{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

L03_publickeycrypto

# Recognized rsa algorithm ron rivest adi shamir len

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: recognized as the founders of Public Key Cryptography. recognized RSA Algorithm Ron Rivest, Adi Shamir, Len Adleman – found the functions and published the results in 1978: D[E[m]] = m = E[D[m]] Most widely accepted and implemented approach to Most widely public key encryption public Block cipher where m = plaintext ; and c =ciphertext are integers, between 0 <= m , c <= n-1 for some n n-1 This is the E[ ] Following form: 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 ub p K riv p RSA: Encryption, decryption 0. Given (n,e) and (n,d) as computed above 1. To encrypt bit pattern, m, compute e c = m e mod n (i.e., remainder when m is divided by n) 2. To decrypt received bit pattern, c, compute d m = c d mod n (i.e., remainder when c is divided by n) Magic d m = (m e mod n) 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 929= 4710128697246……… Use the following property to compute : 929 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 d m = (m e mod n) 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 = med mod 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 infeasible and K (K (m)) = m = K (K (m)) priv pub pub priv use private key use public key first, followed first, fol...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online