Mining Algorithm
Bitcoin uses SHA-256 double hashing (SHA-256D) for proof-of-work. Other coins may use alternative PoW algorithms.
Bitcoin's mining algorithm is SHA-256d - the double application of SHA-256 (SHA-256(SHA-256(header))). Miners compute this hash on candidate block headers until the result falls below the current difficulty target.
The double-hash design isn't arbitrary. It defends against length-extension attacks, a known weakness of single-pass SHA-256 where an attacker who knows SHA-256(x) can compute SHA-256(x || y) for some y without knowing x. Double hashing breaks this property. The cost is a 2× computational hit on the hashing operation; the security benefit was judged worth it.
Other cryptocurrencies use different algorithms - Scrypt (Litecoin), Ethash (legacy Ethereum), RandomX (Monero), Equihash (Zcash), and many others. Each design choice reflects priorities: ASIC-resistance, memory-hardness, energy efficiency, or just protocol differentiation.
For Bitcoin, SHA-256d is locked in by:
- Massive hardware sunk cost. The global Bitcoin mining industry has spent billions on SHA-256-specific ASICs. Changing the algorithm would brick all that hardware.
- A required hard fork. Any algorithm change is a hard fork, which Bitcoin's consensus mechanism makes nearly impossible to deploy.
- No real demand to change. SHA-256 hasn't broken in 25+ years of cryptanalysis. The security argument for switching doesn't hold.
The algorithm choice is one of the most permanent parts of Bitcoin's design. Even discussions about "post-quantum migration" focus on signature schemes (ECDSA → quantum-resistant signatures), not the hashing algorithm. SHA-256 is here for the duration. See Proof-of-Work for the broader mechanism this algorithm is the engine of.
Key takeaways
- Core to Bitcoin's PoW, requiring specialized ASIC hardware
- Double-hash design fosters strong collision resistance
- Shifting away from SHA-256 would be a major disruptive move
Related terms (23)
- ASIC (Application-Specific Integrated Circuit)
- ASIC Resistance
- Competitive Mining
- CPU Mining
- Difficulty Retargeting
- Energy FUD
- Hash Rate
- Hash-Rate Derivative
- Hashlet
- Hidden Miner Tax
- Merged Mining
- Miner
- Miner Capitulation
- Miner Extractable Value (MEV)
- Mining
- Mining Pool
- Mining Centralization
- Mining Colocation
- Mining Rig
- Mining Software
- Proof-of-Work (PoW)
- Retail Mining
- Revenue per TH/s