Basics
HNDL and Mosca: Why the Clock Is Already Running
doc: i6nrbuodt1em1bbx6ora61dn
sig: 4bcbee4e…1a202834
An Attack Written Into Law
On December 21, 2022, the Quantum Computing Cybersecurity Preparedness Act became law in the United States as Public Law 117-260. Congress opens it with a list of findings, and the fourth one describes an attack that, as far as anyone publicly knows, nobody can carry out to the end yet. Adversaries of the United States could steal sensitive encrypted data today using classical computers and wait until quantum systems are powerful enough to decrypt it. The consequence in the law is very down to earth: federal agencies have to keep an inventory of their systems that are vulnerable to decryption by quantum computers.
The attack has two halves, and only the second one needs a quantum computer. The whole thing goes by harvest now, decrypt later (HNDL): record data today, decrypt it later. Germany's Federal Office for Information Security (BSI) calls it the "Store Now, Decrypt Later" scenario in its technical guideline TR-02102-1 and means the same thing. The first half works with today's technology and leaves no trace on the victim's side. Whatever gets recorded today can't be protected after the fact, no matter how fast the migration goes afterward.
How much time is left can be estimated with an inequality by Michele Mosca that shows up in nearly every migration guide. It's simple, and it often gets read even more simply than it was meant.
What a Recording Contains
The Handshake Is in the Clear
A Transport Layer Security (TLS) 1.3 connection starts with client and server agreeing on a shared key. With the widely used X25519, each side generates a short-lived key pair and sends the public half along, the client in its ClientHello and the server in its ServerHello. Both messages cross the wire unencrypted. Under RFC 8446, encryption only covers everything after the ServerHello. From its own private key and the other side's public key, each side computes the same secret, and TLS derives the symmetric keys for the rest of the traffic from it.
So whoever records the connection has everything except a private key. Nobody can compute that from the public key today, and the security rests on exactly that. In the 1990s, Peter Shor showed that a quantum computer could. Shor's algorithm solves integer factorization and the discrete logarithm problem in polynomial time, and practically all public-key cryptography in use today rests on those two problems, from RSA to the elliptic-curve schemes. With a cryptographically relevant quantum computer (CRQC), the recorded public key yields the private key, that yields the shared secret, and the shared secret yields the plaintext. Nobody has to attack AES for this. What Grover's algorithm means for symmetric cryptography is covered in a separate article.
TLS 1.2 with RSA key transport is even simpler. There, the client encrypts a secret under the RSA public key from the server certificate. Factor that one modulus, and every recorded session set up with that certificate opens.
Forward Secrecy Doesn't Help Here
One point tends to get lost. According to RFC 8446, TLS 1.3 provides forward secrecy for every public-key based key exchange. Session keys come from short-lived key pairs that are discarded after the handshake, so old sessions stay protected if a server's long-term key is stolen later. Against a quantum computer, that doesn't help. An attacker doesn't need the deleted private key. They compute it from the public key sitting in the recording. Forward secrecy only prevents a single stolen server key from opening every session at once. With Shor, each session costs its own computation, but it still opens.
TR-02102-1 draws a sober conclusion from this in Remark 2.1. Because someone may record the key establishment, changed recommendations for a scheme also affect keys that were negotiated with it earlier. If a scheme loses conformance with the guideline, the keys negotiated with it should no longer be used.
Stored Data Counts Too
HNDL doesn't stop at the network card. With email encryption via S/MIME or OpenPGP, and with many file encryption tools, the content is encrypted symmetrically and the content key is wrapped with the recipient's RSA or elliptic-curve public key. Both then sit together in the mailbox or the backup. Anyone who gets hold of a copy doesn't need to record anything. That's why the EU migration roadmap explicitly names data that is stored as well as data that is transmitted, if it has to stay confidential for a long time. In a post titled "A Cryptography Engineer's Perspective on Quantum Computing Timelines," Filippo Valsorda calls file encryption especially vulnerable.
Who Records
The first half needs access to the traffic and an interest that lasts for many years. A case from Germany shows what that access can look like. In May 2018, Germany's Federal Administrative Court ruled that the company operating the DE-CIX internet exchange in Frankfurt has to cooperate in the strategic telecommunications surveillance of the Federal Intelligence Service (BND). It must provide the BND with a complete copy of the telecommunications on the designated transmission routes at a handover point in Germany. What intelligence services keep from such feeds, and whether they store encrypted material for later cryptanalysis, isn't publicly documented. What is documented is that lawmakers and agencies on both sides of the Atlantic treat the scenario as a relevant threat.
Interest is the second condition, and it filters hard. The PQC Migration Handbook, published by the Dutch intelligence service AIVD with the research institutions CWI and TNO, considers data vulnerable if other parties would still find it interesting 20 years or more from now. A weather app session doesn't qualify. A personnel file or a draft patent might.
What Isn't Affected
Whether a recording or a copy becomes readable later depends only on the scheme used to agree on or wrap the key.
| Case | Example | Readable later? |
|---|---|---|
| TLS 1.3 with classical key establishment | X25519, P-256 | yes |
| TLS 1.2 with RSA key transport | TLS_RSA_… cipher suites | yes, every session with the same server key |
| TLS 1.3 with hybrid key establishment | X25519MLKEM768 | no, as long as ML-KEM holds |
| SSH | curve25519-sha256 / mlkem768x25519-sha256 | yes / no, as long as ML-KEM holds |
| VPN with classical Diffie-Hellman | IKEv2 without an additional key exchange, WireGuard without a pre-shared key | yes |
| VPN with an additional post-quantum key | IKEv2 per RFC 9370, WireGuard with a pre-shared key from a post-quantum scheme | no, as long as the post-quantum scheme holds |
| Email and files with RSA or ECDH for the content key | S/MIME, OpenPGP | yes |
| Purely symmetric encryption | password or pre-distributed key | no |
| Signatures | certificates, code signatures | no HNDL, but a cutoff date of their own |
Purely symmetric encryption with a key that never traveled through a classical asymmetric scheme gives HNDL nothing to work with. WireGuard builds on this with its optional pre-shared key. The protocol agrees on keys via Curve25519 and can mix in a pre-distributed symmetric key, which its own documentation suggests for post-quantum resistance. The protection then depends on how that key was distributed. Rosenpass, for example, negotiates it with post-quantum schemes, including Classic McEliece, whose current standing has its own article.
Mosca's Inequality
Three Quantities
In November 2015, Michele Mosca of the University of Waterloo published a short paper based on a talk at the QCrypt conference in Tokyo. For the inequality, the paper cites Mosca's own talk at the first Quantum-Safe-Crypto Workshop of the European Telecommunications Standards Institute (ETSI) in September 2013. It asks about three time spans. x is how long cryptographic keys need to stay secure, which Mosca calls the security shelf-life. y is the time it takes to deploy a set of quantum-safe tools, the migration time. z is the time until a quantum computer or some other method breaks the deployed public-key cryptography, the collapse time.
x + y > z
In words: if shelf-life and migration time together exceed the time until the break, Mosca says there's a serious problem today. The reason is in the sequence. During the migration, data keeps crossing the wire under classical protection, the last of it at the end of the y years. That data then has to stay secret for another x years, until y + x. If that point lies beyond z, the data is exposed while it still needs protection. The term HNDL doesn't appear in Mosca's paper. The U.S. National Institute of Standards and Technology (NIST) makes the connection, for example, in its report IR 8547. It introduces the inequality as "Mosca's theorem" and calls the threat "harvest now, decrypt later" in the same section.
Two details of the original often get lost in retellings. For data, x means as long as the content protected by a key is supposed to stay confidential. And z ends with any method that breaks the schemes. A quantum computer is just one of them. The case of Classic McEliece shows that classical cryptanalysis can move a timeline too.
Working Backward
The rearranged form is more useful than the inequality itself. Knowing x and y, you can count back from the year a CRQC is expected:
latest start = year of the CRQC − x − y
In words: the migration has to start at the latest as many years before the expected CRQC as shelf-life and migration time add up to.
A worked example, not a prediction. y is set to 5 years here, the low end of the 5 to 10 years the EU roadmap gives for fully migrating all relevant systems. For the year of the CRQC, two values from the BSI serve as inputs: 2040 from its study on the state of quantum computer development, and around 2035 in case certain error correction approaches prove themselves in demonstrators.
| Data | x (assumption) | Latest start if CRQC in 2040 | Latest start if CRQC in 2035 |
|---|---|---|---|
| Weather app session | 1 year | 2034 | 2029 |
| High risk under the EU criterion | 10 years | 2025 | 2020 |
| Health data over a lifetime | 30 years | 2005 | 2000 |
The first row is relaxed. Data nobody cares about after a year puts no HNDL pressure on anyone. It still has to be migrated, because the agencies' deadlines apply to everything. The middle row is the uncomfortable one. For data that counts as high risk under the EU roadmap's criterion, migration would have had to start last year, even under the later BSI forecast. The last row is no longer about deadlines. Whatever has been sent there under classical protection and may have been recorded is already exposed by this calculation, and no migration changes that.
z Is Not a Year
The table pretends there's a single year for the CRQC. Mosca treated z as a probability from the start. In 2015, Mosca put the chance of breaking RSA-2048 by 2026 at one in seven, and by 2031 at one in two. 2026 is nearly over and no such machine is publicly known, which doesn't refute the estimate. In the Global Risk Institute's Quantum Threat Timeline Report 2025, written by Mosca and Marco Piani, 26 surveyed experts consider a CRQC quite possible within ten years, at 28 to 49 percent, and likely within 15 years, at 51 to 70 percent.
In version 2.2 of its study on the state of quantum computer development, the BSI calls 15 years from 2025 a conservative estimate and considers a CRQC by 2040 a reasonable expectation. If error correction based on quantum low-density parity-check (qLDPC) codes performs well in demonstrators, it could be about ten years.
Meanwhile, resource estimates keep falling. In 2019, Craig Gidney and Martin Ekerå estimated 20 million noisy qubits and eight hours to factor RSA-2048. In May 2025, Gidney arrived at fewer than a million qubits and less than a week of runtime in a preprint. In March 2026, Google Quantum AI described circuits in another preprint that would compute discrete logarithms on 256-bit elliptic curves with fewer than 500,000 physical qubits in a few minutes, roughly a twentieth of the qubits in earlier estimates. Papers like these don't build a machine. They lower the bar a machine has to clear.
People draw different conclusions from this. In March 2026, Google set 2029 as the target year for its own migration and moved authentication to the front. Valsorda had been planning for 2035 and has since argued for 2029 as the target. The argument is about shelf-life: it's very hard to make sure that all secrets in a connection or a file have a shelf-life shorter than three years, so any key exchange without a post-quantum scheme should be treated as a potential active compromise. The BSI sticks with 2040 as the expected year and still sets its key establishment deadlines well before that.
My take: the two camps aren't quite comparing the same quantity. The BSI estimates when a CRQC is likely to exist. Google sets a date by which its own migration should be done, which is the end of y, with a margin for a possible early z. For HNDL, the dispute matters less than it seems. If you send data with a ten-year shelf-life and need five years to migrate, you're already behind under the later BSI year. The forecasts mainly make a difference for short-lived data and for signatures. Valsorda's three years are essentially Mosca with z = 3 and y = 0: if you consider 2029 possible, you can't encrypt anything classically today that still has to be secret in 2029.
How Agencies Turn Mosca Into Deadlines
Agencies rarely write the inequality out, but they do the math. The clearest case is the coordinated roadmap of the EU's Network and Information Security (NIS) Cooperation Group, version 1.1 from June 2025. It takes the quantities from "Mosca's theorem" but focuses on the parts an organization controls itself. The time until a CRQC is already built into the deadlines. A use case counts as high risk if confidentiality has to be protected for at least ten years and an attack after ten years or more would still cause significant damage. That's x with a fixed threshold. High risk also applies if the transition takes more than eight years and an attack would have a high impact, with software updates as the roadmap's example. That's y with a fixed threshold. Where long-term confidentiality is at stake, the roadmap wants the transition completed as soon as possible and by the end of 2030 at the latest.
TR-02102-1, version 2026-01, explicitly grounds its deadlines in HNDL. Because encrypted data can already be stored for later decryption, the guideline says, the threat is relevant today for data with long-term protection needs. It recommends purely classical key establishment only until the end of 2031, and for applications with very high protection needs, the switch should happen by the end of 2030. It considers classical signatures trustworthy as long as no CRQC exists and expects to recommend them until the end of 2035. The four years between those two dates are HNDL in calendar form.
NIST presents the inequality in IR 8547, which followed a November 2024 draft and was published in final form on October 27, 2026. Under it, quantum-vulnerable signature and key establishment schemes are deprecated after 2030 and disallowed after 2035, regardless of security strength. In its application-specific guidance, NIST expects to prioritize the migration of key establishment to protect against HNDL, particularly in interactive protocols like TLS and the Internet Key Exchange (IKE). The UK's National Cyber Security Centre (NCSC) sets three milestones in its March 2025 guidance: discovery and a plan by 2028, the highest-priority migrations by 2031, and everything by 2035. Discovery there explicitly includes the expected lifetime of the data and its value to an adversary.
| Publisher | Document | Status | Key establishment | Signatures |
|---|---|---|---|---|
| EU, NIS Cooperation Group | Coordinated Implementation Roadmap, version 1.1 (June 2025) | Recommendation to member states | high risk by end of 2030, medium risk by end of 2035 | same deadlines, software updates as an example of high risk |
| BSI | TR-02102-1, version 2026-01 | Technical guideline | purely classical until end of 2031, by end of 2030 for very high protection needs | classical expected until end of 2035 |
| NIST | IR 8547 (October 2026) | Report, final | deprecated after 2030, disallowed after 2035, priority over signatures | deprecated after 2030, disallowed after 2035 |
| NCSC | Timelines for migration to post-quantum cryptography (March 2025) | Guidance | highest-priority migrations by 2031, complete by 2035 | same as key establishment |
My take: a deadline is a ceiling for everyone, not a calculation for your own data. If you use the TR's general deadline at the end of 2031 to the full and send data with a ten-year shelf-life, the last classically protected data has to stay secret until 2041, a year past the BSI's 2040. The TR sees this itself. For information that's meant to stay confidential well beyond 2032, it no longer considers a reliable forecast possible. It recommends protection mechanisms that go well beyond its minimum requirements and advises keeping such information off public networks except where strictly necessary.
Signatures Run on a Different Clock
Signatures have no HNDL. NIST puts it this way in IR 8547: unlike encryption, an authentication system remains secure as long as the algorithms and keys used are secure at the time the authentication is performed. A signature that was checked in 2026 doesn't become false in 2040. Instead, there's a cutoff date. Once a CRQC exists, classical signatures no longer guarantee authenticity and integrity, according to TR-02102-1, and that holds for every key someone still trusts at that point.
In my view, Mosca still applies, just with a different x. Here it means the time a public key is still accepted for verification, say as a trust anchor in a device that stays in the field for 15 years, or as the key that checks firmware updates. That's why the EU roadmap uses software updates as its example of high risk, and Google justifies moving authentication forward by saying signatures have to be migrated before the first CRQC. How long a root certification authority outlives the classical schemes is covered in a separate article.
This site is an example. Every article carries an ML-DSA-65 signature that can be checked at /verify, years after publication. A classical signature checked after the cutoff date would be worthless, because there'd be no way to tell whether it's genuine or forged after the fact.
What Already Protects Traffic Today
The only thing that helps against HNDL is key establishment that a quantum computer can't break either. For TLS 1.3, RFC 10024, a Proposed Standard since August 2026, describes hybrid groups like X25519MLKEM768, which combine X25519 with the lattice-based ML-KEM-768. Chrome had rolled out hybrid key agreement by August 2024, explicitly to protect against HNDL. Since version 3.5, released April 8, 2025, OpenSSL offers an X25519MLKEM768 key share by default and prefers hybrid groups. OpenSSH has used post-quantum key agreement by default since version 9.0 in April 2022, with mlkem768x25519-sha256 since 10.0 in April 2025, and since 10.1 it warns when a connection is established without it. For IKEv2, RFC 9370 from May 2023 provides the framework for chaining multiple key exchanges, including post-quantum ones.
You can follow this in the Beyond Shor Playground. It shows a hybrid handshake of X25519 and a key encapsulation mechanism (KEM), including from the attacker's perspective, and the Shor switch lets you play out what's left of a recording once X25519 falls.
Hybrid key establishment only protects what's sent after it's turned on, though. Every recording from before stays exactly as vulnerable as on the day it was made. The potential damage grows with every month of classical transmission and doesn't shrink after the switch. The remaining gaps are wherever nobody updates the defaults: internal services with old libraries or hard-coded group lists, VPNs with classical Diffie-Hellman, embedded systems, and archives of classically encrypted email and files. Which cryptography runs where only becomes clear with an inventory. The article on cryptographic inventory describes how Beyond Shor does this for its own codebase and uses Mosca as the urgency measure in its risk analysis. The data is in the signed Cryptography Bill of Materials (CBOM) at /cbom.
Assessment
A confidentiality problem: HNDL hits key establishment and public-key encryption. Signatures have no HNDL but a cutoff date, and for them Mosca applies with the duration of trust as x.
Invisible and retroactive: A recording leaves no trace on the victim's side, and neither does a later decryption. Whether your own data is affected can't be determined, only assumed. That recordings are actually being made for later cryptanalysis isn't publicly documented. Lawmakers and agencies still treat the scenario as a relevant threat.
Not every file is a target: HNDL only pays off for data that will still interest someone many years from now, and only for attackers with access to the traffic or to copies. For short-lived data, it creates no pressure. Panic is as misplaced as a shrug. It comes down to x.
Forward secrecy is no substitute: Short-lived key pairs help against stolen server keys, not against Shor. The public key share is in the recording.
Mosca sorts, it doesn't predict: The inequality doesn't give you a date, it gives you a backward calculation. Its most uncertain value is z, and estimates for it vary widely. For data with a long shelf-life, they all lead to the same result anyway.
Deadlines are ceilings: The EU, the BSI, NIST and the NCSC have built a z into their dates. Organizations have to supply x and y themselves. For data with a long shelf-life, meeting a deadline isn't enough. The EU roadmap says so itself when it asks for a transition as soon as possible.
Different status: Of the documents cited, only the Quantum Computing Cybersecurity Preparedness Act is a law, and it binds U.S. federal agencies. TR-02102-1 is a technical guideline, the EU roadmap a recommendation to member states, IR 8547 a final NIST report, and the NCSC text guidance.
Recommendations
For Developers
- Enable hybrid key establishment with X25519MLKEM768 per RFC 10024 in TLS 1.3 and mlkem768x25519-sha256 in SSH, preferably by relying on the defaults of current libraries such as OpenSSL 3.5 or later.
- Find group and cipher suite lists hard-coded in code or configuration and change them so hybrid groups are offered first.
- Disable TLS 1.2 cipher suites with RSA key transport.
- Use a packet capture, for example in Wireshark, to check which group is actually negotiated, including on internal links and behind load balancers.
- Don't store session keys on non-volatile media, as TR-02102-1 advises, and create keylog files for debugging only in test environments and delete them afterward.
- Add a post-quantum key exchange to VPNs, per RFC 9370 for IKEv2 and via a pre-shared key from a post-quantum scheme for WireGuard.
- In file and email encryption tools, check what the content key is wrapped with and plan the move to a post-quantum scheme.
For CISOs, Information Security Officers and Consultants
- Have business units and legal set the shelf-life x for each data category, and, as the NCSC suggests, record the data's value to an adversary along with it.
- Estimate the migration time y from the slowest link, usually a vendor or a hardware cycle, and compare it with the 5 to 10 years in the EU roadmap.
- Set the CRQC year as a documented assumption with a source, calculate with at least two values, such as the BSI's 2040 and 2035, and review the assumption every year.
- Work out the latest start for each data category and tackle first the categories where it already lies in the past.
- Move connections over public networks that carry data with a long shelf-life to hybrid key establishment before anything else, and keep the amount of such data on public networks as small as possible.
- Rotate long-lived secrets, such as API keys or pre-shared keys, that have so far traveled over classically protected connections once the switch is done.
- Treat agency deadlines as ceilings in your planning and set earlier internal dates for data with a long shelf-life.
- Ask suppliers for binding dates for hybrid key establishment in their products.
Conclusion: Every Month of Classical Transmission Counts
I expect hybrid key establishment on the public web to be as unremarkable in a few years as TLS 1.3 is today. Chrome and OpenSSL have already changed their defaults, and RFC 10024 is the standard. The work is shifting to the long tail of internal networks, VPNs, long-lived devices and archives of classically encrypted files. Progress there depends less on any library than on whether someone knows x and y for their own data. Every new resource estimate will set off a new debate about z, and signatures will probably move further into focus, because they don't need a recording to become a problem, only a cutoff date. Nobody knows when the Q-Day timeline on Beyond Shor will get its entry for the first CRQC. What gets recorded until then is decided every day that something is still encrypted classically.