How Quantum Computers Can Compromise Bitcoin Security in Under 10 Minutes
The first part of this series delved into the principles of quantum computing, highlighting its distinction from classical computing. However, understanding how quantum computers work is only half the story; the other half involves grasping what they can attack and how they can be utilized to compromise bitcoin. This piece focuses on bitcoin's encryption, the vulnerability it poses, and the timeline for a potential breach, as outlined in a recent paper by Google. Bitcoin's security relies on elliptic curve cryptography, a system that utilizes a pair of keys: a private key and a public key. The public key is derived from the private key through a mathematical operation on a specific curve known as 'secp256k1'. This process can be thought of as a one-way map, where starting from a known point on the curve, taking a series of steps defined by the curve's mathematics leads to the public key. While moving forward in this map is straightforward, reversing the process is virtually impossible for classical computers. The security of bitcoin hinges on this one-way function, with the private key serving as proof of ownership and the public key being safe to share without risking the private key's secrecy. However, the advent of quantum computing, particularly through Shor's algorithm discovered in 1994, poses a significant threat to this security model. Shor's algorithm efficiently solves the discrete logarithm problem, which is the backbone of bitcoin's encryption, by leveraging the principles of quantum mechanics such as superposition, entanglement, and interference. This algorithm can potentially break the encryption in a time frame that is exponentially shorter than what classical computers can achieve. The recent paper by Google has not only reduced the estimated number of qubits required to run Shor's algorithm effectively but also introduced a practical attack scenario. According to Google, parts of Shor's algorithm can be precomputed, allowing a quantum computer to be in a primed state, ready to finish the calculation once a target public key is identified. This could potentially give an attacker a nine-minute window to derive a private key and submit a competing transaction, a timeframe that is alarmingly close to bitcoin's average block confirmation time. Furthermore, the paper suggests that approximately 6.9 million bitcoin, or roughly one-third of the total supply, are vulnerable to an 'at-rest' attack because their public keys have already been exposed on the blockchain. These findings underscore the urgency of developing quantum-resistant cryptographic protocols to safeguard bitcoin and other cryptocurrencies against the emerging threat of quantum computing.