Several classic common encryption algorithms

Source: Internet
Author: User
Tags base64 md5
1.MD5 's full name is Message-digest algorithm 5, developed by the MIT Computer Science Lab and RSA Data Security Inc in the early 90, with the development of MD2, MD3 and MD4.

MD5 transforms any length of "byte string" into a large integer of 128bit, and it is an irreversible string transformation algorithm, in other words, even if you see the source program and algorithm description, you can not transform a MD5 value back to the original string, mathematically speaking, This is because the original string has an infinite number, which is somewhat like a mathematical function that does not have an inverse function.

A typical application of MD5 is to generate fingerprint (fingerprints) on a message (byte string) to prevent "tampering". For example, you write a paragraph in a file called Readme.txt, and you create a MD5 value for the Readme.txt and record it, and then you can spread the file to someone else, and if someone modifies anything in the file, you'll find it when you recalculate the MD5. If there is a third-party certification body, with MD5 can also prevent the file author's "Repudiation", which is called Digital signature application.
MD5 is also widely used in encryption and decryption technology, in many operating systems, the user's password is MD5 value (or similar to other algorithms) to save the way, when the user login, the system is the user input password calculated as MD5 value, and then to the system to save the MD5 value to compare, and the system does not " Know "What the user's password is."

2.rsa:1977 was invented by Ron Rivest, Adi Shamirh and Lenadleman, and RSA was named after three of them. The algorithm is based on a number theory: it is easy to multiply two large primes, but it is very difficult to factorization the results of this product, so the product can be exposed as a public key. This algorithm is capable of resisting all known password attacks. RSA algorithm is an asymmetric algorithm, the algorithm needs a pair of keys, using one of the encryption, you need to use another to decrypt. When we are doing RSA encrypted communication, we put the public key on the client, the private key is left on the server.

3.DES algorithm
In 1973, the U.S. National Standards Bureau began to study data encryption standards for computer systems in other departments except the Ministry of Defence, and issued two public announcements on May 15, 1973 and August 27, 1974 to solicit encryption algorithms. In January 1977, the Government of the United States issued the adoption of IBM-designed programs as an official data Encryption standard for unclassified data (DES? Data Encryption Standard).
4.AES
Advanced Encryption Standard (encryption Standard,aes), also known as Rijndael encryption method.
is a block encryption standard used by the United States federal government. This standard is used to replace the original DES, which has been analyzed by many parties and widely used all over the world. After a five-year selection process, the Advanced Encryption Standard was released by the National Institute of Standards and Technology (NIST) on November 26, 2001 at FIPS PUB 197 and became an effective standard on May 26, 2002. In 2006, the Advanced Encryption Standard has become one of the most popular algorithms in symmetric key cryptography.

5.base64
Base64 is one of the most common encoding methods for transmitting 8Bit bytes of code on the network, and you can view rfc2045~rfc2049, which has a detailed specification of MIME. BASE64 encoding can be used to pass longer identity information in an HTTP environment. For example, in the Java Persistence System hibernate, Base64 is used to encode a long unique identifier (typically 128-bit uuid) as a string that is used as a parameter in an HTTP form and an HTTP GET URL. In other applications, it is often necessary to encode binary data as appropriate in the form of URLs (including hidden form fields). At this time, the use of BASE64 encoding is not readable, that is, the encoded data will not be directly visible to the naked 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.