Home
last modified time | relevance | path

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

123

/third_party/openssl/doc/man3/
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,
DRSA_size.pod40 L<BN_num_bits(3)>
DDH_size.pod42 L<BN_num_bits(3)>
/third_party/openssl/crypto/bn/
Dbn_gcd.c258 if (BN_is_odd(n) && (BN_num_bits(n) <= 2048)) { in int_bn_mod_inverse()
365 if (BN_num_bits(A) == BN_num_bits(B)) { in int_bn_mod_inverse()
370 } else if (BN_num_bits(A) == BN_num_bits(B) + 1) { in int_bn_mod_inverse()
606 rlen = BN_num_bits(r); in BN_gcd()
607 glen = BN_num_bits(g); in BN_gcd()
Dbn_mpi.c21 bits = BN_num_bits(a); in BN_bn2mpi()
82 BN_clear_bit(a, BN_num_bits(a) - 1); in BN_mpi2bn()
Dbn_gf2m.c469 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_mul()
527 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_sqr()
598 if (BN_num_bits(u) < BN_num_bits(v)) { in BN_GF2m_mod_inv_vartime()
615 int ubits = BN_num_bits(u); in BN_GF2m_mod_inv_vartime()
616 int vbits = BN_num_bits(v); /* v is copy of p */ in BN_GF2m_mod_inv_vartime()
735 if (!BN_priv_rand(b, BN_num_bits(p) - 1, in BN_GF2m_mod_inv()
873 n = BN_num_bits(b) - 1; in BN_GF2m_mod_exp_arr()
901 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_exp()
961 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_sqrt()
1091 const int max = BN_num_bits(p) + 1; in BN_GF2m_mod_solve_quad()
Dbn_exp2.c39 bits1 = BN_num_bits(p1); in BN_mod_exp2_mont()
40 bits2 = BN_num_bits(p2); in BN_mod_exp2_mont()
Dbn_recp.c50 recp->num_bits = BN_num_bits(d); in BN_RECP_CTX_set()
114 i = BN_num_bits(m); in BN_div_recp()
Dbn_prime.c169 checks = BN_prime_checks_for_size(BN_num_bits(a)); in BN_is_prime_fasttest_ex()
314 if (BN_num_bits(rnd) != bits) in probable_prime()
354 if (BN_num_bits(rnd) < bits in probable_prime_dh()
Dbn_exp.c61 bits = BN_num_bits(p); in BN_exp()
179 bits = BN_num_bits(p); in BN_mod_exp_recp()
321 bits = BN_num_bits(p); in BN_mod_exp_mont()
666 if ((16 == a->top) && (16 == p->top) && (BN_num_bits(m) == 1024) in BN_mod_exp_mont_consttime()
677 } else if ((8 == a->top) && (8 == p->top) && (BN_num_bits(m) == 512)) { in BN_mod_exp_mont_consttime()
1172 bits = BN_num_bits(p); in BN_mod_exp_mont_word()
1294 bits = BN_num_bits(p); in BN_mod_exp_simple()
Dbn_mod.c290 max_shift = BN_num_bits(m) - BN_num_bits(r); in BN_mod_lshift_quick()
Dbn_div.c50 nd = BN_num_bits(d);
51 nm = BN_num_bits(m);
/third_party/openssl/apps/
Dgendsa.c117 if (BN_num_bits(p) > OPENSSL_DSA_MAX_MODULUS_BITS) in gendsa_main()
121 OPENSSL_DSA_MAX_MODULUS_BITS, BN_num_bits(p)); in gendsa_main()
123 BIO_printf(bio_err, "Generating DSA key, %d bits\n", BN_num_bits(p)); in gendsa_main()
/third_party/openssl/crypto/dh/
Ddh_lib.c154 return BN_num_bits(dh->p); in DH_bits()
166 N = BN_num_bits(dh->q); in DH_security_bits()
171 return BN_security_bits(BN_num_bits(dh->p), N); in DH_security_bits()
209 dh->length = BN_num_bits(q); in DH_set0_pqg()
Ddh_key.c112 if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) { in generate_key()
152 l = dh->length ? dh->length : BN_num_bits(dh->p) - 1; in generate_key()
205 if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) { in compute_key()
/third_party/openssl/crypto/dsa/
Ddsa_lib.c155 i = BN_num_bits(r->q); in DSA_size()
181 return BN_security_bits(BN_num_bits(d->p), BN_num_bits(d->q)); in DSA_security_bits()
357 return BN_num_bits(dsa->p); in DSA_bits()
Ddsa_ossl.c124 if (!BN_priv_rand(blind, BN_num_bits(dsa->q) - 1, in dsa_do_sign()
219 q_bits = BN_num_bits(dsa->q); in dsa_sign_setup()
312 i = BN_num_bits(dsa->q); in dsa_do_verify()
319 if (BN_num_bits(dsa->p) > OPENSSL_DSA_MAX_MODULUS_BITS) { in dsa_do_verify()
/third_party/openssl/crypto/rsa/
Drsa_ossl.c76 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) { in rsa_ossl_public_encrypt()
87 if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) { in rsa_ossl_public_encrypt()
88 if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) { in rsa_ossl_public_encrypt()
519 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) { in rsa_ossl_public_decrypt()
530 if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) { in rsa_ossl_public_decrypt()
531 if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) { in rsa_ossl_public_decrypt()
660 && (BN_num_bits(rsa->q) == BN_num_bits(rsa->p)); in rsa_ossl_mod_exp()
Drsa_pss.c67 MSBits = (BN_num_bits(rsa->n) - 1) & 0x7; in RSA_verify_PKCS1_PSS_mgf1()
178 MSBits = (BN_num_bits(rsa->n) - 1) & 0x7; in RSA_padding_add_PKCS1_PSS_mgf1()
/third_party/openssl/crypto/ec/
Dec_mult.c207 cardinality_bits = BN_num_bits(cardinality); in ec_scalar_mul_ladder()
222 if ((BN_num_bits(k) > cardinality_bits) || (BN_is_negative(k))) { in ec_scalar_mul_ladder()
479 numblocks = (BN_num_bits(scalar) / blocksize) + 1; in ec_wNAF_mul()
528 bits = i < num ? BN_num_bits(scalars[i]) : BN_num_bits(scalar); in ec_wNAF_mul()
859 bits = BN_num_bits(order); in ec_wNAF_precompute_mult()
Decdsa_ossl.c81 order_bits = BN_num_bits(order); in ecdsa_sign_setup()
203 i = BN_num_bits(order); in ossl_ecdsa_sign_sig()
374 i = BN_num_bits(order); in ossl_ecdsa_verify_sig()
Dec2_oct.c312 if (BN_num_bits(x) > m) { in ec_GF2m_simple_oct2point()
323 if (BN_num_bits(y) > m) { in ec_GF2m_simple_oct2point()
Dec_lib.c291 if (BN_num_bits(group->order) <= (BN_num_bits(group->field) + 1) / 2 + 3) { in ec_guess_cofactor()
308 if (!BN_set_bit(q, BN_num_bits(group->field) - 1)) in ec_guess_cofactor()
351 || BN_num_bits(order) > BN_num_bits(group->field) + 1) { in EC_GROUP_set_generator()
1129 return BN_num_bits(group->order); in ec_group_simple_order_bits()
/third_party/openssl/crypto/pem/
Dpvkfmt.c498 bitlen = BN_num_bits(p); in check_bitlen_dsa()
499 if ((bitlen & 7) || (BN_num_bits(q) != 160) in check_bitlen_dsa()
500 || (BN_num_bits(g) > bitlen)) in check_bitlen_dsa()
503 if (BN_num_bits(pub_key) > bitlen) in check_bitlen_dsa()
507 if (BN_num_bits(priv_key) > 160) in check_bitlen_dsa()
524 if (BN_num_bits(e) > 32) in check_bitlen_rsa()
/third_party/openssl/crypto/asn1/
Dx_bignum.c103 if (BN_num_bits(bn) & 0x7) in bn_i2c()

123