Android on the difference between RSA encryption and signature

You just have to think: since it is encryption, it must be that you don’t want others to know my message, so only I can decrypt it, so it can be concluded that the public key is responsible for encryption, and the private key is responsible for decryption ; for the same reason, since it is a signature, it must be no I hope that someone will pretend to be me and send a message. Only I can publish this signature, so it can be concluded that the private key is responsible for signing and the public key is responsible for verification .



Digression:

(1) Symmetric encryption uses the same key for encryption and decryption, so the speed is fast, but because the key needs to be transmitted over the network, the security is not high.

(2) Asymmetric encryption uses a pair of keys, a public key and a private key, so the security is high, but the encryption and decryption speed is slow.

(3) The solution is to encrypt the symmetric encryption key with asymmetric encryption public key, and then send it out. The receiver uses the private key to decrypt to obtain the symmetric encryption key, and then the two parties can use symmetric encryption to communicate .


Write down what you see elsewhere to make it easy to find

Guess you like

Origin blog.csdn.net/w_1220577523/article/details/78400617