Skip to main content
Popular searches
BlockchainUpdated: Nov 11, 2026

SHA-256

SHA-256 is a cryptographic hash function that produces a fixed 256-bit output from any input. In blockchain, Bitcoin uses it for proof-of-work mining, block hashing, and transaction IDs.

Also known as:SHA256secure hash algorithm

What Is SHA-256?

SHA-256 is a cryptographic hash function from the SHA-2 family. It turns input of any length into a 256-bit value, usually written as 64 hexadecimal characters. The SHA-256 hash of the word hello is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.

The same input always gives the same output, changing one character gives a completely different one, and there is no known practical way to work back from a hash to its input or to find two inputs with the same hash.

Bitcoin uses it throughout. Miners hash block headers twice with SHA-256 until the result falls below the difficulty target. Transaction IDs and the Merkle tree that commits transactions to a block are double SHA-256 hashes, and pre-Taproot address types are built from a SHA-256 hash of a public key or script.

Hardware wallet users meet it in two places. The last word of a recovery phrase carries a checksum taken from the SHA-256 hash of the underlying entropy, which is why a mistyped word is usually rejected. And vendors publish SHA-256 hashes of firmware files, so a download can be compared before installing. A hash shows that a file is unchanged, not who made it; that takes a signature.

Real-World Examples

Example 1: Before copying a firmware file to a microSD card for a Coinkite Coldcard Q, a user computes its SHA-256 hash on the computer and compares it with the value in the vendor's signed list.

Example 2: A user restoring a wallet swaps two words of the recovery phrase. The device recalculates the checksum, finds that it does not match and rejects the phrase.

BlockchainBitcoin

Read full definition: Bitcoin
TransactionTransaction ID

Read full definition: Transaction ID
BlockchainMerkle Tree

Read full definition: Merkle Tree
TransactionTaproot

Read full definition: Taproot
BlockchainPublic Key

Read full definition: Public Key
WalletHardware Wallet

Read full definition: Hardware Wallet
BlockchainMnemonic Phrase

Read full definition: Mnemonic Phrase
SecurityEntropy

Read full definition: Entropy
HardwareFirmware

Read full definition: Firmware
DefiSwap

Read full definition: Swap
SecurityRecovery

Read full definition: Recovery

Frequently Asked Questions

How does SHA-256 catch a mistyped recovery phrase?

The last word of a recovery phrase carries a checksum taken from the SHA-256 hash of the underlying entropy. When a word is mistyped or two words are swapped, the device recalculates the checksum, finds that it does not match and rejects the phrase. That is why a typing error is usually caught during a restore.

Does a matching SHA-256 hash prove that a firmware file is genuine?

It proves the file is unchanged, not who made it; that takes a signature. Compute the hash of the downloaded firmware and compare it with the value in the vendor's signed list. The signature on that list is what links the expected hash to the vendor.

Can someone work back from a SHA-256 hash to the original data?

There is no known practical way to do so, or to find two inputs with the same hash. The same input always gives the same 256-bit output, and changing one character gives a completely different one. Bitcoin relies on these properties for mining, transaction IDs and the Merkle tree of each block.

Ready to Choose a Secure Wallet?

Use our tools to find the right hardware wallet for your needs.