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 principles of quantum computing, but understanding how it works is only half the story. To grasp the potential threat to bitcoin, it's essential to comprehend what a quantum computer is attacking and where the vulnerabilities lie. This piece begins with an examination of bitcoin's encryption, specifically the elliptic curve cryptography that underpins its security. Every 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 on the curve, taking a certain number of steps defined by the curve's mathematics leads to the public key. While it's straightforward to go from the private key to the public key, reversing this process is virtually impossible for classical computers due to the elliptic curve discrete logarithm problem. However, in 1994, mathematician Peter Shor discovered a quantum algorithm that can efficiently solve this problem, potentially breaking the security of bitcoin. Shor's algorithm leverages the principles of quantum mechanics, including superposition, entanglement, and interference, to find the period of a function related to the elliptic curve. This period is crucial because it allows for the derivation of the private key from the public key, effectively unlocking the bitcoin associated with that key. The significance of Shor's algorithm is that it reduces the time required to break the encryption from a period longer than the age of the universe to a manageable timeframe. Google's recent paper on quantum computing has further reduced the estimated number of qubits needed to run Shor's algorithm against bitcoin's elliptic curve from millions to fewer than 500,000, making the threat more tangible. The paper also outlines a practical attack scenario where parts of the algorithm can be precomputed, leaving only the final step to be completed once a target public key is identified. This could potentially give an attacker a nine-minute window to derive a private key and steal bitcoin, especially for the 6.9 million coins whose public keys have already been exposed on the blockchain. The race to develop a quantum computer capable of running Shor's algorithm against bitcoin highlights the evolving nature of the threat and the need for the cryptocurrency community to adapt and strengthen its security measures.