L131 Exponential Inverses Finding modular inverses is good enough for decoding simple modular cryptography. However, in RSA encryption consists of exponentiating modulo N, i.e. m e mod N. We want to find a different exponent d based on e and N which will give us back m, i.e. we want m de mod N =m. In other words, we want an exponential inverse for e modulo N.
L132 Exponential Inverses. Prime Modulii To tackle the general problem, start first with the case of N a prime number. Exponentiation modulo a prime number is well understood. EG: Consider exponentiating 3 modulo 7: mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = 1
L133 Exponential Inverses. Prime Modulii Exponentiating to the p -1 power results in 1. Therefore, any further exponentiation results in a cycling, with repetitions occurring every 6 exponentiations. Fermat’s Little Theorem says that this effect happens for all rel-prime numbers under prime modulus: mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = mod 7 = 1
L134 Fermat’s Little Theorem THM (F L T): Suppose that p is a prime number. If a is not divisible by p then a p 1 1 (mod p). Furthermore, all numbers satisfy a p a (mod p). EG: Compute mod 17: p =17, so p-1 = = 6·16+4. Therefore, =9 6·16+4 =(9 16 ) 6 (9) 4. So mod 17 we have (9 16 ) 6 (9) 4 (mod 17) (1) 6 (9) 4 (mod 17) (81) 2 (mod 17) (-4) 2 (mod 17) 16
L135 Exponential Inverses. Prime Modulii COR: If e is relatively prime to p –1, where p is prime, then its exponential inverse modulo p exists and is the inverse of d modulo p-1. Proof. Supposing de 1 (mod p-1). Then for some k, de = 1+k (p-1). So if a is any number not divisible by p, F L T implies: a de a 1+k(p-1) (mod p) a (mod p) In other words, exponentiating by de doesn’t change numbers, modulo p, so by definition, d and e are exponential inverses.
L136 Exponential Inverses. Prime Modulii EG: Find the exponential inverse of 3 modulo 11. p =11, so p-1 = 10. The inverse of 3 modulo 10 is 7, which is the answer.