The Quantum Threat to Bitcoin: How a Quantum Computer Can Steal Your Cryptocurrency in Under 10 Minutes
To understand how a quantum computer can be used to steal bitcoin, it's essential to grasp the basics of bitcoin's security model. Bitcoin utilizes a system called elliptic curve cryptography, which relies on a one-way map to prove ownership. Each wallet has a private key, a secret number, and a public key derived from the private key through a mathematical operation. The public key is shared, while the private key remains secret, as classical computers cannot reverse the math to obtain the private key from the public key. However, a quantum algorithm known as Shor's algorithm can efficiently solve the discrete logarithm problem, breaking the one-way trapdoor and potentially allowing a bad actor to steal bitcoin. The algorithm works by exploiting the properties of quantum mechanics, including superposition, entanglement, and interference, to find the period of a function related to the elliptic curve. Google's recent paper reduced the estimated number of qubits required 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 introduced a practical attack scenario where parts of the calculation can be precomputed, allowing a quantum computer to finish the second half of the calculation in about nine minutes once a target public key appears. This timeframe is concerning, given that bitcoin's average block confirmation time is 10 minutes, providing a narrow window for an attacker to derive a private key and submit a competing transaction. The attack, known as the mempool attack, gives the attacker a roughly 41% chance of succeeding before the original transaction confirms. Moreover, approximately 6.9 million bitcoin are vulnerable to an 'at-rest' attack because their public keys have been permanently exposed on the blockchain, making them susceptible to attack without any time constraint.