How to generate RSA key pairs and provide a pasphrase used in generation (not microsoft generated!)
I am trying to set up using C# and .Net 2.0 a RSA public/private key system to encrypt database columns (in varbinary). I want (like I used to be able to do in an old c library) to provide my own passphrase in generation the RSA keys (2048 or more).
It seems to be very hard to do! using RSACryptoServiceProvider will generate keys but somehow I do not trust that those private keys could not be hacked somehow. I prefer to provide my own passphrase. I looked for a GNU type of package for C# and .net 2.0 but found none :(
So here is what I tried:
CspParameters cspParam = new CspParameters();
cspParam.Flags = CspProviderFlags.UseMachineKeyStore;
RSACryptoServiceProvider x = new RSACryptoServiceProvider(cspParam);
I just want to presist the keys for now. but I get a exception in ToXmlString(false); stating only wrong type!
anyone here has any hints or tips on how to generate those RSA keys using a password. I would like to use the same keys to sign PGP email and stuff. Actually PGP does a nice job with keys asking the user to move the mouse around to generate the seeds and then a strong passphrase for the keys. I'd like to do the same. Is there sample somewhere?