4 ms·
I wonder if this is an incredible hash collision. hash("1") == hash(disney_movie.mp4)
by avisser 5y ago
I wonder if this is an incredible hash collision. hash("1") == hash(disney_movie.mp4)
- p1mrx 5y agoAssuming is's a cryptographic hash function, that sort of collision just never happens.
- askvictor 5y agoWell, it has to happen at some point. Exceedingly unlikely, but never say never.
- Sharlin 5y agoh(1) == h(some_real_data) does not have to happen at some point. Collisions are unavoidable, but the point of a cryptographically secure hash algorithm is to ensure that for all h(x) == h(some_real_data), there are no values of x that can be found by brute force, or by cleverness either for that matter. Of course, it’s always possible that the particular hash function used could be hilariously broken…
- deleted 5y ago[deleted]
- pertique 5y agoPerhaps I'm misunderstanding you, but doesn't the existence of collisions guarantee that h(1)== h(some_real_data) unless the hash function is hilariously broken? Cryptographically secure hash functions state that it's unlikely to occur, but the fact that you can take data a greater size than the output will guarantee that you'll have collisions. If you have collisions and the hash function is generating output that is uniformly distributed across the possible output space, you will hit h(1)==h(some_real_data) at some point (edit: given that "some point" is a mathematical concept, not an actual point in time. Of course, there's no guarantee that we'll ever get collisions for hash functions with massive output spaces. But I'd argue that's a limit of computing, not of the math behind the functions themselves)
- p1mrx 5y agoWhen 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.
- hderms 5y agoBirthday paradox could play a role if there's enough content out there
- account42 5y agoWhat makes you think that this would use a cryptographic hash instead of a perceptual hash?
- xigoi 5y agoNot the case, since it also happens with other numbers.
- rezonant 5y agowell as it turns out hash("0") == hash(pirates of the carribean) as well. Not sure how Disney is finding these.