Home
last modified time | relevance | path

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

12

/external/wpa_supplicant_8/src/eap_server/
Deap_server_pwd.c262 if (((scalar = os_malloc(BN_num_bytes(data->grp->order))) == NULL) || in eap_pwd_build_commit_req()
263 ((element = os_malloc(BN_num_bytes(data->grp->prime) * 2)) == in eap_pwd_build_commit_req()
274 os_memset(scalar, 0, BN_num_bytes(data->grp->order)); in eap_pwd_build_commit_req()
275 os_memset(element, 0, BN_num_bytes(data->grp->prime) * 2); in eap_pwd_build_commit_req()
276 offset = BN_num_bytes(data->grp->order) - in eap_pwd_build_commit_req()
277 BN_num_bytes(data->my_scalar); in eap_pwd_build_commit_req()
280 offset = BN_num_bytes(data->grp->prime) - BN_num_bytes(x); in eap_pwd_build_commit_req()
282 offset = BN_num_bytes(data->grp->prime) - BN_num_bytes(y); in eap_pwd_build_commit_req()
283 BN_bn2bin(y, element + BN_num_bytes(data->grp->prime) + offset); in eap_pwd_build_commit_req()
285 data->outbuf = wpabuf_alloc(2 * BN_num_bytes(data->grp->prime) + in eap_pwd_build_commit_req()
[all …]
/external/wpa_supplicant_8/src/eap_peer/
Deap_pwd.c370 prime_len = BN_num_bytes(data->grp->prime); in eap_pwd_perform_commit_exchange()
371 order_len = BN_num_bytes(data->grp->order); in eap_pwd_perform_commit_exchange()
440 BN_bin2bn(ptr, BN_num_bytes(data->grp->prime), x); in eap_pwd_perform_commit_exchange()
441 ptr += BN_num_bytes(data->grp->prime); in eap_pwd_perform_commit_exchange()
442 BN_bin2bn(ptr, BN_num_bytes(data->grp->prime), y); in eap_pwd_perform_commit_exchange()
443 ptr += BN_num_bytes(data->grp->prime); in eap_pwd_perform_commit_exchange()
444 BN_bin2bn(ptr, BN_num_bytes(data->grp->order), data->server_scalar); in eap_pwd_perform_commit_exchange()
517 if (((scalar = os_malloc(BN_num_bytes(data->grp->order))) == NULL) || in eap_pwd_perform_commit_exchange()
518 ((element = os_malloc(BN_num_bytes(data->grp->prime) * 2)) == in eap_pwd_perform_commit_exchange()
529 os_memset(scalar, 0, BN_num_bytes(data->grp->order)); in eap_pwd_perform_commit_exchange()
[all …]
/external/wpa_supplicant_8/src/eap_common/
Deap_pwd_common.c178 primebytelen = BN_num_bytes(grp->prime); in compute_password_element()
317 if ((cruft = os_malloc(BN_num_bytes(grp->prime))) == NULL) in compute_keys()
331 offset = BN_num_bytes(grp->order) - BN_num_bytes(peer_scalar); in compute_keys()
332 os_memset(cruft, 0, BN_num_bytes(grp->prime)); in compute_keys()
334 eap_pwd_h_update(hash, cruft, BN_num_bytes(grp->order)); in compute_keys()
335 offset = BN_num_bytes(grp->order) - BN_num_bytes(server_scalar); in compute_keys()
336 os_memset(cruft, 0, BN_num_bytes(grp->prime)); in compute_keys()
338 eap_pwd_h_update(hash, cruft, BN_num_bytes(grp->order)); in compute_keys()
347 offset = BN_num_bytes(grp->prime) - BN_num_bytes(k); in compute_keys()
348 os_memset(cruft, 0, BN_num_bytes(grp->prime)); in compute_keys()
[all …]
/external/nos/host/android/hals/keymaster/test/
Dimport_key_test.cpp207 unique_ptr<uint8_t[]> d_buf(new uint8_t[BN_num_bytes(n)]); in MatchAndExplainRSA()
208 if (!BN_bn2le_padded(d_buf.get(), BN_num_bytes(n), d)) { in MatchAndExplainRSA()
213 if (request.rsa().d().size() != BN_num_bytes(n) && in MatchAndExplainRSA()
215 BN_num_bytes(n)) != 0) { in MatchAndExplainRSA()
220 unique_ptr<uint8_t[]> n_buf(new uint8_t[BN_num_bytes(n)]); in MatchAndExplainRSA()
221 if (!BN_bn2le_padded(n_buf.get(), BN_num_bytes(n), n)) { in MatchAndExplainRSA()
225 if (request.rsa().n().size() != BN_num_bytes(n) && in MatchAndExplainRSA()
227 BN_num_bytes(n)) != 0) { in MatchAndExplainRSA()
/external/boringssl/src/fipstools/
Dcavp_rsa2_keygen_test.cc54 std::vector<uint8_t> n_bytes(BN_num_bytes(n)), e_bytes(BN_num_bytes(e)), in TestRSA2KeyGen()
55 d_bytes((bits + 7) / 8), p_bytes(BN_num_bytes(p)), in TestRSA2KeyGen()
56 q_bytes(BN_num_bytes(q)); in TestRSA2KeyGen()
Dcavp_rsa2_siggen_test.cc62 std::vector<uint8_t> n_bytes(BN_num_bytes(n)); in TestRSA2SigGen()
63 std::vector<uint8_t> e_bytes(BN_num_bytes(e)); in TestRSA2SigGen()
Dcavp_ecdsa2_keypair_test.cc61 BN_num_bytes(EC_GROUP_get0_order(EC_KEY_get0_group(key.get()))); in TestECDSA2KeyPair()
Dcavp_ecdsa2_siggen_test.cc74 BN_num_bytes(EC_GROUP_get0_order(EC_KEY_get0_group(key.get()))); in TestECDSA2SigGenImpl()
/external/google-tv-pairing-protocol/cpp/src/polo/pairing/
Dpolochallengeresponse.cc56 size_t client_modulus_size = BN_num_bytes(client_pub_rsa->n); in GetAlpha()
57 size_t client_exponent_size = BN_num_bytes(client_pub_rsa->e); in GetAlpha()
59 size_t server_modulus_size = BN_num_bytes(server_pub_rsa->n); in GetAlpha()
60 size_t server_exponent_size = BN_num_bytes(server_pub_rsa->e); in GetAlpha()
/external/nos/host/android/hals/keymaster/
Dimport_key.cpp118 reinterpret_cast<uint8_t *>(OPENSSL_malloc(BN_num_bytes(n)))); in import_key_rsa()
119 if (!BN_bn2le_padded(d_buf.get(), BN_num_bytes(n), d)) { in import_key_rsa()
123 request->mutable_rsa()->set_d(d_buf.get(), BN_num_bytes(n)); in import_key_rsa()
127 reinterpret_cast<uint8_t *>(OPENSSL_malloc(BN_num_bytes(n)))); in import_key_rsa()
128 if (!BN_bn2le_padded(n_buf.get(), BN_num_bytes(n), n)) { in import_key_rsa()
132 request->mutable_rsa()->set_n(n_buf.get(), BN_num_bytes(n)); in import_key_rsa()
/external/google-tv-pairing-protocol/cpp/src/polo/util/
Dpoloutil.cc38 int length = BN_num_bytes(bn); in HexStringToBytes()
58 int length = BN_num_bytes(bn); in IntToBigEndianBytes()
/external/ipsec-tools/src/racoon/
Dplainrsa-gen.c91 binlen = 1 + BN_num_bytes(key->e) + BN_num_bytes(key->n); in mix_b64_pubkey()
/external/tpm2/
DMathFunctions.c250 retVal = BN_num_bytes(bnP); in _math__Mul()
487 if((unsigned)BN_num_bytes(bnC) > cSize) in _math__ModExp()
492 i = cSize - BN_num_bytes(bnC); in _math__ModExp()
DCpriRSA.c79 if(BN_num_bytes(bnQr) != 0 || BN_num_bits(bnQ) != BN_num_bits(bnP)) in RsaPrivateExponent()
104 fill = key->publicKey->size - BN_num_bytes(bnD); in RsaPrivateExponent()
211 if(BN_num_bytes(bnQr) != 0 || BN_num_bits(bnQ) != BN_num_bits(bnP)) in _cpri__TestKeyRSA()
238 fill = d->size - BN_num_bytes(bnD); in _cpri__TestKeyRSA()
DCpriECC.c708 || (keySizeInBytes = (INT16) BN_num_bytes(bnNm1)) > MAX_ECC_KEY_BYTES) in _cpri__GenerateKeyEcc()
1154 BnTo2B(&rOut->b, bnT, (UINT16)BN_num_bytes(bnT)); in SchnorrEcc()
1506 BnTo2B(&U1.b, bnU1, (INT16) BN_num_bytes(bnU1)); in ValidateSignatureEcdsa()
1507 BnTo2B(&U2.b, bnU2, (INT16) BN_num_bytes(bnU2)); in ValidateSignatureEcdsa()
1913 Point2B(group, outZ, pQeB, (INT16)BN_num_bytes(bnN), context); in C_2_2_MQV()
2053 Point2B(group, outZ, pQeB, (INT16)BN_num_bytes(bnN), context); in SM2KeyExchange()
2101 size = (INT16)BN_num_bytes(order); in C_2_2_ECDH()
/external/boringssl/src/crypto/evp/
Dprint.c83 if (BN_num_bytes(num) <= sizeof(long)) { in bn_print()
128 size_t len = BN_num_bytes(b); in update_buflen()
344 if (priv_key && (i = (size_t)BN_num_bytes(priv_key)) > buf_len) { in do_EC_KEY_print()
/external/wpa_supplicant_8/src/crypto/
Dcrypto_openssl.c668 publen = BN_num_bytes(dh->pub_key); in dh5_init()
672 privlen = BN_num_bytes(dh->priv_key); in dh5_init()
716 publen = BN_num_bytes(pub_key); in dh5_init()
720 privlen = BN_num_bytes(priv_key); in dh5_init()
1187 num_bytes = BN_num_bytes((const BIGNUM *) a); in crypto_bignum_to_bin()
1498 return BN_num_bytes(e->prime); in crypto_ec_prime_len()
1534 int len = BN_num_bytes(e->prime); in crypto_ec_point_to_bin()
1567 int len = BN_num_bytes(e->prime); in crypto_ec_point_from_bin()
1775 int len = BN_num_bytes(ecdh->ec->prime); in crypto_ecdh_get_pubkey()
/external/boringssl/src/crypto/bn_extra/
Dbn_asn1.c57 !BN_bn2cbb_padded(&child, BN_num_bytes(bn), bn) || in BN_marshal_asn1()
/external/boringssl/src/crypto/fipsmodule/ecdsa/
Decdsa_test.cc113 size_t r_len = BN_num_bytes(ecdsa_sig->r); in TestTamperedSig()
114 size_t s_len = BN_num_bytes(ecdsa_sig->s); in TestTamperedSig()
115 size_t bn_len = BN_num_bytes(order); in TestTamperedSig()
/external/boringssl/src/crypto/fipsmodule/ec/
Doct.c95 const size_t field_len = BN_num_bytes(&group->field); in ec_GFp_simple_point2oct()
187 const size_t field_len = BN_num_bytes(&group->field); in ec_GFp_simple_oct2point()
/external/boringssl/src/crypto/fipsmodule/self_check/
Dself_check.c537 BN_num_bytes(sig->r) != sizeof(ecdsa_r_bytes) || in BORINGSSL_self_test()
539 BN_num_bytes(sig->s) != sizeof(ecdsa_s_bytes) || in BORINGSSL_self_test()
/external/boringssl/src/crypto/fipsmodule/bn/
Dbytes.c154 n = i = BN_num_bytes(in); in BN_bn2bin()
/external/boringssl/src/crypto/dsa/
Ddsa.c574 if (digest_len > BN_num_bytes(dsa->q)) { in DSA_do_sign()
578 digest_len = BN_num_bytes(dsa->q); in DSA_do_sign()
815 size_t order_len = BN_num_bytes(dsa->q); in DSA_size()
/external/boringssl/src/crypto/ecdsa_extra/
Decdsa_asn1.c154 group_order_size = BN_num_bytes(EC_GROUP_get0_order(group)); in ECDSA_size()
/external/boringssl/src/crypto/dh/
Ddh_test.cc437 if (BN_num_bytes(bn.get()) != sizeof(kPrime1536) || in TestRFC3526()

12