Why Hashing Public Keys Doesn’t Provide Quantum Resistance
Thanks to Murch and Josie for their insights here Tweet link.
Hashing public keys offers a level of security, but it's not enough to protect against quantum attacks. In this article, we’ll explore why this vulnerability exists in Bitcoin's P2PKH (Pay-to-Public-Key-Hash) transactions.
2. How P2PKH Transactions Work
In a typical P2PKH transaction, the public key is hidden until the transaction is spent. This setup only reveals the public key when funds are being moved
3. Vulnerability in the Mempool
Once the public key is revealed, there’s a window of time where a quantum attack becomes possible. After the transaction enters the mempool, an attacker with a quantum computer can target the public key to derive the private key before the transaction is confirmed.
4. Exploiting the Window of Time
During this window, an attacker can compute the private key and create a conflicting transaction spending the same coins. By offering a higher fee, they incentivize miners to include their transaction over the original one.
5. Transaction Hijacking and Selfish Mining
This technique is known as transaction hijacking. Quantum computers could also exploit Bitcoin through selfish mining, using Grover’s algorithm to gain an advantage in hash rate