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.
- How passwords are really stored: hashing, salting, and slow hashes (beginner, ~25 min)
- Cluster and attribute malware with fuzzy hashing (ssdeep, TLSH, and imphash) (intermediate, ~60 min)
- Collect evidence in the right order (order of volatility) (beginner, ~30 min)
- Hash a file and verify a download (beginner, ~20 min)
- Log every assessment command as hashed evidence (beginner, ~40 min)
- Make a forensic image and prove it wasn't altered (beginner, ~30 min)
- Test your own password strength by cracking your own hashes (beginner, ~40 min)
- Your first Python script for security (beginner, ~30 min)
Related terms
Related
- How passwords are really stored: hashing, salting, and slow hashes
- Cluster and attribute malware with fuzzy hashing (ssdeep, TLSH, and imphash)
- Collect evidence in the right order (order of volatility)
- Hash a file and verify a download
- Log every assessment command as hashed evidence
- Make a forensic image and prove it wasn't altered
- Test your own password strength by cracking your own hashes
- Your first Python script for security
- MITRE ATT&CK
- Phishing
- DMARC
- DomainKeys Identified Mail
- Cybersecurity glossary
- Free cyber labs