14
Announcements: Announcements: HW3 updated. Due next HW3 updated. Due next Thursday Thursday Written quiz today Written quiz today Computer quiz next Computer quiz next Friday Friday on breaking on breaking codes from chapter 2 codes from chapter 2 Today: Today: Three-pass protocol Three-pass protocol Quiz Quiz Questions? Questions? DTTF/NB479: Dszquphsbqiz DTTF/NB479: Dszquphsbqiz Day Day 12 12

Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Announcements:Announcements: HW3 updated. Due next HW3 updated. Due next ThursdayThursday Written quiz todayWritten quiz today Computer quiz next Computer quiz next Friday Friday on breaking codes from on breaking codes from

chapter 2chapter 2

Today: Today: Three-pass protocol Three-pass protocol QuizQuiz

Questions?Questions?

DTTF/NB479: DszquphsbqizDTTF/NB479: Dszquphsbqiz Day 12Day 12

Page 2: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Wrapping up Fermat and EulerWrapping up Fermat and Euler

We skipped the proof of Fermat’s Little We skipped the proof of Fermat’s Little Theorem in the text.Theorem in the text. Be sure to read itBe sure to read it

You are also prepared to read the rest of You are also prepared to read the rest of chapter 3 at your own pace.chapter 3 at your own pace.

Page 3: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Three-pass protocolThree-pass protocol

How can Alice get a secret message to How can Alice get a secret message to Bob without an established key?Bob without an established key?

Can do it with locks.Can do it with locks.

First 2 volunteers get to do the live demoFirst 2 volunteers get to do the live demo

Page 4: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Three-pass protocolThree-pass protocol

Situation: Alice wants to get a short Situation: Alice wants to get a short message to Bob, but they don’t have an message to Bob, but they don’t have an established key to transmit it.established key to transmit it.

Can do with locks:Can do with locks:

Page 5: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Three-pass protocolThree-pass protocol

Situation: Alice wants to get a short Situation: Alice wants to get a short message to Bob, but they don’t have an message to Bob, but they don’t have an established key to transmit it.established key to transmit it.

Can do with locks:Can do with locks:

Page 6: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Three-pass protocolThree-pass protocol

Situation: Alice wants to get a short Situation: Alice wants to get a short message to Bob, but they don’t have an message to Bob, but they don’t have an established key to transmit it.established key to transmit it.

Can do with locks:Can do with locks:

Page 7: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Three-pass protocolThree-pass protocol

Situation: Alice wants to get a short Situation: Alice wants to get a short message to Bob, but they don’t have an message to Bob, but they don’t have an established key to transmit it.established key to transmit it.

Can do with locks:Can do with locks:

Note: it’s always secured by one of their locks

Page 8: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Now with “Fermat’s locks”Now with “Fermat’s locks”

K: the secret messageK: the secret message

p: a public prime number > Kp: a public prime number > K

The two locks:The two locks: a: Alice’s random #, gcd(a,p-1)=1a: Alice’s random #, gcd(a,p-1)=1 b: Bob’s random #, gcd(b,p-1)=1b: Bob’s random #, gcd(b,p-1)=1

To unlock their locks:To unlock their locks: aa-1-1 mod (p-1) mod (p-1) bb-1-1 mod (p-1) mod (p-1)

Page 9: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Now with “Fermat’s locks”Now with “Fermat’s locks”K: the secret K: the secret messagemessagep: a public prime p: a public prime number > Knumber > KThe two locks:The two locks:

a: Alice’s random a: Alice’s random #, gcd(a,p-1)=1#, gcd(a,p-1)=1

b: Bob’s random b: Bob’s random #, gcd(b,p-1)=1#, gcd(b,p-1)=1

To unlock their To unlock their locks:locks:

aa-1-1 mod (p-1) mod (p-1) bb-1-1 mod (p-1) mod (p-1)

Three-pass protocol:Three-pass protocol:Alice computes KAlice computes Ka a (mod p) and sends to (mod p) and sends to

BobBobBob computes (KBob computes (Kaa))b b (mod p) and sends it (mod p) and sends it

backbackAlice computes ((KAlice computes ((Kaa))b b ))inv(a) inv(a) (mod p) and (mod p) and

sends it backsends it backBob computes (((KBob computes (((Kaa))b b ))inv(a)inv(a)))inv(b) inv(b) (mod p) (mod p)

and reads Kand reads K

Page 10: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Now with “Fermat’s locks”Now with “Fermat’s locks”K: the secret K: the secret messagemessagep: a public prime p: a public prime number > Knumber > KThe two locks:The two locks:

a: Alice’s random a: Alice’s random #, gcd(a,p-1)=1#, gcd(a,p-1)=1

b: Bob’s random b: Bob’s random #, gcd(b,p-1)=1#, gcd(b,p-1)=1

To unlock their To unlock their locks:locks:

aa-1-1 mod (p-1) mod (p-1) bb-1-1 mod (p-1) mod (p-1)

Three-pass protocol:Three-pass protocol:Alice computes KAlice computes Ka a (mod p) and sends to (mod p) and sends to

BobBobBob computes (KBob computes (Kaa))b b (mod p) and sends it (mod p) and sends it

backbackAlice computes ((KAlice computes ((Kaa))b b ))inv(a) inv(a) (mod p) and (mod p) and

sends it backsends it backBob computes (((KBob computes (((Kaa))b b ))inv(a)inv(a)))inv(b) inv(b) (mod p) (mod p)

and reads Kand reads K

Toy example:3617 (mod 59) = 121221 (mod 59) = 454541 (mod 59) = 484847 (mod 59) = 36

36

59

17

21

41

47

Why’s it work?

Page 11: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Recall the basic principleRecall the basic principle

When dealing with numbers mod n, we When dealing with numbers mod n, we can deal with their exponents mod _____can deal with their exponents mod _____

Only look at once you’ve thought about Only look at once you’ve thought about this…this… Given integers a and b,Given integers a and b, Since aaSince aa-1-1=bb=bb-1-1=1(mod p-1)=1(mod p-1) What’s K^(abaWhat’s K^(aba-1-1bb-1-1) (mod p)?) (mod p)?

Page 12: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Final thoughtFinal thought

Trappe and Washington say that it’s Trappe and Washington say that it’s vulnerable to an “intruder-in-the-middle” vulnerable to an “intruder-in-the-middle” attack. Think about this…attack. Think about this…

Page 13: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

Some levity before the examSome levity before the exam

http://xkcd.com/c177.htmlhttp://xkcd.com/c177.html

Thanks to Nathan for the link!Thanks to Nathan for the link!

Page 14: Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking

QuizQuiz

Closed book and computerClosed book and computer

Get out note sheet: Get out note sheet: 1 handwritten sheet of 8.5 x 11 paper, one 1 handwritten sheet of 8.5 x 11 paper, one

side only.side only.