Hi Christian,

Have you looked at the sample on the Wiki?
http://www.cryptopp.com/wiki/Diffie-Hellman_Key_Exchange.

Jeff

On 9/14/07, greatx <[EMAIL PROTECTED]> wrote:
>
> I believe the function dh.Agree(...) is NOT expecting the given public
> key to be in DER encoding, or is it?
> I have tried putting the given public key with the SEQUENCE in the
> begining of it, but the Agree() returned 0.
> If I put the given public key after stripping the un-used zero bytes,
> then the Agree() returns 1.
>
> Please also note my question about this:
> ---------------------------------------------------
> // Initiate DH with the given Domain Parameters
> DH dh(StringSource(GivenDHDomainParameters,
> GivenDHDomainParametersLength, true, NULL));
> // This here is the difference on the code: basically I had to create
> a dhTemp and pass the prime and generator... why???
> Integer iPrime = dh.GetGroupParameters().GetModulus();
> Integer iGenerator = dh.GetGroupParameters().GetSubgroupGenerator();
> DH dhTemp(iPrime, iGenerator);
> ----------------------------------------------------
>
> Christian

--~--~---------~--~----~------------~-------~--~----~
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