Can md5 be decrypted?

Source: Internet
Author: User
Tags md5 hash
People who have been familiar with md5 know that md5 cannot be decrypted, but there are still many websites on the Internet that claim that MD5 can be cracked. This article will discuss this issue. People who have been familiar with md5 know that md5 cannot be decrypted, but there are still many websites on the Internet that claim that MD5 can be cracked. This article will discuss this issue.

First, as mentioned on the Internet, md5 has many versions that can be used for reverse cracking. However, md5 is only based on the running Dictionary. The so-called run Dictionary is to compare the md5 codes of some commonly used words and phrases. Note! Is "common "!
If someone cannot understand what is commonly used, let me give a mathematical example.
Suppose that when x = 1, y = 1, and x = 0, y = 0. what is the first response of this function? Y = x ^ n (n> 0) or (y-0.5) ^ 2 + (x-0.5) ^ 2 = (0.5) ^ 2
This is a common function.
What is not commonly used? Or the above condition: y = log2 (x + 1)
Well, it's still a common function =, but it's too troublesome to compile a commonly used function.-forgive me for being lazy.
Suddenly, there was an uncommon function: y = limit (upper limit 1) (lower limit 0) (8x ^ 3 + 8x ^ 2-16x) dx.

Let's look at an example:

MD5 processes input information in 512-bit groups. each group is divided into 16 32-bit groups. after a series of processing, the output of the algorithm consists of four 32-bit groups. after these four 32-bit groups are cascaded, a 128-bit hash value is generated. In the MD5 algorithm, you must first process the information so that the length of its byte is 512 and the remainder is 448. Therefore, the byte length of information is extended to N * 512 + 448, that is, N * 64 + 56 bytes, where N is a positive integer. The filling method is as follows. fill in 1 digit at the end of the information, and fill in 0 until the condition is met. Then, an additional length of the prefill information expressed in 64-bit binary is appended to the result. After the two steps, the direct length of the information is changed to N * 512 + 448 + 64 = (N + 1) * 512, that is, the length is exactly an integer multiple of 512. This is done to meet the requirements of the information length in subsequent processing.

There are four 32-bit integer parameters called connection variables in MD5:

A = 0x01234567;

B = 0x89abcdef;

C = 0xfedcba98;

D = 0x76543210.

There are also four bitwise operation functions, which are:

F (X, Y, Z) = (X & Y) | ((~ X) & Z );

G (X, Y, Z) = (X & Z) | (Y &(~ Z ));

H (X, Y, Z) = X ^ Y ^ Z;

I (X, Y, Z) = Y ^ (X | (~ Z ));

X, Y, and Z represent any 32-bit integers. & Yes and Operation | yes or operation ,~ It is not an operation. ^ is an exclusive or operation [4].

The specific steps are as follows:

First, Copy A to a, B to B, C to c, and D to d. Then, perform a four-wheel master loop and perform 16 operations in each round. Each operation performs a non-linear function operation on three of them in a, B, c, and d, and adds the result to the fourth variable, a sub-group of the text, and a constant. Then shift the result to the right by an indefinite number and add one of a, B, c, and d.

Through the above example, we can clearly know that md5 is to reduce the text content regardless of the length to 128-bit hash columns. Whether the text contains only one letter a or a long paper with over 128 characters, the number of hash columns is reduced (or filled) to characters. This makes cracking almost impossible.

Why? In the previous example, I will tell you the result "x = 0, when y = 0; x = 1, y = 1 ", but I don't tell you (no one will actually count the number of characters in the document) what function are you, log function or linear function, or higher-order functions? I don't know. how can I crack it?

In addition, in the field of encryption, DES and RSA are the real encryption, while MD5 is more used in document verification to generate a key detection document for tampering.

You should be aware of this.Md5 cannot be decrypted.

There are two other highlights:

1. encryption:

Encryption technology is the most common security and confidentiality means. it turns important data into garbled (encrypted) transmission by technical means, and restores (decrypts) data by the same or different means after arriving at the destination ).
Encryption technology includes two elements: algorithms and algorithms combine common or understandable information with a string of numbers to generate incomprehensible ciphertext, A key is an algorithm used to encode and decrypt data. In terms of security and confidentiality, appropriate key encryption technology and management mechanisms can be used to ensure the security of network information and communication.

2. so-called hash:

Hash is usually translated into "Hash", which is also directly translated into "Hash", that is, input of any length (also called pre- ING, pre-image ), the hash algorithm is used to convert an output with a fixed length. the output is the hash value. This type of conversion is a compression ING, that is, the space of hash values is usually much smaller than the input space, and different inputs may be hashed into the same output, instead, it is impossible to uniquely determine the input value from the hash value.
Simply put, a function compresses messages of any length to a fixed-length Information Digest.
HASH is mainly used for encryption algorithms in the information security field. it converts information of different lengths into messy 128-bit codes, which are called HASH values. it can also be said that hash is to find a ing between the data content and the data storage address.
The application of the Hash algorithm in information security is mainly reflected in the following three aspects:
1) file verification
We are familiar with the parity and CRC verification algorithms. These two verification algorithms do not have the ability to defend against data tampering. to a certain extent, they can detect and correct channel codes in data transmission, however, it cannot prevent malicious data destruction.
The "digital fingerprint" feature of the MD5 Hash algorithm makes it the most widely used file integrity Checksum algorithm. many Unix systems provide commands for calculating md5 checksum.
2) Digital signature
Hash algorithms are also an important part of modern cryptographic systems. Due to the slow operation speed of asymmetric algorithms, one-way hashing plays an important role in digital signature protocols. It can be regarded as equivalent in statistics to digital signature of the file itself. This protocol also has other advantages.
3) Authentication Protocol
The following authentication protocol is also known as "challenge-authentication mode: it is a simple and secure method when the transmission channel can be listened but cannot be tampered.

Related articles:
Php md5 encryption and decryption algorithms and tools (with code)
Php md5 decryption code sharing (with interface attached, available for test)
Can php md5 encryption be cracked?
MD5 encryption tool

Is the above md5 decrypted? For more information, see other related articles in the first PHP community!

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.