Skip to content

Harvest now, decrypt later

Why data you send today is already at risk from future quantum computers, how to judge your exposure with Mosca's inequality, and what to fix first.

Part 04 of 09Intermediate 6 min read
On this page

Most security threats need the attacker to act after a weakness exists. Harvest now, decrypt later (HNDL, sometimes "store now, decrypt later") flips that: an adversary records your encrypted traffic today, stores it cheaply, and decrypts it years from now once a quantum computer can break the key exchange that protected it. Nothing you do in the future can protect data that has already been captured under classical key exchange.

This is why governments and large tech companies started deploying post-quantum key exchange years before anyone has a quantum computer capable of breaking anything.

How the attack works

  2026: you                           2026: adversary
  ──────────────────────────────────  ─────────────────────────────────────
  TLS handshake (X25519 key share) ──► records handshake + encrypted traffic
  sensitive data over AES-GCM     ──► stores it (storage is cheap)
                                              │
                                              │   years pass...
                                              ▼
                                      203x: adversary gains access to a CRQC
                                      ─────────────────────────────────────
                                      runs Shor's algorithm on the recorded
                                      X25519 public values → shared secret
                                      → derives the AES keys → reads the data

The weak link is the key exchange. AES-256 itself is fine against quantum attack, but the AES key was derived from an X25519 or ECDHE exchange whose public values were sent in the clear. Recover the exchange's secret and every key derived from it falls.

Several details make this practical rather than theoretical:

  • Recording is easy for well-placed actors. Traffic crosses undersea cables, internet exchange points, cloud networks and Wi-Fi. Intelligence agencies have long been reported to collect bulk traffic, and storage costs keep falling.
  • Targeting is cheap. An adversary doesn't need everything; recording traffic to a specific government department, bank, lab or company is enough.
  • Forward secrecy doesn't help. Ephemeral keys protect against later theft of a server's private key. They don't protect against someone who can solve the maths from the recorded public values.
  • Breaches feed it too. Stolen backups or database dumps encrypted with RSA-wrapped keys (for example, RSA-OAEP envelope encryption) are vulnerable in the same way.

What is at risk, and what isn't

HNDL is a threat to confidentiality of data protected by quantum-vulnerable key establishment. It is not a threat to signatures in the same way.

AssetExposed to HNDL?Why
TLS / HTTPS traffic using ECDHE, X25519 or RSA key transportYesRecorded handshake reveals session keys
SSH sessions with classical key exchangeYesSame principle
VPN tunnels (IPsec/IKEv2, OpenVPN, WireGuard without a PSK)YesClassical DH key exchange
Data encrypted with keys wrapped by RSA or ECIESYesWrapped key can be unwrapped later
Encrypted email (S/MIME, OpenPGP with RSA/ECC)YesMessage keys encrypted with public keys
Data encrypted with AES using pre-shared or KMS-held keys never sent under public-key cryptoNoNothing public to attack
Signatures (certificates, JWTs, code signing)Mostly noForging needs to happen live; but see long-lived signatures below
Password hashes (Argon2id, bcrypt)NoSymmetric; Grover barely helps

Long-lived signatures are the exception worth noting: a firmware image signed today might still be verified in 2040, and a root CA key might live for 20 years. Those need post-quantum signatures before a CRQC exists, not because they can be harvested, but because devices and trust stores can't be changed quickly.

Mosca's inequality: do you have a problem?

Michele Mosca, a quantum computing researcher at the University of Waterloo, gave a simple way to reason about this, now widely cited in government and industry guidance. Define three numbers:

  • x = how many years your data must stay confidential (its shelf life)
  • y = how many years it will take you to migrate to quantum-safe cryptography
  • z = how many years until a cryptographically relevant quantum computer exists

If x + y > z, you have a problem: some of your data will still need protecting after it can be decrypted.

  today
    │◄──────── y: migration ────────►│◄──────── x: data shelf life ────────►│
    │                                 │                                       │
    │◄────────────────── z: until a CRQC exists ──────────────►│             │
    │                                                            ▲            │
    │                                                            └ data sent at the
    │                                                              end of migration
    │                                                              is still secret here,
    │                                                              but now decryptable

Everything you send until your migration finishes is recorded under classical key exchange. If any of that data must stay secret beyond the day a CRQC appears, it's exposed.

A worked example

A health-tech company stores and transmits patient records. Let's estimate:

  • x (shelf life): medical data stays sensitive for the patient's lifetime, and regulations require retention for many years. Call it 25 years to be conservative. Even a short-lived API token might be x = 0, but patient records are not.
  • y (migration time): they have a dozen services, a mobile app, a vendor-managed load balancer, partner integrations over mTLS, and an HSM-backed key hierarchy. An honest estimate including vendor upgrades and testing is 4 years.
  • z (time to a CRQC): unknown. Take a range: optimistic for attackers 10 years (around 2036), pessimistic for attackers 20 years.
  x + y = 25 + 4 = 29 years

  z = 10 → 29 > 10  → exposed by 19 years
  z = 20 → 29 > 20  → still exposed by 9 years

Even under generous assumptions, this company has a problem today: patient data crossing the network now could be readable within its sensitivity window. The conclusion is not panic; it is "turn on hybrid key exchange everywhere we can this year, and shorten y".

Contrast a sports-score API: x is effectively zero (scores are public within minutes), so x + y < z under any reasonable estimate. That team can migrate on the normal upgrade cycle.

Reducing your exposure

You can't change z. You can change the other two:

  • Shrink y. Most of your key exchange may already be one config change away. Browsers, CDNs, OpenSSL 3.5+, Go 1.24+, recent Java and OpenSSH 10 negotiate hybrid post-quantum key exchange by default. The slow part is finding all the places that don't.
  • Shrink x. Don't send or keep data you don't need. Data minimisation and retention limits are quantum mitigations too.
  • Protect the highest-x data first. Long-lived secrets, health, financial, legal, identity documents, trade secrets, government data.

What to do about it: a short checklist

  1. Check your public endpoints. Use pqe's website checker or npx -y pqe-cli check yourdomain.com to see whether each hostname negotiates X25519MLKEM768 (the hybrid that browsers send). If you're behind Cloudflare or another CDN, the browser-facing side is probably already done; check the origin connection too.
  2. Check internal and service-to-service TLS. Old runtimes are the usual blocker: Node.js 20 ships OpenSSL 3.0 and can't negotiate ML-KEM; Node.js 22.20+, 24 and 26 ship OpenSSL 3.5. Load balancers often need a specific post-quantum security policy (for example, AWS's -PQ- TLS policies).
  3. Remove pinned classical-only settings. A config like ecdhCurve: 'P-256:P-384' or an nginx ssl_ecdh_curve prime256v1 line written years ago for "hardening" now disables post-quantum key exchange.
  4. Upgrade SSH. OpenSSH 10.0+ uses mlkem768x25519-sha256 by default; 9.0–9.9 use sntrup761x25519-sha512, also post-quantum. Older servers and network appliances need upgrades.
  5. Find envelope encryption with RSA or ECC. Data keys wrapped with RSA-OAEP or ECIES for long-term storage need a plan: migrate to ML-KEM (often in a hybrid construction) or to symmetric key wrapping inside a KMS.
  6. Scan the code. npx -y pqe-cli scan . finds the RSA, ECDH and X25519 usage, TLS configuration and SSH settings in your repositories, so the inventory isn't guesswork.

The migration playbook turns this into a full plan.

Common objections

"Our traffic isn't interesting enough to record." Maybe. But you rarely know who's interested in your data in ten years, and enabling hybrid key exchange is usually cheap. The cost-benefit is lopsided.

"We use AES-256, so we're fine." AES-256 protects the payload, but its key came from a public-key exchange. That exchange is what gets broken.

"We use TLS 1.3 with forward secrecy." Good, keep it. Forward secrecy protects against stolen server keys, not against solving the key exchange itself.

"Quantum computers might never work." Possible. But hybrid key exchange keeps classical security too, so if they never arrive you've lost a few hundred bytes per handshake. See Hybrid cryptography.

Next: The new standards: ML-KEM, ML-DSA, SLH-DSA and friends.