The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Cryptocurrency in Under 10 Minutes

The first part of this series explored the fundamental principles of quantum computing, revealing how these machines leverage the peculiarities of physics at the atomic and particle level to operate. However, understanding the inner workings of a quantum computer does not directly explain how it can be utilized by malicious actors to steal bitcoin. To grasp this, one must comprehend the target of the attack - the security system of bitcoin itself, and why a quantum algorithm poses a significant threat. This piece begins with an examination of bitcoin's encryption mechanism, known as elliptic curve cryptography, and navigates through to the crucial 'nine-minute window' identified by Google's recent quantum computing paper, which is the estimated time required to breach this security. Bitcoin's security relies on a system where 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 operation is akin to a one-way map, where starting from a known point (the generator point G), taking a certain number of steps defined by the curve's mathematics leads to a public key. While moving forward in this map is straightforward, reversing the process to find the private key from the public key is virtually impossible for classical computers due to the elliptic curve discrete logarithm problem. It's estimated that solving this problem for a 256-bit curve with the best-known classical algorithms would take longer than the age of the universe. This one-way function is the cornerstone of bitcoin's security model, allowing users to prove ownership of their coins with their private key while safely sharing their public key. However, the discovery of Shor's algorithm by mathematician Peter Shor in 1994 introduced a quantum approach that can efficiently solve the discrete logarithm problem, thereby breaking the encryption. Shor's algorithm leverages the properties of quantum computing - superposition, entanglement, and interference - to find the period of a function related to the elliptic curve, which in turn reveals the private key. This process, while theoretically possible, has been hindered by the requirement for a quantum computer with a large number of stable qubits to maintain coherence throughout the calculation. Recent advancements, including a paper by Google's Quantum AI division, have significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000, bringing the possibility of such an attack closer to reality. The paper also introduced a practical attack scenario, suggesting that parts of Shor's algorithm can be precomputed, allowing a quantum computer to be 'primed' and ready to attack once a target public key is identified. This leads to a 'nine-minute window' for the quantum computer to derive the private key and submit a competing transaction, posing a significant threat to bitcoin's security. The implications are alarming, with approximately 6.9 million bitcoin (about one-third of the total supply) potentially vulnerable to such attacks, either through a 'mempool attack' for newly broadcast transactions or an 'at-rest attack' for coins with public keys already exposed on the blockchain.