The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Coins in Under 10 Minutes
The first part of this series delved into the physics of 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 this, one must comprehend what a quantum computer attacks and how bitcoin's security is structured, including the weaknesses within. This piece explores bitcoin's encryption, starting with its use of elliptic curve cryptography to verify ownership. Each wallet has a private key, a secret 256-digit binary number, and a public key derived from the private key through a mathematical operation on the 'secp256k1' curve. The process can be thought of as a one-way map, where starting from a known point on the curve and taking a certain number of steps leads to the public key, but reversing this process to find the private key is virtually impossible for classical computers. This one-way function is the backbone of bitcoin's security model, with the private key serving as proof of ownership and the public key being safe to share. When sending bitcoin, the wallet uses the private key to create a digital signature without revealing the key itself. However, a quantum algorithm known as Shor's algorithm can efficiently solve the discrete logarithm problem, breaking the encryption. Shor's algorithm works by converting the problem of finding the private key into finding the period of a function, which quantum computers can solve efficiently using superposition, entanglement, and interference. Despite Shor's algorithm being known for over 30 years, running it has been beyond reach due to the requirement for 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. The paper introduced a practical attack scenario where parts of the algorithm can be precomputed, allowing the quantum computer to sit in a primed state, waiting for a target public key to appear. Once a public key is exposed, the machine only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. This creates a window of opportunity for a quantum attacker to derive a private key and submit a competing transaction, especially for the 6.9 million bitcoin with public keys already exposed on the blockchain. The implications of this vulnerability and the race to develop quantum-resistant cryptography will be explored in the next part of this series.