/external/wpa_supplicant_8/src/crypto/ |
D | aes-eax.c | 28 int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len, in aes_128_eax_encrypt() argument 38 if (nonce_len > data_len) in aes_128_eax_encrypt() 39 buf_len = nonce_len; in aes_128_eax_encrypt() 53 os_memcpy(buf + 16, nonce, nonce_len); in aes_128_eax_encrypt() 54 if (omac1_aes_128(key, buf, 16 + nonce_len, nonce_mac)) in aes_128_eax_encrypt() 92 int aes_128_eax_decrypt(const u8 *key, const u8 *nonce, size_t nonce_len, in aes_128_eax_decrypt() argument 102 if (nonce_len > data_len) in aes_128_eax_decrypt() 103 buf_len = nonce_len; in aes_128_eax_decrypt() 117 os_memcpy(buf + 16, nonce, nonce_len); in aes_128_eax_decrypt() 118 if (omac1_aes_128(key, buf, 16 + nonce_len, nonce_mac)) { in aes_128_eax_decrypt()
|
D | aes_wrap.h | 41 const u8 *nonce, size_t nonce_len, 45 const u8 *nonce, size_t nonce_len,
|
/external/boringssl/src/ssl/ |
D | ssl_aead_ctx.cc | 269 size_t nonce_len = 0; in Open() local 273 nonce_len = fixed_nonce_len_ - variable_nonce_len_; in Open() 274 OPENSSL_memset(nonce, 0, nonce_len); in Open() 277 nonce_len += fixed_nonce_len_; in Open() 287 OPENSSL_memcpy(nonce + nonce_len, in.data(), variable_nonce_len_); in Open() 291 OPENSSL_memcpy(nonce + nonce_len, seqnum, variable_nonce_len_); in Open() 293 nonce_len += variable_nonce_len_; in Open() 297 assert(nonce_len == fixed_nonce_len_); in Open() 306 nonce_len, in.data(), in.size(), ad.data(), in Open() 347 size_t nonce_len = 0; in SealScatter() local [all …]
|
/external/boringssl/src/crypto/fipsmodule/cipher/ |
D | aead.c | 30 size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead) { return aead->nonce_len; } in EVP_AEAD_nonce_length() 117 size_t nonce_len, const uint8_t *in, size_t in_len, in EVP_AEAD_CTX_seal() argument 136 max_out_len - in_len, nonce, nonce_len, in, in EVP_AEAD_CTX_seal() 153 nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in EVP_AEAD_CTX_seal_scatter() argument 169 nonce, nonce_len, in, in_len, extra_in, in EVP_AEAD_CTX_seal_scatter() 185 size_t nonce_len, const uint8_t *in, size_t in_len, in EVP_AEAD_CTX_open() argument 193 if (!ctx->aead->open(ctx, out, out_len, max_out_len, nonce, nonce_len, in, in EVP_AEAD_CTX_open() 214 if (EVP_AEAD_CTX_open_gather(ctx, out, nonce, nonce_len, in, plaintext_len, in EVP_AEAD_CTX_open() 230 const uint8_t *nonce, size_t nonce_len, in EVP_AEAD_CTX_open_gather() argument 244 if (ctx->aead->open_gather(ctx, out, nonce, nonce_len, in, in_len, in_tag, in EVP_AEAD_CTX_open_gather()
|
D | internal.h | 79 uint8_t nonce_len; member 93 size_t max_out_len, const uint8_t *nonce, size_t nonce_len, 99 const uint8_t *nonce, size_t nonce_len, const uint8_t *in, 104 const uint8_t *nonce, size_t nonce_len, const uint8_t *in,
|
D | e_aes.c | 895 const uint8_t *nonce, size_t nonce_len, in aead_aes_gcm_seal_scatter() argument 910 if (nonce_len == 0) { in aead_aes_gcm_seal_scatter() 920 CRYPTO_gcm128_setiv(&gcm, key, nonce, nonce_len); in aead_aes_gcm_seal_scatter() 957 const uint8_t *nonce, size_t nonce_len, in aead_aes_gcm_open_gather() argument 964 if (nonce_len == 0) { in aead_aes_gcm_open_gather() 979 CRYPTO_gcm128_setiv(&gcm, key, nonce, nonce_len); in aead_aes_gcm_open_gather() 1009 out->nonce_len = 12; in DEFINE_METHOD_FUNCTION() 1024 out->nonce_len = 12; in DEFINE_METHOD_FUNCTION() 1069 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_aes_gcm_tls12_seal_scatter() argument 1074 if (nonce_len != 12) { in aead_aes_gcm_tls12_seal_scatter() [all …]
|
/external/boringssl/src/crypto/cipher_extra/ |
D | e_chacha20poly1305.c | 189 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in chacha20_poly1305_seal_scatter() argument 199 if (nonce_len != 12) { in chacha20_poly1305_seal_scatter() 263 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_chacha20_poly1305_seal_scatter() argument 270 nonce_len, in, in_len, extra_in, extra_in_len, ad, ad_len, ctx->tag_len); in aead_chacha20_poly1305_seal_scatter() 276 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_xchacha20_poly1305_seal_scatter() argument 281 if (nonce_len != 24) { in aead_xchacha20_poly1305_seal_scatter() 300 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *in_tag, in chacha20_poly1305_open_gather() argument 302 if (nonce_len != 12) { in chacha20_poly1305_open_gather() 345 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *in_tag, in aead_chacha20_poly1305_open_gather() argument 350 return chacha20_poly1305_open_gather(c20_ctx->key, out, nonce, nonce_len, in, in aead_chacha20_poly1305_open_gather() [all …]
|
D | e_aesccm.c | 84 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_aes_ccm_seal_scatter() argument 99 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_aes_ccm_seal_scatter() 105 ctx->tag_len, nonce, nonce_len, in, in_len, ad, in aead_aes_ccm_seal_scatter() 116 const uint8_t *nonce, size_t nonce_len, in aead_aes_ccm_open_gather() argument 128 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_aes_ccm_open_gather() 141 ctx->tag_len, nonce, nonce_len, in, in_len, ad, in aead_aes_ccm_open_gather()
|
D | aead_test.cc | 420 const size_t nonce_len = EVP_AEAD_nonce_length(aead()); in TEST_P() local 421 ASSERT_GE(sizeof(nonce), nonce_len); in TEST_P() 435 sizeof(ciphertext), nonce, nonce_len, plaintext, in TEST_P() 456 nonce_len, ciphertext, ciphertext_len, nullptr /* ad */, 0)) in TEST_P() 474 const size_t nonce_len = EVP_AEAD_nonce_length(aead()); in TEST_P() local 492 std::vector<uint8_t> nonce(nonce_len, 'b'); in TEST_P() 497 sizeof(kPlaintext) + max_overhead, nonce.data(), nonce_len, kPlaintext, in TEST_P() 511 nonce.data(), nonce_len, in, sizeof(kPlaintext), nullptr, 0)); in TEST_P() 514 nonce.data(), nonce_len, in, sizeof(kPlaintext), nullptr, 0)); in TEST_P() 519 valid_encryption_len, nonce.data(), nonce_len, in TEST_P() [all …]
|
D | e_aesctrhmac.c | 179 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_aes_ctr_hmac_sha256_seal_scatter() argument 196 if (nonce_len != EVP_AEAD_AES_CTR_HMAC_SHA256_NONCE_LEN) { in aead_aes_ctr_hmac_sha256_seal_scatter() 214 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *in_tag, in aead_aes_ctr_hmac_sha256_open_gather() argument 224 if (nonce_len != EVP_AEAD_AES_CTR_HMAC_SHA256_NONCE_LEN) { in aead_aes_ctr_hmac_sha256_open_gather()
|
D | e_aesgcmsiv.c | 344 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_aes_gcm_siv_asm_seal_scatter() argument 361 if (nonce_len != EVP_AEAD_AES_GCM_SIV_NONCE_LEN) { in aead_aes_gcm_siv_asm_seal_scatter() 413 const uint8_t *nonce, size_t nonce_len, in aead_aes_gcm_siv_asm_open() argument 728 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_aes_gcm_siv_seal_scatter() argument 747 if (nonce_len != EVP_AEAD_AES_GCM_SIV_NONCE_LEN) { in aead_aes_gcm_siv_seal_scatter() 768 const uint8_t *nonce, size_t nonce_len, in aead_aes_gcm_siv_open_gather() argument 786 if (nonce_len != EVP_AEAD_AES_GCM_SIV_NONCE_LEN) { in aead_aes_gcm_siv_open_gather()
|
D | e_tls.c | 125 const uint8_t *nonce, const size_t nonce_len, in aead_tls_seal_scatter() argument 149 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_tls_seal_scatter() 244 size_t nonce_len, const uint8_t *in, size_t in_len, in aead_tls_open() argument 266 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_tls_open()
|
/external/boringssl/src/crypto/fipsmodule/modes/ |
D | ccm.c | 86 const uint8_t *nonce, size_t nonce_len, in ccm128_init_state() argument 95 nonce_len != 15 - L) { in ccm128_init_state() 105 OPENSSL_memcpy(&state->nonce.c[1], nonce, nonce_len); in ccm128_init_state() 236 const uint8_t *nonce, size_t nonce_len, in CRYPTO_ccm128_encrypt() argument 240 return ccm128_init_state(ctx, &state, key, nonce, nonce_len, aad, aad_len, in CRYPTO_ccm128_encrypt() 248 const uint8_t *nonce, size_t nonce_len, in CRYPTO_ccm128_decrypt() argument 252 return ccm128_init_state(ctx, &state, key, nonce, nonce_len, aad, aad_len, in CRYPTO_ccm128_decrypt()
|
D | internal.h | 370 const uint8_t *nonce, size_t nonce_len, 379 const uint8_t *nonce, size_t nonce_len,
|
/external/wpa_supplicant_8/src/eap_server/ |
D | eap_server_eke.c | 320 if (random_get_bytes(data->nonce_s, data->sess.nonce_len)) { in eap_eke_build_confirm() 326 data->nonce_s, data->sess.nonce_len); in eap_eke_build_confirm() 328 os_memcpy(nonces, data->nonce_p, data->sess.nonce_len); in eap_eke_build_confirm() 329 os_memcpy(nonces + data->sess.nonce_len, data->nonce_s, in eap_eke_build_confirm() 330 data->sess.nonce_len); in eap_eke_build_confirm() 332 if (eap_eke_prot(&data->sess, nonces, 2 * data->sess.nonce_len, in eap_eke_build_confirm() 569 if (decrypt_len < (size_t) data->sess.nonce_len) { in eap_eke_process_commit() 575 data->nonce_p, data->sess.nonce_len); in eap_eke_process_commit() 618 if (decrypt_len < (size_t) data->sess.nonce_len) { in eap_eke_process_confirm() 624 nonce, data->sess.nonce_len); in eap_eke_process_confirm() [all …]
|
/external/wpa_supplicant_8/src/eap_peer/ |
D | eap_eke.c | 464 if (random_get_bytes(data->nonce_p, data->sess.nonce_len)) { in eap_eke_process_commit() 470 data->nonce_p, data->sess.nonce_len); in eap_eke_process_commit() 472 if (eap_eke_prot(&data->sess, data->nonce_p, data->sess.nonce_len, in eap_eke_process_commit() 539 if (decrypt_len != (size_t) 2 * data->sess.nonce_len) { in eap_eke_process_confirm() 545 nonces, 2 * data->sess.nonce_len); in eap_eke_process_confirm() 546 if (os_memcmp(data->nonce_p, nonces, data->sess.nonce_len) != 0) { in eap_eke_process_confirm() 552 os_memcpy(data->nonce_s, nonces + data->sess.nonce_len, in eap_eke_process_confirm() 553 data->sess.nonce_len); in eap_eke_process_confirm() 555 data->nonce_s, data->sess.nonce_len); in eap_eke_process_confirm() 588 if (eap_eke_prot(&data->sess, data->nonce_s, data->sess.nonce_len, in eap_eke_process_confirm() [all …]
|
/external/boringssl/src/include/openssl/ |
D | aead.h | 261 const uint8_t *nonce, size_t nonce_len, 286 const uint8_t *nonce, size_t nonce_len, 322 const uint8_t *nonce, size_t nonce_len, 344 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *in_tag,
|
/external/wpa_supplicant_8/src/eap_common/ |
D | eap_eke_common.c | 494 data_len = label_len + id_s_len + id_p_len + 2 * sess->nonce_len; in eap_eke_derive_ka() 505 os_memcpy(pos, nonce_p, sess->nonce_len); in eap_eke_derive_ka() 506 pos += sess->nonce_len; in eap_eke_derive_ka() 507 os_memcpy(pos, nonce_s, sess->nonce_len); in eap_eke_derive_ka() 539 data_len = label_len + id_s_len + id_p_len + 2 * sess->nonce_len; in eap_eke_derive_msk() 550 os_memcpy(pos, nonce_p, sess->nonce_len); in eap_eke_derive_msk() 551 pos += sess->nonce_len; in eap_eke_derive_msk() 552 os_memcpy(pos, nonce_s, sess->nonce_len); in eap_eke_derive_msk() 708 sess->nonce_len = eap_eke_nonce_len(prf); in eap_eke_session_init() 713 if (sess->prf_len < 0 || sess->nonce_len < 0 || sess->auth_len < 0 || in eap_eke_session_init()
|
D | ikev2_common.c | 318 payloads->nonce_len = pdatalen; in ikev2_parse_payloads() 373 const u8 *nonce, size_t nonce_len, in ikev2_derive_auth_data() argument 402 sign_len = wpabuf_len(sign_msg) + nonce_len + prf->hash_len; in ikev2_derive_auth_data() 409 os_memcpy(pos, nonce, nonce_len); in ikev2_derive_auth_data() 410 pos += nonce_len; in ikev2_derive_auth_data()
|
D | ikev2_common.h | 290 const u8 *nonce, size_t nonce_len, 309 size_t nonce_len; member
|
D | eap_eke_common.h | 74 int nonce_len; member
|
/external/boringssl/src/fipstools/ |
D | cavp_ctr_drbg_test.cc | 28 std::string test_type, prediction_resistance, entropy_input_len, nonce_len, in TestCTRDRBG() local 33 !t->GetInstruction(&nonce_len, "NonceLen") || in TestCTRDRBG() 42 nonce_len != "0") { in TestCTRDRBG()
|
/external/wpa_supplicant_8/src/common/ |
D | dpp.c | 1437 size_t nonce_len; in dpp_derive_ke() local 1455 nonce_len = auth->curve->nonce_len; in dpp_derive_ke() 1456 os_memcpy(nonces, auth->i_nonce, nonce_len); in dpp_derive_ke() 1457 os_memcpy(&nonces[nonce_len], auth->r_nonce, nonce_len); in dpp_derive_ke() 1474 res = dpp_hmac_vector(hash_len, nonces, 2 * nonce_len, in dpp_derive_ke() 1529 size_t nonce_len, in dpp_auth_build_req() argument 1618 WPA_PUT_LE16(pos, nonce_len - 1); in dpp_auth_build_req() 1620 os_memcpy(pos, auth->i_nonce, nonce_len - 1); in dpp_auth_build_req() 1621 pos += nonce_len - 1; in dpp_auth_build_req() 1629 WPA_PUT_LE16(pos, nonce_len); in dpp_auth_build_req() [all …]
|
D | dpp.h | 93 size_t nonce_len; member
|
/external/boringssl/src/tool/ |
D | speed.cc | 318 const size_t nonce_len = EVP_AEAD_nonce_length(aead); in SpeedAEADChunk() local 323 std::unique_ptr<uint8_t[]> nonce(new uint8_t[nonce_len]); in SpeedAEADChunk() 324 OPENSSL_memset(nonce.get(), 0, nonce_len); in SpeedAEADChunk() 358 [chunk_len, nonce_len, ad_len, overhead_len, in, out, tag, in SpeedAEADChunk() 363 nonce.get(), nonce_len, in, chunk_len, nullptr, 0, in SpeedAEADChunk() 373 nonce.get(), nonce_len, in, chunk_len, ad.get(), ad_len); in SpeedAEADChunk() 385 [chunk_len, overhead_len, nonce_len, ad_len, in2, out, in SpeedAEADChunk() 392 nonce.get(), nonce_len, out, in SpeedAEADChunk()
|