Iris
← back to lab
Step-by-Step Hashing
Algorithm:
Output bits
Step-by-step processing
Avalanche Effect

Two inputs that differ by one character. Red bits show where the outputs differ.

Input A
Bits
Input B
Bits
Bits flipped: 0 / 32
Percentage: 0%
Hamming distance: 0
Collision Finder

Generate random inputs and look for hash collisions — different inputs that produce the same hash. With a 32-bit hash, the birthday paradox predicts collisions after about 65,536 random inputs.

Tested: 0 · Unique hashes: 0 · Collisions: 0

What makes a good hash?

A hash function maps arbitrary input to a fixed-size output. A good hash function has three properties: it’s fast, it distributes outputs uniformly, and it exhibits the avalanche effect — changing one input bit should flip approximately half the output bits.

FNV-1a (Fowler-Noll-Vo) works by XORing each byte with the hash, then multiplying by a large prime. DJB2 uses a simpler shift-and-add scheme. Jenkins mixes more aggressively with shifts, additions, and XORs. None of these are cryptographic — they’re designed for speed in hash tables, not security. But they demonstrate the core principles that SHA-256 and BLAKE3 take to extremes.

The collision finder demonstrates the birthday paradox: with a 32-bit hash, you only need about 216 (~65,000) random inputs before a collision becomes likely. For a 256-bit hash, you’d need about 2128 — more than the number of atoms in the observable universe.