Symmetric encryption and asymmetric encryption, asymmetric encryption

Source: Internet
Author: User

Symmetric encryption and asymmetric encryption, asymmetric encryption

What is encryption? Encryption is divided into two parts: algorithm and key. The algorithm remains unchanged, and the key changes. For more information, see the following example.

Key: abcedfgh-> 12345678.

Algorithm: in plaintext, each bit is replaced by another bit in the key table.

For example, after adfh is encrypted, It is 1568.



Symmetric encryption is used if the encryption key K is the same as the decryption key K.

Advantages of symmetric encryption: Fast encryption.

Disadvantage of symmetric encryption: The key transmission is insecure.


What is asymmetric encryption, such:


The encryption key K and the decryption key K' are different in asymmetric encryption.

The advantage of asymmetric encryption: There is no key transmission security problem.

The disadvantage of asymmetric encryption: the encryption speed is slow.


In asymmetric encryption, the encryption key is also called the public key, and the decryption key is also called the private key. See:


First, Lao Wang generated the public key and private key, and then Lao Wang sent the public key to Xiao Zhang, Xiao Li, and Xiao Lin. They can encrypt the plaintext and transmit it to Old Wang. Only when Old Wang has a private key that can be decrypted can he see the original text.


In combination with the advantages of symmetric encryption and asymmetric encryption, how does one use symmetric encryption in actual applications?


The transmission of symmetric encryption keys is not secure, so we use asymmetric encryption to transmit symmetric encryption keys.

Asymmetric encryption is slow, so we use symmetric encryption to encrypt data.

After the combination of the two, it works like this:

1. First, Old Wang generates asymmetric encryption public keys and private keys. Send the public key to Xiao Li.

2. Xiao Li generates symmetric encryption keys and transmits them to Lao Wang through asymmetric encryption public keys.

3. Old Wang uses the asymmetric encryption private key to decrypt the symmetric encryption key that Mr. Li passes to him.

4. Xiao Li and Lao Wang transmit data through symmetric encryption keys.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.