Home
last modified time | relevance | path

Searched refs:BN_num_bytes (Results 1 – 25 of 46) sorted by relevance

12

/freebsd-12.1/tools/tools/crypto/
H A Dcryptokeytest.c104 int blen = BN_num_bytes(n); in bignum_to_le()
148 kop.crk_param[0].crp_nbits = BN_num_bytes(a) * 8; in UB_mod_exp()
150 kop.crk_param[1].crp_nbits = BN_num_bytes(b) * 8; in UB_mod_exp()
152 kop.crk_param[2].crp_nbits = BN_num_bytes(c) * 8; in UB_mod_exp()
154 kop.crk_param[3].crp_nbits = BN_num_bytes(c) * 8; in UB_mod_exp()
161 bzero(ale, BN_num_bytes(a)); in UB_mod_exp()
163 bzero(ble, BN_num_bytes(b)); in UB_mod_exp()
168 bzero(cle, BN_num_bytes(c)); in UB_mod_exp()
172 res = le_to_bignum(res, cle, BN_num_bytes(c)); in UB_mod_exp()
173 bzero(cle, BN_num_bytes(c)); in UB_mod_exp()
/freebsd-12.1/crypto/openssl/doc/man3/
H A DBN_num_bytes.pod5 BN_num_bits, BN_num_bytes, BN_num_bits_word - get BIGNUM size
11 int BN_num_bytes(const BIGNUM *a);
19 BN_num_bytes() returns the size of a B<BIGNUM> in bytes.
28 BN_num_bytes() is a macro.
43 and DSA_size(), or use BN_num_bytes() and multiply with 8 (although
H A DBN_bn2bin.pod35 and stores it at B<to>. B<to> must point to BN_num_bytes(B<a>) bytes of
41 BN_num_bytes(B<a>) an error is returned.
105 L<BN_num_bytes(3)>
H A DBN_set_bit.pod58 L<BN_num_bytes(3)>, L<BN_add(3)>
/freebsd-12.1/crypto/openssl/apps/
H A Decparam.c321 if ((tmp_len = (size_t)BN_num_bytes(ec_p)) > buf_len)
323 if ((tmp_len = (size_t)BN_num_bytes(ec_a)) > buf_len)
325 if ((tmp_len = (size_t)BN_num_bytes(ec_b)) > buf_len)
327 if ((tmp_len = (size_t)BN_num_bytes(ec_gen)) > buf_len)
329 if ((tmp_len = (size_t)BN_num_bytes(ec_order)) > buf_len)
331 if ((tmp_len = (size_t)BN_num_bytes(ec_cofactor)) > buf_len)
H A Ddsaparam.c177 len = BN_num_bytes(p);
/freebsd-12.1/crypto/openssh/regress/unittests/sshbuf/
H A Dtest_sshbuf_getput_crypto.c134 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn)); in sshbuf_getput_crypto_tests()
158 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn) + 1); in sshbuf_getput_crypto_tests()
263 ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0); in sshbuf_getput_crypto_tests()
280 ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0); in sshbuf_getput_crypto_tests()
310 ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn) + 1), 0); /* MSB */ in sshbuf_getput_crypto_tests()
328 ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn) + 1), 0); in sshbuf_getput_crypto_tests()
344 ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0); in sshbuf_getput_crypto_tests()
/freebsd-12.1/crypto/openssl/crypto/asn1/
H A Dt_pkey.c64 if (BN_num_bytes(num) <= BN_BYTES) { in ASN1_bn_print()
72 buflen = BN_num_bytes(num) + 1; in ASN1_bn_print()
H A Dx_bignum.c112 return pad + BN_num_bytes(bn); in bn_i2c()
/freebsd-12.1/crypto/openssl/crypto/ec/
H A Decp_oct.c184 field_len = BN_num_bytes(group->field); in ec_GFp_simple_point2oct()
220 skip = field_len - BN_num_bytes(x); in ec_GFp_simple_point2oct()
238 skip = field_len - BN_num_bytes(y); in ec_GFp_simple_point2oct()
306 field_len = BN_num_bytes(group->field); in ec_GFp_simple_oct2point()
H A Dec2_oct.c182 skip = field_len - BN_num_bytes(x); in ec_GF2m_simple_point2oct()
200 skip = field_len - BN_num_bytes(y); in ec_GF2m_simple_point2oct()
H A Dec_print.c41 if ((buf_len = BN_num_bytes(bn)) == 0) in EC_POINT_bn2point()
H A Decdh_ossl.c92 len = BN_num_bytes(x); in ecdh_simple_compute_key()
/freebsd-12.1/crypto/openssl/crypto/pem/
H A Dpvkfmt.c541 if (BN_num_bytes(d) > nbyte) in check_bitlen_rsa()
545 if ((BN_num_bytes(iqmp) > hnbyte) in check_bitlen_rsa()
546 || (BN_num_bytes(p) > hnbyte) in check_bitlen_rsa()
547 || (BN_num_bytes(q) > hnbyte) in check_bitlen_rsa()
548 || (BN_num_bytes(dmp1) > hnbyte) in check_bitlen_rsa()
549 || (BN_num_bytes(dmq1) > hnbyte)) in check_bitlen_rsa()
588 nbyte = BN_num_bytes(p); in write_dsa()
/freebsd-12.1/crypto/openssl/crypto/srp/
H A Dsrp_lib.c27 int numN = BN_num_bytes(N); in srp_Calc_xy()
133 if ((cs = OPENSSL_malloc(BN_num_bytes(s))) == NULL) in SRP_Calc_x()
145 if (!EVP_DigestUpdate(ctxt, cs, BN_num_bytes(s))) in SRP_Calc_x()
/freebsd-12.1/crypto/openssh/
H A Dssh-dss.c83 rlen = BN_num_bytes(sig_r); in ssh_dss_sign()
84 slen = BN_num_bytes(sig_s); in ssh_dss_sign()
H A Dsshbuf-getput-crypto.c150 int len = BN_num_bytes(v), prepend = 0, r; in sshbuf_put_bignum2()
/freebsd-12.1/contrib/wpa/src/crypto/
H A Dcrypto_openssl.c779 publen = BN_num_bytes(dh->pub_key); in dh5_init()
783 privlen = BN_num_bytes(dh->priv_key); in dh5_init()
829 publen = BN_num_bytes(pub_key); in dh5_init()
833 privlen = BN_num_bytes(priv_key); in dh5_init()
1318 num_bytes = BN_num_bytes((const BIGNUM *) a); in crypto_bignum_to_bin()
1657 return BN_num_bytes(e->prime); in crypto_ec_prime_len()
1669 return BN_num_bytes(e->order); in crypto_ec_order_len()
1709 int len = BN_num_bytes(e->prime); in crypto_ec_point_to_bin()
1742 int len = BN_num_bytes(e->prime); in crypto_ec_point_from_bin()
1940 int len = BN_num_bytes(ecdh->ec->prime); in crypto_ecdh_get_pubkey()
/freebsd-12.1/contrib/ldns/
H A Dkeys.c1723 if (BN_num_bytes(e) <= 256) { in ldns_key_rsa2bin()
1727 data[0] = (unsigned char) BN_num_bytes(e); in ldns_key_rsa2bin()
1731 } else if (BN_num_bytes(e) <= 65536) { in ldns_key_rsa2bin()
1734 ldns_write_uint16(data + 1, (uint16_t) BN_num_bytes(e)); in ldns_key_rsa2bin()
1737 BN_bn2bin(n, data + 4 + BN_num_bytes(e)); in ldns_key_rsa2bin()
1738 *size = (uint16_t) BN_num_bytes(n) + 6; in ldns_key_rsa2bin()
1770 *size = (uint16_t)BN_num_bytes(p); in ldns_key_dsa2bin()
1786 BN_bn2bin(g, data + 21 + *size * 2 - BN_num_bytes(g)); in ldns_key_dsa2bin()
1787 BN_bn2bin(pub_key,data + 21 + *size * 3 - BN_num_bytes(pub_key)); in ldns_key_dsa2bin()
H A Ddnssec.c1764 byte_offset = (size_t) (20 - BN_num_bytes(R)); in ldns_convert_dsa_rrsig_asn12rdf()
1772 byte_offset = (size_t) (20 - BN_num_bytes(S)); in ldns_convert_dsa_rrsig_asn12rdf()
1874 if(BN_num_bytes(r) > num_bytes || in ldns_convert_ecdsa_rrsig_asn1len2rdf()
1875 BN_num_bytes(s) > num_bytes) { in ldns_convert_ecdsa_rrsig_asn1len2rdf()
1887 BN_bn2bin(r, data+num_bytes-BN_num_bytes(r)); in ldns_convert_ecdsa_rrsig_asn1len2rdf()
1888 BN_bn2bin(s, data+num_bytes*2-BN_num_bytes(s)); in ldns_convert_ecdsa_rrsig_asn1len2rdf()
/freebsd-12.1/crypto/openssl/crypto/rsa/
H A Drsa_ossl.c99 num = BN_num_bytes(rsa->n); in rsa_ossl_public_encrypt()
254 num = BN_num_bytes(rsa->n); in rsa_ossl_private_encrypt()
388 num = BN_num_bytes(rsa->n); in rsa_ossl_private_decrypt()
533 num = BN_num_bytes(rsa->n); in rsa_ossl_public_decrypt()
H A Drsa_crpt.c24 return BN_num_bytes(r->n); in RSA_size()
/freebsd-12.1/crypto/openssh/regress/unittests/bitmap/
H A Dtests.c77 ASSERT_INT_EQ(BN_num_bytes(bn), in tests()
/freebsd-12.1/crypto/openssl/crypto/dsa/
H A Ddsa_ossl.c102 if (dlen > BN_num_bytes(dsa->q)) in dsa_do_sign()
108 dlen = BN_num_bytes(dsa->q); in dsa_do_sign()
/freebsd-12.1/crypto/openssl/crypto/bn/
H A Dbn_rand.c218 const unsigned num_k_bytes = BN_num_bytes(range) + 8; in BN_generate_dsa_nonce()

12