C# 如何加密数据文件 Bouncy Castle pgp?
我希望能够将加密文件从一个应用程序(Windows 窗体)发送到另一个应用程序(asp.net)。我看过充气城堡,但似乎没有太多文档。有没有简单的充气城堡 pgp C# 示例?在 C# 中如何使用充气城堡完成 pgp?
这是正确的方法吗?:服务器应用程序(winforms)有私钥和公钥,并且进行加密。客户端应用程序(aspnet)只知道公钥并读取数据。
它不必是超强加密,但必须这样做,以便客户端不需要知道用于创建文件的密钥 - 这就是我们选择 pgp 的原因。
目的是客户端只能读取而不能创建数据文件(第三方将能够编写自己的客户端应用程序)。
看起来这些链接值得一看:
http://blogs.microsoft.co.il/blogs/kim/archive/2009/01/23/pgp-zip-encrypted-files-with-c.aspx http:// /jopinblog.wordpress.com/2008/06/23/pgp-single-pass-sign-and-encrypt-with-bouncy-castle/ http://karym6.blogspot.com/2009/06/ pgp-decryption-with-c.html
I want to be able to send encrypted files from one app (windows forms) to another (asp.net). I've looked at bouncy castle, but there doesn't seem to be much documentation. Are there any simple bouncy castle pgp c# examples? How is pgp done in c# using bouncy castle?
Is this the right approach?: Server app (winforms) has a private key and public key, and does the encryption. The client app (aspnet) only knows the public key and reads the data.
It doesnt have to be super strong encryption, but it does have to be done so the client does not need to know the key that was used to create the file - thats why we choose pgp.
The aim is that the client can only read, and not create the data files (3rd parties will be able to write their own client apps).
Looks like these links are worth checking out:
http://blogs.microsoft.co.il/blogs/kim/archive/2009/01/23/pgp-zip-encrypted-files-with-c.aspx
http://jopinblog.wordpress.com/2008/06/23/pgp-single-pass-sign-and-encrypt-with-bouncy-castle/
http://karym6.blogspot.com/2009/06/pgp-decryption-with-c.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您所描述的听起来像是签名,而不是加密。您可以使用.NET 类System.Security.Cryptography.RSACryptoServiceProvider,特别是方法SignHash(对于服务器)和VerifyHash(对于客户端)。
What you are describing sounds like signing, not encryption. You can use the .NET class System.Security.Cryptography.RSACryptoServiceProvider, in particular the methods SignHash (for the server) and VerifyHash (for the client).