Home
last modified time | relevance | path

Searched refs:BN_num_bits (Results 1 – 25 of 75) sorted by relevance

123

/openssl/crypto/dh/
H A Ddh_key.c47 if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) { in ossl_dh_compute_key()
53 && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) { in ossl_dh_compute_key()
58 if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) { in ossl_dh_compute_key()
275 if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) { in generate_key()
281 && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) { in generate_key()
286 if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) { in generate_key()
315 ossl_ifc_ffc_compute_security_bits(BN_num_bits(dh->params.p)); in generate_key()
318 || dh->length > BN_num_bits(dh->params.q)) in generate_key()
332 && dh->length >= BN_num_bits(dh->params.p)) in generate_key()
334 l = dh->length ? dh->length : BN_num_bits(dh->params.p) - 1; in generate_key()
[all …]
H A Ddh_check.c94 if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) in DH_check_params()
96 if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) in DH_check_params()
156 if (BN_num_bits(dh->params.p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) { in DH_check()
253 if (BN_num_bits(dh->params.p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) { in DH_check_pub_key()
299 length = BN_num_bits(dh->params.p) - 1; in ossl_dh_check_priv_key()
300 if (BN_num_bits(priv_key) <= length in ossl_dh_check_priv_key()
301 && BN_num_bits(priv_key) > 1) in ossl_dh_check_priv_key()
303 } else if (BN_num_bits(priv_key) == length) { in ossl_dh_check_priv_key()
H A Ddh_lib.c199 return BN_num_bits(dh->params.p); in DH_bits()
215 N = BN_num_bits(dh->params.q); in DH_security_bits()
221 return BN_security_bits(BN_num_bits(dh->params.p), N); in DH_security_bits()
/openssl/providers/common/
H A Dsecuritycheck.c161 L = BN_num_bits(p); in ossl_dsa_check_key()
162 N = BN_num_bits(q); in ossl_dsa_check_key()
208 L = BN_num_bits(p); in ossl_dh_check_key()
217 N = BN_num_bits(q); in ossl_dh_check_key()
/openssl/crypto/ffc/
H A Dffc_params_validate.c62 L = BN_num_bits(params->p); in ossl_ffc_params_FIPS186_4_validate()
63 N = BN_num_bits(params->q); in ossl_ffc_params_FIPS186_4_validate()
82 L = BN_num_bits(params->p); in ossl_ffc_params_FIPS186_2_validate()
83 N = BN_num_bits(params->q); in ossl_ffc_params_FIPS186_2_validate()
H A Dffc_key_generate.c25 int ret = 0, qbits = BN_num_bits(params->q); in ossl_ffc_generate_private_key()
/openssl/doc/man3/
H A DBN_num_bytes.pod5 BN_num_bits, BN_num_bytes, BN_num_bits_word - get BIGNUM size
13 int BN_num_bits(const BIGNUM *a);
25 BN_num_bits() returns the number of significant bits in a B<BIGNUM>,
36 Some have tried using BN_num_bits() on individual numbers in RSA keys,
/openssl/crypto/dsa/
H A Ddsa_check.c30 if (BN_num_bits(dsa->params.p) > OPENSSL_DSA_MAX_MODULUS_BITS) { in dsa_precheck_params()
36 if (BN_num_bits(dsa->params.q) >= BN_num_bits(dsa->params.p)) { in dsa_precheck_params()
H A Ddsa_lib.c336 return BN_security_bits(BN_num_bits(d->params.p), in DSA_security_bits()
337 BN_num_bits(d->params.q)); in DSA_security_bits()
344 return BN_num_bits(dsa->params.p); in DSA_bits()
H A Ddsa_ossl.c147 if (!BN_priv_rand_ex(blind, BN_num_bits(dsa->params.q) - 1, in ossl_dsa_do_sign_int()
261 q_bits = BN_num_bits(dsa->params.q); in dsa_sign_setup()
371 i = BN_num_bits(dsa->params.q); in dsa_do_verify()
378 if (BN_num_bits(dsa->params.p) > OPENSSL_DSA_MAX_MODULUS_BITS) { in dsa_do_verify()
/openssl/crypto/rsa/
H A Drsa_sp800_56b_check.c95 shift = nbits - BN_num_bits(&ossl_bn_inv_sqrt_2); in ossl_rsa_check_prime_factor_range()
98 if (BN_num_bits(p) != nbits) in ossl_rsa_check_prime_factor_range()
181 if (BN_num_bits(rsa->d) <= (nbits >> 1)) in ossl_rsa_check_private_exponent()
230 bitlen = BN_num_bits(e); in ossl_rsa_check_public_exponent()
256 return (BN_num_bits(diff) > bitlen); in ossl_rsa_check_pminusq_diff()
291 nbits = BN_num_bits(rsa->n);
408 if (nbits != BN_num_bits(rsa->n)) {
H A Drsa_ossl.c107 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) { in rsa_ossl_public_encrypt()
118 if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) { in rsa_ossl_public_encrypt()
119 if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) { in rsa_ossl_public_encrypt()
714 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) { in rsa_ossl_public_decrypt()
725 if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) { in rsa_ossl_public_decrypt()
726 if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) { in rsa_ossl_public_decrypt()
871 && (BN_num_bits(rsa->q) == BN_num_bits(rsa->p)); in rsa_ossl_mod_exp()
/openssl/crypto/bn/
H A Dbn_rsa_fips186_4.c232 if ((BN_num_bits(p1i) + BN_num_bits(p2i)) >= in ossl_bn_rsa_fips186_4_gen_prob_primes()
311 if (bits < BN_num_bits(&ossl_bn_inv_sqrt_2)) in ossl_bn_rsa_fips186_4_derive_prime()
314 bits - BN_num_bits(&ossl_bn_inv_sqrt_2)) in ossl_bn_rsa_fips186_4_derive_prime()
369 if (BN_num_bits(Y) > bits) { in ossl_bn_rsa_fips186_4_derive_prime()
H A Dbn_gcd.c261 if (BN_is_odd(n) && (BN_num_bits(n) <= 2048)) { in int_bn_mod_inverse()
368 if (BN_num_bits(A) == BN_num_bits(B)) { in int_bn_mod_inverse()
373 } else if (BN_num_bits(A) == BN_num_bits(B) + 1) { in int_bn_mod_inverse()
651 rlen = BN_num_bits(r); in BN_gcd()
652 glen = BN_num_bits(g); in BN_gcd()
H A Dbn_mpi.c21 bits = BN_num_bits(a); in BN_bn2mpi()
82 BN_clear_bit(a, BN_num_bits(a) - 1); in BN_mpi2bn()
H A Dbn_gf2m.c470 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_mul()
531 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_sqr()
604 if (BN_num_bits(u) < BN_num_bits(v)) { in BN_GF2m_mod_inv_vartime()
621 int ubits = BN_num_bits(u); in BN_GF2m_mod_inv_vartime()
622 int vbits = BN_num_bits(v); /* v is copy of p */ in BN_GF2m_mod_inv_vartime()
741 numbits = BN_num_bits(p); in BN_GF2m_mod_inv()
885 n = BN_num_bits(b) - 1; in BN_GF2m_mod_exp_arr()
913 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_exp()
976 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_sqrt()
1110 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_solve_quad()
H A Dbn_exp.c69 bits = BN_num_bits(p); in BN_exp()
187 bits = BN_num_bits(p); in BN_mod_exp_recp()
339 bits = BN_num_bits(p); in BN_mod_exp_mont()
688 if ((16 == a->top) && (16 == p->top) && (BN_num_bits(m) == 1024) in BN_mod_exp_mont_consttime()
699 } else if ((8 == a->top) && (8 == p->top) && (BN_num_bits(m) == 512)) { in BN_mod_exp_mont_consttime()
1206 bits = BN_num_bits(p); in BN_mod_exp_mont_word()
1333 bits = BN_num_bits(p); in BN_mod_exp_simple()
1463 (((a1->top == 16) && (p1->top == 16) && (BN_num_bits(m1) == 1024) && in BN_mod_exp_mont_consttime_x2()
1465 ((a1->top == 24) && (p1->top == 24) && (BN_num_bits(m1) == 1536) && in BN_mod_exp_mont_consttime_x2()
1467 ((a1->top == 32) && (p1->top == 32) && (BN_num_bits(m1) == 2048) && in BN_mod_exp_mont_consttime_x2()
[all …]
H A Dbn_prime.c245 int min_checks = bn_mr_min_checks(BN_num_bits(w)); in ossl_bn_check_prime()
303 int trial_divisions = calc_trial_divisions(BN_num_bits(w)); in bn_is_prime_int()
394 iterations = bn_mr_min_checks(BN_num_bits(w)); in ossl_bn_miller_rabin_is_prime()
531 if (BN_num_bits(rnd) != bits) in probable_prime()
580 if (BN_num_bits(rnd) < bits in probable_prime_dh()
H A Dbn_rand.c147 n = BN_num_bits(range); /* n > 0 */ in bnrand_range()
257 n = BN_num_bits(range); /* n > 0 */ in ossl_bn_priv_rand_range_fixed_top()
373 ossl_bn_mask_bits_fixed_top(out, BN_num_bits(range)); in ossl_bn_gen_dsa_nonce_fixed_top()
H A Dbn_exp2.c39 bits1 = BN_num_bits(p1); in BN_mod_exp2_mont()
40 bits2 = BN_num_bits(p2); in BN_mod_exp2_mont()
H A Dbn_recp.c48 recp->num_bits = BN_num_bits(d); in BN_RECP_CTX_set()
112 i = BN_num_bits(m); in BN_div_recp()
/openssl/crypto/ec/
H A Dec_mult.c207 cardinality_bits = BN_num_bits(cardinality); in ossl_ec_scalar_mul_ladder()
222 if ((BN_num_bits(k) > cardinality_bits) || (BN_is_negative(k))) { in ossl_ec_scalar_mul_ladder()
481 numblocks = (BN_num_bits(scalar) / blocksize) + 1; in ossl_ec_wNAF_mul()
528 bits = i < num ? BN_num_bits(scalars[i]) : BN_num_bits(scalar); in ossl_ec_wNAF_mul()
862 bits = BN_num_bits(order); in ossl_ec_wNAF_precompute_mult()
H A Dec_lib.c327 if (BN_num_bits(group->order) <= (BN_num_bits(group->field) + 1) / 2 + 3) { in ec_guess_cofactor()
344 if (!BN_set_bit(q, BN_num_bits(group->field) - 1)) in ec_guess_cofactor()
387 || BN_num_bits(order) > BN_num_bits(group->field) + 1) { in EC_GROUP_set_generator()
1233 return BN_num_bits(group->order); in ossl_ec_group_simple_order_bits()
1641 field_bits = BN_num_bits(p); in EC_GROUP_new_from_params()
1703 || (BN_num_bits(order) > (int)field_bits + 1)) { /* Hasse bound */ in EC_GROUP_new_from_params()
/openssl/crypto/pem/
H A Dpvkfmt.c642 if (BN_num_bits(e) > 32) in check_bitlen_rsa()
707 bitlen = BN_num_bits(p); in check_bitlen_dsa()
708 if ((bitlen & 7) || (BN_num_bits(q) != 160) in check_bitlen_dsa()
709 || (BN_num_bits(g) > bitlen)) in check_bitlen_dsa()
712 if (BN_num_bits(pub_key) > bitlen) in check_bitlen_dsa()
716 if (BN_num_bits(priv_key) > 160) in check_bitlen_dsa()
/openssl/providers/implementations/encode_decode/
H A Dencode_key2text.c266 if (BIO_printf(out, "%s: (%d bit)\n", type_label, BN_num_bits(p)) <= 0) in dh_to_text()
341 if (BIO_printf(out, "%s: (%d bit)\n", type_label, BN_num_bits(p)) <= 0) in dsa_to_text()
675 type_label, BN_num_bits(rsa_n), primes) <= 0) in rsa_to_text()
679 type_label, BN_num_bits(rsa_n)) <= 0) in rsa_to_text()

Completed in 102 milliseconds

123