Stockertim Dictionary · Cybersecurity · Crypto
Hash function
Also called cryptographic hash function, hashing
In short
A mathematical function that turns data of any size into a short, fixed-length string, its hash, in a way that cannot practically be reversed and changes completely if the input changes.
- Intermediate
- Technology
- Checked
In detail
Feed a hash function a single word or an entire film and it produces an output of the same fixed length, such as 256 bits for the widely used SHA-256. The output works like a digital fingerprint. A cryptographic hash function has three key properties: it is one-way, so you cannot work back from the hash to the input; it is collision-resistant, so it is practically impossible to find two different inputs with the same hash; and a tiny change to the input, even one letter, produces a completely different hash.
These properties make hashes useful throughout security. Websites should store hashes of passwords rather than the passwords themselves; when you log in, the site hashes what you typed and compares. Specialised slow password-hashing methods, combined with a random value called a salt, make stolen password databases far harder to crack. Software publishers list the hash of a download so users can check it has not been tampered with. Digital signatures sign the hash of a document rather than the whole document.
Hashing is central to blockchains. Each block contains the hash of the previous one, so altering an old transaction would change every later hash and be obvious. Bitcoin's proof of work asks miners to find a block whose hash falls below a target, which can only be done by trying vast numbers of guesses. Older hash functions such as MD5 and SHA-1 have known weaknesses and should no longer be relied on for security.
In practice
Developers use approved hash functions from standards bodies such as NIST, and dedicated password-hashing algorithms for logins. Investigators record hashes of seized files to prove later that evidence was not altered. Users can compare a published hash with the hash of a downloaded file to confirm it is genuine.
Watch out
- Hashing is not encryption: an encrypted message can be decrypted with the key, a hash cannot be turned back into the original.
- Fast general hash functions on their own are not enough to protect passwords; use slow, salted password-hashing methods.
Learn it properly
Lessons about hash function
Official sources
- Hash function (glossary) · NIST Computer Security Resource Center
- Hash functions · NIST Computer Security Resource Center
Facts last checked on 1 November 2026.
Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.