Public and private key principles _ encryption

Source: Internet
Author: User
Tags decrypt asymmetric encryption
The public key and private key have always been understood not very thoroughly, feel ambiguous, the heart of the drums. How does a public key work. How does the private key work. How the work works. Today on the Internet to find a half-day, by looking at the understanding of this key pair, finally made clear, I will write out my experience to the key to the question of the comrades to see.
Public and private keys are commonly known as asymmetric encryption, from the previous symmetric encryption (using user name and password) to improve the way. I'll explain the principle in e-mail way.
The purpose of using public and private keys is to implement secure e-mail messages, and you must achieve the following:
1. The content I send to you must be encrypted and cannot be seen by others during the transmission of the message.
2. It must be guaranteed that I sent the mail, not someone pretending to be me.
To achieve such a goal, both the public and private keys must be sent to the message.
Public key, is for everyone to use, you can be published through e-mail, you can use the site to let others download, the public key is actually used to encrypt/chapter. The private key, is its own, must be very careful to save, preferably with a password, the private key is used to decrypt/seal, first on the ownership of the key, the private key is owned only by individuals. The public key and the private key function is: the content which encrypts with the public key only can decrypt with the private key, the content which encrypts with the private key only uses the public key to decrypt.
For example, I'm going to send you an encrypted email. First of all, I must have your public key, and you must have my public key.
First of all, I use your public key to encrypt this message, so that the message is not seen by others, and ensure that the message is not modified during the transmission. When you receive the email, you can decrypt it with your private key and you can see the content.
Next, I use my private key to encrypt this email, and after you send it to your hand, you can decrypt it with my public key. Because the private key is only in my hand, this ensures that the mail is sent by me.
When A->b data, a will use B's public key encryption, so as to ensure that only B can be solved, otherwise the general public can unlock the encrypted message, that is, the confidentiality of the data. Verification is the use of the signing of the chapter of the mechanism, A transmission of information to everyone, will be the private key to do the signature, so that all the people who received the message can be used a public key to examine the chapter, it can be confirmed that the message is issued by a.

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.