SHA-256
Last Updated: November 16, 2026
SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash function that turns any input into a fixed 256-bit output, shown as 64 hexadecimal characters. It is part of the SHA-2 family published by the US National Institute of Standards and Technology (NIST), and it is best known for securing the Bitcoin blockchain.
Origin and Standard
NIST first published SHA-256 as a federal standard in FIPS 180-2 in August 2002. The current Secure Hash Standard is FIPS 180-4, dated August 2015. NIST plans a revision, mainly to remove SHA-1, but its hash function pages still cite FIPS 180-4 as of November 16, 2026.
How SHA-256 Works
SHA-256 pads the input and splits it into 512-bit blocks. Each block passes through 64 rounds of simple bit operations that update eight 32-bit words of internal state. After the last block, those eight words form the 256-bit hash.
Even the slightest change in input creates a completely different output. It is a one-way function, meaning you cannot work back to the original data from the hash. In Bitcoin, SHA-256 secures transactions, links blocks together and underpins the proof-of-work mining process.
How Bitcoin Uses SHA-256
- Mining and block hashes: miners hash the 80-byte block header with SHA-256 twice, often written SHA-256d, until the result falls below the network’s target.
- Transaction IDs: each TXID is a double SHA-256 hash of the transaction data.
- Merkle roots: transactions are double-hashed in pairs up to one root, which is stored in the block header.
- Addresses: single-key addresses that start with 1 or bc1q contain HASH160, which is SHA-256 followed by RIPEMD-160, applied to the public key.
Example: Block 976,170
Block 976,170 was mined at 18:36 UTC on November 16, 2026, according to mempool.space. Its double SHA-256 hash starts with 20 zeros, 00000000000000000000e109…be37858f, and its winning nonce was 2,675,311,566. Each new block stores the hash of the one before it, so this value is now part of the chain’s history.
Finding that hash took enormous work. At 19:10 UTC, mempool.space put the network hashrate at about 975.5 EH/s. At the current difficulty of about 134.8 trillion, the network needs about 580 sextillion hashes on average to find one block. Checking the result, by contrast, takes a single double hash.
Why SHA-256 Is Essential
SHA-256 provides the security backbone of Bitcoin and many other blockchain systems. It ensures data integrity, prevents tampering and supports decentralized consensus. Its resistance to collisions and preimage attacks makes it a trusted standard in both blockchain and traditional cybersecurity.
Is SHA-256 Still Secure?
Yes, by current standards. NIST rates SHA-256 at 128 bits of collision resistance and 256 bits of preimage resistance, and it remains an approved algorithm. No practical attack on the full function has been published. NIST’s plan to retire an older function by 2030 covers SHA-1, not SHA-256.
Quantum computers do not change that much. Grover’s algorithm could roughly halve its preimage strength to about 128 bits, which is still out of reach, and the method is hard to run in parallel. IETF RFC 9958, published in June 2026, rates hash functions as a lower quantum risk than public-key cryptography.
Where to Check a SHA-256 Hash
You can compute SHA-256 on any computer: sha256sum on Linux, shasum -a 256 on macOS or certutil -hashfile with SHA256 on Windows. Bitcoin Core’s download page publishes a SHA256SUMS file so users can compare it with their download. Block explorers such as mempool.space show block hashes and TXIDs.
Limits
SHA-256 is fast by design. That suits mining but not password storage, where slow functions make guessing harder. And a strong hash function cannot protect coins on its own: wallet security still depends on private keys and digital signatures.
Frequently Asked Questions
Is SHA-256 secure in 2026?
Yes. NIST still approves SHA-256 and rates it at 128 bits of collision resistance and 256 bits of preimage resistance. No practical attack on the full function has been published. NIST’s plan to phase out an older hash function by the end of 2030 applies to SHA-1, not to SHA-256 or the rest of the SHA-2 family.
Why does Bitcoin hash twice with SHA-256?
The Bitcoin white paper does not explain the choice. Developers often point to protection against length-extension attacks, a known property of single SHA-256 in some designs. In practice, double SHA-256, also called SHA-256d, is used for Bitcoin block hashes, mining, transaction IDs and Merkle roots, so every node and miner must use it.
Can quantum computers break SHA-256?
Not in any practical way known today. Grover’s algorithm could roughly halve its preimage strength, from 256 to about 128 bits, which is still far beyond reach, and the method is hard to run in parallel. The quantum risk for Bitcoin is mainly to signatures on exposed public keys, not to SHA-256 mining.
What is the difference between SHA-256 and SHA-3?
Both are NIST-approved hash functions, but they work differently. SHA-256 belongs to the SHA-2 family, standardized in 2002, and processes data in blocks through 64 rounds. SHA-3, standardized in 2015, uses the Keccak sponge design. Ethereum uses Keccak-256, an earlier variant of SHA-3, so its hashes differ from standard SHA3-256.
Data sources: NIST CSRC (FIPS 180-2, FIPS 180-4 and SHA-256 security strengths, read November 16, 2026); mempool.space (block 976,170, hashrate and difficulty, read at 19:10 UTC, November 16, 2026); Bitcoin Core source code (double SHA-256 and SHA-256 plus RIPEMD-160 hash classes) and download page; IETF RFC 9958 (June 2026).