Home All Groups Group Topic Archive Search About
Author
5 Apr 2005 7:19 AM
Pat Hanzel via .NET 247
Hi,
I generated public-private key pairs from crypto++ lib (ver. 5.2). Now I want to use these generated keys in .NET, but there is used RSAParamaters structure (include exponent,modulus, p, q parameters, etc.) by RSA algorithm. Does anybody have any experience with using RSA keys generated from crypto++ in .NET?
I would like to know too, if I can use RSA keys generated in .NET by RSACryptoServiceProvider in Crypto++ library?

Thank you very much
Patrik

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>lDANWVBOFEimM/cs1C+H3Q==</Id>

Author
6 Apr 2005 2:33 PM
Michel Gallant
If the privatekey generated by crypto++ is PKCS#8, and you want to use that
private key from .NET 1.1, you will have to Pinvoke using something like:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/cryptimportpkcs8.asp
which will import into CSP (and a keycontainer) from a PKCS#8 binary blob.

Then, you can access that private key by specifying the keycontainer when
instantiating:

   CspParameters cp = new CspParameters();
   cp.KeyContainerName = container;
   cp.KeyNumber = keyspec;
   RSACryptoServiceProvider oRSA = new RSACryptoServiceProvider(cp);

I don't think .NET 2 exposes pkcs8 capability.

- Mitch Gallant


"Pat Hanzel via .NET 247" <anonym***@dotnet247.com> wrote in message news:%23xf5K$aOFHA.3856@TK2MSFTNGP10.phx.gbl...
Hi,
I generated public-private key pairs from crypto++ lib (ver. 5.2). Now I want to use these generated keys in .NET, but there is used
RSAParamaters structure (include exponent,modulus, p, q parameters, etc.) by RSA algorithm. Does anybody have any experience with
using RSA keys generated from crypto++ in .NET?
I would like to know too, if I can use RSA keys generated in .NET by RSACryptoServiceProvider in Crypto++ library?

Thank you very much
Patrik

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>lDANWVBOFEimM/cs1C+H3Q==</Id>