任何人都可以解释 RSAParameters 的参数我见过像 p,d,e,q,... 这样的参数我需要它的私钥和公钥
我得到了链接
http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsaparameters%28v=vs.90%29.aspx[^]
我正在使用示例代码,任何人都可以说它是正确的还是错误的示例代码:
//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);
他们给出的公钥是 {e,n} 其中 n = (P*Q) 的结果 私钥是 {d, n} 其中 n = (P*Q) 的结果
在公钥和私钥的示例代码中,我所做的是否正确
多谢