SHA-256
hashing · btc · bch
A 256-bit cryptographic hash function used for transaction IDs, Merkle trees, and proof of work.
SHA-256 is a member of the SHA-2 family of cryptographic hash functions. It takes input data of any size and deterministically produces a 256-bit output, while making it computationally infeasible to recover the input or find two useful inputs with the same hash.
Bitcoin and Bitcoin Cash use double SHA-256 in proof-of-work mining and transaction identifiers. Miners repeatedly hash block headers with different nonces until the resulting value is below the current difficulty target.
SHA-256 is a hash function, not encryption: it does not hide data in a reversible way. Its key properties for blockchains are determinism, preimage resistance, collision resistance, and the avalanche effect. A hash alone does not authenticate who supplied the data; that requires a trusted commitment, signature, or other context.
For the distinction between hashing and encryption, start with cryptographic hashes. The homepage hash playground lets you test SHA-256 with your own message.
Related terms
Proof of Work (PoW)
→A consensus mechanism that makes block production require verifiable computational work.
mining · blockchain · consensus
Mining
→Proof-of-work block production in which miners build candidate blocks and search for a header hash below the network target.
mining · proof-of-work
Mining Difficulty
→Mining difficulty measures how hard it is to find a valid proof-of-work block and adjusts to keep average block times near target.
mining · security · blockchain
Merkle tree
→A Merkle tree is a binary tree of hashes that enables efficient verification of large data sets, used in blockchains for transaction inclusion proofs.
cryptography · data-structure