Enhance Diffie-Hellman implementation to use bignum_cmp