NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Chances of a sha1 collision (Score:1)
SHA1 is 160-bit checksum. 2**160 is around 10**48. Then I plugged that into the formula I found on Wikipedia [wikipedia.org] to see how many checksums you'd have to generate to have a 50% chance of a collision. The answer is around 10**24.
To give you an idea of how big that number is, if you generated one git commit a second, it would take 4.5 quadrillion years before you'd have a 50% chance of a collision. That's plenty big enough for me.
Of course this is assuming that the checksums are evenly distributed over the entire 160-bit range. But that's why crypto people make the big bucks.
Reply to This