Quantum computing

From Bitcoin Wiki
Jump to navigation Jump to search

Quantum computers are computers which exploit quantum mechanics to do certain computations far more quickly than traditional computers. A sufficiently large quantum computer would cause some trouble for Bitcoin, though it would certainly not be insurmountable.

Note that the abbreviation QC can stand for either quantum computer(s) or quantum cryptography.

QC attacks

The most dangerous attack by quantum computers is against public-key cryptography. On traditional computers, it takes on the order of 2128 basic operations to get the Bitcoin private key associated with a Bitcoin public key. This number is so massively large that any attack using traditional computers is completely impractical. However, it is known for sure that it would take a sufficiently large quantum computer on the order of only 1283 basic quantum operations to be able to break a Bitcoin key using Shor's Algorithm. This might take some time, especially since the first quantum computers are likely to be extremely slow, but it is still very practical.

For symmetric cryptography, quantum attacks exist, but are less dangerous. Using Grover's Algorithm, the number of operations required to attack a symmetric algorithm is square-rooted. For example, finding some data which hashes to a specific SHA-256 hash requires 2256 basic operations on a traditional computer, but 2128 basic quantum operations. Both of these are impractically large. Also, since quantum computers will be massively slower and more expensive than traditional computers for decades after they were invented, quantum attacks against symmetric crypto seem unlikely to be especially common. If quantum computers grow in speed and shrink in price over time, then their inherent per-operation advantage in mining might allow them to out-compete classical computers in Bitcoin mining at some point.


Which outputs are exposed

A quantum attacker needs the public key. BIP 360 separates two kinds of attack:[1]

  • A long exposure attack works on a public key that is already visible on the block chain. The attacker has as much time as the key stays exposed.
  • A short exposure attack works on a public key that a transaction reveals when it is broadcast. The attacker has to finish before the transaction confirms.

According to BIP 360, these outputs are open to long exposure attacks:

  • P2PK outputs, which contain the public key itself. Many early mining rewards are of this type.
  • Bare multisig (P2MS) outputs.
  • Taproot (P2TR) outputs, which contain a public key that can sign through the key path.
  • Reused outputs: once one output of an address is spent, the public key is known for the others.

P2PKH, P2SH, P2WPKH and P2WSH outputs show only a hash until they are spent. They become open to long exposure attacks when their script reveals a public key. Extended public keys (xpubs) and wallet descriptors also reveal public keys. Most outputs are open to short exposure attacks, because spending them reveals the public key.[1]

The authors of BIP 361 write that, as of 1 March 2026, more than 34% of all bitcoins had revealed a public key on the block chain.[2]


Timeline / plausibility

Creating a quantum computer is a massive scientific and engineering challenge. As of 2019, the largest general-purpose quantum computers have fewer than 100 qubits, have impractically high error rates, and can operate only in lab conditions at temperatures near absolute zero. Attacking Bitcoin keys would require more than a thousand error-corrected (logical) qubits, each built from many physical qubits; see Resource estimates below. Humanity currently does not have the technology necessary to create a quantum computer large enough to attack Bitcoin keys. It is not known how quickly this technology will advance; however, cryptography standards such as ECRYPT II tend to say that Bitcoin's 256-bit ECDSA keys are secure until at least 2030-2040. In 2024, Google researchers reported a 101-qubit surface code memory in which the logical error rate fell when the code was made larger.[3] A NIST report of October 2026 on the transition to post-quantum cryptography lists ECDSA as deprecated after 2030 and disallowed after 2035 for United States federal use.[4] As of 2024, according to BTQ's quantum risk calculator [5], breaking BitECDSA using Shor's algorithm could happen as early as 2032 under optimistic assumptions, and as far as 2048 under pessimistic ones. An in-depth analysis was presented in [6]

There is a company called D-Wave that claims to produce quantum computers with over 2000 qubits. However, this claim has not been universally accepted, and even if it is true, this is a special-purpose "annealing quantum processor" incapable of attacking crypto.

Resource estimates

Several papers estimate what it would take to compute a 256-bit elliptic curve private key with Shor's algorithm. They assume different hardware, so the figures cannot be compared directly. They are estimates; none of them reports an attack that was carried out.

Date Authors Estimate
June 2017 Roetteler, Naehrig, Svore, Lauter At most 9n + 2⌈log2(n)⌉ + 10 logical qubits for a curve over an n-bit prime field, which is 2330 for n = 256.[7]
August 2021 Webber, Elfving, Weidt, Hensinger About 317 million physical qubits to break a Bitcoin key within one hour, or 13 million within one day, with the surface code, a code cycle time of 1 μs and a physical gate error of 10-3.[8]
June 2023 Litinski 50 million Toffoli gates per key. In a photonic design with non-local connections: one key every 10 minutes using 6000 modules of 1152 physical qubits each.[9]
March 2026 Babbush and others (Google, with co-authors from other institutions) Fewer than 1200 logical qubits and 90 million Toffoli gates, or fewer than 1450 logical qubits and 70 million Toffoli gates. On superconducting hardware with 10-3 physical error rates: minutes, using fewer than half a million physical qubits. The circuits were not published; the authors validated the result with a zero-knowledge proof.[10]
September 2026 Häner and others (IonQ) About 1450 logical qubits and 40 million Toffoli gates; about 26 days on a trapped-ion design with about 20,000 physical qubits.[11]

For comparison, a May 2025 paper estimates that a 2048-bit RSA integer could be factored in less than a week with less than a million noisy qubits; the same author's 2019 estimate was eight hours with 20 million.[12]

Quantum mining

A miner with quantum hardware can use Grover's algorithm, to gain a quadratic advantage: By applying t Grover iterations, the probability of finding a successful block scales like t2; this should be compared with a classical miner, which by applying t iterations the probability scales linearly with t. The ramifications of this difference were analyzed in several works.

A quantum miner may choose how many Grover iterations to apply. Classical miners switch to a new block whenever they hear about it. A quantum miner, which learn about a new block, would be better to first measure their own block before switching. It turns out that this phenomenon will increase the fork-rate. In order to mitigate this problem, a different tie-breaking rule was suggested[13]. The strategy which quantum miners should use, even under this modified tie-breaking rule, is only partially understood[14]: the main part missing in the analysis is that this work finds the equilibrium strategy when considering quantum mining as a single-shot game, wehreas in practice, it is a repeated game. Furtheremore, this work assumes that the different quantum miners are symmetric, with full knowledge of the hash-rate of the others, which is unrealistic assumption in a decentralized system.

A form of a 51% attack, with a single quantum miner was proposed in Ref.[15]. In the attack, the quantum miner increases the difficulty. Since Bitcoin nodes follow the chain with the most commutative proof of work, an increase by a factor of c is only square root of c harder to mine for the quantum miner, but counts as c blocks. Implementing this attack would require extremely fast, noise tolearant quantum computers (with a clock rate exceeding the fastest classical computers available as of 2024), and therefore is considered only a long term concern.

It may seem hard to know whether a quantum miner joins the network. Perhaps surprisingly, in Ref. [16] it was shown that the optimal mining time for the first small quantum miner that joins has a closed form formula:

In the equation above, W is Lambert's W-function, and λ0 is the expected block time. This means that seeing too many blocks mined after 15.593 minutes after the previous blocks could be a signal that quantum mining has started.

Mitigations

Bitcoin already has some built-in quantum resistance. If you only use Bitcoin addresses one time, which has always been the recommended practice, then your ECDSA public key is only ever revealed at the one time that you spend bitcoins sent to each address. A quantum computer would need to be able to break your key in the short time between when your transaction is first sent and when it gets into a block. How soon that could happen is not settled. A 2026 paper by researchers at Google and other institutions argues that the first key-breaking quantum computers with fast clock speeds (such as superconducting or photonic designs) could also attack transactions that wait in the mempool.[10]

All of the commonly-used public-key algorithms are broken by QC. This includes RSA, DSA, DH, and all forms of elliptic-curve cryptography. Public-key crypto that is secure against QC does exist, however. Early discussion among Bitcoin developers favored a cryptosystem based on Lamport signatures. Lamport signatures are very fast to compute, but they have two major downsides:

  • The signature would be quite large, at least several kB (40-170 times larger than now). This would be very bad for Bitcoin's overall scalability, since bandwidth is one of the main limiting factors to Bitcoin's scaling. Advances in scalability such as Segregated Witness (the signature is part of the witness) and Lightning will be helpful.
  • At the time that you create each keypair, you would need to set some finite maximum number of times that you can sign with this key. Signing more than this number of times would be insecure. Increasing the signing limit increases the size of each signature even more. Since you are only really supposed to use addresses once, this may not be a huge problem for Bitcoin.

Standardised post-quantum algorithms now exist. In August 2024 the United States National Institute of Standards and Technology (NIST) released three finished standards: FIPS 203 (ML-KEM, for key establishment), FIPS 204 (ML-DSA, a lattice-based signature algorithm) and FIPS 205 (SLH-DSA, a stateless hash-based signature algorithm).[17] As of March 2025, a further signature standard built around the FALCON algorithm was in draft.[18] None of these algorithms is part of Bitcoin.

A new public-key algorithm can be added to Bitcoin as a softfork. From the end-user perspective, this would appear as the creation of a new address type, and everyone would need to send their bitcoins to this new address type to achieve quantum security.

Proposals for Bitcoin

This section lists proposals and discussion. None of them has been adopted. As of December 2026, BIP 360 and BIP 361 both have the status Draft.[1][2]

BIP 360

  • 8 June 2024: Hunter Beast posted a rough draft for a "Pay to Quantum Resistant Hash" (P2QRH) output type, meant as the first of a series of BIPs for a quantum-resistance soft fork.[19] The pull request to the BIPs repository was opened on 27 September 2024, and the number 360 was assigned on 18 December 2024.[20][1]
  • 19 February 2025: an update changed the list of proposed signature algorithms.[21]
  • 7 July 2025: the proposal became a Taproot-like output without the key path spend. Post-quantum signatures were moved out of it to a future BIP.[22]
  • 19 December 2025: the authors announced a full rewrite with a third co-author and the new name Pay-to-Tapscript-Hash (P2TSH).[23]
  • February 2026: the output type was renamed Pay-to-Merkle-Root (P2MR) on 10 February, and the BIP was merged into the BIPs repository as a Draft on 11 February.[1]
  • June 2026: a change made script trees with a single leaf spendable by anyone who reveals the leaf.[24]

In its current form, BIP 360 proposes an output that commits to the root of a script tree and has no key path. Its authors say it protects against long exposure attacks only; protection against short exposure attacks would need post-quantum signatures, which the BIP does not include.[1]

Output types and the key path

  • 15 December 2024: Matt Corallo proposed adding a post-quantum signature check to tapscript now, so that coins stay spendable if elliptic curve signatures are disabled later.[25]
  • 23 July 2025: Tim Ruffing posted a paper arguing that Taproot is post-quantum secure when it is restricted to script path spends.[26]
  • 9 April 2026: Antoine Poinsot argued for introducing post-quantum signatures through a new output type, instead of a tapscript operation whose protection depends on a later invalidation of Taproot key spends.[27]
  • 25 June 2026: Pieter Wuille discussed writing the expected disabling of elliptic curve spending paths into the consensus rules of a new output type.[28]

Signature schemes

  • Hash-based: on 8 June 2025 the developer conduition posted a prototype of Winternitz signatures built with the proposed OP_CAT opcode.[29] On 8 December 2025 Mikhail Kudinov and Jonas Nick posted a technical report on hash-based signature schemes for Bitcoin.[30]
  • Lattice-based: on 22 January 2026 Giulio Golinelli posted a demonstration that adds Falcon-512 signatures to a fork of Bitcoin Core as a soft fork.[31] A thread started on 19 May 2026 asked why the work so far had concentrated on hash-based schemes and not on lattices.[32]

Sunset, freeze and spending limits for vulnerable outputs

  • 11 February 2025: Agustin Cruz posted a draft "Quantum-Resistant Address Migration Protocol" (QRAMP) that would set a deadline for moving coins out of vulnerable outputs.[33]
  • 16 March 2025: Jameson Lopp argued against letting quantum computers take vulnerable coins.[34]
  • 29 April 2025: the Hourglass proposal aims to mitigate a mass liquidation of P2PK funds.[35] Its second version, of 10 February 2026, limits spending from such outputs to 1 bitcoin per block.[36]
  • 12 July 2025: Jameson Lopp posted a migration proposal.[37] It became BIP 361, merged as a Draft on 14 April 2026.[38] BIP 361 would follow the deployment of a post-quantum output type. Phase A disallows sending funds to quantum-vulnerable addresses. Phase B, five years after activation, restricts ECDSA and Schnorr spends and adds a quantum-safe rescue protocol.[2]

Commit-reveal recovery

These ideas let the owner of coins behind a hashed public key prove ownership without relying on an elliptic curve signature alone: the owner first publishes a commitment and reveals the key later.

  • 26 January 2018: Tim Ruffing described such a scheme for recovering old outputs.[39]
  • 16 March 2025: Martin Habovštiak made a similar argument for hashed keys.[40]
  • 28 May 2025: Tadge Dryja proposed a commit and reveal variant as a soft fork.[41]
  • 20 August 2026: conduition presented DropKick, a commit and reveal rescue protocol for coins that were not moved in time.[42]
  • 22 September 2026: the QSAVE proposal, laid out in five draft BIPs, aims at a transition that does not burn coins.[43]

See Also

References

  1. ↑ 1.0 1.1 1.2 1.3 1.4 1.5 BIP 360: Pay-to-Merkle-Root (P2MR), Hunter Beast, Ethan Heilman and Isabel Foxen Duke, version 0.12.1 (24 July 2026), status Draft.
  2. ↑ 2.0 2.1 2.2 BIP 361: Post Quantum Migration and Legacy Signature Sunset, Jameson Lopp and others, status Draft.
  3. ↑ Acharya, R. et al. (2024). Quantum error correction below the surface code threshold. https://arxiv.org/abs/2408.13687
  4. ↑ Moody, D. et al. (2026). Transition to Post-Quantum Cryptography Standards. NIST IR 8547, October 2026. https://csrc.nist.gov/pubs/ir/8547/final
  5. ↑ https://qrc.btq.li/
  6. ↑ Aggarwal, D., Brennen, G., Lee, T., Santha, M., & Tomamichel, M. (2018). Quantum Attacks on Bitcoin, and How to Protect Against Them. Ledger, 3. https://doi.org/10.5195/ledger.2018.127
  7. ↑ Roetteler, M., Naehrig, M., Svore, K. M., & Lauter, K. (2017). Quantum resource estimates for computing elliptic curve discrete logarithms. https://arxiv.org/abs/1706.06752
  8. ↑ Webber, M., Elfving, V., Weidt, S., & Hensinger, W. K. (2021). The Impact of Hardware Specifications on Reaching Quantum Advantage in the Fault Tolerant Regime. https://arxiv.org/abs/2108.12371
  9. ↑ Litinski, D. (2023). How to compute a 256-bit elliptic curve private key with only 50 million Toffoli gates. https://arxiv.org/abs/2306.08585
  10. ↑ 10.0 10.1 Babbush, R., Zalcman, A., Gidney, C., Broughton, M., Khattar, T., Neven, H., Bergamaschi, T., Drake, J., & Boneh, D. (2026). Securing Elliptic Curve Cryptocurrencies against Quantum Vulnerabilities: Resource Estimates and Mitigations. arXiv preprint https://arxiv.org/abs/2603.28846 (30 March 2026)
  11. ↑ Häner, T. et al. (2026). Computing 256-bit elliptic curve discrete logarithms in 26 days on a fault-tolerant trapped-ion quantum computer with 20,000 qubits. Cryptology ePrint Archive, Paper 2026/1916. https://eprint.iacr.org/2026/1916
  12. ↑ Gidney, C. (2025). How to factor 2048 bit RSA integers with less than a million noisy qubits. https://arxiv.org/abs/2505.15917
  13. ↑ Sattath, O. On the insecurity of quantum Bitcoin mining. Int. J. Inf. Secur. 19, 291–302 (2020). https://doi.org/10.1007/s10207-020-00493-9
  14. ↑ Troy Lee, Maharshi Ray, and Miklos Santha. Strategies for Quantum Races. In 10th Innovations in Theoretical Computer Science Conference (ITCS 2019). Leibniz International Proceedings in Informatics (LIPIcs), Volume 124, pp. 51:1-51:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019) https://doi.org/10.4230/LIPIcs.ITCS.2019.51
  15. ↑ Bailey, B., & Sattath, O. (2024). 51% Attack via Difficulty Increase with a Small Quantum Miner. arXiv preprint https://arxiv.org/abs/2403.08023
  16. ↑ Nerem, R. R., & Gaur, D. R. (2023). Conditions for advantageous quantum Bitcoin mining. Blockchain: Research and Applications, 4(3), 100141. https://doi.org/10.1016/j.bcra.2023.100141
  17. ↑ NIST Releases First 3 Finalized Post-Quantum Encryption Standards, NIST, 13 August 2024.
  18. ↑ NIST Selects HQC as Fifth Algorithm for Post-Quantum Encryption, NIST, 11 March 2025.
  19. ↑ Proposing a P2QRH BIP towards a quantum resistant soft fork, Hunter Beast, Bitcoin Development Mailing List, 8 June 2024.
  20. ↑ BIP 360 - Pay to Merkle Root (P2MR), bitcoin/bips pull request #1670.
  21. ↑ P2QRH / BIP-360 Update, Hunter Beast, Bitcoin Development Mailing List, 19 February 2025.
  22. ↑ Changes to BIP-360 - Pay to Quantum Resistant Hash (P2QRH), Ethan Heilman, Bitcoin Development Mailing List, 7 July 2025.
  23. ↑ Major BIP 360 Update, Hunter Beast, Bitcoin Development Mailing List, 19 December 2025.
  24. ↑ bip360: depth-zero script trees should be anyone-can-spend, bitcoin/bips pull request #2198.
  25. ↑ Trivial QC signatures with clean upgrade path, Matt Corallo, Bitcoin Development Mailing List, 15 December 2024.
  26. ↑ Taproot is post-quantum secure when restricted to script-path spends, Tim Ruffing, Bitcoin Development Mailing List, 23 July 2025.
  27. ↑ In defense of a PQ output type, Antoine Poinsot, Bitcoin Development Mailing List, 9 April 2026.
  28. ↑ Giving teeth to expected EC disabling: P2XX(-T)(-ML), Pieter Wuille, Bitcoin Development Mailing List, 25 June 2026.
  29. ↑ OP_CAT Enables Winternitz Signatures, conduition, Bitcoin Development Mailing List, 8 June 2025.
  30. ↑ Hash-Based Signatures for Bitcoin's Post-Quantum Future, Mikhail Kudinov, Bitcoin Development Mailing List, 8 December 2025.
  31. ↑ Falcon Post-Quantum Signature Scheme Proposal, Giulio Golinelli, Bitcoin Development Mailing List, 22 January 2026.
  32. ↑ PQC: Lattice-based signatures, Nikita Karetnikov, Bitcoin Development Mailing List, 19 May 2026.
  33. ↑ Proposal for Quantum-Resistant Address Migration Protocol (QRAMP) BIP, Agustin Cruz, Bitcoin Development Mailing List, 11 February 2025.
  34. ↑ Against Allowing Quantum Recovery of Bitcoin, Jameson Lopp, Bitcoin Development Mailing List, 16 March 2025.
  35. ↑ Introducing Hourglass, Hunter Beast, Bitcoin Development Mailing List, 29 April 2025.
  36. ↑ Hourglass V2 Update, Mike Casey, Bitcoin Development Mailing List, 10 February 2026.
  37. ↑ A Post Quantum Migration Proposal, Jameson Lopp, Bitcoin Development Mailing List, 12 July 2025.
  38. ↑ BIP361: Post Quantum Migration and Legacy Signature Sunset, bitcoin/bips pull request #1895.
  39. ↑ Recovery of old UTXOs in a post-quantum world, Tim Ruffing, Bitcoin Development Mailing List, 26 January 2018.
  40. ↑ Hashed keys are actually fully quantum secure, Martin Habovštiak, Bitcoin Development Mailing List, 16 March 2025.
  41. ↑ Post-Quantum commit / reveal Fawkescoin variant as a soft fork, Tadge Dryja, Bitcoin Development Mailing List, 28 May 2025.
  42. ↑ DropKick - A minimal commit/reveal PQ rescue protocol, conduition, Bitcoin Development Mailing List, 20 August 2026.
  43. ↑ QSAVE post-quantum solution for non-migrated coins, James T, Bitcoin Development Mailing List, 22 September 2026.