3 ms·
Just 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 fac
by askvictor 5y ago
Just 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.