Hi, Crypto++ users,
DH Well-Known Group 2 (RFC 2539) uses a 1024 bit prime
The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 } and
the value is given in DH_MODULUS_DEC below
/** RFC 2539 */
#define DH_MODULUS_DEC
"179769313486231590770839156793787453197860296048756011706444423684197180216158519368947833795864925541502180565485980503646440548199239100050792877003355816639229553136239076508735759914822574862575007425302077447712589550957937778424442426617334727629299387668709205606050270810842907692932019128194467627007"
#define DH_BASE  "2"

1. I use the following snippet based on crypto++ wiki to build DH
object. Can you confirm if this snipet is correct, or correct it
otherwise? I noticed the PrivakeKey generated by this object starts
with many zeros. Please clarify if this is OK.

// Initialize the Diffie-Hellman class with a random prime and base
AutoSeededRandomPool arng;
RandomNumberGenerator& rng = *dynamic_cast<RandomNumberGenerator *>
(&arng);

Integer iModulus(DH_MODULUS_DEC);
Integer iGenerator(DH_BASE);
DH dh(iModulus, iGenerator);

dh.GenerateKeyPair(rng,m_vPvKey, m_vPbKey);

2. What does the dh1024.dat contain? Is that a Private Key?

Thanks in advance,
daneluta
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to