Public key encryption

Source: Internet
Author: User

For encryption, symmetric encryption and public/private key encryption must be distinguished.

In symmetric encryption, you can use the same key for encryption and decryption. But the public/private key is not like this. If a public key is used for encryption, the corresponding private key should be used for decryption instead of the public key. Similarly, if a private key is used for encryption, the corresponding public key should be used for decryption instead of the private key.

The public and private keys are always created in pairs. The public key can be used by anyone, but the private key must be securely locked.

If Alice sends Bob an email, Alice wants to ensure that no one except Bob can read the email, so she uses Bob's public key for encryption. Information is encrypted using Bob's public key. Bob opens the email and decrypts it using his private key. This method ensures that no one except Bob can read Alice's email.

But there is another problem: Bob cannot ensure that the email is sent by Alice. Anyone can use Bob's public key to send emails to Bob. Let's extend this order. Next, Alice sends an email to Bob again. Before Alice encrypts Bob by sending an email with the public key, she adds her own signature and uses her own key to encrypt the signature. In this way, no one except Bob can read this email. Bob detected an encrypted signature when decrypting the email. This signature can be decrypted using Alice's public key. Bob can access Alice's public key. After the signature is decrypted, Bob can confirm that it is an email sent by Alice.

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.