Skip to main content
deleted 146 characters in body
Source Link

Proving the existence of two different length plaintexts that collide using MD5 only requires you know that the number of inputs (andThe number of different lengths of inputs) for MD5 hashing are far greater than the number of possible outputs.

Given that MD5 can receive inputs It takes input of any length and can only outputgenerates a hash as output of size 128 bits, that means that for all stringsthe string of bytes of any length they must map to the same 2 ^ 128 possible MD5 hashes.

ForThis implies that for each input plaintext of length 128, there is guaranteed to be a collision with a plaintext that is of a size less than 128, because if MD5 was a perfect hashing algorithm it would hash each of those 128 bit length plaintexts (Hint: there's 2 ^ 128 of them, same number as possible outputs) to it's own unique hash, but that same set of output hashes must have been used for hashes of size 127 bits or less as well, so there must be a collision somewhere! Given this information we can prove mathematically the existence of two plaintexts of different lengths that have the same hash.

Proving the existence of two different length plaintexts that collide using MD5 only requires you know that the number of inputs (and number of different lengths of inputs) are far greater than the number of possible outputs.

Given that MD5 can receive inputs of any length and can only output a hash of size 128 bits, that means that for all strings of bytes of any length they must map to the same 2 ^ 128 possible MD5 hashes.

For each input plaintext of length 128, there is guaranteed to be a collision with a plaintext that is of a size less than 128, because if MD5 was a perfect hashing algorithm it would hash each of those 128 bit length plaintexts (Hint: there's 2 ^ 128 of them, same number as possible outputs) to it's own unique hash, but that same set of output hashes must have been used for hashes of size 127 bits or less as well, so there must be a collision somewhere! Given this information we can prove mathematically the existence of two plaintexts of different lengths that have the same hash.

The number of inputs for MD5 hashing are far greater than number of outputs. It takes input of any length and generates a hash as output of size 128 bits, that means that for all the string of bytes of any length they must map to the same 2 ^ 128 possible MD5 hashes.

This implies that for each input plaintext of length 128, there is guaranteed to be a collision with a plaintext that is of a size less than 128, because if MD5 was a perfect hashing algorithm it would hash each of those 128 bit length plaintexts (Hint: there's 2 ^ 128 of them, same number as possible outputs) to it's own unique hash, but that same set of output hashes must have been used for hashes of size 127 bits or less as well, so there must be a collision somewhere! Given this information we can prove mathematically the existence of two plaintexts of different lengths that have the same hash.

Source Link

Proving the existence of two different length plaintexts that collide using MD5 only requires you know that the number of inputs (and number of different lengths of inputs) are far greater than the number of possible outputs.

Given that MD5 can receive inputs of any length and can only output a hash of size 128 bits, that means that for all strings of bytes of any length they must map to the same 2 ^ 128 possible MD5 hashes.

For each input plaintext of length 128, there is guaranteed to be a collision with a plaintext that is of a size less than 128, because if MD5 was a perfect hashing algorithm it would hash each of those 128 bit length plaintexts (Hint: there's 2 ^ 128 of them, same number as possible outputs) to it's own unique hash, but that same set of output hashes must have been used for hashes of size 127 bits or less as well, so there must be a collision somewhere! Given this information we can prove mathematically the existence of two plaintexts of different lengths that have the same hash.