Skip to content

Instantly share code, notes, and snippets.

@schacon
Created February 11, 2010 00:58
Show Gist options
  • Save schacon/301065 to your computer and use it in GitHub Desktop.
Save schacon/301065 to your computer and use it in GitHub Desktop.
Chances of a SHA-1 collision in a 1 million object database:
p = (1000000(1000000-1)/2) * (1/2^160)
1/2923006197668003504410874076306642345
1 in 2,923,006,197,668,003,504,410,874,076,306,642,345
Chances of having 6 specific hard drives fail within one hour:
3% annual failure rate = 1/33 per year for one hard drive
1/12167 per day for one hard drive
1/292001 per hour for one hard drive
1/619877727940661135383038961752001 for 6 hard drives in one hour
1 in 619,877,727,940,661,135,383,038,961,752,001
2923006197668003504410874076306642345
619877727940661135383038961752001
at 3% AFR, you are 4715x more likely to have 6/6 simultaneous hard drive failures in one hour than you are to have a SHA collision in a project the size of a linux kernel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment