Introduction to several encryption and decryption algorithms

Source: Internet
Author: User
Tags md5 digest

Sha isData EncryptionAlgorithmThis algorithm has been developed and improved by encryption experts over the years and has become one of the most secure and widely used Hash algorithms. The idea of this algorithm is to receive a piece of plain text, and then convert it into a section (usually smaller) ciphertext in an irreversible way, it can also be understood as a string of input codes (called pre- ing or information ), and convert them into output sequences with a short length and fixed digits, that is, hash values (also known as information summarization or information Authentication ).Code.

Hash Algorithm

Hash is the extraction of information. Generally, its length is much smaller than that of information, and it is a fixed length. The hashed columns with strong encryption must be irreversible, which means that the original information of any part cannot be introduced through the hashed results. Any change in input information, even if only one bit, will lead to a significant change in the hash result, which is called the avalanche effect. The hash should also prevent conflict, that is, two messages with the same hash result cannot be found. Hash results with these features can be used to verify whether information is modified.

Unidirectional hashing functions are generally used to generate message summaries and encrypt keys. common algorithms include Message Digest (Message Digest algorithm 5), a one-way hashing algorithm developed by RSA Data security companies. SHA (secure hash algorithm): a 160-bit value can be generated for any-length data operation. SHA-1: the maximum length of the input packet of this algorithm cannot exceed 264 bits, and the output is a 160-bit message digest. The input is processed by 512-bit grouping. SHA-1 is irreversible, conflict-proof, and has a good avalanche effect. Comparison between SHA-1 and MD5

Because both are exported from md4, SHA-1 and MD5 are similar to each other. Correspondingly, their strength is similar to other features, but there are several differences:

L security of forcible attacks: the most significant and important difference is that the SHA-1 digest is 32-bit longer than the MD5 Digest. Using forcible technology, it is difficult to generate any message so that its digest is equal to the given report. MD5 is an operation of 2 ^ 128 orders of magnitude, and SHA-1 is an operation of 2 ^ 160 orders of magnitude. In this way, SHA-1 has a greater intensity for forcible attacks.

L security of password analysis: Due to the MD5 design, SHA-1 is vulnerable to password analysis attacks.

L speed: SHA-1 is slower than MD5 on the same hardware.

RSA Algorithm RSA The algorithm is the first algorithm that can be used for both encryption and digital signature, and is easy to understand and operate. RSA It is currently the most influential public key encryption algorithm, which can resist all known password attacks so far and has been recommended as the Public Key Data Encryption Standard by ISO. RSA The algorithm is based on a very simple number theory fact: it is very easy to multiply two large prime numbers, but at that time it is extremely difficult to break down the product of the product, so the product can be published as an encryption key. RSAThe main disadvantages are as follows: a) It is very troublesome to generate a key, and it is difficult to achieve one-time password due to technical restrictions on the generation of prime numbers. B) The Group length is too large. To ensure security, N must at least 600 Bits The above makes the operation very costly. High, especially slow, C)RSAThe length of a key increases rapidly as the level of confidentiality increases. The Data Encryption Standard des uses a 56-bit key and an additional 8-bit parity bit to generate a maximum of 64-bit grouping size. This is an iterative group password, using the technology known as feistel, where the encrypted text block is divided into two halves. Use the sub-key pair to apply the loop function in half of them, and then perform the "XOR" Operation on the output and the other half; then switch the two half, the process continues, but the last loop is not exchanged. Des uses 16 cycles, exclusive or, replacement, replacement, and shift operations. The primary form of attacks against DES is called brute force or thorough key search, that is, repeat various keys until there is a match. If des uses a 56-bit key, the number of keys may be 56 to the power of 2. With the continuous development of computer system capabilities, Des has a much weaker security than it was when it first appeared. However, it can still be considered sufficient from non-essential reality. However, des is currently only used for identification of old systems, and more choose the new encryption standard-Advanced Encryption Standard (AES ). Base64 base64 is one of the most common encoding methods used to transmit 8-bit code on the network. For details, refer to rfc2045 ~ Rfc2049, which has the mime detailed specification. Base64 encoding can be used to transmit long identification information in the HTTP environment. In some applications Program Binary data is often encoded in a URL (including hidden form fields) format. At this time, base64 encoding is not only short, but also non-readable, that is, the encoded data is not directly seen by the human eye.

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.