← 🔐 Cryptography

🎂 Birthday Paradox

People added: 0
P(collision) now:
√(π·N/2) estimate:
Trials run: 0
Avg trial length:
FPS:
Drag — rotate · Scroll — zoom

🎂 The Birthday Paradox

People arrive one by one and are assigned a random bucket on a ring — a day of the year, or a hash digest slot. Watch how quickly two arrivals land in the same bucket, and see the live probability curve explain why.

🔬 What It Demonstrates

Collision probability grows with the number of pairs, not the number of people, so it rises far faster than intuition suggests — the same combinatorics that lets birthday-style attacks break undersized cryptographic hashes.

🎮 How to Use

Pick a preset (birthdays or a hash bit-width) or drag the bucket-count slider directly. Watch pillars fill and flash red on collision, then track the running average trial length against the √(πN/2) theoretical estimate.

💡 Did You Know?

With only 23 people in a room there's already a 50% chance two share a birthday — and the same math means a 128-bit hash only offers about 64 bits of real collision resistance.