Home
last modified time | relevance | path

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

123

/external/openssh/
Dsshconnect1.c357 packet_put_int(BN_num_bits(host_key->rsa->n)); in try_rhosts_rsa_authentication()
529 rbits = BN_num_bits(server_key->rsa->n); in ssh_kex()
542 rbits = BN_num_bits(host_key->rsa->n); in ssh_kex()
558 BN_num_bits(server_key->rsa->n), BN_num_bits(host_key->rsa->n)); in ssh_kex()
602 if (BN_num_bits(host_key->rsa->n) < in ssh_kex()
603 BN_num_bits(server_key->rsa->n) + SSH_KEY_BITS_RESERVED) { in ssh_kex()
606 BN_num_bits(host_key->rsa->n), in ssh_kex()
607 BN_num_bits(server_key->rsa->n), in ssh_kex()
615 if (BN_num_bits(server_key->rsa->n) < in ssh_kex()
616 BN_num_bits(host_key->rsa->n) + SSH_KEY_BITS_RESERVED) { in ssh_kex()
[all …]
Ddh.c125 if (BN_num_bits(dhg->p) != dhg->size) { in parse_prime()
127 linenum, BN_num_bits(dhg->p), dhg->size - 1); in parse_prime()
218 int n = BN_num_bits(dh_pub); in dh_pub_is_valid()
246 debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p)); in dh_pub_is_valid()
253 bits_set, BN_num_bits(dh->p)); in dh_pub_is_valid()
265 (pbits = BN_num_bits(dh->p)) <= 0 || in dh_gen_key()
Dauthfd.c218 keybits = BN_num_bits(key->rsa->n); in deserialise_identity1()
402 (r = sshbuf_put_u32(msg, BN_num_bits(key->rsa->n))) != 0 || in ssh_decrypt_challenge()
504 if ((r = sshbuf_put_u32(b, BN_num_bits(key->n))) != 0 || in ssh_encode_identity_rsa1()
627 (r = sshbuf_put_u32(msg, BN_num_bits(key->rsa->n))) != 0 || in ssh_remove_identity()
Dssh-rsa.c103 BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) in ssh_rsa_sign()
175 BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE || in ssh_rsa_verify()
Dkexgexc.c110 if ((bits = BN_num_bits(p)) < 0 || in input_kex_dh_gex_group()
196 debug("bits %d", BN_num_bits(dh_server_pub)); in input_kex_dh_gex_reply()
Drsa.c80 if (BN_num_bits(key->e) < 2 || !BN_is_odd(key->e)) in rsa_public_encrypt()
/external/vboot_reference/utility/
DdumpRSAPublicKey.c24 int modulus = BN_num_bits(key->n); in check()
53 nwords = BN_num_bits(N) / 32; in output()
88 BN_set_word(NnumBits, BN_num_bits(N)); in output()
/external/openssh/regress/unittests/sshbuf/
Dtest_sshbuf_getput_crypto.c86 ASSERT_U16_EQ(PEEK_U16(sshbuf_ptr(p1)), (u_int16_t)BN_num_bits(bn)); in sshbuf_getput_crypto_tests()
110 ASSERT_U16_EQ(PEEK_U16(sshbuf_ptr(p1)), (u_int16_t)BN_num_bits(bn)); in sshbuf_getput_crypto_tests()
181 ASSERT_INT_EQ(sshbuf_put_u16(p1, BN_num_bits(bn)), 0); in sshbuf_getput_crypto_tests()
198 ASSERT_INT_EQ(sshbuf_put_u16(p1, BN_num_bits(bn)), 0); in sshbuf_getput_crypto_tests()
230 ASSERT_INT_EQ(sshbuf_put_u16(p1, BN_num_bits(bn)), 0); in sshbuf_getput_crypto_tests()
247 ASSERT_INT_EQ(sshbuf_put_u16(p1, BN_num_bits(bn)), 0); in sshbuf_getput_crypto_tests()
/external/boringssl/src/crypto/dh/
Ddh.c298 if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) { in DH_generate_key()
341 const unsigned p_bits = BN_num_bits(dh->p); in DH_generate_key()
385 if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) { in DH_compute_key()
434 unsigned DH_num_bits(const DH *dh) { return BN_num_bits(dh->p); } in DH_num_bits()
/external/vboot_reference/host/lib/
Dutil_misc.c49 nwords = BN_num_bits(rsa_private_key->n) / 32; in vb_keyb_from_rsa()
94 BN_set_word(NnumBits, BN_num_bits(N)); in vb_keyb_from_rsa()
/external/boringssl/src/crypto/fipsmodule/bn/
Dprime.c635 iterations = BN_prime_checks_for_size(BN_num_bits(w)); in BN_primality_test()
658 int w_len = BN_num_bits(w); in BN_primality_test()
821 iterations = BN_prime_checks_for_size(BN_num_bits(w)); in BN_enhanced_miller_rabin_primality_test()
1021 if (BN_num_bits(rnd) != (unsigned)bits) { in probable_prime()
Dexponentiation.c142 bits = BN_num_bits(p); in BN_exp()
205 recp->num_bits = BN_num_bits(d); in BN_RECP_CTX_set()
278 i = BN_num_bits(m); in BN_div_recp()
442 int bits = BN_num_bits(p); in mod_exp_recp()
602 int bits = BN_num_bits(p); in BN_mod_exp_mont()
964 if (a->width == 16 && p->width == 16 && BN_num_bits(m) == 1024 && in BN_mod_exp_mont_consttime()
Dsqrt.c239 if (!BN_pseudo_rand(y, BN_num_bits(p), 0, 0)) { in BN_mod_sqrt()
455 if (!BN_lshift(estimate, BN_value_one(), BN_num_bits(in)/2)) { in BN_sqrt()
Dbn.c235 unsigned BN_num_bits(const BIGNUM *bn) { in BN_num_bits() function
245 return (BN_num_bits(bn) + 7) / 8; in BN_num_bytes()
Dmontgomery_inv.c171 unsigned n_bits = BN_num_bits(n); in bn_mod_exp_base_2_consttime()
/external/u-boot/lib/rsa/
Drsa-sign.c519 if (BN_num_bits(key_e) > 64) in rsa_get_exponent()
524 if (BN_num_bits(key_e) < 33) { in rsa_get_exponent()
597 if (!BN_set_word(tmp, BN_num_bits(n)) || in rsa_get_params()
712 bits = BN_num_bits(modulus); in rsa_add_verify_data()
/external/boringssl/src/crypto/rsa_extra/
Drsa_test.cc510 EXPECT_EQ(2048u, BN_num_bits(rsa->n)); in TEST()
515 EXPECT_EQ(3072u, BN_num_bits(rsa->n)); in TEST()
662 EXPECT_EQ(1024u, BN_num_bits(rsa->n)); in TEST()
667 EXPECT_EQ(1024u, BN_num_bits(rsa->n)); in TEST()
672 EXPECT_EQ(1024u, BN_num_bits(rsa->n)); in TEST()
677 EXPECT_EQ(1152u, BN_num_bits(rsa->n)); in TEST()
/external/boringssl/src/crypto/evp/
Dprint.c162 mod_len = BN_num_bits(rsa->n); in do_rsa_print()
256 BIO_printf(bp, "%s: (%d bit)\n", ktype, BN_num_bits(x->p)) <= 0) { in do_dsa_print()
371 BIO_printf(bp, "%s: (%d bit)\n", ecstr, BN_num_bits(order)) <= 0) { in do_EC_KEY_print()
/external/boringssl/src/crypto/bn_extra/
Dbn_asn1.c56 (BN_num_bits(bn) % 8 == 0 && !CBB_add_u8(&child, 0x00)) || in BN_marshal_asn1()
Dconvert.c382 const size_t bits = BN_num_bits(in); in BN_bn2mpi()
459 BN_clear_bit(out, BN_num_bits(out) - 1); in BN_mpi2bn()
/external/boringssl/src/crypto/fipsmodule/rsa/
Drsa_impl.c76 unsigned rsa_bits = BN_num_bits(rsa->n); in check_modulus_and_exponent_sizes()
94 if (BN_num_bits(rsa->e) > kMaxExponentBits) { in check_modulus_and_exponent_sizes()
1105 if (BN_num_bits(e_value) > 32) { in rsa_generate_key_impl()
1150 assert(sqrt2_bits == (int)BN_num_bits(sqrt2)); in rsa_generate_key_impl()
1165 assert(prime_bits == (int)BN_num_bits(sqrt2)); in rsa_generate_key_impl()
1219 if (BN_num_bits(rsa->n) != (unsigned)bits) { in rsa_generate_key_impl()
/external/boringssl/src/crypto/fipsmodule/ecdsa/
Decdsa.c75 size_t num_bits = BN_num_bits(order); in digest_to_scalar()
197 if (BN_num_bits(order) < 160) { in ecdsa_sign_setup()
/external/boringssl/src/crypto/dsa/
Ddsa.c579 if (BN_num_bits(dsa->q) % 8 != 0) { in DSA_do_sign()
678 i = BN_num_bits(dsa->q); in DSA_do_check_signature()
685 if (BN_num_bits(dsa->p) > OPENSSL_DSA_MAX_MODULUS_BITS) { in DSA_do_check_signature()
947 ret->priv_length = BN_num_bits(dsa->q); in DSA_dup_DH()
/external/boringssl/src/crypto/asn1/
Da_enum.c167 j = BN_num_bits(bn); in BN_to_ASN1_ENUMERATED()
/external/boringssl/src/crypto/fipsmodule/ec/
Dsimple_mul.c44 unsigned bits = BN_num_bits(&group->order); in ec_GFp_mont_mul_single()

123