Public Encryption: RSA

Presentation on theme: "Public Encryption: RSA"— Presentation transcript:

Public Encryption: RSA
Jerzy Wojdyło Department of Mathematics Southeast Missouri State University

Symmetric Cryptosystem
A symmetric cryptosystem is a five-tuple (P,C,K,E,D), where the following are satisfied: P is a finite set of possible plaintexts. C is a finite set of possible ciphertexts. K, the key space, is a finite set of possible keys KK, EKE (encryption rule), DKD (decryption rule). Each EK: PC and DK: CP are functions such that xP, DK(EK(x)) = x. (the same key in encryption and decryption) RSA, Jerzy Wojdylo, 9/21/01

Asymmetric Cryptosystem
One key for encryption (public key) DIFFERENT key for decryption (private key) Decryption key CANNOT be deduced from the encryption key RSA, Jerzy Wojdylo, 9/21/01

Pierre de Fermat (1601-1665) Fermat’s Little Theorem
Let p be prime, a  Z+, not a multiple of p. Then a p-1  1 (mod p). RSA, Jerzy Wojdylo, 9/21/01

Leonard Euler (1707 – 1783) Euler’s “phi” function : Z + Z +
nZ+, (n) = |{z[1,n]: gcd(z, n) = 1}| . Examples: (2) = 1, (6) = 2, (7) = 6, (30) = 8 RSA, Jerzy Wojdylo, 9/21/01

Leonard Euler (1707 – 1783) Properties of the function :
If p is a prime, then (p) = p – 1. If p is a prime and kZ+, then (pk) = pk – pk-1. a, bZ+, if gcd(a, b) = 1, then (ab) = (a)(b). RSA, Jerzy Wojdylo, 9/21/01

Leonard Euler (1707 – 1783) Euler’s Theorem
a, nZ+, if gcd(a, n)=1 then a (n) 1 (mod n). Fermat’s Little Theorem Let p be prime, aZ+, a not a multiple of p. Then a p-1  1 (mod p). RSA, Jerzy Wojdylo, 9/21/01

RSA (public key encryption)
Ron Rivest, Adi Shamir, Leonard Adleman, “A Method for Obtaining Digital Signatures and Public Key Cryptosystems”, Communications of the ACM, Vol. 21, no. 2, February 1978, REVOLUTION! RSA cipher, RSA Security, RSA, Jerzy Wojdylo, 9/21/01

RSA (public key encryption)
Alice wants Bob to send her a message. She: selects two (large) primes p, q, TOP SECRET, computes n = pq and (n) = (p-1)(q-1), (n) also TOP SECRET, selects an integer e, 1 < e < (n), such that gcd(e, (n)) = 1, computes d, such that ed  1 (mod (n)), d also TOP SECRET, gives public key (e, n), keeps private key (d, n). RSA, Jerzy Wojdylo, 9/21/01

RSA (public key encryption)
RSA in action Bob wants to send plaintext P, 0 < P < n. Encryption: E(e, n)(P) = C = Pe (mod n). Bob sends ciphertext C. Alice receives C. Decryption: D(d, n)(C) = Cd (mod n) = P (ha!) RSA, Jerzy Wojdylo, 9/21/01

RSA (public key encryption)
Does it work? Yes! D(d, n)(C) = D(d, n)(P e) = (P e)d = P ed = = P k(n) +1 = ed  1 (mod (n)) = (P (n))k P   P (mod n). Euler’s Theorem a (n) 1 (mod n). RSA, Jerzy Wojdylo, 9/21/01

RSA (public key encryption)
Example: p = 997, q = 991, n = , (n) = , e = 13, d = P = RSA = Encryption: E(e, n)(P) = C = Pe (mod n) = = (mod ) = Decryption: D(d, n)(C) = Cd (mod n) = = (mod ) = RSA, Jerzy Wojdylo, 9/21/01

RSA (public key encryption)
Is it secure? Yes, if p and q are large primes (over 150 decimal digits each). Factoring is a HARD problem, no known polynomial time algorithm. RSA is much slower than DES or AES. RSA, Jerzy Wojdylo, 9/21/01

RSA (public key encryption)
Alice’s Signature Alice encrypts her signature S using her private key: E(d, n)(S) = T = Sd (mod n) and sends T to Bob. Bob decrypts T using Alice’s public key to authenticate her message: D(d, n)(T) = Td (mod n) = S. RSA, Jerzy Wojdylo, 9/21/01

The End Public Encryption: RSA