Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
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. L13 1 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: L13 1. 2. 3. 4. 5. 6. 31 mod 7 = 3 32 mod 7 = 2 33 mod 7 = 6 34 mod 7 = 4 35 mod 7 = 5 36 mod 7 = 1 7. 37 mod 7 = 3 8. 38 mod 7 = 2 9. 39 mod 7 = 6 10.310 mod 7 = 4 11.311 mod 7 = 5 12.312 mod 7 = 1 2 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: 1. 2. 3. 4. 5. 6. L13 31 mod 7 = 3 32 mod 7 = 2 33 mod 7 = 6 34 mod 7 = 4 35 mod 7 = 5 36 mod 7 = 1 7. 8. 9. 10. 11. 12. 37 mod 7 = 3 38 mod 7 = 2 39 mod 7 = 6 310 mod 7 = 4 311 mod 7 = 5 312 mod 7 = 1 3 Fermat’s Little Theorem THM (FLT): 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 9100 mod 17: p =17, so p-1 = 16. 100 = 6·16+4. Therefore, 9100=96·16+4=(916)6(9)4 . So mod 17 we have 9100 (916)6(9)4 (mod 17) (1)6(9)4 (mod 17) (81)2 (mod 17) (-4)2 (mod 17) 16 L13 4 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, FLT implies: ade a1+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. • L13 5 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. L13 6