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 from classical computers and harness the unique rules of the atomic and particle world. However, understanding the mechanics of quantum computers doesn't reveal how they can be utilized to compromise Bitcoin security. To grasp this, it's essential to comprehend what quantum computers are attacking - the encryption that secures Bitcoin transactions. This piece begins with an examination of Bitcoin's encryption system, known as elliptic curve cryptography, which is used to verify ownership. Each Bitcoin wallet has a pair of 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, taking a certain number of steps defined by the curve's mathematics leads to a public key. Anyone can confirm the public key, but determining the number of steps (the private key) is virtually impossible for classical computers due to the elliptic curve discrete logarithm problem, which is estimated to take longer than the universe's age to solve with current algorithms. The security of Bitcoin relies on this one-way function, with the private key serving as proof of ownership and the public key being 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, provides a quantum approach to solving the discrete logarithm problem efficiently, leveraging the principles of superposition, entanglement, and interference. This algorithm can break the encryption by finding the period of a function related to the elliptic curve, which classical computers cannot achieve in a reasonable timeframe. Shor's algorithm has been known for over 30 years, but its implementation requires a quantum computer with a sufficient number of stable qubits. Recent research by Google, in collaboration with Ethereum Foundation and Stanford cryptographers, has significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000. This reduction makes the threat more tangible, especially considering the 'mempool attack' scenario, where a quantum computer could derive a private key from a public key in about nine minutes, potentially allowing for the redirection of funds before a transaction is confirmed. Moreover, approximately 6.9 million Bitcoins, or one-third of the total supply, are vulnerable to an 'at-rest' attack because their public keys have been exposed on the blockchain. These coins can be targeted without a time constraint, posing a significant risk once a capable quantum computer is developed.