Lines Matching refs:dh
64 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) { in DH_check_pub_key() argument
77 if (!BN_copy(&q, dh->p) || in DH_check_pub_key()
93 int DH_check(const DH *dh, int *ret) { in DH_check() argument
121 if (dh->q) { in DH_check()
122 if (BN_cmp(dh->g, BN_value_one()) <= 0) { in DH_check()
124 } else if (BN_cmp(dh->g, dh->p) >= 0) { in DH_check()
128 if (!BN_mod_exp(t1, dh->g, dh->q, dh->p, ctx)) { in DH_check()
135 if (!BN_is_prime_ex(dh->q, BN_prime_checks, ctx, NULL)) { in DH_check()
139 if (!BN_div(t1, t2, dh->p, dh->q, ctx)) { in DH_check()
145 if (dh->j && BN_cmp(dh->j, t1)) { in DH_check()
148 } else if (BN_is_word(dh->g, DH_GENERATOR_2)) { in DH_check()
149 l = BN_mod_word(dh->p, 24); in DH_check()
153 } else if (BN_is_word(dh->g, DH_GENERATOR_5)) { in DH_check()
154 l = BN_mod_word(dh->p, 10); in DH_check()
162 if (!BN_is_prime_ex(dh->p, BN_prime_checks, ctx, NULL)) { in DH_check()
164 } else if (!dh->q) { in DH_check()
165 if (!BN_rshift1(t1, dh->p)) { in DH_check()