Docsity

Cryptographic Protocols: Design and Analysis - Notation and Cryptographic Keys - Prof. Hao, Study notes of Computer Science

Partial preview of the text

Download Cryptographic Protocols: Design and Analysis - Notation and Cryptographic Keys - Prof. Hao and more Study notes Computer Science in PDF only on Docsity!

Cryptographic protocols:

design and analysis

David Wagner University of California, Berkeley

Notation

A, B, C, S: names of legitimate parties. (Short for: Alice, Bob, client, server.)

M : name of a malicious attacker. (Short for: Mallet.)

Caveats

  1. A → B : x

Do note:

  1. B only receives the message x, not who it came from. (Thus, messages should include the sender’s name if the needs to know it.)
  2. There is no guarantee that A, the network, or the adversa as intended. (Thus, messages might be intercepted, modified, re-order

More Notation

k is a key; k−^1 is its inverse. For symmetric cryptosystems, k = k−^1 ; for public-key cryptos the public key and k−^1 the corresponding private key.

Still More Notation

TA is a timestamp chosen by A. NA is an unpredictable random nonce (a “challenge”) chosen

Who’s awake?

What does the following notation mean?

  1. A → B : {A, [kAB, A, B]K− 1 A

}KB

  1. B → A : {message}kAB

Denning-Sacco

Key exchange between A, B, with the aid of an online certifica

  1. A → S : A, B
  2. S → A : certA, certB
  3. A → B : certA, certB, {[kAB, TA]K− 1 A

}KB

Can you spot the flaw?

Breaking Denning-Sacco

Look closely:

  1. A → B : certA, certB, {[kAB, TA]K− 1 A

}KB

The key kAB isn’t bound to the names of the endpoints A, B.

Therefore, B can extract the quantity [kAB, TA]K− 1 A

and use it

in a new connection to C, like this:

3 ′. B → C : certA, certC, {[kAB, TA]K− 1 A

}KC

As a result, C mistakenly concludes he is speaking with A.

Early SSL

Key exchange with mutual authentication:

  1. A → B : {kAB}KB
  2. B → A : {NB}kAB
  3. A → B : {certA, [NB]K− 1 A

}kAB

Can you spot the flaw?

Breaking early SSL

Look closely:

  1. A → B : {kAB}KB
  2. B → A : {NB}kAB
  3. A → B : {certA, [NB]K− 1 A

}kAB

Alice will sign anything with her private key.

Fixing early SSL

Fix: replace [NB]K− 1 A

with [A, B, NA, NB]K− 1 A

  1. A → B : {kAB}KB
  2. B → A : {NB}kAB
  3. A → B : {certA, [A, B, NA, NB]K− 1 A

}kAB

Moral: Don’t let yourself be used as a signing oracle. Add randomness—and bind names—before signing.

Credits: Abadi

GSM challenge-response

A is cellphone handset, B is a base station.

  1. B → A : NB
  2. A → B : A, [NB]K− 1 AB

, {data}k

where k = f (KAB, NB) is the voice privacy key.

Can you spot the weakness?

Breaking X.509 standard

Look again:

  1. A → B : A, [TA, B, {message}KB ]K− 1 A There’s no reason to believe the sender was ever aware of the the message.

An Attack on X.509

Example: Proving yourself by sending a password.

Attacker M intercepts Alice’s encrypted password:

  1. A → B : A, [TA, B, {password}KB ]K− 1 A Then M extracts {password}KB , and sends 1 ′. M → B : M, [TM , B, {password}KB ]K− 1 M Now M is in, without needing to know the password.