MD5 algorithm Detailed

Source: Internet
Author: User
Tags md5 encryption

What is MD5?

Message-digest algorithm 5 (Information-Digest algorithm). Often said "MD5 encryption", is it → information-digest algorithm .
When downloading something, you often see the MD5 value in some of the compression package properties. And this download page, most likely in a certain place, wrote a sentence, the file's MD5 value is xxxxxxxxx. How does that work?
Vernacular vernacular: MD5, in fact, is an algorithm. You can put a string, or a file, or a compressed package, after executing MD5, you can generate a fixed length of 128bit string. This string is basically the only one.
Therefore, after someone has repaired the package, it will generate a new string, then you can take the Web site provided by the string and the new generated string contrast, if different, it is the person has been repaired.

General compression software with check function (SRS,MD5,SHA1)

Encryption and digest, is not the same

After the encrypted message is complete, has the decryption algorithm, obtains the raw data;
The information obtained is incomplete; The raw data cannot be obtained through the summary data;
So, when you see a lot of people say, MD5, encryption, decryption, hehe smile on the good.

MD5 length

Some people say md5,128 bit, 32 bit, 16 bit, how long is MD5?
The length of the MD5, which defaults to 128bit, is a binary string of 128 0 and 1.
It is very unfriendly to say so.
So the binary is turned into 16, each 4 bit represents a 16 binary, so 128/4 = 32 is 16 decimal after 32.

Why is there a 16-bit MD5 on the Internet?

There are many posts online, MD5 32-bit 16-bit encryption difference.

Carefully observe the 32-bit and 16-bit MD5 values generated by admin ...

Query result: MD5 (admin,32) = 21232F297A57A5A743894A0E4A801FC3MD5 (admin,16) = 7a57a5a743894a0e

Look out!

In fact, the 16-bit length is from the 32-bit MD5 value. is to remove the 32-bit MD5 from the first eight bits, and remove the eight-bit

The role of MD5

① conformance test, the top example

② digital signature, or the top example. Think of MD5 as a fingerprint, a handprint, a unique one.

③ Secure access authentication, this is the usual system design problems. When the user registers, the password is MD5 encrypted and stored in the database. This will prevent those who can see the database data, malicious operation.

MD5 can't crack it?

MD5 is irreversible, that is, there is no corresponding algorithm, from the production of MD5 value of the reverse to get the original data.

But if you use brute force, you say otherwise.

MD5 is the only one?

MD5 as the primary key in the database is it feasible? This involves a question, is the MD5 value unique? The answer is, not the only.

That is, a primitive data, which corresponds to only one MD5 value;

But a MD5 value that may correspond to multiple raw data

Transferred from: http://www.weixuehao.com/archives/474

MD5 algorithm Detailed

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.