What Is the Hash Function Commonly Used in Bitcoin’s Proof-of-Work?

Bitcoin's Proof-of-Work (PoW) consensus mechanism uses the SHA-256 (Secure Hash Algorithm 256-bit) hash function. Specifically, it uses a double SHA-256, meaning the data is hashed twice: SHA256(SHA256(data)).

Miners repeatedly calculate this hash, adjusting a nonce, until the resulting hash is below a specific target difficulty. This double hashing is done to mitigate a potential length-extension attack, though SHA-256 itself is not vulnerable to it.

How Is SHA-256 Used to Generate a Bitcoin Wallet Address?
How Does the “Difficulty Adjustment” in Bitcoin Mining Relate to the 256-Bit Hash Target?
Can a Quantum Computer Theoretically Break SHA-256 Encryption, and What Would Be the Impact on Options Pricing for Bitcoin?
How Does the ‘Proof-of-Work’ Consensus Mechanism Relate to SHA-256?
How Does the Difficulty Adjustment Mechanism Relate to SHA-256’s Output?
What Is the Difference between SHA-256 and Keccak-256?
What Is the Difference between SHA-256 and a Simpler Hash Function like CRC Used in Other Data Integrity Checks?
What Is a Merkle Tree and How Does SHA-256 Contribute to Its Function in a Block?

Glossar