Lines Matching refs:dh
1 /* crypto/dh/dh_check.c */
61 #include <openssl/dh.h>
76 int DH_check(const DH *dh, int *ret)
89 if (BN_is_word(dh->g,DH_GENERATOR_2))
91 l=BN_mod_word(dh->p,24);
95 else if (BN_is_word(dh->g,DH_GENERATOR_3))
97 l=BN_mod_word(dh->p,12);
101 else if (BN_is_word(dh->g,DH_GENERATOR_5))
103 l=BN_mod_word(dh->p,10);
110 if (!BN_is_prime_ex(dh->p,BN_prime_checks,ctx,NULL))
114 if (!BN_rshift1(q,dh->p)) goto err;
125 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
136 BN_copy(q,dh->p);