#define DH_PRIME
"0xDAB6B094B2C56A0ED16BC46EF604CFD9BA3404CAC4BF65964997D0DDC6C5A0D0759FAFC46744457457578BCC3C707BF7C26A3BA9DFA5CD27D2E19F60DFD337D0A051ECCC3B824B6309D6FC5CDB7EE041EA563278CB054C1B54250AC1FB00D8911522DCF638C30275B382461469693539FB89E9FCEC475A1AF2FDD39CBFB0C8DB"
#define DH_GENERATOR "0x03"

Integer iPrime(DH_PRIME);
Integer iGenerator(DH_GENERATOR);

note : 0x is hexa. if you want to print a number, remove "0x".

On 6월10일, 오후9시31분, "[email protected]" <[email protected]>
wrote:
> 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 [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to