4 ms·
When the number of hash values (at least 2^128) exceeds the number of atoms in the observable universe (10^80), it's never going to happen. ... unless the hash
by p1mrx 5y ago
When the number of hash values (at least 2^128) exceeds the number of atoms in the observable universe (10^80), it's never going to happen.
... unless the hash function is broken, in which case it's not cryptographic anymore. Note that the birthday paradox doesn't apply when one of the inputs is trivial.
- askvictor 5y agoJust because there are a lot of possible values doesn't matter. There are also a lot of possible pieces of data that could be fed into the hash function. In fact, an infinite number. Which is larger than 2^128. Unimaginably larger. Collisions will happen. Sure, intentional collisions might be next to impossible, but collisions will happen. Consider a piece of data that is 128 bits long. There are 2^128 possible values. A 128 bit hash function will either yield a unique value for each possible data value (which will exhaust the entire range of unique hash values), or you'll have a collision. Now, lets add in pieces of data that are 129 bits (or any other length) as well - you'll have a collision immediately.
- p1mrx 5y ago2^128 is a big number, and we live in a universe with physical constraints. The mathematical probability is nonzero, but it's never going to happen.