Michael,

Thanks for your response.

Yes, I do understand the DH exchange process. But with respect to the
OpenSSL DH Library usage, let's say I and another party have fixed p & g. I
calculate X using DH_generate_key() (I get a different X every time for the
same p & g, is that okay?). And later I receive the other party's Y (which
never changes by the way) and use it to calculate the secret key and is
different every time. So my comparison against their shared secret key
fails.

Am I missing something obvious?

-- Bala

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Michael Sierchio
Sent: Wednesday, September 03, 2003 12:43 AM
To: [EMAIL PROTECTED]
Subject: Re: More DH questions


Bala Pitchandi wrote:

> Is it true that for a given P & g, I would always get the same public key
> and for a given P, g & pub_key, I would get the same shared secret key?

Okay, let's get a few terms straight.  With Diffie-Hellman, a system
shares g, p and each user generates a random secret exponent, x.  g^x mod p
yields the public exponent.  Given any two users whose publice exponents are
X & Y, and who share g, p,  they may calculate the pairwise shared secret as
follows

One party calculates X^y mod p
the other calculates Y^x mod p

and thanks to the properties of algebra, these two are the same.

Is that what you mean?

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to