Glossary · deep dive

Hash

A fixed-length fingerprint of data. Change one bit of input and the output changes completely. Bitcoin uses SHA-256.

A hash function takes any input, a word, a file or a whole block, and produces a short output of fixed length called a hash or digest. Bitcoin mainly uses SHA-256, which always outputs 256 bits, usually written as 64 hexadecimal characters.

Four useful properties

Deterministic: the same input always gives the same hash.

Avalanche effect: change a single character and the output looks completely different. "bitcoin" and "Bitcoin" give unrelated hashes.

One-way: given a hash, there is no practical way to work out the input, except by guessing again and again.

Collision-resistant: finding two different inputs with the same hash is, as far as anyone knows, practically impossible.

Where Bitcoin uses hashes

Linking blocks. Each block stores the hash of the previous block. Change anything in history and the hashes stop matching. This is what makes the blockchain tamper-evident.

Mining. In proof of work, miners hash a block header over and over, changing a small number each time, until the result falls below a target set by the difficulty. Because hashes are unpredictable, the only strategy is brute force, which is why mining costs real energy.

Transaction IDs and addresses. Every transaction is identified by its hash. Many address types are made by hashing a public key, which adds a layer of protection.

A fingerprint, not encryption

Hashing is not encryption. Nothing is hidden that can be "decrypted" later. A hash is a fingerprint: tiny, unique, and impossible to turn back into the original. That simple tool carries a surprising amount of Bitcoin's security.