开发者

C# How to encrypt a data file Bouncy Castle pgp?

开发者 https://www.devze.com 2022-12-20 07:21 出处:网络
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

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 pa开发者_如何学运维rties 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


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消