II · Probability & randomness
Birthday paradox
What it is
In a room of 23 people, two share a birthday with > 50% probability. Generally: collisions in n samples from k buckets become likely around √k.
Where it lives
Hash collisions, UUID collision probability, BREACH attacks, why 128-bit hashes feel "small".
The key insight
Hash output of N bits gives collision-resistance only at ~2^(N/2) operations. SHA-256 → 128 bits of resistance.