Search code examples
c#.netencryptionencryption-asymmetric

PRIVATE key encryption in .Net


I am looking for a way to do private key encryption in C#.

I thought I could use the RSACryptoServiceProvider, but it only supports public key encryption.

The only thing I found on the subject was this project, but I would rather use something I can find in .net: http://www.codeproject.com/KB/security/PrivateEncryption.aspx

Please note I am not looking for signing.

Please note I require asymmetric encryption.

Any idea's?

Background story:

I am sending an encrypted file to another system which is running an application. The encryption is making sure the file cannot be altered (more or less) or viewed by anyone. The application is able to decrypt the file using the public key and do something with it.

I know pretty much anyone is able to get the public key from the application, this is not a problem in this case.


Solution

  • It should not be done. Sign instead and use symmetric encryption.