C# 如何加密数据文件 Bouncy Castle pgp?

发布于 2024-08-21 05:54:00 字数 960 浏览 1 评论 0原文

我希望能够将加密文件从一个应用程序(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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

┾廆蒐ゝ 2024-08-28 05:54:00

您所描述的听起来像是签名,而不是加密。您可以使用.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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文