Is it possible to encrypt with private key using .net RSACryptoServiceProvider?

前端 未结 9 1977
醉话见心
醉话见心 2020-12-08 05:32

I know that RSACryptoServiceProvider can encrypt with the public key, then it can be decrypted with the private key.

Is it possible to encrypt with the private key a

9条回答
  •  天命终不由人
    2020-12-08 05:53

    Fortunately no. You can however sign with the private key and verify the signature with the public key.

    While the math involve makes sense when the key roles are reversed (and this is how signatures work), encrypting for privacy doesn't make much sense when the decryption key is well know and public.

提交回复
热议问题