Imagine you need to find one specific key in a giant bundle. A regular computer will check them one by one, while a quantum computer will 'scan' them all at once thanks to superposition. This makes it dangerous for cryptography: algorithms like Shor's can break encryptions in seconds instead of billions of years.
The second threat concerns mining. Grover's algorithm allows quantum computers to significantly speed up the brute force of hashes. Theoretically, this could lead to a 51% attack, where one user controls more than 50% of the network's computational power.
However, breaking SHA-256 will require millions of qubits, which is currently unattainable.
Another pressing issue is 'old' bitcoins. According to Bitcoin Core developer Peter Wuille, about 7 million BTC (37% of the total supply in 2019) are stored in addresses with public keys. In the future, quantum computers may be able to compute the keys and steal all these funds.
Malicious actors can already collect public keys from the blockchain and then decrypt them when sufficiently powerful quantum computers become available. Here's how such an attack works: when a transaction is published, the public key is revealed. While the transaction awaits confirmation, a quantum adversary can run Shor's algorithm, find the private key, and sign 'their' transaction for the same coins.
Experts are reassuring: even the most powerful quantum computer cannot break Bitcoin's encryption yet. The crypto community has time to prepare.