I use crypto++ v4.2 !
My code is below:
void GenerateRSAKey(unsigned int keyLength, const char *privFilename, const
char *pubFilename, const char *seed)
{
RandomPool randPool;
randPool.Put((byte *)seed, strlen(seed));
RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength);
InvertibleRSAFunction privkey(randPool, keyLength);
cout << "d= " << privkey.GetDecryptionExponent()<< endl;
cout << endl;
cout << "p= " <<privkey.GetPrime1() <<endl;
cout << endl;
cout << "q= " << privkey.GetPrime2() <<endl;
cout << endl;
cout << "e= "<< privkey.GetExponent() << endl;
}
Thank in advanced!
generalz
--
View this message in context:
http://www.nabble.com/how-to-get-the-e-and-d-in-rsa--t1250344.html#a3352426
Sent from the Crypto++ forum at Nabble.com.