« Return to Thread: How to hardcode prime and base #s for Diffie-Hellman?

How to hardcode prime and base #s for Diffie-Hellman?

by tiredashell@gmail.com :: Rate this Message:

Reply to Author | View in Thread


In the wiki's DH example, the prime and base are generated on the fly:

Integer iPrime = dhA.GetGroupParameters().GetModulus();
Integer iGenerator = dhA.GetGroupParameters().GetSubgroupGenerator();

How would I hardcode these into my application? I tried to hardcode
the trivially small numbers below, but doing so actually breaks the
key exchange for some reason (the keys don't end up being the same):

Integer iPrime(23);
Integer iGenerator(5);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe@....
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: How to hardcode prime and base #s for Diffie-Hellman?