Loading prices...

Hash

TechnologyUpdated 11.08.20261 min

A hash is a fixed-length string a mathematical function produces from any input. Changing one character of the input changes the result completely, and the input cannot be recovered from the hash.

How it works

The function takes an input of any size — a word, a file, a whole block of transactions — and always returns a result of the same length. Bitcoin uses SHA-256, producing 256 bits, or 64 characters in hexadecimal.

The key property is the avalanche effect: changing one letter yields a completely different hash with no resemblance to the previous one. That makes a hash a convenient way to check data has not changed.

The function is one-way. Computing a hash from data is instant; finding data that produces a given hash takes brute force. Mining rests on exactly that asymmetry.

Where you encounter it

  • A transaction IDThe long string you use to find a transfer in a block explorer is the hash of the transaction itself.
  • The link between blocksEach block contains the previous one's hash. Alter an old block and every reference after it breaks.
  • The mining puzzleA miner searches for a number that puts the block's hash below a target. Verifying the answer takes one operation.
  • Checking files and passwordsHashing is used far beyond crypto, from download checksums to how passwords are stored.