Lines Matching defs:bits
31 static int rsa_keygen(OSSL_LIB_CTX *libctx, RSA *rsa, int bits, int primes,
41 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
44 return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
46 return RSA_generate_multi_prime_key(rsa, bits, RSA_DEFAULT_PRIME_NUM,
50 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes,
56 return rsa->meth->rsa_multi_prime_keygen(rsa, bits, primes,
66 return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
71 return rsa_keygen(rsa->libctx, rsa, bits, primes, e_value, cb, 0);
75 static int rsa_multiprime_keygen(RSA *rsa, int bits, int primes,
88 if (bits < RSA_MIN_MODULUS_BITS) {
100 if (primes < RSA_DEFAULT_PRIME_NUM || primes > ossl_rsa_multip_cap(bits)) {
116 /* divide bits into 'primes' pieces evenly */
117 quo = bits / primes;
118 rmd = bits % primes;
256 * (by checking the first 4 bits are less than 0x9 or greater than
424 static int rsa_keygen(OSSL_LIB_CTX *libctx, RSA *rsa, int bits, int primes,
430 ok = ossl_rsa_sp800_56b_generate_key(rsa, bits, e_value, cb);
438 && bits >= 2048
440 ok = ossl_rsa_sp800_56b_generate_key(rsa, bits, e_value, cb);
442 ok = rsa_multiprime_keygen(rsa, bits, primes, e_value, cb);