使用C#中的Boncy Castel库基于密码生成RSA公共/私钥
我想使用C#中的Boncy Castel库加密使用密码的私钥生成一个RSA键对,然后将它们保存到分开文件,以便我可以在需要时使用它们来加密或解密事物
。能够生成RSA键盘并将其存储在单独的PEM文件中。我相信它是PKCS1格式,但我似乎无法弄清楚如何基于密码生成Keypair。
我在官方网站上查看了 https://www.bouncycastle.org/csharp t找到任何例子。 我还通过堆栈溢出一直搜索,没有成功。
I'd like to generate an RSA key pair with a private key encrypted with passphrase using the Bouncy Castel Library in C# and save them to separate files so that I can use them to encrypt or decrypt things whenever I need to...
I'm able to generate an RSA keypair and store them in separate PEM files. I believe it is in PKCS1 format, but I can't seem to figure out how to generate Keypair based on the password.
I looked on the official site, https://www.bouncycastle.org/csharp, but couldn't find any examples.
I also searched all the way through stack overflow with no success.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
至少我想出了如何使用密码生成RSA Keypair来对私钥进行加密,并使用AES-256-CBC与Bouncycastle C#(1.9.2)一起加密钥匙
注意:两个密钥的均为PEM格式。
I got help from the following Link: https://csharp.hotexamples.com/site/file?
At least I figured out How to generate RSA Keypair with passphrase to encrypt the private key, using AES-256-CBC with BouncyCastle C# (1.9.2)
Note: Both the key's are in PEM format.
I got help from the following Link: https://csharp.hotexamples.com/site/file?hash=0xdc447ca00ad5a1a69649f92339871f7caeada0c6c47b8b39ccad91e46cf75d74&fullName=Certificate.cs&project=nicholaspaun/Kalkulator1