> From: owner-openssl-us...@openssl.org On Behalf Of Prashant Batra > Sent: Thursday, 21 April, 2011 09:16
> Hi, I tried the dhtest sample provided in the test folder of openssl-0.9.8g. > What it does is- > Creates 2 DH objects using a single prime and generator value. > It then calculates the public, private keys pairs using the 2 DH's. > Then computes the secret for each DH using the public key of > the other DH. The secrets should match ad it does so. > It works fine. > But now, I modified the test program, so that it calls > dh_generate_parameters for both the objects,( so that both does not > using the same prime value), and do the rest of things similarly. > But the secrets calculated does not match. Kindly help. Of course not. Both parties in a DH exchange MUST use the same parameters (prime AND generator, but you used 5 for the generator in both cases). THAT'S HOW DH WORKS. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org