TL;DR
- Encrypted traffic recorded today could be decrypted later. A future quantum computer running Shor’s algorithm could break ECDHE, the key exchange HTTPS connections have mostly relied on.
- That makes it a risk now for anything that must stay private for years, and even everyday browsing data has buyers.
- The fix is post-quantum key exchange. ML-KEM, standardized by NIST in 2024, rests on math no known quantum algorithm breaks efficiently.
- TLS 1.3 adopts it in hybrid form (X25519MLKEM768), so the connection stays safe if either algorithm holds.
- If you build software: providers are rolling this out, but your endpoints are yours. Check what your servers actually negotiate, and keep your libraries up to date.
Harvest now, decrypt later
Imagine connecting to what looks like legitimate airport Wi-Fi and opening your bank’s website. You can’t really know the network belongs to the airport; anyone around you can create a Wi-Fi network and name it practically anything. Still, the padlock is there and the connection is encrypted, which means what you send over the wire is encrypted too. Someone controlling that network can’t read it today. However, they can record all of it. Now imagine that, years from now, a sufficiently powerful quantum computer can recover the secrets that protected that recording.
That scenario is called “harvest now, decrypt later.” For a while now, I’ve been interested in understanding what the future might look like when AI and quantum computing meet, and how that could affect things like bank security and the crypto markets. Along the way, I’ve been following publications from major infrastructure organizations like DigitalOcean[1], which recently described the changes it’s making to its own cryptography to prepare for this shift. Organizations are preparing before cryptographically relevant quantum computers exist, because an attacker doesn’t need one today. They only need to capture the traffic, including the key exchange messages at the start of each connection, and keep it.
So why should anyone care, five years from now, about encrypted data someone picked up today? On the surface, it seems like most of the things we send online lose their value quickly. The obvious ones that don’t are medical records, financial history, legal documents and trade secrets. Anything that still needs to be private years from now is exposed to this kind of attack today.
It isn’t only the obvious secrets, though. Whoever is recording a network sees everyone’s traffic passing through it. Once decrypted, everyday browsing and purchases are exactly the kind of data companies already buy and sell to decide what to show you next. Traffic that seems worthless to you could still be worth something to a data broker.
To see how that’s possible, it helps to first look at how two computers communicate in secret.
How your browser reaches a server
When you visit a website, your browser first looks up the site’s name in DNS to find an IP address. Then your request travels as packets through a chain of networks you don’t control.
Text version
Your browser
│
▼
Local router, airport or other public Wi-Fi ◀── whoever runs this can record traffic
│
▼
Internet service provider
│
▼
Backbone and transit networks
│
▼
Cloud provider or load balancer ◀── TLS often ends here
│
▼
Application serverAny hop along that path can see the packets go by. That’s why HTTPS matters even when you trust the website: you can’t trust every network in between. It’s also worth knowing that the encrypted connection often doesn’t reach the application server itself. It usually ends at a CDN or load balancer, and the connections behind it may have their own, separate encryption, or none.
What TLS does
HTTPS is HTTP running inside TLS. SSL is TLS’s predecessor, and people still use the old name. TLS gives a connection three properties:
- Confidentiality: nobody on the path can read the data.
- Authentication: you’re talking to the real bank, not an impostor.
- Integrity: nobody can change the data in transit without it being detected.
Every connection starts with a handshake, where both sides negotiate which cryptographic algorithms to use, establish shared keys, and authenticate the server. This post focuses on one part of that handshake: establishing the keys.
One easy misconception: TLS 1.3 doesn’t automatically mean post-quantum protection. What matters is which algorithms the two sides actually negotiate.
How two computers agree on a secret
TLS 1.3 relies on a shared secret: a value that only the two ends of the connection know. The side starting the conversation and the side receiving it both need to arrive at that same secret before anything sensitive is sent, because TLS derives the keys that encrypt the traffic from it. The catch is that they have to establish it over a network anyone can watch, so they can’t simply send it. The process they use is called key exchange.
The classic method is Diffie-Hellman. Historically, the predominant version in TLS 1.3 has been elliptic-curve Diffie-Hellman ephemeral, or ECDHE, particularly through X25519, which Cloudflare identifies as the most commonly used key agreement algorithm in TLS 1.3[2]. Before getting to the real math, here’s a version with numbers you can do in your head.
A simplified example
Say you open your bank’s website to send a payment. Two parties are involved: your browser, which starts the conversation, and the bank’s server, which answers it. Before any payment details are sent, they need a secret only the two of them know.
First, they agree on a public starting point. In real TLS, that’s an agreed method and its settings; here, let’s represent it with a single number: 2. Because it’s public, anyone watching can see it. Next, each side picks a private number and keeps it to itself: the browser picks 6, and the bank picks 17. Each side multiplies the public number by its private one and sends the result to the other. Finally, each side multiplies the value it received by its own private number.
Text version
Agreed public number: 2
BROWSER NETWORK BANK
private: 6 (not visible) private: 17
public: 2 × 6 = 12 public: 2 × 17 = 34
── 12, visible to anyone ─────────▶
◀───────── 34, visible to anyone ──
34 × 6 = 204 (204 never 12 × 17 = 204
appears here)
Shared secret: 204 (never sent)Neither side ever sends 204. Each one computes it independently. The starting number 2 and the two public values, 12 and 34, are visible to anyone watching the network. The private numbers, 6 and 17, never leave their sides, and the shared secret, 204, never crosses the network at all.
From a number to Rule A
In real TLS, the “starting number” is an agreed algorithm and its parameters. I’ll call it Rule A. Both sides usually support several algorithms and negotiate which to use; they send identifiers for the algorithms, not the math itself. Swapping the arithmetic for functions gives a more accurate picture:
Text version
Rule A: traditional key exchange
BROWSER NETWORK BANK
private key: a (not visible) private key: b
X = public_key(a) Y = public_key(b)
── X, visible to anyone ──────────▶
◀────────── Y, visible to anyone ──
derive_secret(a, Y) (S never derive_secret(b, X)
appears here)
Shared secret: S (never sent)# Illustrative pseudocode, not a cryptographic implementation
browser_private = generate_private_key()
browser_public = generate_public_key(browser_private)
bank_private = generate_private_key()
bank_public = generate_public_key(bank_private)
# Exchange public keys
browser_secret = derive_secret(browser_private, bank_public)
bank_secret = derive_secret(bank_private, browser_public)
assert browser_secret == bank_secretThe real math, with tiny numbers
Real Diffie-Hellman uses modular exponentiation: raise a number to a power, then keep only the remainder after dividing by a prime. Keeping the remainder is called the modulo operation, written “mod.” So 5^6 mod 23 means: raise 5 to the 6th power (15,625), divide by 23, and keep the remainder (8). Take the public parameters p = 23 and g = 5, and keep the same private numbers, 6 and 17.
Both sides land on 13, because both calculations equal g^(6 × 17) mod p. Unlike the multiplication example, going backwards from 8 to 6 means solving a discrete logarithm, which is impractical with large enough numbers. These parameters are deliberately tiny and insecure. Real finite-field Diffie-Hellman uses much larger ones, and modern ECDHE uses elliptic-curve operations instead. TLS also doesn’t use the shared secret directly; it derives the traffic encryption keys from it.
Why quantum computing breaks Rule A
Back to the recorded airport Wi-Fi connection. Its safety rests on one assumption: that nobody can work out a private key from a public value. With today’s computers and properly sized parameters, that’s the discrete logarithm problem, and it’s impractical to solve.
Shor’s algorithm changes that. It’s a method for quantum computers that mathematician Peter Shor published in 1994[3], before any quantum computer existed to run it. Given a sufficiently capable quantum computer, it solves discrete logarithm problems efficiently, including the elliptic-curve version ECDHE relies on. Making traditional keys bigger doesn’t fix this; it only buys a little time. For a recorded connection, the chain looks like this:
Text version
Recorded handshake and encrypted traffic (captured today)
│
▼
Sufficiently powerful quantum computer (future)
│
▼
Shor's algorithm recovers the key exchange secret
│
▼
TLS traffic keys are rebuilt
│
▼
Recorded traffic can be decryptedThat chain applies to a conventional ECDHE handshake with no other uncompromised secret mixed in, such as a separately protected pre-shared key. It’s also a future threat, not a demonstrated one: no quantum computer today can do this to real-world key sizes. The point is that today’s recordings would still be useful to whoever has one later.
Post-quantum key exchange: ML-KEM
ML-KEM stands for Module-Lattice-Based Key-Encapsulation Mechanism. The U.S. National Institute of Standards and Technology (NIST)[4], the federal agency that publishes the cryptography standards much of the industry follows, standardized it in FIPS 203[5] in August 2024. Instead of both sides computing the secret, it works in three operations:
Call the post-quantum algorithm Rule B. The browser and bank still negotiate which rule to use, but how they arrive at the shared secret changes:
Text version
Rule B: ML-KEM
BROWSER NETWORK BANK
KeyGen() (not visible) fresh private randomness
→ private key (kept)
→ public key
── public key, visible to anyone ─▶
Encapsulate(public key)
→ shared secret S (kept)
→ ciphertext
◀─ ciphertext, visible to anyone ──
Decapsulate(private key,
ciphertext) → S
(S never appears here)
Shared secret: S (never sent)The browser generates its keys
public_key, private_key = RuleB.keygen()The browser keeps its private key and sends its public key. Unlike the simple examples, ML-KEM creates the two keys together in one key generation step.
The bank encapsulates
randomness = secure_random_bytes(32)
shared_secret, ciphertext = RuleB.encapsulate(
browser_public_key, randomness
)The bank combines the browser’s public key with fresh private randomness. It gets two things back: a shared secret it keeps, and a ciphertext it sends to the browser. At this point, only the bank has the secret. The randomness is private, unlike a password salt, which isn’t secret.
The browser decapsulates
shared_secret = RuleB.decapsulate(browser_private_key, ciphertext)The browser uses its private key to recover the same secret from the ciphertext. Again, the secret itself never crosses the network. These snippets are pseudocode; real libraries usually handle the randomness for you.
This is the big difference from Rule A. With Diffie-Hellman, both sides contribute to the secret and each one computes it independently. With ML-KEM, the bank has the final say. The secret comes out of encapsulation, which mixes in randomness only the bank has. The browser doesn’t help create the secret; it recovers the one the bank made by decapsulating the ciphertext.
So the only things that cross the network are the name of the chosen algorithm, the browser’s public key, and the ciphertext. The bank’s randomness, the browser’s private key, and the shared secret itself never leave their sides.
Rule A and Rule B side by side
The different message flow isn’t what makes ML-KEM quantum-resistant. The underlying math problem is.
Why ML-KEM resists quantum computers
ML-KEM is built on lattices: regular grids of points in many dimensions. Its security rests on a problem called Learning With Errors. You’re given a set of equations that would be easy to solve, except each one has a small amount of noise deliberately added. Recovering the secret means undoing that noise, and in hundreds of dimensions, nobody knows an efficient way to do it.
Crucially, nobody has found a quantum algorithm that does to this problem what Shor’s algorithm does to discrete logarithms. That’s different from saying it’s proven unbreakable. “Quantum-resistant” means no known attack, classical or quantum, breaks it efficiently. The lattice math deserves its own post, so I’ll save it for a later one.
How TLS 1.3 adopts it: hybrid key exchange
Rather than switching to ML-KEM alone, TLS 1.3 runs both rules at once. The hybrid group X25519MLKEM768, specified in RFC 10024[6], pairs X25519 (traditional elliptic-curve Diffie-Hellman) with ML-KEM-768 (post-quantum):
Text version
TLS 1.3 hybrid group: X25519MLKEM768
│
┌──────────┴───────────┐
▼ ▼
Rule A: X25519 Rule B: ML-KEM-768
traditional secret post-quantum secret
│ │
└──────────┬───────────┘
▼
Combined: ML-KEM secret, then X25519 secret
│
▼
TLS key derivation (HKDF)
│
▼
Symmetric traffic encryption keysThe idea is belt and braces. X25519 has years of scrutiny behind it; ML-KEM is newer. If either one holds, the connection’s secret stays safe. The cost is size. These are the key exchange payloads alone, not the whole handshake:
The client share is 38 times the size of X25519 alone. That sounds dramatic, but it isn’t a 38-fold increase in the handshake or in the traffic that follows. Two more distinctions matter. Key exchange is separate from certificate authentication, which still proves you’re talking to the real bank. And all of this only helps when both ends support the hybrid group and actually negotiate it.
What this means if you build software
It’s worth keeping up with what infrastructure providers like DigitalOcean, Cloudflare and AWS are doing here, both for the services you use directly and for the services your own software depends on. Many of these changes arrive as new defaults, or as settings you have to turn on.
Like most security, though, this is a shared responsibility. Providers cover their side; your application’s endpoints and servers are yours to protect. A new option from a provider only helps once you’ve reviewed your configuration and updated your settings to use it.
The cryptography itself mostly happens inside libraries you already use, which is how it should be. Here’s a checklist to work through:
- Inventory your cryptographic libraries and dependencies.
- Find every place TLS terminates, including CDNs and load balancers.
- Use the newest secure connection protocol your stack supports. As of this writing, that’s TLS 1.3.
- Turn off the older versions it replaced once nothing depends on them.
- Check whether hybrid post-quantum key exchange is actually negotiated, not just available.
- Keep OpenSSL, web servers, SDKs and runtimes up to date.
- Review encryption between your internal services.
- Identify data that needs to stay confidential for years.
- Watch for developments in post-quantum certificates and digital signatures.
- Don’t implement cryptographic algorithms yourself.
The internet is changing before quantum computers arrive
Back at the airport one last time. Post-quantum cryptography doesn’t stop anyone from recording your packets. It makes sure that what they record stays unreadable, even to a computer that doesn’t exist yet.
That’s the shift I find most interesting: this work protects today’s information against tomorrow’s capabilities. Waiting for quantum computers to arrive would be too late for anything recorded in the meantime. (For the protocol itself, the current TLS 1.3 specification is RFC 9846[7].)
Next, I want to dig into the other half of the handshake: how your browser knows it’s talking to the right server, and what post-quantum signatures like ML-DSA[8] change about certificates.
References
- DigitalOcean, Post-Quantum Cryptography at DigitalOcean, updated December 3, 2026
- Cloudflare, Post-quantum cryptography, Cloudflare SSL/TLS documentation
- Peter W. Shor, Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer, SIAM Journal on Computing, 26(5), 1484–1509, 1997
- National Institute of Standards and Technology (NIST)
- NIST, FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard (ML-KEM), August 2024
- IETF, RFC 10024: Hybrid key agreement in TLS 1.3
- IETF, RFC 9846: TLS 1.3, July 2026 (supersedes RFC 8446)
- NIST, FIPS 204: Module-Lattice-Based Digital Signature Standard (ML-DSA), August 2024