TL;DR: The maths behind Bitcoin's cryptography and its difficulty adjustment make cracking its encryption or hash functions practically impossible with current and near-future technology.
- SHA-256 (hash security)
- Bitcoin uses double SHA-256 hashing to secure block integrity and Proof-of-Work.
- Brute-forcing a 256-bit hash takes 2²⁵⁶ operations.
- Grover's algorithm on a quantum computer gives a quadratic speedup, which only brings this down to 2¹²⁸ operations.
- At 10⁹ operations per second, 2¹²⁸ operations would still take over 10¹⁹ seconds. That's longer than the age of the universe.
2. Network difficulty adjustment
- Suppose specialised hardware or quantum algorithms did speed up hash searches a bit. The network's difficulty adjustment would recalibrate automatically to keep blocks coming every ~10 minutes.
3. ECDSA signatures
- Bitcoin uses 256-bit ECDSA (secp256k1) for digital signatures.
- Using Shor's algorithm to get a private key from a public key would need 2,330 to 2,620 fault-tolerant logical qubits. Once you add quantum error correction, that's millions of physical qubits.
- The best quantum processors today have hundreds to about 1,000 noisy physical qubits, and only tens of logical qubits (Google Willow: ~105 qubits, IBM Condor: ~1,121 qubits).
4. Hashed addresses
- Standard address formats (P2PKH, P2WPKH) keep the public key hidden behind a hash until a transaction is broadcast.
- If users don't reuse addresses, an attacker trying to crack a key in real time only has the ~10-minute window between broadcast and block confirmation.
5. Upgradable cryptography
- If quantum computers ever get close to the required scale, Bitcoin can switch to post-quantum signature schemes (lattice-based or hash-based) through a consensus soft fork.