Does the MD5 have the same output for different inputs?

Source: Internet
Author: User
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

md5is 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.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.