RSA PublicKey Encryption 1976 Proposed by Diffie and
RSA Public-Key Encryption • 1976 - Proposed by Diffie and Hellman – Relies on difficulty of computing discrete logarithms (solve ax = b mod n for x) • 1977 - RSA algorithm developed by Rivest, Shamir, and Adleman – Relies on difficulty of factoring large numbers
• Primes: • 1, 2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, 41…. • Factoring: 3 x 17 = 51 11 x 17 = 187 13 x 19 = 247 31 x 29 = 899 This way is easy
• How about 377 = ? x ? 1189 = ? x ? 1363 = ? x ? 756851 = 863 x 877 This way is harder. • If the number is getting bigger, it becomes even harder.
• One-way function f(x) is easy to compute but hard to invert.
• 1094173864157052742180970732204035 7612003732945449059909138421314763 4998428893478471799725789126733249 7625752899781833797076537244027146 743531593354333897 = ? x? • 1026395928297411057720541965739916 7590071656780803066803341933521790 711307779 * 1066034883801684548209272203600128 7867920795857598929152227060823719 3062808643.
The RSA Algorithm • • • Select two primes p and q Calculate n = p x q Calculate f(n) = (p-1)(q-1) Select e such that 1 < e < f(n) and gcd(f(n), e) = 1 (there are many choices) Find d which is the inverse of e modulo f(n): d=e-1 (mod f(n) ) or (d)(e)/f(n) = k(some number) with 1 remaining (The students can manually try multiple numbers to find the one which satisfies the above condition)
How does the cipher work? Public key pair KU = {e, n} Private key pair KR = {d, n} M – the original text (Plaintext). Use public key to encrypt the plain text M into cipher text C= Me (mod n) Use private key to decrypt ciphertext to plaintext Cd (mod n) = M
• The RSA system is currently used in a wide variety of products, platforms, and industries around the world. • It is found in many commercial software products and is planned to be in many more.
• 1994 - RSA 129 (426 -bit key) cracked by 1600 networked computers • 1999 - RSA 140 (465 -bit key) cracked by 185 networked computers in 8. 9 CPU-years • 1999 – RSA 155 (512 -bit key) cracked by 300 networked computers • Recently, industry uses 2014 -bit keys
RSA Algorithm Example • • Choose p = 3 and q = 11 Compute n = p * q = 3 * 11 = 33 Compute φ(n) = (p - 1) * (q - 1) = 2 * 10 = 20 Choose e such that 1 < e < φ(n) and e and n are co-prime. Let e = 7 (many other choices which you can use) • Compute a value for d such that (d * e) % φ(n) = 1. One solution is d = 3 because [(3 * 7) % 20 = 1] (students can find other numbers which satisfies this condition) • Public key is (e, n) => (7, 33) • Private key is (d, n) => (3, 33) Suppose the plaintext m =2 • The encryption process of m =2 - get the cipher c = 27 % 33 = 29 • The decryption of cipher c = 29 is 293 % 33 = 2 -- we get the plaintext (this converts cipher into plaintext)
- Slides: 10