Hash Function Properties
Hash Function Demonstration
See how different inputs produce different hash outputs
315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
One-way Function
Hash functions are one-way: you cannot derive the original input from the hash output. Even a tiny change in the input produces a completely different hash.
Key Properties of Hash Functions
Understanding what makes a cryptographic hash function secure
1. Deterministic
The same input will always produce the same hash output.
2. Fixed Output Length
Regardless of input size, the output hash has a fixed length.
MD5: 128 bits (16 bytes)
SHA-1: 160 bits (20 bytes)
SHA-256: 256 bits (32 bytes)
SHA-512: 512 bits (64 bytes)
3. Fast Computation
Computing the hash value for any input is relatively quick.
4. Avalanche Effect
A small change in input results in a significantly different output hash.
5. Collision Resistance
It should be computationally infeasible to find two different inputs that produce the same hash.
6. Pre-image Resistance
Given a hash value, it should be computationally infeasible to find an input that produces that hash.