Birthday Attack: Hash Collision Simulator
Interactive 3D birthday-attack simulator: watch random hash values fill a grid of buckets in a hash space and see exactly how many samples it takes to find a collision, live against the birthday-paradox prediction.
This simulator turns a hash function's output space into a 3D grid of buckets and repeatedly "hashes" a fresh random input by dropping a ball into a uniformly random bucket, exactly the assumption an ideal hash function is supposed to satisfy. Because the birthday paradox says collisions appear after roughly the square root of the space size rather than the full size, you can watch — bucket by bucket — how few tries it actually takes for two random hashes to land on the same value. Adjust the bit-width to grow or shrink the hash space, control the sampling speed, and compare the live average number of samples needed against the closed-form birthday-attack prediction E[k] ≈ 1.253·√N — the same math that forces real cryptographic hashes to double their digest length for full collision resistance.
Watch random hash values fill a 3D grid of buckets in a hash space and see exactly how many samples it takes to find a collision, live against the birthday-paradox prediction that underlies real hash collision attacks.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install