Lines Matching defs:bits
131 static int probable_prime(BIGNUM *rnd, int bits);
132 static int probable_prime_dh(BIGNUM *rnd, int bits,
134 static int probable_prime_dh_safe(BIGNUM *rnd, int bits,
159 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
166 int checks = BN_prime_checks_for_size(bits);
174 /* make a random number and set the top and bottom bits */
177 if (!probable_prime(ret,bits)) goto err;
183 if (!probable_prime_dh_safe(ret,bits,add,rem,ctx))
188 if (!probable_prime_dh(ret,bits,add,rem,ctx))
376 static int probable_prime(BIGNUM *rnd, int bits)
383 if (!BN_rand(rnd,bits,1,1)) return(0);
408 static int probable_prime_dh(BIGNUM *rnd, int bits,
417 if (!BN_rand(rnd,bits,0,1)) goto err;
446 static int probable_prime_dh_safe(BIGNUM *p, int bits, const BIGNUM *padd,
452 bits--;
461 if (!BN_rand(q,bits,0,1)) goto err;