views:

542

answers:

1

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

A: 

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

GregS