The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Cryptocurrency in Under 10 Minutes
The first part of this series delved into the physics behind quantum computing, explaining how these machines differ fundamentally from regular computers. However, understanding the mechanics of quantum computers doesn't reveal how they can be used to steal bitcoin. To grasp this, one must comprehend what quantum computers are attacking, the nature of bitcoin's security, and where its weaknesses lie. This piece begins by examining bitcoin's encryption, leading up to the nine-minute window identified by Google's recent quantum computing paper, in which a quantum computer can potentially break bitcoin's encryption. Bitcoin utilizes elliptic curve cryptography to verify ownership. Each wallet has two keys: a private key, which is a secret 256-digit binary number, and a public key derived from the private key through a mathematical operation on the 'secp256k1' curve. This process can be thought of as a one-way map, where starting from a known point on the curve, taking a certain number of steps defined by the curve's math leads to the public key. While it's easy to go forward, reversing the process is virtually impossible for classical computers, due to the elliptic curve discrete logarithm problem. The best classical algorithms would take longer than the age of the universe to solve this problem for a 256-bit curve. This one-way trapdoor is the foundation of bitcoin's security model. The private key proves ownership, and the public key is safe to share since classical computers cannot reverse the math. When sending bitcoin, the wallet uses the private key to create a digital signature, proving knowledge of the secret number without revealing it. However, Shor's algorithm, discovered in 1994, breaks this trapdoor using quantum computing. It efficiently solves the discrete logarithm problem, which classical computers cannot. The algorithm works by converting the problem into finding the period of a function related to the elliptic curve. Quantum computers are ideal for this task due to their ability to represent all possible values simultaneously (superposition), apply a function to all values at once, and then use the Fourier transform to find the correct period. This process leverages quantum properties such as superposition, entanglement, and interference to filter out incorrect answers and reinforce the correct ones. The reason bitcoin remains secure for now is that running Shor's algorithm requires a quantum computer with a large number of stable qubits. Google's recent paper significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000, by designing quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve. This reduction makes the threat more tangible. The paper introduced a practical attack scenario where parts of Shor's algorithm can be precomputed, leaving the quantum computer in a primed state, ready to finish the calculation once a target public key appears. Google estimates this second half takes about nine minutes, which is close to bitcoin's average block confirmation time. This creates a window where a quantum attacker has a roughly 41% chance of deriving a private key and submitting a competing transaction before the original transaction confirms. The bigger concern is the 6.9 million bitcoin already exposed on the blockchain, vulnerable to an 'at-rest' attack that doesn't require racing against the clock. A quantum computer can turn a public key into a private key, controlling the coins. For coins transacted since Taproot, the public key is visible, and for older addresses, the public key is hidden until spent, at which point the owner has roughly nine minutes before an attacker can catch up.