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 inner workings of a quantum computer doesn't reveal how it can be used to steal bitcoin. To grasp that, one must comprehend what a quantum computer attacks and how bitcoin's security is structured, including its weaknesses. This piece begins with an examination of bitcoin's encryption, leading up to the nine-minute window, as identified by Google's recent quantum computing paper, in which an attack can be successful. Bitcoin utilizes elliptic curve cryptography, a system that proves ownership. Each wallet has two keys: a private key, which is a secret number, and a public key derived from the private key through a mathematical operation on the 'secp256k1' curve. This can be thought of as a one-way map, where starting from a known point (generator point G), taking a number of steps defined by the curve's math (the private key) leads to a public key. Anyone can verify the public key, but figuring out the private key is virtually impossible for classical computers. This one-way function is the core of bitcoin's security model. Your private key proves ownership, and your public key is safe to share because 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 encryption using quantum properties. It solves the discrete logarithm problem efficiently, which would take a classical computer longer than the universe has existed. The algorithm converts finding the private key into a problem of finding the period of a function related to the elliptic curve. Quantum computers are ideal for this, as they can put their input register into a superposition, representing all possible values simultaneously, apply the function, and then use the Fourier transform to find the period. From this period, ordinary math can recover the private key, and thus, the coins. The reason bitcoin remains secure today is that running Shor's algorithm requires a quantum computer with a large number of stable qubits. Google's paper reduced the estimated number of qubits needed from millions to fewer than 500,000, a 20-fold reduction. The team designed quantum circuits that implement Shor's algorithm against bitcoin's elliptic curve, using approximately 1,200 to 1,450 logical qubits. Because qubits lose their quantum state, redundant qubits are needed to maintain a single reliable logical qubit. The paper also introduced a practical attack scenario, where parts of the algorithm can be precomputed, leaving the quantum computer in a primed state, waiting for a target public key to appear. Once it does, the machine only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. Since bitcoin's average block confirmation time is 10 minutes, an attacker has roughly nine minutes to derive a private key and submit a competing transaction. This gives the attacker a 41% chance of succeeding before the original transaction confirms. However, the bigger concern is the 6.9 million bitcoin, roughly one-third of the total supply, sitting in wallets where the public key has already been exposed. These coins are vulnerable to an 'at-rest' attack that requires no race against the clock. A quantum computer running Shor's algorithm can turn a bitcoin public key into the private key that controls the coins, posing a significant threat to bitcoin's security.