Quiz Entry - updated: 2026.07.10
True or false: "Diffie-Hellman is an encryption system."
False — DH is purely a key exchange protocol. It establishes a shared secret, but cannot encrypt messages or create signatures. The encryption scheme built on DH is called ElGamal.
The confusion is understandable because DH and ElGamal share almost the same machinery, but the distinction is sharp: DH agrees on a secret, it never transports one. The instant you want to send a chosen message rather than settle on a random key, you have left DH behind and entered ElGamal — which is literally DH plus one multiplication.
What DH does:
- Allows two parties to agree on a shared secret $K = g^{ab} \mod p$
- Neither party can choose what $K$ will be — it's determined by both random exponents
- $K$ can then be used as a symmetric key (e.g., for AES)
What DH does NOT do:
- Encrypt a specific message of Alice's choice
- Create digital signatures
- Authenticate the parties (vulnerable to MitM)
The relationship:
- DHKE = key exchange only → shared random secret
- ElGamal = encryption built on DH → Alice can send a specific message $x$ by masking it as $y = x \cdot K \mod p$
- ElGamal is essentially "DH + one multiplication" — but the message flow is reordered for efficiency (Bob sends his public value first, so Alice can compute everything in one round)
Go deeper:
Diffie-Hellman key exchange — Wikipedia — it establishes a shared key, not a ciphertext.