Most security threats arrive after the attack. A quantum computer is unusual because the attack has a long front end. If an adversary records encrypted data now, the loss happens years later, when the machine arrives, and no defence you deploy at that point can undo it.
That strategy has a name, harvest now, decrypt later, sometimes written store now, decrypt later. It explains why the migration to post-quantum cryptography starts before any machine that can break RSA exists.
How harvest now, decrypt later works
The attacker needs two things: access to ciphertext, and patience. Collecting ciphertext is far easier than most people assume, because encryption is designed to be safe on untrusted networks, so that is where the copies are taken.
- Recording network traffic. TLS sessions, VPN tunnels and SSH connections cross networks that other parties can observe, such as internet providers, transit links, shared facilities and any compromised router. A recording of a handshake plus the encrypted stream that follows is all that is needed.
- Copying encrypted backups and databases. Backup tapes, cloud snapshots, exported data sets and encrypted database dumps get stolen in ordinary breaches. If the data key was wrapped with RSA or an elliptic curve key, the wrapped key is in the same archive.
- Collecting archives and file shares. Documents encrypted with PGP, S/MIME or CMS under public-key recipients are often kept for years in mailboxes and document stores.
Storage is cheap, and the attacker does not need to know in advance which recordings will matter. The decision about what to decrypt can be made later, when the machine is available and its time is scarce.
Why forward secrecy does not help
Forward secrecy is a good property of modern protocols. In TLS 1.3 every connection uses a fresh, ephemeral key pair to agree a session key. The long-term certificate key only signs the handshake. If an attacker steals the server's private key next year, they still cannot decrypt last year's recordings, because the session keys were never derived from it.
That protects against one threat, the later theft of a stored key. A quantum attacker does not need to steal anything. The recording of the handshake contains the ephemeral public values, for example the X25519 shares in the ClientHello and ServerHello. Shor's algorithm turns an elliptic curve public value into the matching private value.[2] With both private values, the attacker computes the same session key as the two endpoints did and decrypts the whole recorded session.
So ECDHE with forward secrecy, which is the best classical practice, gives no protection against this particular attacker. The protection has to come from a key exchange that Shor's algorithm cannot solve. That is the purpose of hybrid key exchange such as X25519MLKEM768, which combines X25519 with the NIST-standard ML-KEM.[7] An attacker would have to break both, so recordings made after deployment are protected even if X25519 falls.
Hybrid key exchange is already widely available as of mid-2026. OpenSSL 3.5 offers X25519MLKEM768 in its default TLS key shares,[9] OpenSSH 10.0 uses mlkem768x25519-sha256 as its default,[8] and RFC 9370 lets IKEv2 add a post-quantum exchange to an IPsec tunnel.[10] Check the readiness tracker for the products you rely on. Traffic recorded before the upgrade stays exposed, which is the reason to move early.
Data lifetimes
Whether a recording matters depends on how long the data stays sensitive. Think of this as the confidentiality shelf life. Some data is worthless a minute later, and some must stay secret for decades.
| Data | How long it stays sensitive | Why |
|---|---|---|
| Session cookies, one-time passcodes | Minutes | Useless once expired |
| Card authorisation messages | Short to medium | Card numbers expire and are reissued, but cardholder identity data in the same messages lasts longer |
| Interbank and treasury messages | Medium | Commercial sensitivity fades, but counterparties and positions can matter for years |
| Mortgage and loan files, customer identity records | Decades | Held for the life of the loan and long afterwards for regulatory reasons; they contain identity data that does not change |
| Legal, M and A and board material | Years to decades | Strategic and legal sensitivity persists |
| Trade secrets and research and development data | Decades | Value lasts as long as the secret does |
| Health and insurance records | A lifetime | People's medical history never expires |
| Encryption keys and credentials stored in backups | As long as the keys work | A recovered key unlocks everything under it |
Retention schedules help here. If a regulation or policy obliges you to keep records for a fixed period, that period is a floor on the shelf life of anything an attacker could copy from those records.
Mosca's inequality, worked through
Michele Mosca framed the timing question in 2015 with three quantities, all measured in years.[1]
- x, the shelf life: how long the data must stay confidential.
- y, the migration time: how long it will take you to replace the vulnerable cryptography in the systems that protect it.
- z, the time until a quantum computer can break the cryptography.
The reasoning is simple. Data encrypted just before you finish migrating stays sensitive for x more years. By then it is y years after today, plus x years of shelf life, so it needs protection until year x + y. If the machine arrives before that, the data is exposed.
The unknown is z. No one can supply it, so treat it as an input you vary. The table uses two illustrative values, 15 and 25 years. They are assumptions chosen for the example, and they are not forecasts. The values of x and y are also illustrative.
| Data type | x: shelf life | y: migration time | x + y | At risk if z = 15? | At risk if z = 25? |
|---|---|---|---|---|---|
| Card authorisation traffic | 3 | 3 | 6 | No (6 is below 15) | No (6 is below 25) |
| Mortgage and customer identity records | 30 | 5 | 35 | Yes (35 is above 15) | Yes (35 is above 25) |
| Pharmaceutical or engineering research data | 15 | 4 | 19 | Yes (19 is above 15) | No (19 is below 25) |
Three lessons follow. Card traffic has a short shelf life and a short fuse, so it can wait behind other work. Mortgage records are at risk under both assumptions, because the shelf life alone is longer than any plausible z in the table. The research data depends on the assumption, which is the usual situation. When the answer flips with a plausible change in z, the sensible conclusion is to act, because the cost of migrating early is low compared with being wrong.
You control y. A migration time of five years assumes inventory, vendor upgrades, testing and rollout. Every year you take off y moves the whole inequality in your favour. That is where a cryptographic inventory pays off.
Exposed. Data encrypted with RSA or ECC until 2032 must stay secret until 2042, but becomes readable in 2038. That is 4 years of exposure, and it starts with traffic recorded today.
Signatures behave differently
A digital signature needs to be unforgeable only while someone relies on it. Signing a transaction today with ECDSA does not let an attacker forge it retroactively in a way that matters, because the transaction was accepted at the time. Forgery is therefore a forward-looking risk. It starts when a machine exists.
Two cases are urgent anyway, because replacing the keys takes years.
- Long-lived roots. A root certificate authority key may be embedded in devices and trust stores for decades. If it is forged, every certificate beneath it can be forged.
- Firmware and code-signing keys. Devices in the field, such as payment terminals, ATMs and network gear, verify firmware with a key baked in at manufacture. If that key can later be forged, an attacker can push malicious firmware, and you cannot rotate the key on devices you cannot reach. The NSA's CNSA 2.0 calls for stateful hash-based signatures (LMS and XMSS) for software and firmware signing, with support and preference by 2025 and exclusive use by 2030.[6]
Signatures that must stay verifiable for decades, such as archived contracts, also need thought. The signed document remains valid only if the algorithm remains trustworthy, so long-term archives often re-sign or timestamp periodically.
Uncertainty about Q-day
Q-day is the informal name for the day a quantum computer can break widely used public-key cryptography. Nobody knows it. Expert surveys such as the Global Risk Institute's Quantum Threat Timeline place a cryptographically relevant quantum computer most likely in the 2030s, with wide uncertainty.[3] Those surveys reflect opinion, not measurement, and the opinions move as hardware and algorithms improve.
Three consequences follow for planning.
- Do not wait for a date. Mosca's inequality turns the uncertainty into a decision rule that works without one.
- Official deadlines already treat 2030 to 2035 as the planning horizon. NIST's draft IR 8547 would deprecate quantum-vulnerable public-key algorithms after 2030 and disallow them after 2035,[5] and the UK NCSC asks for discovery and a plan by 2028, highest-priority migrations by 2031 and completion by 2035.[4]
- Surprises are possible in both directions. An algorithm improvement can lower the cost of the attack, and hardware delays can postpone it. Cheap early action costs little in either case.
Common objections
Three objections come up in most steering committees. Each has a short answer.
Our data is encrypted with AES-256, so it is safe
AES-256 itself is not the weak point. What matters is how the AES key reached the other party or was stored. If the key was agreed with ECDHE, or wrapped under an RSA public key, the attacker attacks that step and then decrypts with the recovered AES key. Strong symmetric encryption does not help when the key handover is the weak link. The article on Grover's algorithm and symmetric cryptography explains why the symmetric layer itself holds up.
Nobody would bother to record our traffic
That may be true for much of it. The inequality asks about the most sensitive and longest-lived data, which is a small share of the total. Bulk recording is cheap enough that the attacker does not have to be selective at collection time. You do not have to guess whether you are a target. You have to decide which data you could not accept losing, and protect that.
We will migrate when the standards settle
The core standards were final in August 2024 (FIPS 203 for ML-KEM, FIPS 204 for ML-DSA and FIPS 205 for SLH-DSA).[7] Waiting adds to the volume of recorded data and does nothing to shorten y. Inventory and planning can begin immediately and cost little.
What to protect first
- Key exchange on links that carry long-lived data. VPNs between data centres, links to cloud providers and partners, internal TLS to databases, and SSH to administrative hosts. Hybrid key exchange fixes future recordings without touching the data itself.
- Data at rest wrapped with RSA or curve keys. Backups, archives, and envelope-encrypted data with key encryption keys held by RSA. Use symmetric AES-256 key wrapping where a post-quantum option is not yet available.
- Long-lived signing roots and firmware keys. These take longest to replace.
- Everything else, by shelf life. Rank the rest with Mosca's inequality.
Reducing retention helps as well. Data you delete cannot be harvested from a backup later.
What to do now
- Run
qsc scanacross repositories, configuration, certificates, infrastructure and live endpoints (--target host:443,ssh://host) to build a list of where RSA and curve key exchange protect data. - Export the result as a CBOM and attach a shelf life to each protected data set, using the table above as a starting point.
- Run
qsc advisoriesto see which findings carry harvest-now exposure, such as RSA key transport and ECDH key agreement, and which have a fix available today. - Apply the safe TLS and SSH configuration patches that
qsc fixproposes, then re-scan with--baselineto prove the change. - Revisit your assumption for z every year and record the reasoning with your risk assessment.
Related reading: How Shor's algorithm breaks RSA explains the attack, Hybrid key exchange in TLS, SSH and VPNs covers the main defence, and The post-quantum migration playbook shows how to run the programme.