Learn / Quantum & AI

Can quantum computers break Bitcoin? A plain-English guide for HODLers

How Bitcoin's keys and signatures work, which coins a future quantum computer could target first, and what AI can and can't do.

The short answer

Not today, and not with AI. Working out a Bitcoin private key from its public key on an ordinary computer would take on the order of 2128 operations, which Chaincode Labs puts at more than 100 quadrillion years on the fastest supercomputer of late 2024. AI runs on the same kind of computers and faces the same wall.

The realistic future risk is a large, error-corrected quantum computer, a machine that does not exist today. It could work out the private key for any public key it can see on the blockchain, so some coins are more exposed than others, depending on their address type and how they have been used. Today's real risks are human: scams, phishing and malware, some of them made more convincing by AI.

How Bitcoin's cryptography works, in plain words

You don't need the maths to follow the quantum question, only four ideas: a private key, a public key, a signature and a hash.

Private key and public key

Owning bitcoin means controlling a private key: a secret number your wallet picks at random. A 12- or 24-word recovery phrase encodes the randomness your keys are derived from: 128 bits for 12 words, 256 bits for 24, under the BIP 39 standard.

From the private key, the wallet computes a public key with elliptic-curve maths on a curve called secp256k1. Think of the public key as a padlock with your name on it: anyone can see it, but only your private key opens it. The maths runs one way. Computing the public key takes microseconds; going back to the private key would take an ordinary computer about 2128 operations.

Signatures

To spend coins, your wallet signs the transaction with the private key, and every node checks the signature against the public key. A valid signature proves you hold the private key without revealing it. Bitcoin has used ECDSA signatures from the start and, since the Taproot upgrade of 2021, also Schnorr signatures (BIP 340). Both rest on the same assumption: that working back from a public key to its private key, the elliptic curve discrete logarithm problem, is hard.

Hashes and addresses

A hash function turns any data into a short fingerprint, and it is one-way too: you can't rebuild the data from it. Bitcoin uses SHA-256 and RIPEMD-160. Most addresses are not the public key itself but a hash of it, or of a small script that contains keys. Picture a sealed envelope with the address on the front and your padlock inside: the public key only comes out when you spend.

From private key to addressThe private key gives the public key by one-way elliptic-curve maths, and the public key gives the address by a one-way hash. The private key is never on the blockchain. P2PK, P2MS and P2TR outputs show the public key from day one; P2PKH, P2SH, P2WPKH and P2WSH show only the hash until the coins are spent. PRIVATE KEYA secret numberkept in your wallet PUBLIC KEYYour padlockchecks your signatures ADDRESSA hash of the key1… 3… bc1q… one-waycurve mathsone-wayhash ON THE BLOCKCHAIN BEFORE YOU SPEND Neverthe private key isnot published P2PK · P2MS · P2TRthe public key itself,from day one P2PKH · P2SH ·P2WPKH · P2WSHonly the hash; the keyappears when you spend From private key to addressThe private key gives the public key by one-way elliptic-curve maths, and the public key gives the address by a one-way hash. The private key is never on the blockchain. P2PK, P2MS and P2TR outputs show the public key from day one; P2PKH, P2SH, P2WPKH and P2WSH show only the hash until the coins are spent. PRIVATE KEYA secret random numberkept in your wallet never on the blockchain one-way: elliptic-curve mathsone-way: hash PUBLIC KEYYour padlockchecks your signatures on-chain from day one inP2PK, P2MS and P2TR outputs ADDRESSA hash of the public key1… 3… bc1q… on-chain in P2PKH, P2SH, P2WPKH, P2WSH;the key appears only when you spend
Figure 1. Each step runs one way only. The private key is never published. P2PK, P2MS and P2TR outputs put the public key on the blockchain from the start; the hash-based types show only a hash until the coins are spent.

SHA-256 also does other jobs. Miners hash block headers over and over until one falls below the network's target, the proof-of-work that makes past transactions so hard to rewrite, and transaction IDs are SHA-256 hashes too. Quantum computers affect those uses differently, as the next section shows.

Advertisement

What a quantum computer could and couldn't do

A quantum computer is not simply a faster laptop. It is a different kind of machine that could solve certain specific problems dramatically faster than ordinary computers. Two quantum algorithms matter for Bitcoin.

Shor's algorithm: the real threat to signatures

In 1994, Peter Shor described a quantum algorithm that solves the discrete logarithm problem efficiently: the very problem that protects Bitcoin's keys. A quantum computer big and reliable enough to run it against real keys is called a cryptographically relevant quantum computer (CRQC). Such a machine could derive a private key from a public key, which would break ECDSA and Schnorr alike. But it needs the public key to start from. A key it cannot see, it cannot attack.

Grover's algorithm: a much smaller effect on hashes and mining

In 1996, Lov Grover described a quantum algorithm for searching without shortcuts: where an ordinary computer has to check about half of N possibilities, it needs about √N steps. That is a square-root speed-up, not a break. Chaincode Labs calls SHA-256 and RIPEMD-160 "somewhat weakened, but by no means broken" by it. For mining, a 2026 paper led by researchers at Google Quantum AI concludes that Grover-based mining is not practically relevant: error correction eats nearly all of the speed-up, and the algorithm does not parallelise well, while mining rewards massive parallel hardware.

What a quantum computer threatensLeft: signatures (ECDSA and Schnorr) and Shor's algorithm, which could derive a private key from a public key it can see; serious if the key is visible. Right: hashes and mining (SHA-256) and Grover's algorithm, which gives only a square-root speed-up; hashes are weakened, not broken, and quantum mining is not seen as practical. SIGNATURES (ECDSA, SCHNORR)Shor's algorithm Could derive a private key froma public key it can see. It needs the public key: a key thatis still hidden can't be attacked. SERIOUS IF THE KEY IS VISIBLE HASHES AND MINING (SHA-256)Grover's algorithm Only a square-root speed-up:N guesses become about √N. Hashes weakened, not broken;quantum mining not seen as practical. NOT A PRACTICAL THREAT What a quantum computer threatensSignatures (ECDSA and Schnorr) and Shor's algorithm, which could derive a private key from a public key it can see; serious if the key is visible. Hashes and mining (SHA-256) and Grover's algorithm, which gives only a square-root speed-up; hashes are weakened, not broken, and quantum mining is not seen as practical. SIGNATURES (ECDSA, SCHNORR)Shor's algorithm Could derive a private key froma public key it can see. It needs the public key: a key thatis still hidden can't be attacked. SERIOUS IF THE KEY IS VISIBLE HASHES AND MINING (SHA-256)Grover's algorithm Only a square-root speed-up:N guesses become about √N. Hashes weakened, not broken;quantum mining not seen as practical. NOT A PRACTICAL THREAT
Figure 2. A quantum computer would threaten Bitcoin's signatures, but only where it can see the public key. Against hashes and mining it gives only a square-root speed-up (Chaincode Labs; Babbush et al., 2026).

So what a quantum computer would really threaten is the signature, and only where it can see the public key.

How big would such a machine need to be?

Nobody has built one, so every number here is an estimate. Quantum hardware is made of error-prone physical qubits; a long calculation needs logical qubits, each built from many physical ones with error correction, roughly 10 to 1,000 per logical qubit according to Chaincode Labs.

For scale, Google's Willow chip, announced in December 2024, has 105 physical qubits, and Chaincode Labs described quantum computers in 2025 as still nascent, not yet useful in any commercially relevant application. No one can say when, or whether, a CRQC will exist; Chaincode Labs calls the timeline "a divisive topic". This site makes no prediction.

Where Bitcoin could have a problem

Every spend reveals a public key, because nodes need it to check the signature. What differs between address types is whether the key is visible before that. In the envelope picture, hash-based addresses keep the padlock sealed inside until you spend, while P2PK, bare multisig (P2MS) and Taproot (P2TR) outputs carry it on the outside from the moment the coins arrive.

Where the public key is visibleVisible from day one, exposed: P2PK, P2MS and P2TR (bc1p addresses), because the public key is part of the output. Hidden until you spend, hashed: P2PKH (1…), P2SH (3…), P2WPKH and P2WSH (bc1q…), because only a hash is on-chain. The first spend from an address makes its key public for good, so coins left at that address or sent to it later sit behind an already-public key, as exposed as P2PK coins. VISIBLE FROM DAY ONEEXPOSED P2PKP2MSP2TR bc1p… The public key is part of the output: anyone can read it, at any time. HIDDEN UNTIL YOU SPENDHASHED P2PKH 1…P2SH 3…P2WPKH bc1q…P2WSH bc1q… Only a hash is on-chain. The key appears when the coins are spent. the first spend from an address reveals its key PUBLIC AFTER FIRST SPENDEXPOSED Coins still at that address, or sent to it later, are as exposed as P2PK coins. Where the public key is visibleVisible from day one, exposed: P2PK, P2MS and P2TR (bc1p addresses), because the public key is part of the output. Hidden until you spend, hashed: P2PKH (1…), P2SH (3…), P2WPKH and P2WSH (bc1q…), because only a hash is on-chain. The first spend from an address makes its key public for good, so coins left at that address or sent to it later sit behind an already-public key, as exposed as P2PK coins. VISIBLE FROM DAY ONEEXPOSED P2PKP2MSP2TR bc1p… The public key is part of the output:anyone can read it, at any time. HIDDEN UNTIL YOU SPENDHASHED P2PKH 1…P2SH 3… P2WPKH bc1q…P2WSH bc1q… Only a hash is on-chain; the key appearswhen the coins are spent. the first spend reveals the key PUBLIC AFTER FIRST SPENDEXPOSED Coins still at that address, or sent to itlater, are as exposed as P2PK coins.
Figure 3. When the public key shows on the blockchain, by output type. A hash hides it only until the first spend from that address.

The table spells it out. "Long-range" and "short-range" are Chaincode Labs' names for the two kinds of attack: on a key that has been public for a long time, or on a key revealed only by a spend still waiting to confirm.

Type
(address)
Public key
on-chain
If a CRQC
existed
P2PK
no address
From day oneLong-range attack
P2MS
no address
From day oneLong-range attack
P2TR
bc1p…
From day oneLong-range attack
P2PKH
1…
When spentShort-range only*
P2SH
3…
When spentShort-range only*
P2WPKH
bc1q…
When spentShort-range only*
P2WSH
bc1q…
When spentShort-range only*

P2PK and bare multisig have no address format of their own, and a P2WSH address is longer than a P2WPKH one. *Unless the key is already public, for example through address reuse: then a long-range attack works too.

Taproot surprises many people: it is the newest type, yet its output holds a public key. Chaincode Labs notes that, unlike P2PK and bare multisig, this could be addressed with a soft fork that disables Taproot's key-path spending. Legacy, SegWit, Taproot: which are exposed? covers every type in detail.

Three things that change the picture

Address reuse. A hash-based address hides the key only until the first spend from it. After that, the public key is on the blockchain for good, and coins still at that address, or sent to it later, are as exposed as a P2PK output. Keys can also leak in other ways, for example when the same coins were spent on a fork such as Bitcoin Cash. Glassnode's May 2026 study counts about 4.12 million BTC exposed this way ("operational" exposure), besides about 1.92 million BTC in types that show the key by design ("structural").

The spend window. When you send bitcoin, your transaction, public key included, waits in the mempool (the queue of unconfirmed transactions) until a miner puts it in a block; a new block comes about every 10 minutes on average. A short-range attacker would have to derive the private key inside that window and get a competing transaction confirmed first. The 2026 Google-led paper estimates that a fast, superconducting CRQC could take 18 to 23 minutes per key, "close to the 10 minute average Bitcoin block time", or roughly 9 to 12 minutes with the half of the work that doesn't depend on the key done in advance. Slower designs would at first manage only long-range attacks. BIP 360's authors likewise note that protection against short-range attacks may require post-quantum signatures.

The spend windowTimeline: coins at rest, key hidden behind a hash; you broadcast, and the key is readable in the mempool; confirmed in a block, and blocks come about every 10 minutes on average. A long-range attack works on keys that are already public (P2PK, P2MS, P2TR or a reused address) with no time limit. A short-range attack works only on a key revealed by this spend, and must finish before it confirms. COINS AT RESTYOU BROADCASTCONFIRMED key hidden behind a hashkey readable in the mempoolin a block; blocks comeevery 10 min on average LONG-RANGE ATTACKKey already public (P2PK, P2MS, P2TR or a reused address): no time limit SHORT-RANGE ATTACKKey revealed only by this spend: the attacker must finish before it confirms The spend windowTimeline: coins at rest, key hidden behind a hash; you broadcast, and the key is readable in the mempool; confirmed in a block, and blocks come about every 10 minutes on average. A long-range attack works on keys that are already public with no time limit. A short-range attack works only on a key revealed by this spend, and must finish before it confirms. COINS AT RESTKey hidden behind a hash YOU BROADCASTKey readable in the mempool CONFIRMEDIn a block; blocks come aboutevery 10 minutes on average LONG-RANGE ATTACKKey already public: no time limit restmempoolblock SHORT-RANGE ATTACKKey revealed by this spend: mustfinish before it confirms restmempoolblock
Figure 4. The spend window. A long-range attack works on keys that are already public, whenever the attacker likes. A short-range attack would have to derive the key between broadcast and confirmation; blocks come about every 10 minutes on average.

Coins that can't move. Owners can protect coins by moving them to an output that doesn't show the key, but nobody can do that for coins whose keys are lost. Lost coins, and early coins that have never moved, stay exactly as exposed as they are today. The best-known example is the roughly 1.1 million BTC of early mining rewards attributed to Satoshi Nakamoto through the Patoshi pattern, paid to P2PK outputs and nearly all unspent. The dashboard tracks them in its Satoshi section.

How much bitcoin sits in exposed output types right now? The dashboard counts P2PK, P2MS and P2TR outputs live, block by block, following the data sources and rules in its methodology, and Why does an exposed public key matter? explains what that count includes and leaves out.

What about AI?

The short version: AI does not change the maths that protects your keys, but it does change the scams aimed at the person holding them.

What AI can't do

AI models run on ordinary computers. They are good at finding patterns, but a key or seed phrase that a wallet generated is random: there is no pattern to find. Working out a private key from a public key would still take about 2128 operations. Guessing a wallet-made 12-word phrase means searching about 2128 possibilities, a 24-word one about 2256. AI doesn't change that arithmetic, nor the one-way nature of SHA-256.

Weak secrets are another matter, and always were. A study of "brain wallets", keys made from a password or phrase a person chose, found 884 in use between 2011 and 2015; all but 21 had been drained, usually within 24 hours and often within minutes. BIP 39, the standard behind recovery phrases, is explicitly meant to carry computer-generated randomness, not sentences people make up.

Where the real risks are (with or without AI)

AI also helps defenders. In November 2024, Google's Big Sleep team reported an AI agent finding an exploitable memory-safety bug in the widely used SQLite database before the bug reached an official release, which the team believes is the first public example of its kind.

AI: myths and real risksWhat AI can't do: break ECDSA, Schnorr or SHA-256; work out a private key from a public key; guess a 12- or 24-word phrase that a wallet generated, which has 128 or more bits of randomness. Real risks, some made easier by AI: convincing phishing and fake support, cloned voices and deepfake video calls, fake quantum upgrade letters and sites, and address-swapping malware. WHAT AI CAN'T DO Break ECDSA, Schnorr or SHA-256 Work out a private key froma public key Guess a 12- or 24-word phrasethat a wallet generated 128+ bits of randomness: no pattern to learn REAL RISKS, SOME MADE EASIER BY AI Convincing phishing and fake support Cloned voices, deepfake video calls Fake “quantum upgrade” letters, sites Address-swapping malware The target is you, not the maths AI: myths and real risksWhat AI can't do: break ECDSA, Schnorr or SHA-256; work out a private key from a public key; guess a 12- or 24-word phrase that a wallet generated, which has 128 or more bits of randomness. Real risks, some made easier by AI: convincing phishing and fake support, cloned voices and deepfake video calls, fake quantum upgrade letters and sites, and address-swapping malware. WHAT AI CAN'T DO Break ECDSA, Schnorr or SHA-256 Work out a private key froma public key Guess a 12- or 24-word phrasethat a wallet generated 128+ bits of randomness: no pattern REAL RISKS, SOME MADE EASIER BY AI Convincing phishing and fake support Cloned voices, deepfake video calls Fake “quantum upgrade” letters, sites Address-swapping malware The target is you, not the maths
Figure 5. AI does not break Bitcoin's cryptography or a seed phrase that a wallet generated. The risks it adds are aimed at people (FBI; Google Threat Intelligence Group; Swiss NCSC; Microsoft).

The common thread: AI attacks the person, not the maths, and the defences, listed below, are the old ones.

What Bitcoin developers are discussing

Changes to Bitcoin are proposed and debated in public, usually as Bitcoin Improvement Proposals (BIPs). As of December 2026, two quantum-related proposals have BIP numbers, and both have the status Draft: under discussion, not part of Bitcoin's rules.

Outside Bitcoin, the US standards body NIST published its first three post-quantum standards in August 2024: FIPS 203 (ML-KEM, for general encryption) and two signature standards, FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA, a hash-based backup). Such signatures are big: in Chaincode Labs' comparison an ML-DSA (Dilithium) signature takes 2,420 bytes against 64 for Schnorr, which would use more block space and affect fees.

Perhaps the hardest open question isn't technical: should exposed coins that never move one day become unspendable ("burned"), or stay open to whoever first builds a quantum computer ("stolen")? Chaincode Labs calls it a polarising issue touching property rights, censorship resistance and immutability. This site takes no side.

Advertisement

What you can do today

General good practice, not advice for your situation:

Sources

  1. Anthony Milton and Clara Shikhelman, Chaincode Labs, "Bitcoin and Quantum Computing: Current Status and Future Directions", May 2025. chaincode.com/bitcoin-post-quantum.pdf
  2. Ryan Babbush, Adam Zalcman, Craig Gidney et al., "Securing Elliptic Curve Cryptocurrencies against Quantum Vulnerabilities: Resource Estimates and Mitigations", Cryptology ePrint Archive 2026/625, March 2026 (revised April 2026). eprint.iacr.org/2026/625
  3. Mark Webber, Vincent Elfving, Sebastian Weidt and Winfried K. Hensinger, "The impact of hardware specifications on reaching quantum advantage in the fault tolerant regime", AVS Quantum Science 4(1), 2022. doi.org/10.1116/5.0073075 (preprint: arxiv.org/abs/2108.12371)
  4. Peter W. Shor, "Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer", expanded version of a 1994 FOCS paper (SIAM Journal on Computing, 1997). arxiv.org/abs/quant-ph/9508027
  5. Lov K. Grover, "A fast quantum mechanical algorithm for database search", STOC 1996. arxiv.org/abs/quant-ph/9605043
  6. NIST, "NIST Releases First 3 Finalized Post-Quantum Encryption Standards", 13 August 2024. nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards
  7. BIP 360, "Pay-to-Merkle-Root (P2MR)", status Draft. github.com/bitcoin/bips/blob/master/bip-0360.mediawiki
  8. BIP 361, "Post Quantum Migration and Legacy Signature Sunset", status Draft. github.com/bitcoin/bips/blob/master/bip-0361.mediawiki
  9. BIP 39, "Mnemonic code for generating deterministic keys". github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
  10. BIP 340, "Schnorr Signatures for secp256k1". github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
  11. Glassnode, "Measuring Bitcoin's Quantum-Exposed Supply", 20 May 2026. research.glassnode.com/measuring-bitcoins-quantum-exposed-supply
  12. FBI Internet Crime Complaint Center, "Criminals Use Generative Artificial Intelligence to Facilitate Financial Fraud", public service announcement I-120324-PSA, 3 December 2024. ic3.gov/PSA/2024/PSA241203
  13. Google Threat Intelligence Group, "GTIG AI Threat Tracker: Advances in Threat Actor Usage of AI Tools", 5 November 2025. cloud.google.com/blog/topics/threat-intelligence/threat-actor-usage-of-ai-tools
  14. Swiss National Cyber Security Centre (NCSC), "Week 33: Crypto wallet phishing by post", 18 August 2026. bacs.admin.ch/en/26w33-en
  15. Microsoft Threat Intelligence, "In hot pursuit of ‘cryware’: Defending hot wallets from attacks", 17 May 2022. microsoft.com/en-us/security/blog/2022/05/17/in-hot-pursuit-of-cryware-defending-hot-wallets-from-attacks
  16. Marie Vasek, Joseph Bonneau, Ryan Castellucci, Cameron Keith and Tyler Moore, "The Bitcoin Brain Drain: Examining the Use and Abuse of Bitcoin Brain Wallets", Financial Cryptography and Data Security 2016. discovery.ucl.ac.uk/id/eprint/10154816
  17. Google Project Zero (Big Sleep team), "From Naptime to Big Sleep: Using Large Language Models To Catch Vulnerabilities In Real-World Code", 1 November 2024. googleprojectzero.blogspot.com/2024/10/from-naptime-to-big-sleep.html