Skip to main content

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.

What Is the Role of the ‘Target’ in the Bitcoin Difficulty Adjustment?
What Is the Difference between SHA-256 and a Simpler Hash Function like CRC Used in Other Data Integrity Checks?
What Is the Difference between SHA-256 and Keccak-256?
What Is the “Difficulty Target” in PoW?