Is it possible to encrypt with private key using .net RSACryptoServiceProvider?(是否可以使用.net RSACryptoServiceProvider 使用私钥加密?)
问题描述
我知道 RSACryptoServiceProvider 可以用公钥加密,然后可以用私钥解密.
I know that RSACryptoServiceProvider can encrypt with the public key, then it can be decrypted with the private key.
是否可以使用 RSACryptoServiceProvider 使用私钥加密并使用公钥解密?
Is it possible to encrypt with the private key and decrypt with the public key using the RSACryptoServiceProvider ?
推荐答案
没有.这不是任何公钥/私钥加密的工作方式.只能用公钥加密,只能用私钥解密.
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.
如果您想将私钥应用于消息,也许您正在寻找 签名,而不是加密?这是一种不同的加密方案,也可以使用 RSA 密钥.
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.
这篇关于是否可以使用.net RSACryptoServiceProvider 使用私钥加密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:是否可以使用.net RSACryptoServiceProvider 使用私钥加


基础教程推荐
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01