Lines Matching defs:bits
23 static int bnrand(BNRAND_FLAG flag, BIGNUM *rnd, int bits, int top, int bottom,
30 if (bits == 0) {
36 if (bits < 0 || (bits == 1 && top > 0))
39 bytes = (bits + 7) / 8;
40 bit = (bits - 1) % 8;
49 /* make a random number and set the top and bottom bits */
102 int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
105 return bnrand(NORMAL, rnd, bits, top, bottom, strength, ctx);
108 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
110 return bnrand(NORMAL, rnd, bits, top, bottom, 0, NULL);
113 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
115 return bnrand(TESTING, rnd, bits, top, bottom, 0, NULL);
119 int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
122 return bnrand(PRIVATE, rnd, bits, top, bottom, strength, ctx);
126 int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom)
128 return bnrand(PRIVATE, rnd, bits, top, bottom, 0, NULL);
231 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom)
233 return BN_rand(rnd, bits, top, bottom);
257 * We use 512 bits of random data per iteration to ensure that we have at
258 * least |range| bits of randomness.