The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Cryptocurrency
The first part of this series delved into the physics behind quantum computing, explaining how these machines differ fundamentally from classical computers. However, understanding the mechanics of quantum computing does not provide insight into how it can be utilized to steal bitcoin. To grasp this, one must comprehend what quantum computers are attacking and the inherent weaknesses in bitcoin's security. This piece begins by examining bitcoin's encryption, explaining how it works, why a quantum algorithm can break it, and the implications of Google's recent paper on the timeline for such an attack. Bitcoin employs elliptic curve cryptography, a system that involves two keys: a private key, which is a secret number, and a public key derived from the private key through a mathematical operation. The relationship between these keys can be thought of as a one-way map, where starting from a known point, taking a series of steps defined by the curve's mathematics leads to a public key. While moving forward in this map is straightforward, reversing the process is virtually impossible for classical computers. This one-way function is the backbone of bitcoin's security model, ensuring that only the owner of the private key can access and transfer the associated coins. However, the advent of quantum computing, particularly through Shor's algorithm discovered in 1994, poses a significant threat to this security. Shor's algorithm can efficiently solve the discrete logarithm problem, which is the mathematical foundation of elliptic curve cryptography, thereby breaking the one-way trapdoor. The algorithm exploits the properties of quantum mechanics, such as superposition, entanglement, and interference, to find the period of a function related to the elliptic curve. This period is crucial because, once known, it allows for the easy calculation of the private key from the public key. The practical implementation of Shor's algorithm requires a quantum computer with a large number of stable qubits. Recent estimates have significantly reduced the number of qubits needed, making the threat more tangible. Google's paper introduced a scenario where parts of the calculation can be precomputed, leaving the quantum computer in a state ready to finalize the attack once a target public key is identified. This reduces the time needed to derive a private key to about nine minutes, which is alarming given bitcoin's average block confirmation time of 10 minutes. The implications are significant, with approximately 6.9 million bitcoin being vulnerable to attack, either through a race against the clock when a transaction is broadcast or through an 'at-rest' attack on coins whose public keys have already been exposed.