Mosca’s theorem, also called the Mosca inequality, is a risk rule stating that an organization must act now on post-quantum migration if X + Y > Z, where X is how long data must stay confidential, Y is how long migration to quantum-safe cryptography will take, and Z is the time until a cryptographically relevant quantum computer exists. It is the most widely used framework in quantum security for deciding when to start replacing vulnerable public-key cryptography.
The rule was formulated by Michele Mosca, a researcher at the Institute for Quantum Computing at the University of Waterloo, and popularized in the mid-2010s. Despite its name, it is not a mathematical theorem with a proof. It is a planning heuristic whose strength lies in turning an uncertain technology forecast into a concrete deadline.
How the inequality works
The inequality compares two durations an organization controls or knows with one duration it cannot control. If the sum of the data protection period and the migration period is longer than the time left before quantum attacks become practical, some protected data will be exposed during its required confidentiality window.
The mechanism behind the risk is harvest now, decrypt later. An adversary can record encrypted traffic today and store it until a quantum computer running Shor’s algorithm can break the RSA or elliptic curve key exchange that protected it. The moment of interception is therefore irrelevant; what counts is when decryption becomes possible.
The table defines the three variables and what determines each one.
| Variable | Meaning | Determined by |
|---|---|---|
| X: shelf life | Years the data must remain confidential | Regulation, contracts, business value |
| Y: migration time | Years needed to deploy quantum-safe cryptography | System complexity, vendors, budget |
| Z: threat timeline | Years until a quantum computer breaks current public-key cryptography | Progress in quantum hardware and error correction |
Estimating each variable in practice
Shelf life is usually the easiest variable to estimate, because retention rules and contractual obligations often specify it. Medical records, national security material and long-lived intellectual property can require 25 years or more of confidentiality, while session data for a retail transaction may matter for only weeks.
Migration time is chronically underestimated. Past transitions, such as moving from SHA-1 to SHA-2 or retiring weak TLS versions, took many years to more than a decade in large organizations. Migration includes building a cryptographic inventory, waiting for vendor support, testing performance of larger post-quantum keys and replacing embedded devices that cannot be updated.
| Sector | Typical shelf life | Typical migration challenge |
|---|---|---|
| Government and defense | 25 to 75 years | Classified systems and long procurement cycles |
| Healthcare | Lifetime of the patient | Legacy medical devices |
| Banking | 7 to 10 years | Interconnected payment networks |
| Automotive and industrial | 15 to 20 years of product life | Firmware locked into deployed hardware |
| Consumer web services | Days to a few years | Dependence on browsers and libraries |
The threat timeline Z is the uncertain variable. Expert surveys, including the annual quantum threat timeline reports co-authored by Mosca, express it as probabilities rather than a date. Most experts consider a breaking machine unlikely within five years but give a substantial probability within 15 years; the spread of opinion remains wide.
Interpreting the result
The inequality yields a decision signal, not a precise forecast. Because Z is uncertain, practitioners evaluate it against several plausible values and treat any scenario where X + Y exceeds Z as unacceptable risk for sensitive data.
| Outcome | Interpretation | Recommended response |
|---|---|---|
| X + Y > Z | Data will be exposed while still sensitive | Start migration immediately and prioritize this data |
| X + Y close to Z | Small schedule slips create exposure | Begin inventory and hybrid deployments now |
| X + Y clearly below Z | Current protection likely sufficient | Plan migration and monitor quantum progress |
A useful rearrangement is Z minus Y, which gives the last year in which data can be encrypted with classical public-key methods and still meet its shelf life. For data with a long shelf life, this deadline often lies in the past already, which explains the urgency of national migration programs.
Relation to post-quantum standards and policy
Mosca’s theorem provides the rationale behind migration deadlines set by governments. Once NIST published the first post-quantum standards in 2024, including ML-KEM for key establishment and ML-DSA and SLH-DSA for signatures, the migration variable Y became something organizations could start reducing rather than merely estimate.
Policies such as CNSA 2.0 in the United States and similar roadmaps in Europe set transition dates around 2030 to 2035. These dates implicitly apply the inequality: they assume a plausible Z and back-calculate when systems must switch, given realistic Y values. Hybrid key exchange, which combines a classical and a post-quantum algorithm, is the common way to start protecting data before full migration is complete.
Limitations and misreadings
The inequality is simple by design, and its simplicity causes frequent misuse. It addresses confidentiality well but handles authentication less directly, because forged signatures matter only once a quantum computer exists rather than retroactively.
- Treating Z as a single date: a point estimate hides the tail risk that a breakthrough arrives early.
- Ignoring Y components: inventory, vendor readiness and device replacement often double initial estimates.
- Applying it only to new data: archives already harvested remain exposed regardless of future migration.
- Calling it a theorem in the strict sense: it is a heuristic, and its conclusions are only as good as its inputs.
- Overlooking symmetric cryptography: AES with 256-bit keys is not seriously threatened, so the inequality mainly concerns public-key algorithms.
Put simply
Mosca’s theorem is a simple deadline check for secrets. Add how many years a secret must stay safe to how many years it takes to upgrade the locks. If that total is longer than the years left before quantum computers can pick those locks, the upgrade is already late.
It works like planning a roof repair before the rainy season. If the repair takes three months and the rain might arrive in two, waiting is a mistake. The rule turns a vague future threat into a clear reason to start now.
In practice
A national health insurer stores patient records that must stay confidential for at least 30 years. Its security team estimates that replacing RSA-based key exchange across data centers, partner connections and backup systems will take about 8 years. Even under an optimistic assumption that a cryptographically relevant quantum computer is 20 years away, the sum of 30 plus 8 far exceeds 20.
The insurer therefore treats migration as urgent. It builds a cryptographic inventory, enables hybrid ML-KEM key exchange on external connections first, because recorded internet traffic is the easiest target for harvesting, and schedules internal systems next. The result is that newly transmitted records gain quantum-resistant protection within two years, long before the full migration is finished.