PLAIN QUANTUM
Search

What is key exchange?

  • Level: Beginner
  • 3 min read
  • Quick answer
The short answer

Key exchange, more precisely key establishment, is how two computers that have never met end up sharing a secret key over an open network such as the internet, without an eavesdropper learning it. They then use that key with fast symmetric encryption such as AES to protect the data. Today it's done with RSA or elliptic-curve cryptography, which a large quantum computer could break, so it's the first job the post-quantum migration replaces, with ML-KEM.

Three ways to set up a key

How it worksExample
Key agreementEach side combines its own secret with the other's public value, and both arrive at the same keyDiffie–Hellman; elliptic-curve Diffie–Hellman, such as X25519
Key transportOne side picks the key and sends it locked with the other's public keyRSA key transport
Key encapsulation (KEM)One side uses the other's public key to wrap a fresh shared secret; the other unwraps it with its private keyML-KEM (FIPS 203)
All three are kinds of key establishment. "Key exchange" is the everyday name for any of them.
What crosses the network Bytes in each message, drawn to scale A B Key agreement X25519 32 32 Key transport RSA-2048 256 256 Key encapsulation ML-KEM-768 1,184 1,088 public key or value wrapped secret What crosses the network Bytes in each message, drawn to scale A B Key agreement X25519 32 32 Key transport RSA-2048 256 256 Key encapsulation ML-KEM-768 1,184 1,088 public key or value wrapped secret
The same three kinds as the table, drawn as the messages that cross the network, each to scale. In key agreement only public values cross; each side works out the key, which never travels. In key transport B picks the key and sends it locked with A's public key. In a KEM, B's encapsulation makes a fresh secret and B sends only the wrapped copy, the ciphertext. RSA-2048 sizes count its 2,048-bit modulus, 256 bytes; real encodings add a few bytes. ML-KEM-768 sizes are from FIPS 203; X25519's 32 bytes from RFC 7748.

Why it's the urgent part

Someone who records a connection today has its key establishment on file. A quantum computer running Shor's algorithm could later work back from it to the secret key and read everything that followed: harvest now, decrypt later. Switching key establishment to a post-quantum method stops that, which is why the first post-quantum deployments, in browsers and messaging apps, changed key establishment, usually as hybrid key exchange.

Common confusions

  • "Key exchange sends the key across the network." Not in key agreement: only public values travel. In key transport and KEMs the key or secret travels, but only in wrapped form.
  • "Key exchange encrypts the data." No. It only sets up the key; symmetric encryption such as AES does the bulk work.
  • "Post-quantum key exchange needs quantum hardware." No. ML-KEM is ordinary software. The hardware approach is quantum key distribution, which is something different.

Where this comes up

Sources and further reading

Tags show the kind of source (how sources are chosen and checked). The original source list was checked on 13 November 2026. The RFC 7748 reference was added on 26 November 2026.

  1. Peer-reviewed paperNew directions in cryptographyWhitfield Diffie and Martin Hellman, IEEE Transactions on Information Theory, 1976
  2. Peer-reviewed paperA method for obtaining digital signatures and public-key cryptosystemsRivest, Shamir and Adleman, Communications of the ACM, 1978
  3. StandardSP 800-56A Rev. 3: Recommendation for Pair-Wise Key-Establishment Schemes Using Discrete Logarithm CryptographyNIST, 2018
  4. StandardSP 800-56B Rev. 2: Recommendation for Pair-Wise Key-Establishment Using Integer Factorization CryptographyNIST, 2019
  5. StandardFIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard (ML-KEM)NIST, 2024
  6. Informational RFCRFC 7748: Elliptic Curves for SecurityA. Langley, M. Hamburg and S. Turner, IRTF, 2016
  7. StandardSP 800-227: Recommendations for Key-Encapsulation MechanismsNIST, 2025
  8. Company announcementProtecting Chrome traffic with hybrid Kyber KEMChromium blog, 2023
  9. Company announcementQuantum resistance and the Signal ProtocolSignal, 2023

Written by Muhammad Atif · Reviewed 26 November 2026 · Report a correction