Given a set of 100 different strings of equal length, how can you quantify the probability that a SHA1 digest collision for the strings is unlikely... ?
SHA-1 collision attacks In a cryptographic hash function, collisions should in theory be not significantly faster to find than in a brute force attack. Such a brute-force attack is based on the birthday paradox, and it would require expected 2^80 computations to produce a SHA-1 collision.
While the SHA1 collision is definitive proof that the algorithm can be compromised, it still took Google and CWI's researchers a massive amount of computing power (nine quintillion SHA1 or 6,500 CPU and 110 GPU years' worth of computations) despite all the technology available to them.
SHA256: The slowest, usually 60% slower than md5, and the longest generated hash (32 bytes). The probability of just two hashes accidentally colliding is approximately: 4.3*10-60.
The collision probability is defined as the probability that the miss distance between two objects is less than the sum of their safety-radii. Each object's positional uncertainties are combined and their radii summed at the point of closest approach.
Are the 160 bit hash values generated by SHA-1 large enough to ensure the fingerprint of every block is unique? Assuming random hash values with a uniform distribution, a collection of n different data blocks and a hash function that generates b bits, the probability p that there will be one or more collisions is bounded by the number of pairs of blocks multiplied by the probability that a given pair will collide.
(source : http://bitcache.org/faq/hash-collision-probabilities)
Well, the probability of a collision would be:
1 - ((2^160 - 1) / 2^160) * ((2^160 - 2) / 2^160) * ... * ((2^160 - 99) / 2^160)
Think of the probability of a collision of 2 items in a space of 10. The first item is unique with probability 100%. The second is unique with probability 9/10. So the probability of both being unique is 100% * 90%
, and the probability of a collision is:
1 - (100% * 90%), or 1 - ((10 - 0) / 10) * ((10 - 1) / 10), or 1 - ((10 - 1) / 10)
It's pretty unlikely. You'd have to have many more strings for it to be a remote possibility.
Take a look at the table on this page on Wikipedia; just interpolate between the rows for 128 bits and 256 bits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With