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
public key encryption
public Block cipher where m = plaintext ; and c =ciphertext
are integers, between 0 <= m , c <= n-1 for some n
This is the E[ ] Following form:
This is the D[ ]
c = me mod n
m = cd mod n
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).
p K riv
p RSA: Encryption, decryption
0. Given (n,e) and (n,d) as computed above
1. To encrypt bit pattern, m, compute
c = m e mod n (i.e., remainder when m is divided by n)
2. To decrypt received bit pattern, c, compute
m = c d mod n (i.e., remainder when c is divided by n)
m = (m e mod n) mod n
c RSA example:
Bob chooses p=5, q=7. Then n=5*7 =35,
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
c c = me mod n
m = cd mod n letter
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 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
K (K (m)) = m = K (K (m))
priv pub pub priv use private key
use public key
View Full Document
- Fall '13
- Cryptography, Public-key cryptography