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

前端 未结 9 1991
醉话见心
醉话见心 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:56

    No. That's not how any public/private key encryption works. You can only encrypt with the public key, and only decrypt with the private key.

    If you want to apply the private key to a message, maybe you're looking for a signature, rather than encryption? This is a different cryptographic scheme that can also use RSA keys.

提交回复
热议问题