RSA cryptographic decryption and signature verification mechanisms and their differences and linkages

Source: Internet
Author: User
Tags decrypt
The principle of 1.RSA encryption and decryption mechanism

RSA public Key cryptography consists of the following 3 algorithms: KeyGen (Key generation algorithm), Encrypt (cryptographic algorithm), and decrypt (decryption algorithm). Details are as follows:


So, as we can see from the algorithm description: The public key is used to encrypt the data, and the private key is used to decrypt the data . Of course, this can also be very intuitive to understand: the public key is a public key, it is public to use it to encrypt data. The private key is a private key, and whoever has this key is able to decrypt the text. Otherwise everyone can see the private key, can be decrypted, it is not a mess.
2.RSA Signature Authentication mechanism principle signature system also contains 3 algorithms: KeyGen (Key generation algorithm), sign (signature algorithm), Verify (authentication algorithm). The secret key generation algorithm is the same as the key generation algorithm in RSA encryption and decryption.
For the signature and authentication of M, it can be the message digest of the original message. In HTTPS, the CA also signs the digest of certain information about the certificate. Therefore, in the signature algorithm, the private key is used to sign the data, and the public key is used to authenticate the signature. This can also be intuitively understood: to sign a file, of course, to use the private key, because we hope that only ourselves to complete the signature. The verification process certainly wants everyone to be able to execute, and everyone can see that the signature is verified by the verification that I signed it myself.
The difference and connection between 3.RSA encryption and decryption mechanism and signature authentication mechanism assuming the RSA encryption and decryption system, the cryptographic function is called E, and the decoding function is called D.         During the encryption process, we use the public key PK and E functions to encrypt the message and then decrypt the ciphertext with the private key SK and D functions on the peer to get the original message. In the process of signature authentication, we use the private key SK and D functions for the signature of the message, and then use the public key PK and E functions to authenticate the peer.         Note that D and E here are the same as the D and E functions above. Because, in an RSA encryption system, the D and E functions are applied in any order, both cancel each other out. So E (d (Stuff)) =stuff, just like D (e (stuff)) =stuff. Just used to, E and D in the process of encryption, called cryptographic functions and decoding functions, and in the process of signing authentication, called signature functions and authentication functions, is actually the same.
References from: https://www.zhihu.com/question/25912483

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.