Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi
any body can explain the parameters of RSAParameters
i had seen the parameters like p,d,e,q,...
i need the private key and public key from it

i got the link

http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsaparameters%28v=vs.90%29.aspx[^]

i am using the sample code as like this
can anybody can say it was right or not
sample code:

//Generate a public/private key pair.
          RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
          //Save the public key information to an RSAParameters structure.
          RSAParameters RSAKeyInfo = RSA.ExportParameters(true);
          //public key
          TextBox5.Text = Convert.ToBase64String(RSAKeyInfo.Exponent);
          // private key
          TextBox6.Text = Convert.ToBase64String(RSAKeyInfo.D);


they had give as that the
public key is {e,n} where n = result of the (P*Q)
Private key is {d, n} where n = result of the (P*Q)

where i had done is the correct thing or not in the sample code for the public and private keys

thanks alot
Posted

1 solution

It is a complex argument. Try to look here Certificates to DB and Back[^] and maybe you will find something that works for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900