Learning Information security knowledge together (4) -- Relationship and difference between CRC, MD5, and sha1

Source: Internet
Author: User

 

Some people often ask, what is the difference between CRC, MD5, and sha1 when calculating a verification value? I hope the descriptions below will give you an understanding.

 

Similarities:

CRC, MD5, and sha1 are calculated to generate a verification value, which is used to verify data integrity.

 

Differences:

1.AlgorithmDifferent. CRC adopts polynomial Division, while MD5 and sha1 use replacement, rotation, and other methods;

2. The length of the check value is different. The length of the CRC check bit is related to its polynomial, generally 16 or 32 bits; MD5 is 16 bytes (128 bits); sha1 is 20 bytes (160 bits );

3. Different checksum names are used. CRC is generally called the CRC value; MD5 and sha1 are generally called the hash value or hash value;

4. Security is different. The security here refers to the ability to detect errors, that is, data errors can be detected by the check bit. The security of CRC is closely related to polynomial, which is much weaker than MD5 and sha1. MD5 is highly secure, but it was cracked by Wang Xiaoyun of Shandong University in; sha1 has the highest security.

5. The efficiency is different, and the CRC calculation efficiency is very high; MD5 and sha1 are slow.

6. Different purposes. CRC is generally used for verification of communication data; MD5 and sha1 are used for security, such as file verification and digital signature.

 

I will explain security-related knowledge one by one later.

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.