Public key

 1, public and private key pairs
2, disclosed key is called a public key, called the private key known only to themselves
3, data encrypted with the public key corresponding to the private key can decrypt
4, the data encrypted with the private only the corresponding public key can decrypt
5, if the public key can decrypt the private key must be a corresponding increase adhesiveness
6, if the private key can decrypt the encrypted must be a public key corresponding to the added
Hypothetically, I found two figures, a 1, a 2. I love this number 2, on reservations, I will not tell you, then I tell you, one of my public key.
I have a file, you can not let others see, I use an encrypted. Others found the file, but he did not know the private key to decrypt 2 is, ah, so he can not be untied, I can only use the number 2, that is my private key to decrypt. So I can protect the data.
My good friend x 1 with my public key to encrypt a character a, encrypted became b, on the web. Others steal this file, but others can not be untied, because people do not know 2 is my private key can be decrypted only I, after decrypted a. In this way, we can send the encrypted data.
Now we know that use public key encryption, and then use the private key to decrypt, can solve the problem of the secure transmission. If I use a private key to encrypt a piece of data (of course, I can only use private key encryption, because only I know my private key 2), the results of all the people have seen my content, because they all know my public key is 1, then what is the use of this encryption it?
But my friend said someone posing as x I gave him a letter. How to do it? I want to send me a letter, the content is c, 2 with my private key encryption, the encrypted content is d, sent to x, then told him to decrypt see is not c. He used my public key to decrypt 1, and found that indeed is c. This time, he will think, I can use the public key to decrypt the data, it must be added using my private key secret. I only knew I had a private key, so he can be sure that something really is my hair. So that we can confirm the identity of the sender. This process is called digital signature. Of course, the specific procedure is slightly more complicated. With a private key to encrypt data, use a digital signature is.
Well, we go over:
1, public and private key pairs appear
2, only I know the private key
3, you can use my public key encryption to send me a letter of
4, we use my public key to decrypt the contents of the letter , see if you can unlock, to unlock, indicating that through my private key encryption, and can indeed confirm that I made up.
To summarize the conclusions:
1, with the public key to encrypt data, using the private key to decrypt the data
2, data encrypted with the private key (digital signature), with a public key to verify the digital signature.
In actual use, the public will not be alone, always by way of digital certificates appear, this is to the safety and effectiveness of public keys.
Principle of digital certificates
   The digital certificate using the public key system, i.e. one another by a pair of matching keys for encryption and decryption. Each user's own set a specific
I only know the private key (private key), use it to decrypt and signature; at the same time set a public key (public key) which I am open
, Shared by a group of users, for encryption and signature verification. When sending a confidential document, the sender using the recipient's public key for data encryption
Dense, while the recipient is using its own private key to decrypt the information so you can reach your destination safe and correct manner. By means of digital guarantee plus
Secret process is an irreversible process, that is, only with the private key can decrypt. In public key cryptography, a common one is the RSA system.
  Users can also employ their own private information to be processed, because the key is only my all, thus creating a generation of others can not
File, and then form a digital signature. Digital signature can confirm the following two points:
  (1) ensure that information is sent by the signer's own signature, the signer can not be denied or difficult to deny;
  (2) to ensure that the information received since the issuance of any changes so far has not been conducted, document issued document is authentic.

My explanation:
Each user has a pair of private and public keys.
The private key is used to decrypt and signature, it is for my own use.
Public disclosure by me, for encryption and authentication signature, is for others to use.
When the user sends a file with a private key signature, others with his public key to decrypt, we can guarantee that the information was sent by him. That digital signature
.
When the user accepts the file, others with his public key encryption, he used to decrypt the private key, only you can ensure that the information received by him to. Avoided
He is seen by other people.

Digital Certificates
Is a digital form of identification, passport or driver's license is very similar. A digital certificate is a digital credential that provides information about the identity of the entity to
And other supporting information. A digital certificate is authority (CA) by the authorities to be issued a certificate. Because digital certificate by a certificate authority machine
Configuration issue, and therefore the validity of the security certificate information from the authorities. In addition, the digital certificate is only valid for a specific period of time.
Digital certificate containing the public key of the entity identified in the certificate (that is to say you have your public key in the certificate), because the certificate of a public key with a particular
People matching, and the authenticity of the certificate by the authority to ensure (that is to say so that everyone can trust your certificate is true), therefore, the digital certificate
How to find books for the user's public key and know whether it is effective to provide a solution to this problem.
Original articles published 0 · won praise 27 · views 80000 +

Guess you like

Origin blog.csdn.net/yimenglin/article/details/103251274