140 likes | 148 Views
Learn about the Three-Pass Protocol for secure messaging without a key. Discover how Alice and Bob can transmit messages securely using locks and prime numbers. Gain insights into the protocol's encryption process and its vulnerabilities. Get ready for a quiz on breaking codes and understand the importance of Fermat's locks in cryptography. Explore a toy example to comprehend the protocol's workings. Stay prepared for the upcoming computer quiz by revising the material from Chapter 2.
E N D
DTTF/NB479: Dszquphsbqiz Day 12 • Announcements: • HW3 updated. Due next Thursday • Written quiz today • Computer quiz next Friday on breaking codes from chapter 2 • Today: • Three-pass protocol • Quiz • Questions?
Wrapping up Fermat and Euler • We skipped the proof of Fermat’s Little Theorem in the text. • Be sure to read it • You are also prepared to read the rest of chapter 3 at your own pace.
Three-pass protocol • How can Alice get a secret message to Bob without an established key? • Can do it with locks. • First 2 volunteers get to do the live demo
Three-pass protocol • Situation: Alice wants to get a short message to Bob, but they don’t have an established key to transmit it. • Can do with locks:
Three-pass protocol • Situation: Alice wants to get a short message to Bob, but they don’t have an established key to transmit it. • Can do with locks:
Three-pass protocol • Situation: Alice wants to get a short message to Bob, but they don’t have an established key to transmit it. • Can do with locks:
Three-pass protocol • Situation: Alice wants to get a short message to Bob, but they don’t have an established key to transmit it. • Can do with locks: Note: it’s always secured by one of their locks
Now with “Fermat’s locks” • K: the secret message • p: a public prime number > K • The two locks: • a: Alice’s random #, gcd(a,p-1)=1 • b: Bob’s random #, gcd(b,p-1)=1 • To unlock their locks: • a-1 mod (p-1) • b-1 mod (p-1)
K: the secret message p: a public prime number > K The two locks: a: Alice’s random #, gcd(a,p-1)=1 b: Bob’s random #, gcd(b,p-1)=1 To unlock their locks: a-1 mod (p-1) b-1 mod (p-1) Three-pass protocol: Alice computes Ka (mod p) and sends to Bob Bob computes (Ka)b (mod p) and sends it back Alice computes ((Ka)b )inv(a) (mod p) and sends it back Bob computes (((Ka)b )inv(a))inv(b) (mod p) and reads K Now with “Fermat’s locks”
K: the secret message p: a public prime number > K The two locks: a: Alice’s random #, gcd(a,p-1)=1 b: Bob’s random #, gcd(b,p-1)=1 To unlock their locks: a-1 mod (p-1) b-1 mod (p-1) Three-pass protocol: Alice computes Ka (mod p) and sends to Bob Bob computes (Ka)b (mod p) and sends it back Alice computes ((Ka)b )inv(a) (mod p) and sends it back Bob computes (((Ka)b )inv(a))inv(b) (mod p) and reads K Now with “Fermat’s locks” 36 59 17 21 41 • Toy example: • 3617 (mod 59) = 12 • 1221 (mod 59) = 45 • 4541 (mod 59) = 48 • 4847 (mod 59) = 36 47 Why’s it work?
Recall the basic principle • When dealing with numbers mod n, we can deal with their exponents mod _____ • Only look at once you’ve thought about this… • Given integers a and b, • Since aa-1=bb-1=1(mod p-1) • What’s K^(aba-1b-1) (mod p)?
Final thought • Trappe and Washington say that it’s vulnerable to an “intruder-in-the-middle” attack. Think about this…
Some levity before the exam • http://xkcd.com/c177.html • Thanks to Nathan for the link!
Quiz • Closed book and computer • Get out note sheet: • 1 handwritten sheet of 8.5 x 11 paper, one side only.