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.

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.
What happens when you open a secure websiteQuantum computers would break thisStays safeA large quantum computer would break the key exchange and the certificate signature. The encryption of your data itself stays safe.
  1. Your phone or laptop
  2. 1Key exchange Your device and the site agree a secret key over the open internet. Today: X25519 (elliptic curves) Breakable by a large quantum computer. Browsers now add ML-KEM alongside it.
  3. 2Certificate and signature The site proves it is your bank and not an impostor. Today: RSA or ECDSA signatures Breakable by a large quantum computer. No post-quantum certificates are used on the public web yet. Chrome plans to start in 2027.
  4. 3Encrypted data Everything you send and receive is scrambled with the shared key. Today: AES or ChaCha20 Safe with today's key sizes. Quantum computers only weaken it slightly.
  5. 4Integrity checks Every message carries a tag that shows if anyone tampered with it. Today: Built into AES-GCM or ChaCha20-Poly1305 Safe. Quantum computers barely affect these checks.
  6. The website

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.

How harvest now, decrypt later worksAttacker's stepDefenceData recorded today can be read after Q-Day unless the key exchange is already post-quantum.
  1. 1Record An attacker copies encrypted traffic, such as a VPN tunnel or a messaging session. When: Today Nothing alerts the victim.
  2. 2Store The recording is kept, possibly for decades, until it can be read. When: Years Mosca's rule: if secrecy time plus migration time exceeds the time to Q-Day, you are already late.
  3. 3Break the key exchange A large quantum computer recovers the session key from the recorded key exchange. When: Q-Day, date unknown The bulk AES encryption does not need breaking.
  4. 4Defence: hybrid key exchange now Traffic protected with ML-KEM today cannot be decrypted this way later. When: Already default in major browsers Why key exchange is upgraded first.
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.