A cryptographic hash function turns any input into a fixed-size fingerprint. Two properties make it useful for security: the avalanche effect — changing a single input bit should flip roughly half the output bits, so outputs look unrelated even for near-identical inputs — and collision resistance — it should be hard to find two different inputs that hash to the same output.
The "birthday bound" gets its name from the classic puzzle: in a room of just 23 people there's already a 50% chance two share a birthday, out of 365 possibilities — because you're comparing every pair, not one fixed date. The same square-root scaling is why cryptographic hash digests need to be twice as many bits as their claimed "security level" to resist collision search.
Flip a single bit in a 3D input word and watch a toy hash function scramble roughly half the output bits — then switch to a birthday-bound collision simulator that drops random hashes into buckets until two land in the same one.
The avalanche grid shows how a well-mixed hash makes single-bit input changes look like a completely new, unrelated output. The collision grid shows why a hash's output space needs to be far larger than its expected number of uses — collisions arrive around √(π/2 · N) insertions, not N.
In Avalanche mode, pick a bit and hit "Flip that bit" to see which output cubes change. In Collisions mode, watch random values fall into buckets automatically — a red flash marks a collision, and the run resets so you can compare trial lengths against the theoretical estimate.
This square-root scaling — the "birthday bound" — is why a hash digest needs roughly twice as many bits as its stated security level; a 128-bit collision-resistant hash needs about 256 output bits.