Modular Arithmetic Warmup
Computing powers What is 3 2 (mod 7)? 3 2 = 9 = 2 (mod 7) What is 3 25 (mod 7)? 3 25 = (3 12 ) 2 × = (3 6 ) = (3 3 ) = 3 2 ×3 = 2×3 = 6 (mod 7) 3 6 = 6 2 = 1 (mod 7) 3 12 = 1 2 = 1 (mod 7) 3 25 = 1 2 × 3 = 3 (mod 7)
Discrete Logarithms So 25 is a base-7 discrete logarithm of 3 since 3 25 = 3 (mod 7) What is log ? Easy using Wolfram alpha: –log b a = log a/log b But what is a discrete base 123 log of 1 (mod 7)? 57 is an answer since = ×7+1 But how would you ever know? And if the base and the modulus get bigger ….