How to store/retreieve RSA public/private key?

What I have done successfully is to store the keys as XML. There are two methods in RSACryptoServiceProvider: ToXMLString and FromXMlString . The ToXMLString will return an XML string containing either just the public key data or both the public and private key data depending on how you set it's parameter.

The FromXMLString method will populate the RSACryptoServiceProvider with the appropriate key data when provided an XML string containing either just the public key data or both the public and private key data.

Use a existing standard format, like PEM. Your crypto library should provide functions to load and save keys from files in PEM format. Exponent and Modulus are the Public key.

D and Modulus are the Private key. The other values allow faster computation for the holder of the Private key.

– ala Jul 28 '09 at 12:02 1 Exponent and Modulus as two independent values, stored in whatever way makes sense. The PEM format uses ASN1 to store these values (defined in the PKCS#1 standard as the "SubjectPublicKeyInfo" format), then base64 encodes the result. – caf Jul 28 '09 at 12:11.

The public key is identified by Modulus and Exponent. The private key is identified by the other members.

Normally Private keys are stored in HSM's/smart card. This provides a good security.

– ala Jul 31 '09 at 8:40 This is one of the requirements for my future project. In my current one, we used HSM.My initial readings shows that MS has secure stores to store keys. You can access keys from these secure stores.

Other alternatives to MS are Link1 1: trac.opendnssec.Org/wiki/HSM/SoftTokens – Raj Aug 5 '09 at 10:43.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions