Interactive Calculator · Security and Networks
Post-Quantum Migration Risk Calculator (Mosca Inequality)
Combine how long your data must stay secret, how long migration takes, and when a quantum computer might arrive, and see whether you are already late.
From the moment it is encrypted. Medical, legal, and state secrets can need decades.
Inventory, testing, vendor updates, and replacing hardware. Large organizations often need 5 to 10 years.
Mosca test x + y
26.0 years
versus z = 12 years
Chance of exposure
99.7%
Probability that z < x + y
High risk
On the central guess you are 14.0 years late. Data encrypted during migration could be decrypted while it is still sensitive.Planning
To keep exposure under 5%, migration must finish within -16.2 years from now, so it should start 22.2 years ago.
Timeline
If the amber bar ends after the red line, data encrypted late in the migration can be exposed.
Exposure probability versus migration time
Apply Mosca's inequality with uncertainty: compute the probability that data is exposed, see the timeline of migration against the quantum threat, and find how soon you must start to keep the risk under five percent.
What this calculator does
Nobody knows when a quantum computer capable of breaking today's public-key cryptography will exist. That uncertainty tempts organizations to wait. Michele Mosca gave a compact way to see why waiting is dangerous. Let x be the number of years your data must stay confidential, let y be the number of years your organization needs to migrate to quantum-safe cryptography, and let z be the number of years until a cryptographically relevant quantum computer exists. If x plus y is greater than z, then data protected during the migration can be decrypted while it is still sensitive. The inequality does not need an exact value of z. It only asks whether your own deadlines already overlap with a plausible threat.
This calculator turns the inequality into a risk estimate. You enter x and y, a central guess for z, and how uncertain that guess is. It models z as a bell-shaped distribution, computes the probability that z is smaller than x plus y, draws the timeline, and works out how many years you have left before migration must start in order to keep the risk below five percent. A second chart shows how exposure falls as you shorten the migration.
How to use it
Start with the Medical records preset: data that must stay private for 30 years and a five year migration. With a central threat estimate of 12 years and an uncertainty of five years, the sum x plus y is 35 years, far beyond the threat, and the exposure probability is essentially 100 percent. Records encrypted today with quantum-vulnerable key exchange can be recorded now and decrypted later, which is the harvest-now-decrypt-later risk. Compare the Short-lived tokens preset, where data is sensitive for about a month and migration takes a year. The sum is 1.1 years, the exposure probability is about 1.5 percent, and there is little urgency.
Next, try the Payment card data preset, with a seven year secrecy requirement and a three year migration. The sum of 10 years is just under the central threat estimate of 12 years, so the central case looks fine, but the uncertainty leaves a 35 percent chance that the threat arrives sooner. This is the zone where most organizations live, and it shows why the calculator reports a probability and not just a pass or fail. Then flip the threat to the Cautious preset, with a central guess of 25 years and an uncertainty of eight years: the same card-data case drops to about 3 percent. The conclusion depends strongly on your view of the threat, which is why national agencies set deadlines for everyone, not just for those who agree.
The planning panel answers the practical question: to keep exposure under five percent, when must migration finish and when must it start? With the central guess of 12 years and a five year uncertainty, the 95 percent worst case is that the threat arrives in under four years. Data that must stay secret for more than four years then needs protection already, and the start date is negative, meaning the start date has already passed. For short-lived data, the calculator gives you a positive number of years to begin. Move the sliders to see which of the four variables dominates your situation.
Reading the result
Treat the probability as a way to compare scenarios, not as a forecast. The model assumes that the threat arrival date follows a simple bell-shaped distribution, which is a crude stand-in for expert opinion. Expert surveys, such as the Global Risk Institute's annual report, show wide disagreement, with some experts giving high probability to a break within 10 years and others much lower. Policy deadlines reflect that spread. NIST proposes deprecating quantum-vulnerable algorithms by 2030 and disallowing them by 2035, the US National Security Agency requires exclusive use of quantum-resistant algorithms in most national security systems by 2033, and the UK and EU have published similar timelines.
The migration time y deserves as much thought as the threat. Cryptographic transitions are slow: SHA-1 was deprecated for signatures by NIST in 2011, and a practical collision was shown in 2017, yet some systems still used it afterwards. Post-quantum migration touches protocols, certificates, hardware security modules, embedded firmware, and third-party dependencies. Many large organizations need five to ten years even when they start with a good inventory.
Assumptions and limits
The model treats x, y, and the threat date as independent and ignores that migration can be staged: key exchange for new connections can move quickly, while signatures and embedded devices lag. It assumes that data can be collected and stored by an adversary, which is plausible for network traffic and stolen databases, and it ignores partial mitigations such as strong symmetric encryption layers. It uses a single threat distribution rather than a mix of scenarios. It is a thinking tool for planning, not a risk assessment of a particular system.
The formulas behind it
Mosca's inequality
x + y > z ⇒ exposure
x is the secrecy lifetime, y the migration time, z the time until a cryptographically relevant quantum computer.
Probability of exposure
P = Φ((x + y − μ) / σ)
Φ is the normal cumulative distribution function, μ the central guess for z, σ its uncertainty.
Migration deadline for 5% risk
t_finish = μ − 1.645σ − x
Latest completion time, in years from now, that keeps the exposure probability under 5 percent.
Latest start
t_start = t_finish − y
Negative values mean the start date has already passed.
Worked examples
Medical records
- x = 30 years, y = 5 years, μ = 12 years, σ = 5 years.
- x + y = 35, so P = Φ((35 − 12)/5) = Φ(4.6) ≈ 1.
ResultNear-certain exposure on this model. Such data needs protection now.
Short-lived tokens
- x = 0.1 years, y = 1 year, same threat.
- x + y = 1.1 years, so P = Φ((1.1 − 12)/5) = Φ(−2.18) ≈ 1.5%.
ResultLow risk. The deadline to finish is about 3.7 years away and the start is about 2.7 years away.
Payment card data
- x = 7 years, y = 3 years.
- With μ = 12 and σ = 5: P = Φ((10 − 12)/5) = Φ(−0.4) ≈ 34%.
- With μ = 25 and σ = 8: P = Φ((10 − 25)/8) = Φ(−1.9) ≈ 3%.
ResultThe answer swings from a third to a few percent depending on the threat view.
Frequently asked questions
Do I need to know exactly when a quantum computer will arrive?
No. The inequality works with a range of plausible dates, and the cost of being late is high enough to justify caution.
Why is harvest now, decrypt later relevant?
Because an adversary can record encrypted traffic today and decrypt it when a machine exists, so exposure starts when the data is sent, not when the machine arrives.
What should I do first?
Make an inventory of where and how cryptography is used, rank systems by x and y, and begin with the ones that fail the test.
References
- Mosca, M. (2018). Cybersecurity in an era with quantum computers: Will we be ready? IEEE Security and Privacy, 16(5), 38-41.
- National Institute of Standards and Technology (2024). NIST IR 8547 (initial public draft): Transition to post-quantum cryptography standards.
- National Security Agency (2022). Commercial National Security Algorithm Suite 2.0 advisory.
- Mosca, M., & Piani, M. Quantum threat timeline report. Global Risk Institute (annual).
- Stevens, M., Bursztein, E., Karpman, P., Albertini, A., & Markov, Y. (2017). The first collision for full SHA-1. CRYPTO 2017, LNCS 10401, 570-596.
- Gidney, C. (2025). How to factor 2048 bit RSA integers with less than a million noisy qubits. arXiv:2505.15917.
Keep exploring
- Paper: Cybersecurity in an Era with Quantum Computers: Will We Be Ready?
- Term: Harvest Now, Decrypt Later
- Myth: There is no need to switch to post-quantum cryptography until a quantum computer actually exists
- Forecast: Migrating to Post-Quantum Cryptography: The Engineering Reality
- Forecast: A Practical Roadmap for Companies: How to Prepare for Quantum
These calculators use simplified, published models for education and planning. Real devices and systems differ, so treat results as estimates. They are not engineering, investment, legal, or security advice.