Problem with implementing Diffie-Hellman key exchange using GMP

Ismail Donmez ismail at kde.org.tr
Sat May 28 13:01:16 CEST 2005


Hi again,

Obviously code was wrong it should be like :
 
[...]
mpz_class tmp= calc_alice;

mpz_powm(calc_alice.get_mpz_t(),calc_bob.get_mpz_t(),secret_alice.get_mpz_t(),prime.get_mpz_t());
mpz_powm(calc_bob.get_mpz_t(),tmp.get_mpz_t(),secret_bob.get_mpz_t(),prime.get_mpz_t());
[...]

Sorry for the noise :).

Regards,
ismail

-- 
They say people don't believe in heroes anymore


More information about the gmp-discuss mailing list