Hi,
my name is Alex and currently I am learning
the source code of cryptopp.
I would be very glad if someone would reply
to my question below.
I am using the following code, which I downloaded
online:
RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength);
HexEncoder privKey(new FileSink(privFile));
priv.DEREncode(privKey);
privKey.MessageEnd();
// Build public key
RSAES_OAEP_SHA_Encryptor pub(priv);
HexEncoder pubKey(new FileSink(pubFile));
pub.DEREncode(pubKey);
pubKey.MessageEnd();
If I do NOT change the seed of randPool, why the algorithm
above always generates the same public and private keys?
My understanding is that the method
void InvertibleRSAFunction::GenerateRandom(RandomNumberGenerator &rng,
const NameValuePairs &alg)
that has
m_p.GenerateRandom(rng, primeParam);
m_q.GenerateRandom(rng, primeParam);
should generate random primes m_p and m_q
(let's say 128 bit numbers)?
I appreciate your time and I will be very glad
to hear the answer to that question that better helps
me to understand the code:)
I am looking forward to hearing from you soon.
Best regards,
Alex
--
University of Missouri-Columbia
Department of Mathematics
E-mail [EMAIL PROTECTED]