Lines Matching refs:dh
1 /* crypto/dh/dh_check.c */
62 #include <openssl/dh.h>
75 int DH_check(const DH *dh, int *ret)
88 if (BN_is_word(dh->g,DH_GENERATOR_2))
90 l=BN_mod_word(dh->p,24);
94 else if (BN_is_word(dh->g,DH_GENERATOR_3))
96 l=BN_mod_word(dh->p,12);
100 else if (BN_is_word(dh->g,DH_GENERATOR_5))
102 l=BN_mod_word(dh->p,10);
109 if (!BN_is_prime(dh->p,BN_prime_checks,NULL,ctx,NULL))
113 if (!BN_rshift1(q,dh->p)) goto err;