MD5 produces a 32-bit value, the 32-bit arrangement is limited, in the face of infinite input, how can all get different output, solve
Reply content:
MD5 produces a 32-bit value, the 32-bit arrangement is limited, in the face of infinite input, how can all get different output, solve
md5
is a digest algorithm and is irreversible, so even if different inputs produce the same output, there is no effect on our operations. Because we are in the program, always get the original value, and then through the MD5 algorithm processing, after the comparison, as long as the result is consistent, can be.
Yes, MD5 can be considered a lossy compression algorithm, and it is possible to get the same MD5 value after different string compression, but it is difficult to construct the same MD5 string if you know the original and MD5.
One way to crack MD5 is through a dictionary, in advance to calculate a large number of string MD5 value, to crack the time to query. Another way to solve this is through collisions, you need to find the string with the same MD5 as the original string.
It is generally said that "different files are almost impossible to meet the same MD5 value", but this "almost" can actually be ignored.
Violence compared MD5 value, can be found on the Internet, there are hundreds of thousands of, but the probability of MD5 value is 36^32, the number is very large ...
(6.3340286662973277706162286946812e+49)
At the same time, in the history of MD5 evolution, it is mentioned that in the previous generations of the abstract algorithm, there is a loophole that makes different files have the same MD5 value, and the reason why MD5 appear is to make up for this loophole.
And @ I was the second light mentioned, even if this problem occurs, but because the MD5 calibration is mainly to verify the data in the transmission process has not produced an error, so long as the same file in the transmission before and after two times to seek MD5 the same.
But if it is used to verify whether the two files are the same, it depends on the discovery of new MD5 vulnerabilities.