HTTPS combined with symmetric and asymmetric encryption

Source: Internet
Author: User
Tags decrypt asymmetric encryption

(i) Symmetric encryption (symmetric cryptography)  ----shared key encryption

Symmetric encryption is the fastest and simplest way to encrypt encryption (encryption) and decryption (decryption) with the same key (secret key), which is called symmetric encryption algorithm in cryptography. Symmetric encryption has many algorithms, and because of its high efficiency, it is widely used in the core of many cryptographic protocols.
Symmetric encryption typically uses a relatively small key, typically less than the size of a bit. The greater the key, the stronger the encryption, but the slower the encryption and decryption process. If you use only 1 bit to do this key, the hacker can first try to decrypt with the word, no, then use 1 solution, but if your key is 1 MB large, hackers may never crack, but the encryption and decryption process takes a long time. The size of the key is both to take care of the security, but also to take care of the efficiency, is a trade-off.
One of the big drawbacks of symmetric encryption is the management and allocation of keys, in other words, the question of how to send a key to someone who needs to decrypt your message. In the process of sending the key, there is a great risk that the key will be intercepted by hackers. The common practice in reality is to encrypt the symmetric encrypted key in an asymmetric manner and then pass it on to the person who needs it.

(ii) Asymmetric encryption (asymmetric cryptography)---Public key encryption
In 1976, American scholar dime and Henman to solve the problem of information public transmission and Key management, a new key exchange protocol is proposed, which allows communication between two sides of the insecure media to exchange information and secure a consistent key, which is " public key system ". This method is also called "Asymmetric encryption algorithm" relative to "symmetric encryption algorithm".
Asymmetric encryption provides a very secure way to encrypt and decrypt data, using a pair of keys, public key, and privatekey. The private key can only be safely kept by one party and cannot be compromised, while the public key may be sent to any person requesting it. Asymmetric encryption uses one of these keys to encrypt, while decryption requires another key. For example, you ask the bank for the public key, the bank sends you the public key, you encrypt the message using the public key, then only the holder of the private key-the bank can decrypt your message. Unlike symmetric encryption, the bank does not need to send the private key over the network, so security is greatly improved.
currently the most commonly used asymmetric encryption algorithm is the RSA algorithm, which is Rivest, Shamir, and Adleman invented in 1978.
Although asymmetric encryption is secure, it is very slow compared to symmetric encryption, so we still use symmetric encryption to deliver the message, but the key we use for symmetric encryption can be sent out by asymmetric encryption. To explain this process, take a look at the following example:
(1) Alice needs to make a deal on the bank's website, and her browser first generates a random number as the symmetric key.
(2) Alice's browser requests the public key from the bank's website.
(3) The bank sends the public key to Alice.
(4) Alice's browser uses the bank's public key to encrypt its own symmetric key.
(5) Alice's browser sends the encrypted symmetric key to the bank.
(6) The bank uses the private key to decrypt the symmetric key from Alice's browser.
(7) Alice and the bank can use the symmetric key to encrypt and decrypt the content of the communication.

(iii) Summary
(1) symmetric encryption and decryption using the same key, so fast, but because the need to transfer the key in the network , so security is not high.
(2) Asymmetric encryption uses a pair of keys, public and private keys, so security is high, but encryption and decryption slow.
(3) The solution is to encrypt the symmetric encryption key using the asymmetric encryption of the public key, and then send it out, the receiver uses the private key to decrypt the symmetric encryption key, and then the two sides can use symmetric encryption to communicate.


HTTPS

HTTPS combined with symmetric and asymmetric encryption

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.