SLIDE 1 CS70: Lecture 11. Outline.
- 1. RSA system (continued)
1.1 Correctness: Fermat’s Theorem. 1.2 Construction.
- 2. Signature Schemes.
- 3. Warnings.
SLIDE 2
Bijections
Bijection is one to one and onto. Bijection:
SLIDE 3
Bijections
Bijection is one to one and onto. Bijection: f : A → B.
SLIDE 4
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B.
SLIDE 5
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range.
SLIDE 6
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x).
SLIDE 7
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals.
SLIDE 8
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1].
SLIDE 9
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1].
SLIDE 10
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one.
SLIDE 11
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0.
SLIDE 12
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto.
SLIDE 13
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m.
SLIDE 14
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}.
SLIDE 15
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}.
SLIDE 16
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}. Note: Why? Inverse if and only if f(·) one to one.
SLIDE 17
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}. Note: Why? Inverse if and only if f(·) one to one. Same size.
SLIDE 18
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}. Note: Why? Inverse if and only if f(·) one to one. Same size. When is it a bijection?
SLIDE 19
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}. Note: Why? Inverse if and only if f(·) one to one. Same size. When is it a bijection? When gcd(a,m) is ....
SLIDE 20
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}. Note: Why? Inverse if and only if f(·) one to one. Same size. When is it a bijection? When gcd(a,m) is ....?
SLIDE 21
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}. Note: Why? Inverse if and only if f(·) one to one. Same size. When is it a bijection? When gcd(a,m) is ....? ... 1.
SLIDE 22
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}. Note: Why? Inverse if and only if f(·) one to one. Same size. When is it a bijection? When gcd(a,m) is ....? ... 1. Not Example: a = 2, m = 4,
SLIDE 23
Bijections
Bijection is one to one and onto. Bijection: f : A → B. Domain: A, Co-Domain: B. Versus Range. E.g. sin (x). A = B = reals. Range is [−1,1]. Onto: [−1,1]. Not one-to-one. sin (π) = sin (0) = 0. Range Definition always is onto. Consider f(x) = ax mod m. f : {0,...,m −1} → {0,...,m −1}. Domain/Co-Domain: {0,...,m −1}. Note: Why? Inverse if and only if f(·) one to one. Same size. When is it a bijection? When gcd(a,m) is ....? ... 1. Not Example: a = 2, m = 4, f(0) = f(2) = 0 (mod 4).
SLIDE 24
Isomorphisms.
Bijection:
SLIDE 25
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1.
SLIDE 26
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem:
SLIDE 27
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1.
SLIDE 28
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n.
SLIDE 29
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45).
SLIDE 30
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45).
SLIDE 31
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45). Now consider:
SLIDE 32
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45). Now consider: (a,b)+(a′,b′) = (0,2).
SLIDE 33
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45). Now consider: (a,b)+(a′,b′) = (0,2). What is x where x = 0 (mod 5) and x = 2 (mod 9)?
SLIDE 34
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45). Now consider: (a,b)+(a′,b′) = (0,2). What is x where x = 0 (mod 5) and x = 2 (mod 9)? Try 43+22 = 65
SLIDE 35
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45). Now consider: (a,b)+(a′,b′) = (0,2). What is x where x = 0 (mod 5) and x = 2 (mod 9)? Try 43+22 = 65 = 20 (mod 45).
SLIDE 36
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45). Now consider: (a,b)+(a′,b′) = (0,2). What is x where x = 0 (mod 5) and x = 2 (mod 9)? Try 43+22 = 65 = 20 (mod 45). Isomorphism:
SLIDE 37
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45). Now consider: (a,b)+(a′,b′) = (0,2). What is x where x = 0 (mod 5) and x = 2 (mod 9)? Try 43+22 = 65 = 20 (mod 45). Isomorphism: the actions under (mod 5), (mod 9)
SLIDE 38
Isomorphisms.
Bijection: f(x) = ax (mod m) if gcd(a,m) = 1. Simplified Chinese Remainder Theorem: There is a unique x (mod mn) where x = a (mod m) and x = b (mod n) and gcd(n,m) = 1. Bijection between (a (mod n),b (mod m)) and x (mod m)n. Consider m = 5, n = 9, then if (a,b) = (3,7) then x = 43 (mod 45). Consider (a′,b′) = (2,4), then x = 22 (mod 45). Now consider: (a,b)+(a′,b′) = (0,2). What is x where x = 0 (mod 5) and x = 2 (mod 9)? Try 43+22 = 65 = 20 (mod 45). Isomorphism: the actions under (mod 5), (mod 9) correspond to actions in (mod 45)!
SLIDE 39
Public key crypography.
Bob Alice Eve
SLIDE 40
Public key crypography.
Bob Alice Eve Public: K
SLIDE 41
Public key crypography.
Bob Alice Eve Public: K Private: k
SLIDE 42
Public key crypography.
Bob Alice Eve Public: K Private: k Message m
SLIDE 43
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K)
SLIDE 44
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K)
SLIDE 45
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k)
SLIDE 46
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k) Everyone knows key K!
SLIDE 47
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k) Everyone knows key K! Bob (and Eve
SLIDE 48
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k) Everyone knows key K! Bob (and Eve and me
SLIDE 49
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k) Everyone knows key K! Bob (and Eve and me and you
SLIDE 50
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k) Everyone knows key K! Bob (and Eve and me and you and you ...) can encode.
SLIDE 51
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k) Everyone knows key K! Bob (and Eve and me and you and you ...) can encode. Only Alice knows the secret key k for public key K.
SLIDE 52
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k) Everyone knows key K! Bob (and Eve and me and you and you ...) can encode. Only Alice knows the secret key k for public key K. (Only?) Alice can decode with k.
SLIDE 53
Public key crypography.
Bob Alice Eve Public: K Private: k Message m E(m,K) m = D(E(m,K),k) Everyone knows key K! Bob (and Eve and me and you and you ...) can encode. Only Alice knows the secret key k for public key K. (Only?) Alice can decode with k. Is this even possible?
SLIDE 54 Is public key crypto possible?
1Typically small, say e = 3.
SLIDE 55 Is public key crypto possible?
We don’t really know.
1Typically small, say e = 3.
SLIDE 56 Is public key crypto possible?
We don’t really know. ...but we do it every day!!!
1Typically small, say e = 3.
SLIDE 57 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman)
1Typically small, say e = 3.
SLIDE 58 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman) Pick two large primes p and q. Let N = pq.
1Typically small, say e = 3.
SLIDE 59 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman) Pick two large primes p and q. Let N = pq. Choose e relatively prime to (p −1)(q −1).1
1Typically small, say e = 3.
SLIDE 60 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman) Pick two large primes p and q. Let N = pq. Choose e relatively prime to (p −1)(q −1).1 Compute d = e−1 mod (p −1)(q −1).
1Typically small, say e = 3.
SLIDE 61 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman) Pick two large primes p and q. Let N = pq. Choose e relatively prime to (p −1)(q −1).1 Compute d = e−1 mod (p −1)(q −1). Announce N(= p ·q) and e: K = (N,e) is my public key!
1Typically small, say e = 3.
SLIDE 62 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman) Pick two large primes p and q. Let N = pq. Choose e relatively prime to (p −1)(q −1).1 Compute d = e−1 mod (p −1)(q −1). Announce N(= p ·q) and e: K = (N,e) is my public key! Encoding: mod (xe,N).
1Typically small, say e = 3.
SLIDE 63 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman) Pick two large primes p and q. Let N = pq. Choose e relatively prime to (p −1)(q −1).1 Compute d = e−1 mod (p −1)(q −1). Announce N(= p ·q) and e: K = (N,e) is my public key! Encoding: mod (xe,N). Decoding: mod (yd,N).
1Typically small, say e = 3.
SLIDE 64 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman) Pick two large primes p and q. Let N = pq. Choose e relatively prime to (p −1)(q −1).1 Compute d = e−1 mod (p −1)(q −1). Announce N(= p ·q) and e: K = (N,e) is my public key! Encoding: mod (xe,N). Decoding: mod (yd,N). Does D(E(m)) = med = m mod N?
1Typically small, say e = 3.
SLIDE 65 Is public key crypto possible?
We don’t really know. ...but we do it every day!!! RSA (Rivest, Shamir, and Adleman) Pick two large primes p and q. Let N = pq. Choose e relatively prime to (p −1)(q −1).1 Compute d = e−1 mod (p −1)(q −1). Announce N(= p ·q) and e: K = (N,e) is my public key! Encoding: mod (xe,N). Decoding: mod (yd,N). Does D(E(m)) = med = m mod N? Yes!
1Typically small, say e = 3.
SLIDE 66
RSA is pretty fast.
Modular Exponentiation: xy mod N.
SLIDE 67
RSA is pretty fast.
Modular Exponentiation: xy mod N. All n-bit numbers. O(n3) time.
SLIDE 68
RSA is pretty fast.
Modular Exponentiation: xy mod N. All n-bit numbers. O(n3) time. Remember RSA encoding/decoding!
SLIDE 69
RSA is pretty fast.
Modular Exponentiation: xy mod N. All n-bit numbers. O(n3) time. Remember RSA encoding/decoding! E(m,(N,e)) = me (mod N).
SLIDE 70
RSA is pretty fast.
Modular Exponentiation: xy mod N. All n-bit numbers. O(n3) time. Remember RSA encoding/decoding! E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N).
SLIDE 71
RSA is pretty fast.
Modular Exponentiation: xy mod N. All n-bit numbers. O(n3) time. Remember RSA encoding/decoding! E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N).
SLIDE 72
RSA is pretty fast.
Modular Exponentiation: xy mod N. All n-bit numbers. O(n3) time. Remember RSA encoding/decoding! E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). For 512 bits, a few hundred million operations.
SLIDE 73
RSA is pretty fast.
Modular Exponentiation: xy mod N. All n-bit numbers. O(n3) time. Remember RSA encoding/decoding! E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). For 512 bits, a few hundred million operations. Easy, peasey.
SLIDE 74
Decoding.
E(m,(N,e)) = me (mod N).
SLIDE 75
Decoding.
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N).
SLIDE 76
Decoding.
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N).
SLIDE 77
Decoding.
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq
SLIDE 78
Decoding.
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)).
SLIDE 79
Decoding.
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want:
SLIDE 80
Decoding.
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N).
SLIDE 81
Always decode correctly?
E(m,(N,e)) = me (mod N).
SLIDE 82
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N).
SLIDE 83
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N).
SLIDE 84
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq
SLIDE 85
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)).
SLIDE 86
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want:
SLIDE 87
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N).
SLIDE 88
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view:
SLIDE 89
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1.
SLIDE 90
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider...
SLIDE 91
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider... Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p),
SLIDE 92
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider... Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p).
SLIDE 93
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider... Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). = ⇒ ak(p−1) ≡ 1 (mod p)
SLIDE 94
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider... Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). = ⇒ ak(p−1) ≡ 1 (mod p) = ⇒
SLIDE 95
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider... Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). = ⇒ ak(p−1) ≡ 1 (mod p) = ⇒ ak(p−1)+1
SLIDE 96
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider... Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). = ⇒ ak(p−1) ≡ 1 (mod p) = ⇒ ak(p−1)+1 = a (mod p)
SLIDE 97
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider... Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). = ⇒ ak(p−1) ≡ 1 (mod p) = ⇒ ak(p−1)+1 = a (mod p) versus ak(p−1)(q−1)+1 = a (mod pq).
SLIDE 98
Always decode correctly?
E(m,(N,e)) = me (mod N). D(m,(N,d)) = md (mod N). N = pq and d = e−1 (mod (p −1)(q −1)). Want: (me)d = med = m (mod N). Another view: d = e−1 (mod (p −1)(q −1)) ⇐ ⇒ ed = k(p −1)(q −1)+1. Consider... Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). = ⇒ ak(p−1) ≡ 1 (mod p) = ⇒ ak(p−1)+1 = a (mod p) versus ak(p−1)(q−1)+1 = a (mod pq). Similar, not same, but useful.
SLIDE 99
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p),
SLIDE 100
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p).
SLIDE 101
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof:
SLIDE 102
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}.
SLIDE 103
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p.
SLIDE 104
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p. S contains representative of {1,...,p −1} modulo p.
SLIDE 105
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p. S contains representative of {1,...,p −1} modulo p. (a·1)·(a·2)···(a·(p −1)) ≡ 1·2···(p −1) mod p,
SLIDE 106
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p. S contains representative of {1,...,p −1} modulo p. (a·1)·(a·2)···(a·(p −1)) ≡ 1·2···(p −1) mod p, Since multiplication is commutative.
SLIDE 107
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p. S contains representative of {1,...,p −1} modulo p. (a·1)·(a·2)···(a·(p −1)) ≡ 1·2···(p −1) mod p, Since multiplication is commutative. a(p−1)(1···(p −1)) ≡ (1···(p −1)) mod p.
SLIDE 108
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p. S contains representative of {1,...,p −1} modulo p. (a·1)·(a·2)···(a·(p −1)) ≡ 1·2···(p −1) mod p, Since multiplication is commutative. a(p−1)(1···(p −1)) ≡ (1···(p −1)) mod p. Each of 2,...(p −1) has an inverse modulo p,
SLIDE 109
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p. S contains representative of {1,...,p −1} modulo p. (a·1)·(a·2)···(a·(p −1)) ≡ 1·2···(p −1) mod p, Since multiplication is commutative. a(p−1)(1···(p −1)) ≡ (1···(p −1)) mod p. Each of 2,...(p −1) has an inverse modulo p, solve to get...
SLIDE 110
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p. S contains representative of {1,...,p −1} modulo p. (a·1)·(a·2)···(a·(p −1)) ≡ 1·2···(p −1) mod p, Since multiplication is commutative. a(p−1)(1···(p −1)) ≡ (1···(p −1)) mod p. Each of 2,...(p −1) has an inverse modulo p, solve to get... a(p−1) ≡ 1 mod p.
SLIDE 111
Correct decoding...
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Proof: Consider S = {a·1,...,a·(p −1)}. All different modulo p since a has an inverse modulo p. S contains representative of {1,...,p −1} modulo p. (a·1)·(a·2)···(a·(p −1)) ≡ 1·2···(p −1) mod p, Since multiplication is commutative. a(p−1)(1···(p −1)) ≡ (1···(p −1)) mod p. Each of 2,...(p −1) has an inverse modulo p, solve to get... a(p−1) ≡ 1 mod p.
SLIDE 112
Always decode correctly? (cont.)
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p).
SLIDE 113
Always decode correctly? (cont.)
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Proof:
SLIDE 114
Always decode correctly? (cont.)
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Proof: If a ≡ 0 (mod p), of course.
SLIDE 115
Always decode correctly? (cont.)
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Proof: If a ≡ 0 (mod p), of course. Otherwise a1+b(p−1) ≡
SLIDE 116
Always decode correctly? (cont.)
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Proof: If a ≡ 0 (mod p), of course. Otherwise a1+b(p−1) ≡ a1 ∗(ap−1)b
SLIDE 117
Always decode correctly? (cont.)
Fermat’s Little Theorem: For prime p, and a ≡ 0 (mod p), ap−1 ≡ 1 (mod p). Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p) Proof: If a ≡ 0 (mod p), of course. Otherwise a1+b(p−1) ≡ a1 ∗(ap−1)b ≡ a∗(1)b ≡ a (mod p)
SLIDE 118
...Decoding correctness...
Lemma 1: For any prime p and any a,b, a1+b(p−1) ≡ a (mod p)
SLIDE 119
...Decoding correctness...
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 120
...Decoding correctness...
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 121
...Decoding correctness...
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 122
...Decoding correctness...
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) Let a = x, b = k(q −1) and apply Lemma 1 with modulus p.
SLIDE 123
...Decoding correctness...
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) Let a = x, b = k(q −1) and apply Lemma 1 with modulus p. x1+k(p−1)(q−1) ≡ x (mod p)
SLIDE 124
...Decoding correctness...
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) 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 is multiple of p and q. x1+k(q−1)(p−1) −x ≡ 0 mod (pq)
SLIDE 125
...Decoding correctness...
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) 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 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 126
...Decoding correctness...
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) 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 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 127
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 128
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 129
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 130
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 131
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 132
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 133
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 134
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 135
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 136 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
SLIDE 137 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than N.For all N ≥ 17 π(N) ≥ N/lnN.
SLIDE 138 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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 139 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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 140 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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 141 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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 142 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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). For 1024 bit number, 1 in 710 is prime.
SLIDE 143 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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). For 1024 bit number, 1 in 710 is prime.
- 2. Choose e with gcd(e,(p −1)(q −1)) = 1.
SLIDE 144 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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). For 1024 bit number, 1 in 710 is prime.
- 2. Choose e with gcd(e,(p −1)(q −1)) = 1.
Use gcd algorithm to test.
SLIDE 145 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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). For 1024 bit number, 1 in 710 is prime.
- 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 146 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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). For 1024 bit number, 1 in 710 is prime.
- 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 147 Construction of keys.. ..
- 1. Find large (100 digit) primes p and q?
Prime Number Theorem: π(N) number of primes less than 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). For 1024 bit number, 1 in 710 is prime.
- 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 148
Security of RSA.
SLIDE 149 Security of RSA.
Security?
- 1. Alice knows p and q.
- 2. Bob only knows, N(= pq), and e.
SLIDE 150 Security of RSA.
Security?
- 1. Alice knows p and q.
- 2. Bob only knows, N(= pq), and e.
Does not know, for example, d or factorization of N.
SLIDE 151 Security of RSA.
Security?
- 1. Alice knows p and q.
- 2. Bob only knows, N(= pq), and e.
Does not know, for example, d or factorization of N.
- 3. I don’t know how to break this scheme without factoring N.
SLIDE 152 Security of RSA.
Security?
- 1. Alice knows p and q.
- 2. Bob only knows, N(= pq), and e.
Does not know, for example, d or factorization of N.
- 3. I don’t know how to break this scheme without factoring N.
No one I know or have heard of admits to knowing how to factor N.
SLIDE 153 Security of RSA.
Security?
- 1. Alice knows p and q.
- 2. Bob only knows, N(= pq), and e.
Does not know, for example, d or factorization of N.
- 3. I don’t know how to break this scheme without factoring N.
No one I know or have heard of admits to knowing how to factor N. Breaking in general sense = ⇒ factoring algorithm.
SLIDE 154
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice,
SLIDE 155
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it.
SLIDE 156
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. Eve can send credit card again!!
SLIDE 157
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. Eve can send credit card again!! The protocols are built on RSA but more complicated;
SLIDE 158
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. Eve can send credit card again!! The protocols are built on RSA but more complicated; For example, several rounds of challenge/response.
SLIDE 159
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. Eve can send credit card again!! 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 160
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. Eve can send credit card again!! 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 161
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. Eve can send credit card again!! 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 162
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. Eve can send credit card again!! 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 163
Much more to it.....
If Bobs sends a message (Credit Card Number) to Alice, Eve sees it. Eve can send credit card again!! 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. CS161...
SLIDE 164
Signatures using RSA.
Verisign: Browser. Amazon
SLIDE 165
Signatures using RSA.
Verisign: Browser. Amazon Certificate Authority: Verisign, GoDaddy, DigiNotar,...
SLIDE 166
Signatures using RSA.
Verisign: kv, Kv Browser. Amazon Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.)
SLIDE 167 Signatures using RSA.
Verisign: kv, Kv
Amazon Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV.
SLIDE 168 Signatures using RSA.
Verisign: kv, Kv
Amazon Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.”
SLIDE 169 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N.
SLIDE 170 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N.
SLIDE 171 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y]
SLIDE 172 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] C = E(SV(C),kV)? Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y] Checks E(y,KV) = C?
SLIDE 173 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] C = E(SV(C),kV)? Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y] Checks E(y,KV) = C? E(Sv(C),KV)
SLIDE 174 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] C = E(SV(C),kV)? Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y] Checks E(y,KV) = C? E(Sv(C),KV) = (Sv(C))e
SLIDE 175 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] C = E(SV(C),kV)? Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y] Checks E(y,KV) = C? E(Sv(C),KV) = (Sv(C))e = (Cd)e
SLIDE 176 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] C = E(SV(C),kV)? Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y] Checks E(y,KV) = C? E(Sv(C),KV) = (Sv(C))e = (Cd)e = Cde
SLIDE 177 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] C = E(SV(C),kV)? Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y] Checks E(y,KV) = C? E(Sv(C),KV) = (Sv(C))e = (Cd)e = Cde = C (mod N)
SLIDE 178 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] C = E(SV(C),kV)? Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y] Checks E(y,KV) = C? E(Sv(C),KV) = (Sv(C))e = (Cd)e = Cde = C (mod N) Valid signature of Amazon certificate C!
SLIDE 179 Signatures using RSA.
Verisign: kv, Kv
Amazon [C,Sv(C)] [C,Sv(C)] C = E(SV(C),kV)? Certificate Authority: Verisign, GoDaddy, DigiNotar,... Verisign’s key: KV = (N,e) and kV = d (N = pq.) Browser “knows” Verisign’s public key: KV. Amazon Certificate: C = “I am Amazon. My public Key is KA.” Versign signature of C: Sv(C): D(C,kV) = Cd mod N. Browser receives: [C,y] Checks E(y,KV) = C? E(Sv(C),KV) = (Sv(C))e = (Cd)e = Cde = C (mod N) Valid signature of Amazon certificate C! Security: Eve can’t forge unless she “breaks” RSA scheme.
SLIDE 180
RSA
SLIDE 181
RSA
Public Key Cryptography:
SLIDE 182
RSA
Public Key Cryptography: D(E(m,K),k) = (me)d mod N = m.
SLIDE 183
RSA
Public Key Cryptography: D(E(m,K),k) = (me)d mod N = m. Signature scheme:
SLIDE 184
RSA
Public Key Cryptography: D(E(m,K),k) = (me)d mod N = m. Signature scheme: E(D(C,k),K) = (Cd)e mod N = C
SLIDE 185
Other Eve.
SLIDE 186
Other Eve.
Get CA to certify fake certificates: Microsoft Corporation.
SLIDE 187
Other Eve.
Get CA to certify fake certificates: Microsoft Corporation. 2001..Doh.
SLIDE 188
Other Eve.
Get CA to certify fake certificates: Microsoft Corporation. 2001..Doh. ... and August 28, 2011 announcement.
SLIDE 189
Other Eve.
Get CA to certify fake certificates: Microsoft Corporation. 2001..Doh. ... and August 28, 2011 announcement. DigiNotar Certificate issued for Microsoft!!!
SLIDE 190
Other Eve.
Get CA to certify fake certificates: Microsoft Corporation. 2001..Doh. ... and August 28, 2011 announcement. DigiNotar Certificate issued for Microsoft!!! How does Microsoft get a CA to issue certificate to them ...
SLIDE 191
Other Eve.
Get CA to certify fake certificates: Microsoft Corporation. 2001..Doh. ... and August 28, 2011 announcement. DigiNotar Certificate issued for Microsoft!!! How does Microsoft get a CA to issue certificate to them ... and only them?
SLIDE 192
Summary.
Public-Key Encryption.
SLIDE 193
Summary.
Public-Key Encryption. RSA Scheme:
SLIDE 194
Summary.
Public-Key Encryption. RSA Scheme: N = pq and d = e−1 (mod (p −1)(q −1)). E(x) = xe (mod N). D(y) = yd (mod N).
SLIDE 195
Summary.
Public-Key Encryption. RSA Scheme: N = pq and d = e−1 (mod (p −1)(q −1)). E(x) = xe (mod N). D(y) = yd (mod N). Repeated Squaring = ⇒ efficiency.
SLIDE 196
Summary.
Public-Key Encryption. RSA Scheme: N = pq and d = e−1 (mod (p −1)(q −1)). E(x) = xe (mod N). D(y) = yd (mod N). Repeated Squaring = ⇒ efficiency. Fermat’s Theorem = ⇒ correctness.
SLIDE 197
Summary.
Public-Key Encryption. RSA Scheme: N = pq and d = e−1 (mod (p −1)(q −1)). E(x) = xe (mod N). D(y) = yd (mod N). Repeated Squaring = ⇒ efficiency. Fermat’s Theorem = ⇒ correctness. Good for Encryption
SLIDE 198
Summary.
Public-Key Encryption. RSA Scheme: N = pq and d = e−1 (mod (p −1)(q −1)). E(x) = xe (mod N). D(y) = yd (mod N). Repeated Squaring = ⇒ efficiency. Fermat’s Theorem = ⇒ correctness. Good for Encryption and Signature Schemes.