04 publickeycrypto

E it is computationally infeasible to derive d by

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: is known to the public can E( is i.e. it is computationally infeasible to derive D( ) by knowing E( ) D( b y E( Instead, they were able to find a way for communication parties to establish Instead, a shared secret via open communications only => This is the Diffie-Hellman Key exchange algorithm The Beginning of Public Key Cryptography in “public” world (cont’d) Diffie and Hellman published their ideas and findings in “New Diffie Directions in Cryptography” Nov ’76, together with the open problem of realizing PKC Ron Rivest saw Diffie and Hellman’s paper and was intrigued by it. Ron He enlisted the help of Shamir and Adleman, all from MIT, to work on the open problem and came up with the solution in 1977 --- this is the RSA algorithm Diffie, Hellman, Merkle, Rivest, Shamir, Adleman were commonly Diffie recognized as the founders of Public Key Cryptography. RSA Algorithm Ron Rivest, Adi Shamir, Len Adleman – found the Ron functions and published the results in 1978: D[E[m]] = m = E[D[m]] D[E[m Most widely accepted and implemented approach to Most public key encryption Block cipher where m = plaintext ; and c =ciphertext Block plaintext are integers, between 0 <= m , c <= n-1 for some n <= <= for This is the E[ ] Following form: Following This is the D[ ] c = me mod n mod m = cd mod n mod Public key is (n,e). Private key is (n,d). RSA: Choosing keys 1. Choose two large prime numbers p, q. (e.g., 1024 bits each) 2. Compute n = pq, z = (p-1)(q-1) 3. Choose e (with e<n) that has no common factors with z. (e, z are “relatively prime”). 4. Choose d such that ed-1 is exactly divisible by z. (in other words: ed –1 = K * z for some integer K , i.e. , ed = K * z + 1, in other words: If ed is divided by z, the remainder is equal to 1, i.e., ed mod z = 1 ). 5. Public key is (n,e). Private key is (n,d). K pub K priv RSA: Encryption, decryption 0. Given (n,e) and (n,d) as computed above 1. To encrypt bit pattern, m, compute e mod n (i.e., remainder when m e is divided by n) c=m 2. To decrypt received bit pattern, c, compute d m = c d mod n (i.e., remainder when c is divided by n) Magic m = (m e mod n) d mod n happens! c RSA example: Bob chooses p=5, q=7. Then n=5*7 =35, z=(5-1)*(7-1) =24 e=5 (so e, z relatively prime). d=29 (so ed-1 = 5*29 – 1 =144 which is exactly divisible by z.) encrypt: decrypt: letter m me D 4 1024 = 29 * 35 + 9 c 9 d c c = me mod n 9 m = cd mod n letter 4 D 29 929= 4710128697246……… Use the following property to compute : 9 mod 35 (a * b) mod n = [(a mod n) * (b mod n)] mod n, i.e. 929 mod 35 = 910+10+9 mod 35 = [(910 mod 35) * (910 mod 35) * (99 mod 35) ] mod 35 = (16 * 16 * 29) mod 35 = 4 m = (m e mod n) d mod n RSA: Why is that Useful number theory result: If p,q prime and n = pq, then: y y mod (p-1)(q-1) x mod n = x mod n e (m mod n) d mod n = medmod n =m ed mod (p-1)(q-1) mod n (using number theory result above) 1 = m mod n (since we chose ed to be divisible by (p-1)(q-1) with remainder 1 ) = m (since m < n, thus m mod n = m) RSA: Important properties It is infeasible to determine d given e and n given and and K (K (m)) = m = K (K (m)) priv pub pub priv use public key first, followed by private key use private ke...
View Full Document

Ask a homework question - tutors are online