130 likes | 265 Views
Securing Communications…. …a look at public-key cryptography and the RSA algorithm. The Security Problem. In the Information Age… Security/privacy is essential to protect secrecy and integrity of messages Authenticity is crucial to validate messages and prevent forgery. “History” of RSA.
E N D
Securing Communications… …a look at public-key cryptography and the RSA algorithm
The Security Problem In the Information Age… • Security/privacy is essential to protect secrecy and integrity of messages • Authenticity is crucial to validate messages and prevent forgery
“History” of RSA • Developed by Ron Rivest, Adi Shamir, Len Adleman in 1977 at MIT • According to Wikipedia…”apocryphally, it was invented at a Passover seder in New York...” • Patented in 1983 by MIT • Patent expired inSeptember 2000
Number Theory background • Modular arithmetic • Euler’s Totient function • Extended Euclidean Algorithm or greatest common denominator • Exponentiation by Squaring
The RSA concept • In public-key cryptosystems, two keys are used: one public and one private • RSA has these 4 properties: • D(C)=D(E(M))=M • Both E and D are easy to compute • Revealing E does not give away D • E(D(M))=M - for signing messages • Having 1-3 are one-way trap door functions and with 4 they arepermutations
Computing the keys • Choose two very large, random, independent prime numbers, p and q • Find the modulus: n=p*q • Find totient: φ(n)=(p-1)(q-1) • Choose d: 1<d<φ(n) andcoprime to φ(n) • Find e such that e*dΞ1 mod(φ(n)),making e and d multiplicative inverses of each other
Encryption and Decryption • Convert message to numeric values so that m<n • Compute ciphertext c=me mod(n) by exponentiation by squaring • The message can be decrypted so that m=cd mod(n)
My MATLAB code • Pretty simple to implement but numbers in RSA get huge fast • Wrote several simple functions • Important built in functionswere de2bi(), mod(), gcd(),randint(), and primes() • 159 lines of code…with comments and spaces
Cracking RSA • The problem of factoring large numbers • The RSA problem • Timing attack • Chosen plaintext attack • Quantum computing…
RSA factoring challenge • http://en.wikipedia.org/wiki/RSA_Factoring_Challenge • http://www.rsasecurity.com/rsalabs/node.asp?id=2094
Sources… • R.L. Rivest, A. Shamir, and L. Adleman. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. 1977 • Comm Text – Appendix A5 • Wikipedia.com. ‘RSA’