Methodology
Last updated: May 2026 · Based on the framework from Ray, Gautam & Ryan (2026)
1. Overview
Bitcoin addresses rely on either elliptic-curve cryptography (ECDSA) or Schnorr signatures to authorize spending. A sufficiently powerful quantum computer running Shor's algorithm can derive the private key from a public key in polynomial time. This scanner determines whether each address has revealed its public key on-chain and, if so, how urgently funds should be migrated under three possible CRQC arrival timelines.
2. Address Classification
We detect address type using the bitcoin-address-validation library, mapped to the following types:
| Prefix / Pattern | Type | Pubkey exposed when spent? |
|---|---|---|
| 1… | P2PKH | Yes — ECDSA signature reveals full public key |
| 3… | P2SH | Ambiguous — depends on redeem script |
| bc1q… (20 byte) | P2WPKH | Yes — SegWit v0, pubkey in witness |
| bc1q… (32 byte) | P2WSH | Script-dependent; treated as ambiguous |
| bc1p… | P2TR | Key path spends expose the key; EXPOSED automatically |
| Pay-to-PubKey | P2PK | Always exposed — pubkey in scriptPubKey |
Each address is then classified as SAFE_AT_REST, EXPOSED, EMPTY, or UNRESOLVABLE based on the logic in §3.
3. Pubkey Exposure Logic
An address is classified EXPOSED when its public key is knowable by an adversary. The truth table:
| Condition | Classification | Action |
|---|---|---|
| P2TR or P2PK, balance > 0 | EXPOSED | MIGRATE_IMMEDIATELY |
| P2TR or P2PK, balance = 0 | EMPTY (exposed) | MONITOR |
| Any type, has outgoing tx, balance > 0 | EXPOSED | MIGRATE_IMMEDIATELY |
| Any type, no outgoing tx, balance > 0 | SAFE_AT_REST | NO_ACTION_NEEDED |
| Any type, no outgoing tx, balance = 0 | EMPTY | NO_ACTION_NEEDED |
| UNKNOWN type | UNRESOLVABLE | MANUAL_REVIEW |
| txCount > 100 (any) | + HIGH_REUSE flag | Consider consolidation |
4. Risk Score Formula
The risk score (0–100) for each CRQC scenario is computed as:
Where:
- exposureRatio = exposedBtc / totalBtc
- weight = scenario urgency weight (see §5)
- yearsToMid = max(1, scenarioMidYear − currentYear)
- Square-root decay reflects diminishing marginal risk reduction as the threat recedes
Risk bands: 0–24 LOW · 25–49 MODERATE · 50–74 HIGH · 75–100 CRITICAL
5. CRQC Timeline Scenarios
We model three CRQC arrival scenarios derived from the GRI 2024 quantum threat ranges as formalized in Ray, Gautam & Ryan (2026). We make no claim of endorsement by the paper's authors.
Mid-year: 2042
Weight: 0.6
Mid-year: 2035
Weight: 0.85
Mid-year: 2030
Weight: 1
6. Recommended Actions
MIGRATE_IMMEDIATELY
Move funds to a quantum-resistant address type (P2WPKH or P2TR key-path-only used once). The pubkey is on-chain and the balance is non-zero.
MONITOR
The pubkey is exposed but the address currently holds zero balance. Set up alerts for any incoming transactions.
NO_ACTION_NEEDED
The pubkey has never been revealed. No quantum risk today; continue monitoring as CRQC timelines evolve.
MANUAL_REVIEW
Address type is ambiguous (complex P2SH script) or could not be resolved. Investigate manually.
7. Data Sources & Privacy
On-chain data is fetched from mempool.space (primary) with automatic fallback to Blockstream Esplora on 429 or 5xx responses. BTC/USD price is fetched from CoinGecko and cached in-process for 60 seconds.
Privacy: No addresses, results, or user identifiers are persisted. No personal data is transmitted or stored.
The scanner is fully open-source (MIT). You can run it locally against your own mempool node.
Ready to scan?