Encryption Observer

Glossary The basics

Key exchange (Diffie-Hellman)

Key exchange lets two computers that have never met agree a secret key while someone listens to every message, without the listener learning the key. They then use that key for fast symmetric encryption.

Think of it like this

Two people each mix a secret paint colour into a shared public colour and swap the results. Each adds their own secret again and both end up with the same final colour. An onlooker who saw the swapped pots cannot unmix them.

Why it matters

Nearly every secure connection on the internet starts with one.

Where you meet it

Every time you load an https website or start a WhatsApp chat.

Alice's secretnever sentBob's secretnever sentPublic lineeveryone can listenEach sends a value made from their secret. Listeners see only these.Shared keyAlice works it outShared keyBob works it outsame key on both sides
Each side mixes its own secret with what the other sent. Both arrive at the same key, which never crossed the network.

More diagrams: What happens when you open a secure website · How harvest now, decrypt later works

Go deeper history and technical detail

Published by Diffie and Hellman in 1976. Today's versions mostly use elliptic curves (ECDH, often the curve X25519). Because Shor's algorithm breaks it, the post-quantum replacement is a 'key encapsulation mechanism' (KEM), standardised by NIST as ML-KEM. Browsers now commonly run both side by side, which is called a hybrid.

Read or watch next

Related terms

Cite this page Encryption Observer, “Key exchange (Diffie-Hellman)”, encryption.observer/terms/key-exchange/, checked December 2026.