Principle of RSA algorithm (i)

Source: Internet
Author: User
Tags decrypt asymmetric encryption

If you ask me, which algorithm is the most important?

I might answer the "Public Key cryptography Algorithm".

Because it is the cornerstone of the computer communication security, guaranteed that the encrypted data will not be cracked. You can imagine the consequences of a credit card transaction being cracked.

Before I get to the point, let me briefly explain what a "public key encryption Algorithm" is.

11 Point History

Until 1976, all encryption methods were of the same pattern:

(1) The party a chooses one kind of encryption rule, encrypts the information;

(2) Party B uses the same rule to decrypt the information.

Because encryption and decryption use the same rule ("key"), this is referred to as the "Symmetric Encryption Algorithm" (Symmetric-key algorithm).

This encryption mode has one of the biggest weaknesses: Party A must tell the encryption rules to party B, or can not decrypt. Saving and passing the key is the most vexing problem.

In 1976, two American computer scientists, Whitfield Diffie and Martin Hellman, presented a new idea to complete decryption without directly passing the key. This is called the "Diffie-hellman key exchange Algorithm". This algorithm inspires other scientists. It is recognized that encryption and decryption can use different rules, as long as there is a corresponding relationship between the two rules, so as to avoid the direct transfer of the key.

This new encryption pattern is referred to as an "asymmetric encryption algorithm".

(1) Party B generates two key (public and private). The public key is public and can be obtained by anyone, and the private key is confidential.

(2) Party a obtains party B's public key, then uses it to encrypt the information.

(3) Party B obtains the encrypted information, decrypts with the private key.

If the public key is encrypted with only the private key, the communication is secure as long as the private key does not leak.

In the 1977, three mathematicians, Rivest, Shamir and Adleman, designed an algorithm to achieve asymmetric encryption. This algorithm is named after their three names, called the RSA algorithm. From then until now, the RSA algorithm has been the most widely used "asymmetric encryption algorithm." It is no exaggeration to say that, as long as there is a computer network, there are RSA algorithms.

This algorithm is very reliable, the longer the key, the more difficult it is to crack. According to the published literature, the longest RSA key currently cracked is 768 bits. In other words, a key that is longer than 768 bits is not cracked (at least not publicly). Therefore, the 1024-bit RSA key is considered to be basically secure and the 2048-bit key is extremely secure.

Next, I'll go to the point of explaining the principle of the RSA algorithm. The article is divided into two parts, today is the first part, introduces the four mathematical concepts to be used. You can see that the RSA algorithm is not difficult, just a little bit of the theory of knowledge can be understood.

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.