Home | History | Annotate | Download | only in dh

Lines Matching refs:DH

1 /* crypto/dh/dh_check.c */
62 #include <openssl/dh.h>
73 int DH_check(const DH *dh, int *ret)
86 if (BN_is_word(dh->g,DH_GENERATOR_2))
88 l=BN_mod_word(dh->p,24);
92 else if (BN_is_word(dh->g,DH_GENERATOR_3))
94 l=BN_mod_word(dh->p,12);
98 else if (BN_is_word(dh->g,DH_GENERATOR_5))
100 l=BN_mod_word(dh->p,10);
107 if (!BN_is_prime_ex(dh->p,BN_prime_checks,ctx,NULL))
111 if (!BN_rshift1(q,dh->p)) goto err;
122 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
133 BN_copy(q,dh->p);