Basic Key Exchange: Trusted 3 Parties
Basic Key Exchange: Trusted 3 Parties
Dan Boneh
Key management
Problem: n users. Storing mutual secret keys is difficult
Dan Boneh
A better solution
Online Trusted 3rd Party (TTP)
TTP
Dan Boneh
Generating keys: a toy protocol
Alice wants a shared key with Bob. Eavesdropping security only.
(E,D) is CPA-secure ⇒
eavesdropper learns nothing about kAB
Note: TTP needed for every key exchange, knows all session keys.
(basis of Kerberos system)
Dan Boneh
Toy protocol: insecure against active attacks
Dan Boneh
Key question
Can we generate shared keys without an online trusted 3rd party?
Answer: yes!
• More recently: ID-based enc. (BF 2001), Functional enc. (BSW 2011)
Dan Boneh
End of Segment
Dan Boneh
Online Cryptography Course Dan Boneh
Merkle Puzzles
Dan Boneh
Key exchange without an online TTP?
Goal: Alice and Bob want shared key, unknown to eavesdropper
• For now: security against eavesdropping only (no tampering)
Alice Bob
eavesdropper ??
Dan Boneh
Merkle puzzles
Alice: prepare 232 puzzles
• For i=1, …, 232 choose random Pi ∈{0,1}32 and xi, ki ∈{0,1}128
set puzzlei ⟵ E( 096 ll Pi , “Puzzle # xi” ll ki )
• Send puzzle1 , … , puzzle232 to Bob
kj kj
Dan Boneh
End of Segment
Dan Boneh
Online Cryptography Course Dan Boneh
The Diffie-Hellman
protocol
Dan Boneh
Key exchange without an online TTP?
Goal: Alice and Bob want shared secret, unknown to eavesdropper
• For now: security against eavesdropping only (no tampering)
Alice Bob
eavesdropper ??
Alice Bob
choose random a in {1,…,p-1} choose random b in {1,…,p-1}
b a a b
Ba
(mod p) = (g ) = kAB = g ab
(mod p) = (g ) = Ab (mod p)
Dan Boneh
Security (much more on this later)
Dan Boneh
How hard is the DH function mod p?
Suppose prime p is n bits long.
Best known algorithm (GNFS): run time exp( )
Elliptic Curve
cipher key size modulus size size
80 bits 1024 bits 160 bits
128 bits 3072 bits 256 bits
256 bits (AES) 15360 bits 512 bits
Dan Boneh
Another look at DH
Facebook
ga gb gc gd
Dan Boneh
An open problem
Facebook
ga gb gc gd
Dan Boneh
Online Cryptography Course Dan Boneh
Public-key encryption
Dan Boneh
Establishing a shared secret
Goal: Alice and Bob want shared secret, unknown to eavesdropper
• For now: security against eavesdropping only (no tampering)
Alice Bob
eavesdropper ??
Alice Bob
E D
Dan Boneh
Public key encryption
Def: a public-key encryption system is a triple of algs. (G, E, D)
• G(): randomized alg. outputs a key pair (pk, sk)
• E(pk, m): randomized alg. that takes m∈M and outputs c ∈C
• D(sk,c): det. alg. that takes c∈C and outputs m∈M or ⊥
pk
b Chal. Adv. A
m0 , m1 M : |m0| = |m1|
(pk,sk)G()
c E(pk, mb) b’ {0,1}
EXP(b)
Dan Boneh
Security (eavesdropping)
Semantic security ⇒
adversary cannot distinguish
{ pk, E(pk, x), x } from { pk, E(pk, x), rand∈M }
Dan Boneh
Public key encryption: constructions
Next module:
• Brief detour to catch up on the relevant background
Dan Boneh
Further readings
• Merkle Puzzles are Optimal,
B. Barak, M. Mahmoody-Ghidary, Crypto ’09
Dan Boneh
End of Segment
Dan Boneh