SLIDE 1
RSA and Fermat. RSA: Key Generation: (Alice) Primes: p , q . N = pq - - PowerPoint PPT Presentation
RSA and Fermat. RSA: Key Generation: (Alice) Primes: p , q . N = pq - - PowerPoint PPT Presentation
RSA and Fermat. RSA: Key Generation: (Alice) Primes: p , q . N = pq . Encryption Key: e , where gcd ( e , ( p 1 )( q 1 ))) = 1 Decryption Key: d = e 1 ( mod ( p 1 )( q 1 )) Message: m Encryption (Bob): y = E ( m ) = m e ( mod
SLIDE 2
SLIDE 3
RSA and Fermat.
RSA: Key Generation: (Alice) Primes: p, q. N = pq. Encryption Key: e, where gcd(e,(p −1)(q −1))) = 1 Decryption Key: d = e−1 (mod (p −1)(q −1)) Message: m Encryption (Bob): y = E(m) = me (mod N). Decryption (Alice): D(y) = yd (mod N). Result: med (mod N) Want D(E(x)) = x Thm: xed = x (mod N)
SLIDE 4
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1))
SLIDE 5
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic!
SLIDE 6
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p),
SLIDE 7
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p).
SLIDE 8
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)?
SLIDE 9
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1.
SLIDE 10
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)?
SLIDE 11
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3.
SLIDE 12
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)?
SLIDE 13
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)?
SLIDE 14
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)?
SLIDE 15
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3.
SLIDE 16
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p)
SLIDE 17
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back
SLIDE 18
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1).
SLIDE 19
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)).
SLIDE 20
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)). Proof of Corollary. If a = 0, ak(p−1)+1 = 0 (mod m).
SLIDE 21
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)). Proof of Corollary. If a = 0, ak(p−1)+1 = 0 (mod m). Otherwise
SLIDE 22
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)). Proof of Corollary. If a = 0, ak(p−1)+1 = 0 (mod m). Otherwise a1+k(p−1) ≡
SLIDE 23
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)). Proof of Corollary. If a = 0, ak(p−1)+1 = 0 (mod m). Otherwise a1+k(p−1) ≡ a1 ∗(ap−1)k
SLIDE 24
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)). Proof of Corollary. If a = 0, ak(p−1)+1 = 0 (mod m). Otherwise a1+k(p−1) ≡ a1 ∗(ap−1)k ≡ a∗(1)b ≡ a (mod p)
SLIDE 25
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)). Proof of Corollary. If a = 0, ak(p−1)+1 = 0 (mod m). Otherwise a1+k(p−1) ≡ a1 ∗(ap−1)k ≡ a∗(1)b ≡ a (mod p)
SLIDE 26
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)). Proof of Corollary. If a = 0, ak(p−1)+1 = 0 (mod m). Otherwise a1+k(p−1) ≡ a1 ∗(ap−1)k ≡ a∗(1)b ≡ a (mod p) Idea: Fermat removes the k(p −1) from the exponent!
SLIDE 27
RSA and Fermat: mathematical connection
Thm: med = m (mod pq) if ed = 1 (mod (p −1)(q −1)) Seems like magic! Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). 36 (mod 7)? 1. 37 (mod 7)? 3. 319 (mod 7)? 33∗6+1 (mod 7)? (33∗6 ∗3) (mod 7)? 3. Corollary: ak(p−1)+1 = a (mod p) Get a back when exponent is 1 (mod p −1). A little like RSA: aed (mod (p −1)(q −1)) is a when exponent is 1 (mod (p −1)(q −1)). Proof of Corollary. If a = 0, ak(p−1)+1 = 0 (mod m). Otherwise a1+k(p−1) ≡ a1 ∗(ap−1)k ≡ a∗(1)b ≡ a (mod p) Idea: Fermat removes the k(p −1) from the exponent!
SLIDE 28
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p)
SLIDE 29
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq)
SLIDE 30
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q.
SLIDE 31
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q)
SLIDE 32
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q) x1+k(q−1)(p−1) −x ≡ 0 mod (q) = ⇒ multiple of q.
SLIDE 33
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q) x1+k(q−1)(p−1) −x ≡ 0 mod (q) = ⇒ multiple of q. Let a = x, b = k(q −1) and apply Lemma 1 with modulus p.
SLIDE 34
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q) x1+k(q−1)(p−1) −x ≡ 0 mod (q) = ⇒ multiple of q. Let a = x, b = k(q −1) and apply Lemma 1 with modulus p. x1+k(p−1)(q−1) ≡ x (mod p)
SLIDE 35
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q) x1+k(q−1)(p−1) −x ≡ 0 mod (q) = ⇒ multiple of q. Let a = x, b = k(q −1) and apply Lemma 1 with modulus p. x1+k(p−1)(q−1) ≡ x (mod p) x1+k(q−1)(p−1) −x ≡ 0 mod (p) = ⇒ multiple of p.
SLIDE 36
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q) x1+k(q−1)(p−1) −x ≡ 0 mod (q) = ⇒ multiple of q. Let a = x, b = k(q −1) and apply Lemma 1 with modulus p. x1+k(p−1)(q−1) ≡ x (mod p) x1+k(q−1)(p−1) −x ≡ 0 mod (p) = ⇒ multiple of p. x1+k(q−1)(p−1) −x is multiple of p and q.
SLIDE 37
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q) x1+k(q−1)(p−1) −x ≡ 0 mod (q) = ⇒ multiple of q. Let a = x, b = k(q −1) and apply Lemma 1 with modulus p. x1+k(p−1)(q−1) ≡ x (mod p) x1+k(q−1)(p−1) −x ≡ 0 mod (p) = ⇒ multiple of p. x1+k(q−1)(p−1) −x is multiple of p and q. x1+k(q−1)(p−1) −x ≡ 0 mod (pq)
SLIDE 38
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q) x1+k(q−1)(p−1) −x ≡ 0 mod (q) = ⇒ multiple of q. Let a = x, b = k(q −1) and apply Lemma 1 with modulus p. x1+k(p−1)(q−1) ≡ x (mod p) x1+k(q−1)(p−1) −x ≡ 0 mod (p) = ⇒ multiple of p. x1+k(q−1)(p−1) −x is multiple of p and q. x1+k(q−1)(p−1) −x ≡ 0 mod (pq) = ⇒ x1+k(q−1)(p−1) = x mod pq.
SLIDE 39
Correctness of RSA...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Let a = x, b = k(p −1) and apply Lemma 1 with modulus q. x1+k(p−1)(q−1) ≡ x (mod q) x1+k(q−1)(p−1) −x ≡ 0 mod (q) = ⇒ multiple of q. Let a = x, b = k(q −1) and apply Lemma 1 with modulus p. x1+k(p−1)(q−1) ≡ x (mod p) x1+k(q−1)(p−1) −x ≡ 0 mod (p) = ⇒ multiple of p. x1+k(q−1)(p−1) −x is multiple of p and q. x1+k(q−1)(p−1) −x ≡ 0 mod (pq) = ⇒ x1+k(q−1)(p−1) = x mod pq.
SLIDE 40
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq)
SLIDE 41
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Theorem: RSA correctly decodes!
SLIDE 42
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Theorem: RSA correctly decodes! Recall D(E(x)) = (xe)d
SLIDE 43
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Theorem: RSA correctly decodes! Recall D(E(x)) = (xe)d = xed (mod pq),
SLIDE 44
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Theorem: RSA correctly decodes! Recall D(E(x)) = (xe)d = xed (mod pq), where ed ≡ 1 mod (p −1)(q −1) = ⇒ ed = 1+k(p −1)(q −1)
SLIDE 45
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Theorem: RSA correctly decodes! Recall D(E(x)) = (xe)d = xed (mod pq), where ed ≡ 1 mod (p −1)(q −1) = ⇒ ed = 1+k(p −1)(q −1) xed ≡
SLIDE 46
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Theorem: RSA correctly decodes! Recall D(E(x)) = (xe)d = xed (mod pq), where ed ≡ 1 mod (p −1)(q −1) = ⇒ ed = 1+k(p −1)(q −1) xed ≡ xk(p−1)(q−1)+1
SLIDE 47
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Theorem: RSA correctly decodes! Recall D(E(x)) = (xe)d = xed (mod pq), where ed ≡ 1 mod (p −1)(q −1) = ⇒ ed = 1+k(p −1)(q −1) xed ≡ xk(p−1)(q−1)+1 ≡ x (mod pq).
SLIDE 48
RSA decodes correctly..
Lemma 2: For any two different primes p,q and any x,k, x1+k(p−1)(q−1) ≡ x (mod pq) Theorem: RSA correctly decodes! Recall D(E(x)) = (xe)d = xed ≡ x (mod pq), where ed ≡ 1 mod (p −1)(q −1) = ⇒ ed = 1+k(p −1)(q −1) xed ≡ xk(p−1)(q−1)+1 ≡ x (mod pq).
SLIDE 49
Key Generation...
- 1. Find large (100 digit) primes p and q?
SLIDE 50
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN.
SLIDE 51
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime.
SLIDE 52
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime. (How do you tell if it is prime?
SLIDE 53
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime. (How do you tell if it is prime? ... cs170..
SLIDE 54
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime. (How do you tell if it is prime? ... cs170..Miller-Rabin test..
SLIDE 55
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime. (How do you tell if it is prime? ... cs170..Miller-Rabin test.. Primes in P).
SLIDE 56
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime. (How do you tell if it is prime? ... cs170..Miller-Rabin test.. Primes in P).
- 2. Choose e with gcd(e,(p −1)(q −1)) = 1.
SLIDE 57
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime. (How do you tell if it is prime? ... cs170..Miller-Rabin test.. Primes in P).
- 2. Choose e with gcd(e,(p −1)(q −1)) = 1.
Use gcd algorithm to test.
- 3. Find inverse d of e modulo (p −1)(q −1).
SLIDE 58
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime. (How do you tell if it is prime? ... cs170..Miller-Rabin test.. Primes in P).
- 2. Choose e with gcd(e,(p −1)(q −1)) = 1.
Use gcd algorithm to test.
- 3. Find inverse d of e modulo (p −1)(q −1).
Use extended gcd algorithm.
SLIDE 59
Key Generation...
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) denotes the number of primes less than or equal to N. For all N ≥ 17 π(N) ≥ N/lnN. Choosing randomly gives approximately 1/(lnN) chance of number being a prime. (How do you tell if it is prime? ... cs170..Miller-Rabin test.. Primes in P).
- 2. Choose e with gcd(e,(p −1)(q −1)) = 1.
Use gcd algorithm to test.
- 3. Find inverse d of e modulo (p −1)(q −1).
Use extended gcd algorithm. All steps are polynomial in O(logN), the number of bits.
SLIDE 60
Security of RSA.
SLIDE 61
Security of RSA.
Security?
- 1. Alice knows p and q (and d, and other numbers).
- 2. Bob only knows, N(= pq), and e.
SLIDE 62
Security of RSA.
Security?
- 1. Alice knows p and q (and d, and other numbers).
- 2. Bob only knows, N(= pq), and e.
Does not know, for example, d or factorization of N.
SLIDE 63
Security of RSA.
Security?
- 1. Alice knows p and q (and d, and other numbers).
- 2. Bob only knows, N(= pq), and e.
Does not know, for example, d or factorization of N.
- 3. Breaking this scheme =
⇒ factoring N.
SLIDE 64
Security of RSA.
Security?
- 1. Alice knows p and q (and d, and other numbers).
- 2. Bob only knows, N(= pq), and e.
Does not know, for example, d or factorization of N.
- 3. Breaking this scheme =
⇒ factoring N. Don’t know how to factor N efficiently on regular computers.
SLIDE 65
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice,
SLIDE 66
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.)
SLIDE 67
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.) Eve can send same credit card number again!!
SLIDE 68
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.) Eve can send same credit card number again!! “Replay attack”
SLIDE 69
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.) Eve can send same credit card number again!! “Replay attack” The protocols are built on RSA but more complicated; For example, several rounds of challenge/response.
SLIDE 70
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.) Eve can send same credit card number again!! “Replay attack” The protocols are built on RSA but more complicated; For example, several rounds of challenge/response. One trick: Bob encodes credit card number, c,
SLIDE 71
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.) Eve can send same credit card number again!! “Replay attack” The protocols are built on RSA but more complicated; For example, several rounds of challenge/response. One trick: Bob encodes credit card number, c,
SLIDE 72
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.) Eve can send same credit card number again!! “Replay attack” The protocols are built on RSA but more complicated; For example, several rounds of challenge/response. One trick: Bob encodes credit card number, c, concatenated with random k-bit number r.
SLIDE 73
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.) Eve can send same credit card number again!! “Replay attack” The protocols are built on RSA but more complicated; For example, several rounds of challenge/response. One trick: Bob encodes credit card number, c, concatenated with random k-bit number r. Never sends just c.
SLIDE 74
Much more to it in practice!
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. (The encrypted CC number.) Eve can send same credit card number again!! “Replay attack” The protocols are built on RSA but more complicated; For example, several rounds of challenge/response. One trick: Bob encodes credit card number, c, concatenated with random k-bit number r. Never sends just c. Again, more work to do to get entire system.
SLIDE 75