Crypto glossary
Hash function
A hash function turns any input into a fixed-length string, the hash, in a way that cannot be reversed; blockchains use it to link blocks and to mine.
A cryptographic hash function takes data of any size and produces a fixed-size output that looks random. The same input always gives the same hash, but changing even one character gives a completely different one. Good hash functions are one-way, so the input cannot be worked out from the output, and collision-resistant, so finding two inputs with the same hash is practically impossible.
Blockchains rely on hashing everywhere. Each block contains the hash of the previous one, transactions are identified by their hash, Merkle trees summarise them, and proof-of-work mining is a race to find a block hash below a target. Bitcoin uses SHA-256, Ethereum uses Keccak-256, and addresses are derived from hashes of public keys.
A hash function is only as strong as its design; older ones such as MD5 and SHA-1 have been broken and are no longer trusted for security. Hashing also proves integrity, not secrecy: the hash of a short or guessable value, such as a weak password, does not keep it safe.
Example
Running the word "bitcoin" through SHA-256 always produces the same 64-character string, but "Bitcoin" with a capital B produces an entirely different one.