What is Hash function?

A function that turns any input into a fixed-length fingerprint. The same input always gives the same hash, and any change gives a completely different one, so hashes verify integrity and identify files. Hashing is one-way, not encryption.

Cryptographic hash functions such as SHA-256 are designed so it is infeasible to reverse them or to find two inputs with the same output. That makes them useful for checking downloads and forensic images, identifying malware samples by hash, and building digital signatures. MD5 and SHA-1 are broken for collision resistance and should not be relied on where an adversary could craft inputs, though they still appear as file identifiers. Passwords need special, deliberately slow hashing (bcrypt, scrypt, Argon2) with a unique salt per password, because fast hashes let attackers test billions of guesses per second.

Source: NIST CSRC Glossary (NIST SP 800-107 Rev. 1).

Practice it in a lab

Free, hands-on labs that teach Hash function. 25 more labs also cover it.

Related terms

All glossary terms

Related