Diffie-Hellman key exchange
From CRYPTUTOR
Diffie-Hellman key exchange (or Diffie-Hellman key agreement) is a protocol for two parties who have never interacted before to publicly compute a common secret (say, for use as a key in a private-key encryption scheme). That is, without sharing any common secret information, by exchanging messages over an insecure channel, they can both compute a shared secret, but anyone observing the messages they exchange gets no information about their shared secret.
The protocol
Let G be a cyclic group of prime order p with generator g. The Diffie-Hellman key exchange protocol between Alice and Bob works like this:
Diffie-Hellman key exchange:
- Alice chooses a random
, and sends A = ga to Bob.
- Bob chooses a random
, and sends B = gb to Alice.
- Alice can compute the shared secret Ba = gab.
- Bob can compute the shared secret Ab = gab.
Clearly the protocol is correct in that Alice and Bob both compute the same secret gab.
The protocol achieves the security described above, if the decisional Diffie-Hellman assumption holds for the group G. To see this, observe that any eavesdropping PPT adversary sees only the messages A = ga and B = gb, for randomly chosen a and b. The DDH assumption is that the shared secret gab is pseudorandom given A and B. Thus, from the adversary's point of view, Alice and Bob share a truly random secret.
See also
References
- Whitfield Diffie, Martin Hellman, New directions in cryptography, IEEE Trans. on Information Theory, November 1976, vol22, no6, pp644-654.
, and sends
, and sends 
