2 "Cryptography" Posts

The Birthday Paradox in Production: When Random IDs Collide

Why collision risk grows faster than intuition suggests, and what that means for IDs, hashes, and distributed systems
What You'll Learn
  • Why collisions happen long before an ID space is full
  • Why collision risk grows much faster than intuition suggests
  • How the birthday paradox applies to computer systems
  • How to calculate the probability of an ID collision
  • Why the square root of the ID space determines the danger zone
  • How 32-bit, 64-bit, and UUID v4 IDs compare
  • How generation rate changes the time until collisions become likely
  • How to choose an acceptable collision risk for a real system
  • How Monte Carlo simulation can validate collision calculations
  • How to predict when an ID strategy needs to be replaced

Hash Collisions: Why Your 'Unique' Fingerprints Aren't (And Why That's Usually OK)

The mathematical certainty of hash collisions, the near-impossibility of meaningful ones, and what it means for modern cryptography
What You'll Learn
  • Why hash collisions are mathematically inevitable even with strong algorithms
  • Why a possible collision is very different from a meaningful security threat
  • How MD5 and SHA-1 went from trusted standards to broken algorithms
  • Why modern password storage needs more than a fast hash and a salt
  • When hash collisions matter for security and when they are harmless
  • How crypto-agility helps systems survive when today’s algorithms eventually fail