Explainer Cybersecurity 7 min read

Which Bitcoin addresses show a public key, and what a quantum computer could do with it

Some Bitcoin outputs put a public key on the chain as soon as they are paid, and others hold only a hash of one until the coins are spent. We decoded the specifications’ own test vectors to see which is which, and read the 2026 quantum estimate for Bitcoin’s curve in its own units.

Kenji Tanaka
Developer Tools & Cloud Analyst · Singapore
Published 29 Nov 2026, 11:50 PM (SGT)
Share:
A pale blue envelope on a wooden table, with a brass seal stamp on one side and a stick of red sealing wax on the other.
Photo by sik-life on Pixabay
Advertisement

Key points

  • Decoding the test vectors in Bitcoin’s own specifications, we found three output types that put a public key on the chain as soon as they are paid: pay-to-public-key, bare multisig and Taproot. All 40 of our checks passed.
  • The hashed types (P2PKH, P2SH, P2WPKH, P2WSH) hold 20 or 32 bytes of hash. BIP-360 says they become exposed “anytime their script reveals a public key”, and that xpubs and wallet descriptors reveal key information too.
  • A 2026 paper by Babbush and colleagues puts one run of Shor’s algorithm against Bitcoin’s curve at ≤1,200 logical qubits and ≤90 million Toffoli gates, or ≤1,450 and ≤70 million, on fewer than half a million physical qubits under its stated assumptions.
  • Published counts of exposed bitcoin use different definitions and dates. Chaincode Labs gives 20–50% of supply; Project Eleven’s tracker showed 6,262,905 BTC in a 30 January 2025 capture, last updated 17 January 2025.
  • BIP-360 (Pay-to-Merkle-Root) is a Draft, version 0.12.1, on 29 November 2026. In its own words it does not, by itself, protect against short exposure attacks.

Every bitcoin sits in an output whose locking script says what a spender must show. Some scripts hold a public key; others hold only a hash of one. That matters because Shor’s algorithm, on a large error-corrected quantum computer, would work back from a public key to its private key, and a hash gives it nothing to start from. The Bitcoin Improvement Proposals (BIPs) print test vectors, worked sample keys and scripts that software can check itself against. We decoded them and found three output types that put a key on the chain the moment they are paid: pay-to-public-key (P2PK), bare multisig (P2MS) and Taproot (P2TR). All 40 of our checks passed, including the seven Taproot keys in BIP-341’s wallet vectors, recomputed from their inputs. No such machine exists yet.

Three output types carry the key in the clear

Our decoder reads each vector from the bitcoin/bips repository at commit 9f3d3bc6a (Python 3.9.6, Apple M4, 29 November 2026). P2PK and P2MS have no standard address, so the table shows scripts. HASH160 is Bitcoin’s 20-byte fingerprint of a key or script, made with SHA-256 and then RIPEMD-160.

TypeLocking script, as decodedWhat the bytes areKey on chain before a spend
P2PK<33 or 65 B> OP_CHECKSIGpublic keyyes
P2MS (bare multisig)OP_6, six 33 B keys, OP_6 OP_CHECKMULTISIGsix public keys, 198 Byes
P2PKHOP_DUP OP_HASH160 <20 B> OP_EQUALVERIFY OP_CHECKSIGHASH160 of a keyno
P2SHOP_HASH160 <20 B> OP_EQUALHASH160 of a scriptno
P2WPKHOP_0 <20 B>HASH160 of a keyno
P2WSHOP_0 <32 B>SHA-256 of a scriptno
P2TROP_1 <32 B>tweaked public keyyes
P2MR (Draft)OP_2 <32 B>Merkle root of scriptsno

The genesis block shows the split. Its output, as Bitcoin Core’s source code records it, is a P2PK script holding a 65-byte key. HASH160 of that key equals the 20 bytes inside 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, the P2PKH address BIP-360 uses as its example. One key appears whole in one output and hashed in the other.

BIP-143’s six-of-six multisig script. As a bare P2MS output its 198 bytes of public keys sit on the chain. Wrapped, it is hashed by SHA-256 and then HASH160 to 20 bytes, and both hashes match BIP-143’s printed values.
The same six keys, in the clear or hashed twice. Recomputed by RECATOOLS on 29 November 2026. RECATOOLS, from BIP-11 and BIP-143

BIP-360’s own P2PK and P2MS examples do not decode as printed, so we used BIP-143’s two P2PK scripts and built P2MS from BIP-11’s template with BIP-143’s six keys. BIP-11 makes bare multisig standard “only for n less than or equal to 3”, so ours only illustrates where keys sit.

Download

Where the key sits, output type by output type

Eight output types with the vector we decoded, the locking-script shape, what the output holds, and how BIP-360, Chaincode Labs and Babbush et al. each label it, in their own words.

CSV · 2.5 KB

Download the CSV — Where the key sits, output type by output type (CSV)

Same key, hashed twice and shown once

The BIP vectors reuse G, the generator point of secp256k1 (Bitcoin’s curve), as a test key. BIP-173’s P2WPKH vector is HASH160 of G, its P2WSH vector is SHA-256 of a script checking a signature against G, and BIP-350’s Taproot vector is G’s x-coordinate itself. We recomputed all three.

One test key, G, in three outputs. P2WPKH holds a 20-byte HASH160 of G. P2WSH holds a 32-byte SHA-256 of a script containing G. P2TR holds G’s 32-byte x-coordinate, the key itself.
Two outputs hide the key behind a hash; Taproot shows it. RECATOOLS, from the BIP-173 and BIP-350 vectors

A Taproot key is tweaked. The key on the chain is the wallet’s own key shifted by an amount computed from a hash of that key and of any spending scripts. The tweak changes which point appears on the chain, and a point still appears. For BIP-341’s seven wallet vectors, with zero to three spending scripts, we recomputed every intermediate value from the script hashes to the final locking script, and all of them matched. Babbush and colleagues write that P2TR “brings back the quantum vulnerability of P2PK and P2MS addresses”.

Bytes alone cannot say what an output holds. The P2WSH hash above is also a valid x-coordinate on the curve, as about half of all 32-byte strings are; the witness version and length in BIP-141 and BIP-341 decide.

Spending, reuse and xpubs reveal a hashed key

A hash protects a key only until the key is seen. Spending from a hashed output publishes it, and BIP-360 says “Funds in P2PKH, P2SH, P2WPKH, P2WSH, and P2MR outputs can become vulnerable to long exposure quantum attacks anytime their script reveals a public key.” Its list of outputs “fundamentally vulnerable to long exposure attacks” includes “Reused outputs”. Once a spend has published a key, any coins still locked to that same key are exposed with it. BIP-360 adds that “Extended public keys, commonly known as ‘xpubs,’ and wallet descriptors also reveal quantum vulnerable public key information.” Babbush and colleagues call P2PKH immune to at-rest attacks only if “the public key is not leaked in other ways”.

Advertisement

Each source names the exposure windows its own way

All three describe two windows: a key sitting on the chain, and a key revealed while a spending transaction waits to be confirmed. Each source’s own words:

SourceKey already on chainKey revealed when spending
BIP-360, v0.12.1“long exposure attacks”“short exposure attacks”
Chaincode Labs, May 2025“long-range attacks”“short-range attacks”
Babbush et al., 2026“At-Rest Attacks”“On-Spend Attacks”

All three say the second window is close to universal. BIP-360 says Bitcoin outputs are “generally vulnerable to short exposure attacks”, and that such attacks “require faster quantum computers”. Chaincode says “All of Bitcoin’s current script types share this spending-time, momentary vulnerability.” Babbush and colleagues say every existing transaction type is vulnerable to on-spend attacks “by a potential future fast-clock CRQC”, a cryptographically relevant quantum computer.

Babbush and colleagues count both kinds of qubit

The estimate is in Securing Elliptic Curve Cryptocurrencies against Quantum Vulnerabilities: Resource Estimates and Mitigations by Babbush and eight co-authors from Google Quantum AI, UC Berkeley, the Ethereum Foundation and Stanford (arXiv, version 2, April 2026). It covers one curve, secp256k1, and says Shor’s algorithm “can execute with either ≤ 1200 logical qubits and ≤ 90 million Toffoli gates or ≤ 1450 logical qubits and ≤ 70 million Toffoli gates.”

Two trade-off points for one run against secp256k1: at most 1,200 logical qubits and 90 million Toffoli gates, about 23 minutes, or at most 1,450 and 70 million, about 18 minutes. Either needs under half a million physical qubits on stated superconducting assumptions.
Every figure is an upper bound as the paper prints it, with its assumptions. RECATOOLS, from Babbush et al., arXiv:2603.28846 v2

Here a logical qubit is error-corrected, built from many physical qubits by the surface code, unlike the unit counted in the 2024 factoring paper behind “broke RSA” headlines, covered in our guide to that claim. The paper estimates “fewer than half a million physical qubits”, assuming superconducting chips laid out as a flat grid with each qubit wired to four neighbours, and a physical error rate of one in a thousand (10⁻³). With a 10-microsecond control reaction time and 50% overhead per Toffoli gate, it puts a run at 18 or 23 minutes. Its figures “apply to a single instance”. What error correction costs is in why a 1,000-qubit computer has zero usable qubits, and the algorithm in what Shor’s algorithm actually breaks.

The circuits are not published. The authors “use a zero-knowledge proof to validate these results without disclosing attack vectors”, and the proof covers a point-addition subroutine, from which the full cost is derived by formula. Version 2’s arXiv comment says it “patches software bug enabling exploit against ZKP soundness”. We did not run the proof.

Download

Every estimate in this guide, in its own units

Fifteen rows: each figure with its unit, scope and assumptions, and the exact words we checked in the source. No prices.

CSV · 5.2 KB

Download the CSV — Every estimate in this guide, in its own units (CSV)

Published tallies of exposed bitcoin measure different things

The Chaincode Labs report by Anthony Milton and Clara Shikhelman (May 2025) says: “Approximately 20-50% of all Bitcoin in circulation (4-10 million BTC) is potentially vulnerable to CRQC attacks.” Its announcement on Delving Bitcoin repeats the sentence word for word. The report attributes the range to others: about 25% from an estimate by Barmes, Bosch and Haalstra, and upwards of 50% from a 2019 post by Wuille.

Project Eleven’s tracker, in a Wayback Machine capture of 30 January 2025, read “6,262,905 BTC Total BTC at Risk of Quantum Attack”, last updated 17 January 2025 at block 879,648. It also counted 10,095,693 addresses with a non-zero balance and an exposed public key. It differs from Chaincode’s range in date and in what it counts.

BIP-360 is a Draft that covers long exposure only

BIP-360, Pay-to-Merkle-Root (P2MR), reads “Status: Draft” and “Version: 0.12.1” as of 29 November 2026. Our decoder recomputed its seven valid construction vectors: a P2MR output holds a hash of scripts, with no key. In its own words, P2MR outputs “are only resistant to ‘long exposure attacks’”, and short exposure “may require the introduction of post-quantum signatures in Bitcoin”, whose sizes our NIST standards guide sets out. The BIP “does not take a position on any specific quantum computing timeline”.

Ethereum has a draft of its own. EIP-8141, “Frame Transaction” (Draft, created 29 January 2026), describes “a native off-ramp” to post-quantum signatures. The ethereum.org page “A more secure Ethereum” (updated 23 October 2026) says core post-quantum infrastructure milestones “target completion by approximately 2029” and that “These are planning targets and may shift.” The dates governments have set for their own systems are in our guide to each government’s deadline text.

Advertisement
Kenji Tanaka
Developer Tools & Cloud Analyst · Singapore

Kenji Tanaka covers developer tools, cloud platforms, DevOps, CI/CD, and software supply-chain topics for RECATOOLS.

View author profile → · Editorial policy

About this byline Kenji Tanaka is a RECATOOLS editorial persona for developer tools, cloud, DevOps, and software supply-chain coverage. Articles are produced and reviewed under RECATOOLS editorial supervision.

Corrections policy

Go further

More from Cybersecurity

Advertisement
Advertisement