SecSIGSecurity Special Interest Group of US MensaCuriosity. Perspective. Security.

Research Library · Idea

Diffie-Hellman key exchange

Diffie-Hellman key exchange is the protocol by which two parties who share no secret agree on one over a public channel. Whitfield Diffie and Martin Hellman published it in “New Directions in Cryptography” in the IEEE Transactions on Information Theory in November 1976, as a public key distribution system 1. The same paper defined public-key cryptosystems, in which computing the deciphering key from the enciphering key is computationally infeasible, and set out digital signatures as a goal, but it called the problem of building a public-key cryptosystem still largely open 1.

In the paper's version, the users fix a large prime q and a primitive element α of the field with q elements. Each user i chooses a secret number X_i uniformly at random from 1 to q − 1 and places Y_i = α^X_i mod q in a public file; users i and j then share K_ij = α^(X_i X_j) mod q, which each can compute from the other's public value and its own secret 1. The authors rested security on the apparent difficulty of computing logarithms modulo q, provisionally assumed that the best known algorithm was close to optimal, and said that they had no proof that the system is secure if such logarithms are hard 1. The assumption that g^(ab) is hard to compute from g^a and g^b is now called the computational Diffie-Hellman assumption 3. Boneh and Venkatesan list proving or disproving that breaking Diffie-Hellman is as hard as computing discrete logarithms among the longstanding open problems of cryptography, while noting some progress on it 2.

The bare exchange authenticates no one. Boneh and Shoup's textbook shows it is secure against a passive eavesdropper but completely falls apart against an active adversary who controls the network, because neither party knows with whom the secret is shared; a man in the middle runs one exchange with each side and can expose all their traffic 3. The 1976 paper itself proposed tying the public values to a read-only public file of user information that would serve to authenticate users to one another 1.

Ephemeral Diffie-Hellman is central to TLS. Version 1.3 (RFC 8446, August 2018) has three key exchange modes, two of which use Diffie-Hellman over finite fields or elliptic curves, and it removed static RSA and Diffie-Hellman cipher suites so that all its public-key key exchanges provide forward secrecy 4.

The protocol is not expected to survive large quantum computers. Peter Shor gave polynomial-time algorithms for discrete logarithms, as well as factoring, on a hypothetical quantum computer 5. NIST IR 8547, finalised in October 2026, lists finite-field and elliptic-curve Diffie-Hellman among the quantum-vulnerable key-establishment schemes that NIST will deprecate after 2030 and disallow under its standards after 2035, with migration to ML-KEM or other quantum-resistant techniques, and earlier deadlines for high-sensitivity federal systems 6.

Source · New Directions in Cryptography (opens in a new tab) · IEEE Transactions on Information Theory IT-22(6)

References

  1. New Directions in Cryptography (opens in a new tab) · IEEE Transactions on Information Theory IT-22(6), author copy at Stanford University · November 1, 1976 ↩ ↩ ↩ ↩ ↩
  2. Breaking RSA May Be Easier Than Factoring (opens in a new tab) · Dan Boneh and Ramarathnam Venkatesan, author copy at Stanford University ↩
  3. A Graduate Course in Applied Cryptography, version 0.6 (opens in a new tab) · Dan Boneh and Victor Shoup · January 1, 2023 · Sections 10.4 to 10.7 on Diffie-Hellman key exchange, the CDH assumption and the man-in-the-middle attack. ↩ ↩
  4. RFC 8446, The Transport Layer Security (TLS) Protocol Version 1.3 (opens in a new tab) · Internet Engineering Task Force (RFC Editor) · August 1, 2018 ↩
  5. Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer (opens in a new tab) · arXiv (Peter W. Shor) · August 30, 1995 ↩
  6. NIST IR 8547, Transition to Post-Quantum Cryptography Standards (opens in a new tab) · National Institute of Standards and Technology · October 1, 2026 · Section 4.1.2 and Table 4, quantum-vulnerable key-establishment schemes. ↩

Research articles

See what connects to it on the map of ideas →

See also