Encryption libraries?

Well, you did not mention that the built-in class doesn't cover your need, so how about System.Security.Cryptography.RSACryptoServiceProvider?

It has a large set qualified ways to asymmetrically encrypt/decrypt streams.

There are several tutorial/guides to take you along the way:

  • Public Key RSA Encryption in C# .NET - Code Project
  • RSA Encryption in .NET -- Demystified! - By Peter A. Bromberg

There are countless more to be found through Google.

Update: About the length-restrictments, it's should not be any problems if you just implement the same buffer-algorithm on both sides, encryption and decryption.

Update2: Yes, my example was RSACryptoProvider, but you can use any class that derives from System.Security.Cryptography.AsymmetricAlgorithm, if you want a public/private key-solution. Or build your own... or maybe not :)

Tags:

C#

Encryption

Pki