Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
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.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.