
Cost-of-delay prioritisation for post-quantum migration: classical and harvest-now-decrypt-later risk in one unit (USD per year). Code, proofs, case studies, live explorer.
Live explorer · reference implementation, proofs, case studies and statistics for a research paper.
Classical hacking risk and harvest-now-decrypt-later (HNDL) quantum risk, expressed in one unit — US dollars of loss per year of delay — so a single ordered list can answer "should we close this classical finding, or migrate that asset's cryptography first?"
Status: research prototype. All case-study inputs are assumptions derived from public documentation; no organisation supplied data, and the method has not been validated against real incidents or migrations. See Caveats.
Attackers can copy encrypted data today and decrypt it once a large quantum computer exists. How much that matters depends on how long the data must stay secret, whether it can be recorded, and whether an ordinary attacker would have taken it first. Existing post-quantum risk scores are dimensionless and quantum-only, so they cannot be compared with classical risk, which is measured in dollars.
This repository computes, for each asset, the cost of waiting one more year from each threat, in dollars, and couples them so the same loss is not counted twice. It contains:
costofdelay/) with the model, the arrival-time law for a quantum computer, uncertainty propagation, sensitivity analysis and a scheduling check;app/) that runs in a browser and explains every input.| Idea | Classical term = annualised loss $\lambda V$. Quantum term = $r,h\int_0^L f_Q(t),e^{-(\lambda+\rho)t},dt$, the rate at which deferring migration commits irreversible loss. Both in USD/year; a competing-risks factor stops the same loss being counted twice. |
| Proved | Units, no double counting, bounds, comparative statics, a closed-form dominance threshold, non-separability, and optimality of the ordering under Smith's rule (methodology/FORMAL_METHOD.md). |
| Verified | 256 automated tests; Monte Carlo and quadrature cross-checks; a second (JavaScript) implementation matching 577 values. |
| Evaluated on | MOSIP (national ID), Apache Fineract (banking), OpenMRS (medical records), Online Boutique (demo shop, procedure test only). |
| Headline results | The quantum term changes magnitudes and a few specific assets decisively, but moves the whole list less than input noise does for three of the four systems. The quantum-arrival date explains only 3–17% of the uncertainty; loss and turnover explain 73–91% (methodology/STATISTICS.md). |
Requires Python ≥ 3.10. Node ≥ 18 is optional (it runs the check on the explorer's maths).
git clone https://github.com/AnimeshShaw/pqc-cost-of-delay && cd pqc-cost-of-delay
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
python scripts/reproduce.py
reproduce.py runs, in order: the test suite → numerical validation → the statistical analysis (results/) → the figures (paper/figures/, created if missing) → the parameter tables → the explorer's data and its cross-language check. It takes roughly 2–4 minutes and is deterministic (every random procedure has a fixed seed). Afterwards git diff --stat results/ should show no change, or differences only in the last printed digit if your NumPy/SciPy versions differ. Exact tested versions are in requirements-lock.txt.
To explore interactively, use the live explorer or open app/index.html locally. It needs no server, and the page's code makes no network requests and sends your inputs nowhere (GitHub, as host, logs ordinary page visits).
To score your own register:
python -m costofdelay.register path/to/asset_register.csv
The CSV format is described in methodology/PARAMETERS.md and exemplified in case_studies/.
| Path | Contents |
|---|---|
costofdelay/ | The Python package: CRQC arrival law, asset model, scoring, a comparator for the published QARS score, uncertainty and statistics, scheduling. The scoring core uses only the standard library. |
tests/ | Unit tests, property tests of every proposition, refutation baselines |
methodology/ | Proofs; parameter definitions and anchors; statistical analysis |
case_studies/ | The four asset registers (CSV), one per system |
scripts/ | Reproduction, results, figures and tables |
results/ | Generated numbers (JSON, CSV, Markdown) |
app/ | Interactive explorer (HTML/JavaScript) with a Python-parity test |
If your organisation would like to test the method on a real register, or use the code or paper as a starting point, you are welcome to get in touch: [email protected]. Contributions are described in CONTRIBUTING.md.