Hash properties
The five properties that make a function a cryptographic hash, demonstrated by an input you can type into.
Deterministic
The same input always yields the same hash. Edit a single character and recompute: same input, same output, every time.
Fixed-length output
SHA-256 emits 256 bits whether you feed it one byte or one gigabyte. Switch algorithms and the output length changes; the input doesn't.
Avalanche
Flip one bit of the input (say, swap a single character) and roughly half the output bits flip too. There's no "close."
One-way
Given the output, there's no way to recover the input short of guessing every possible one. That's why password databases store hashes, not passwords.
Collision-resistant
Finding two different inputs with the same hash should be computationally infeasible. The broken algorithms in this lab failed exactly that property.
Read the deep dive on guptadeepak.com
- All about Hashing Algorithms
The umbrella reference page for everything hashing on guptadeepak.com.
- What is Hashing? A Complete Guide for Developers and Security Professionals
Long-form 101. Start here if hashing is new to you.
- Understanding Hashing Algorithms: A Beginner's Guide
Companion 101 with worked examples.