If you only use the first 4 bytes of an MD5 hash, would that mean theoretically only 1 in 255^4 chance of collision? That is, are hashes designed such that you only have to use a small portion of the returned hash (say the hash is of a file of some size)?
Share
Remember that, even without considering a smart attacker deliberately trying to cause collisions, you need to start worrying about accidental collisions once the number of objects you’re hashing get comparable to the square root of the hash space… just a few tens of thousands of objects for a 32-bit hash key. This comes from the so-called birthday paradox.