Fix a Key-Exchange protocol Π and an attacker (passive eavesdropper) A. Define the experiment KEA,Πeav(n):
Two parties holding 1n execute protocol Π. This results in a transcript trans containing all the messages sent by the parties, and a key k∈{0,1}n output by each of the parties.
A uniform bit b∈{0,1} is chosen. If b=0, set k′:=k. If b=1, choose k′←{0,1}n uniformly at random.
Attacker A is given trans and k′. A then outputs a bit b′.
A succeeds and the experiment evaluates to 1 if and only if b′=b.
Key-Exchange Security
Definition. The Key-Exchange Protocol Π is secure in the presence of an eavesdropper, if for all probabilistic, polynomial-time adversaries A, there is a negligible function ϵ(n) such that
Pr[KEA,Πeav(n)=1]≤21+ϵ(n)
Diffie-Hellman Key-Exchange Protocol
The Diffie-Hellman key-exchange protocol for the common input consisting of security parameter 1n is formally described as follows:
Alice runs G(1n) to obtain (G,q,g).
Alice chooses a uniform x∈Zq, and computes hA:=gx.
Alice sends (G,q,g,hA) to Bob.
Bob receives (G,q,g,hA). Bob chooses uniform y∈Zq, and computes hB:=gy. Bob sends hB to Alice, and outputs the key kB:=hAy.
Alice receives hB and outputs the key kA:=hBx.
Diffie-Hellman Key-Exchange Protocol: Security
Theorem. If the Decisional Diffie-Hellman problem is hard relative to G, then the Diffie-Hellman key-exchange protocol Π is secure in the presence of an eavesdropper (with respect to KEA,Πeav ).