Hash (hash) algorithm for popular Science

Source: Internet
Author: User

A one-way hash function algorithm, also called a hash (hash) algorithm, is a function that compresses a message of any length to a fixed length (The Message digest) (the process is irreversible). The hash function can be used for digital signature, message integrity detection, message origin authentication detection and so on. Common hashing algorithms are MD5, SHA, RIPE-MD, HAVAL, N-hash, and so on.

Here we introduce the hash function with MD5. The MD5 Message digest algorithm (msg Digest algorithm) is designed by R.rivest. IT operations the input of any length of message, resulting in a 128-bit message digest. In recent years, with the development of exhaustive attack and cipher analysis, the most widely used MD5 algorithm is no longer popular.

MD5 converts a string of any length into a large 128-bit integer, and is irreversible. In other words, even if the source code of the MD5 algorithm is flying, anyone can understand the detailed algorithm description of MD5, but absolutely no one can restore a string that has been encrypted by the MD5 algorithm back to the original string.

For example, string: ce.kanxue.com, calculate the MD5 value with the MD5 calculator:

A645153dfd40ce085e4a8948e589ae59

Using this method, the article or file can be signed, the article or article if the character is changed, the resulting MD5 value will change.

MD5 Calculator Download here: http://tools.pediy.com/windows/cryptography.htm

Some web sites, like to use MD5 to save passwords, such as a user's password is: 12345678, the site will be the user password 12345678 password MD5 value "25d55ad283aa400af464c76d713c07ad" saved to the database.

This way, even if the hacker gets the data, it can't get the plaintext of the password. But there will be a problem, the hacker will create a rainbow table, to save the common words or strings of MD5 value, when needed, through the value of MD5, it is necessary to get the clear text "12345678."

Example this site: http://www.cmd5.com/

Enter the MD5 value "" 25d55ad283aa400af464c76d713c07ad "" to get Clear text:

Tip: A rainbow table is a pre-computed table used to encrypt the inverse of a hash function, often used to crack encrypted cryptographic hashes.

Therefore, the Web site development is very taboo to save passwords directly with MD5, it is recommended to use multiple rounds of MD5 or other hash functions and random numbers to generate hash values to save.

What needs to be paid attention to is that with the development of cryptography, existing hashing algorithms are not secure. such as SHA-160, MD5, RIPEMD, HAVAL, and Tiger can construct collisions under certain conditions. Software protectors are advised to select sha-256/384/512 when using the hash algorithm for signature verification protection, or to use whirlpool.

----------------------------------------------------------------------turn from the snow watching forum

Hash (hash) algorithm for popular Science

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.