The application of the MD5 algorithm generates a summary of the information.
A typical application of MD5 is to generate a Message Digest (message-Digest) for a piece of information to prevent tampering. For example, many software in UNIX have a file with the same file name and the file extension. MD5 when downloading. This file usually contains only one line of text, with the approximate structure as follows:
MD5 (tanajiya.tar.gz) = 0ca175b9c0fda-a831d895e269332461
The digital signature of the tanajiya.tar.gz file. MD5 treats the entire file as a large text, and generates this unique MD5 information digest through its irreversible String Conversion Algorithm. In order to give readers an intuitive understanding of the MD5 application, I will briefly describe the working process with an example:
Everyone knows that anyone on the Earth has his own unique fingerprint, which is often the most trustworthy way for public security organs to identify criminals. Similarly, MD5 can generate a unique "digital fingerprint" for any file regardless of its size, format, and quantity. If anyone makes any changes to the file, the MD5 value, that is, the corresponding "digital fingerprint", will change.
We often see the MD5 value in a software information on some software download sites. Its function is that after we download the software, use special software (such as Windows MD5 check) for MD5 verification on the downloaded files to ensure that the files we obtain are the same as the files provided by the site. The MD5 algorithm is widely used in software download sites, Forum databases, and system file security.
Fingerprint of byte strings
A typical application of MD5 is to generate fingerprint (fingerprint) for a message (byte string) to prevent "tampering ". For example, you write a paragraph in a readme.txt file and generate an MD5 value for this readme.txt file and record it. Then you can spread the file to others. If someone else modifies any content in the file, when you re-calculate the MD5 value of this file, you will find that (two MD5 values are different ). If there is another third-party certification authority, MD5 can also prevent the "credit" of the file author. This is the so-called digital signature application.
Logon authentication
MD5 is also widely used in login authentication of operating systems, such as UNIX, various types of BSD system logon passwords, digital signatures, and many other parties. For example, in Unix systems, users' passwords are stored in file systems after MD5 (or other similar algorithms) hash operations. When a user logs on, the system performs the MD5 hash operation on the password entered by the user, and then compares it with the MD5 value saved in the file system to determine whether the entered password is correct. In this step, the system can determine the validity of the user's logon system without knowing the user's password. This prevents the user's password from being known by users with system administrator permissions. It is difficult for MD5 to map a "Byte string" of any length to a large integer of BITs and use this bits to reverse the original string. In other words, even if you see the source program and algorithm description, it is also impossible to convert an MD5 value back to the original string. In terms of mathematical principle, it is because there are infinite numbers of original strings, which is a bit like a mathematical function without an inverse function. Therefore, if you encounter an MD5 password problem, you can use the MD5 () function in the system to reset a password, such as admin, overwrite the hash value of the generated string of passwords with the original hash value.
For this reason, one of the most frequently used methods for deciphering passwords by hackers is known as "Running dictionaries. There are two ways to get the dictionary: one is the string table that is collected daily and the other is generated by means of arrangement and combination, use the MD5 program to calculate the MD5 value of these dictionary items, and then use the target MD5 value for retrieval in this dictionary. Assume that the maximum length of the password is 8 bytes (8 bytes), and the password can only contain letters and numbers, 26 + 26 + 10 = 62 characters in total, the number of items in the dictionary is P () + P ).... + P () is already a very astronomical number. to store this dictionary, you need a TB-level disk array, and this method has a premise, it is only possible to obtain the MD5 value of the password of the target account. This encryption technology is widely used in Unix systems, which is also an important reason why UNIX systems are more robust than general operating systems.