/external/boringssl/src/ssl/ |
D | ssl_aead_ctx.c | 181 size_t nonce_len = 0; in SSL_AEAD_CTX_open() local 185 nonce_len = aead->fixed_nonce_len - aead->variable_nonce_len; in SSL_AEAD_CTX_open() 186 memset(nonce, 0, nonce_len); in SSL_AEAD_CTX_open() 189 nonce_len += aead->fixed_nonce_len; in SSL_AEAD_CTX_open() 199 memcpy(nonce + nonce_len, in, aead->variable_nonce_len); in SSL_AEAD_CTX_open() 204 memcpy(nonce + nonce_len, seqnum, aead->variable_nonce_len); in SSL_AEAD_CTX_open() 206 nonce_len += aead->variable_nonce_len; in SSL_AEAD_CTX_open() 210 assert(nonce_len == aead->fixed_nonce_len); in SSL_AEAD_CTX_open() 217 return EVP_AEAD_CTX_open(&aead->ctx, out, out_len, max_out, nonce, nonce_len, in SSL_AEAD_CTX_open() 242 size_t nonce_len = 0; in SSL_AEAD_CTX_seal() local [all …]
|
/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 | 39 const u8 *nonce, size_t nonce_len, 43 const u8 *nonce, size_t nonce_len,
|
/external/boringssl/src/crypto/cipher/ |
D | e_chacha20poly1305.c | 210 const uint8_t *nonce, size_t nonce_len, in aead_chacha20_poly1305_seal() argument 213 if (nonce_len != 12) { in aead_chacha20_poly1305_seal() 223 const uint8_t *nonce, size_t nonce_len, in aead_chacha20_poly1305_open() argument 226 if (nonce_len != 12) { in aead_chacha20_poly1305_open() 267 const uint8_t *nonce, size_t nonce_len, const uint8_t *in, size_t in_len, in aead_chacha20_poly1305_old_seal() argument 269 if (nonce_len != 8) { in aead_chacha20_poly1305_old_seal() 282 const uint8_t *nonce, size_t nonce_len, const uint8_t *in, size_t in_len, in aead_chacha20_poly1305_old_open() argument 284 if (nonce_len != 8) { in aead_chacha20_poly1305_old_open()
|
D | aead.c | 27 size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead) { return aead->nonce_len; } in EVP_AEAD_nonce_length() 102 size_t nonce_len, const uint8_t *in, size_t in_len, in EVP_AEAD_CTX_seal() argument 116 if (ctx->aead->seal(ctx, out, out_len, max_out_len, nonce, nonce_len, in, in EVP_AEAD_CTX_seal() 131 size_t nonce_len, const uint8_t *in, size_t in_len, in EVP_AEAD_CTX_open() argument 138 if (ctx->aead->open(ctx, out, out_len, max_out_len, nonce, nonce_len, in, in EVP_AEAD_CTX_open()
|
D | internal.h | 76 uint8_t nonce_len; member 89 size_t max_out_len, const uint8_t *nonce, size_t nonce_len, 94 size_t max_out_len, const uint8_t *nonce, size_t nonce_len,
|
D | e_aes.c | 1102 const uint8_t *nonce, size_t nonce_len, in aead_aes_gcm_seal() argument 1121 CRYPTO_gcm128_setiv(&gcm, key, nonce, nonce_len); in aead_aes_gcm_seal() 1145 const uint8_t *nonce, size_t nonce_len, in aead_aes_gcm_open() argument 1168 CRYPTO_gcm128_setiv(&gcm, key, nonce, nonce_len); in aead_aes_gcm_open() 1282 const uint8_t *nonce, size_t nonce_len, in aead_aes_key_wrap_seal() argument 1300 if (nonce_len == 0) { in aead_aes_key_wrap_seal() 1302 nonce_len = sizeof(kDefaultAESKeyWrapNonce); in aead_aes_key_wrap_seal() 1305 if (nonce_len != 8) { in aead_aes_key_wrap_seal() 1371 const uint8_t *nonce, size_t nonce_len, in aead_aes_key_wrap_open() argument 1389 if (nonce_len == 0) { in aead_aes_key_wrap_open() [all …]
|
D | e_ssl3.c | 128 const uint8_t *nonce, size_t nonce_len, in aead_ssl3_seal() argument 152 if (nonce_len != 0) { in aead_ssl3_seal() 213 const uint8_t *nonce, size_t nonce_len, in aead_ssl3_open() argument 237 if (nonce_len != 0) { in aead_ssl3_open()
|
D | e_tls.c | 105 const uint8_t *nonce, size_t nonce_len, in aead_tls_seal() argument 129 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_tls_seal() 206 const uint8_t *nonce, size_t nonce_len, in aead_tls_open() argument 229 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_tls_open()
|
/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() 570 if (decrypt_len < (size_t) data->sess.nonce_len) { in eap_eke_process_commit() 576 data->nonce_p, data->sess.nonce_len); in eap_eke_process_commit() 619 if (decrypt_len < (size_t) data->sess.nonce_len) { in eap_eke_process_confirm() 625 nonce, data->sess.nonce_len); in eap_eke_process_confirm() [all …]
|
/external/wpa_supplicant_8/src/eap_peer/ |
D | eap_eke.c | 466 if (random_get_bytes(data->nonce_p, data->sess.nonce_len)) { in eap_eke_process_commit() 472 data->nonce_p, data->sess.nonce_len); in eap_eke_process_commit() 474 if (eap_eke_prot(&data->sess, data->nonce_p, data->sess.nonce_len, in eap_eke_process_commit() 541 if (decrypt_len != (size_t) 2 * data->sess.nonce_len) { in eap_eke_process_confirm() 547 nonces, 2 * data->sess.nonce_len); in eap_eke_process_confirm() 548 if (os_memcmp(data->nonce_p, nonces, data->sess.nonce_len) != 0) { in eap_eke_process_confirm() 554 os_memcpy(data->nonce_s, nonces + data->sess.nonce_len, in eap_eke_process_confirm() 555 data->sess.nonce_len); in eap_eke_process_confirm() 557 data->nonce_s, data->sess.nonce_len); in eap_eke_process_confirm() 590 if (eap_eke_prot(&data->sess, data->nonce_s, data->sess.nonce_len, in eap_eke_process_confirm() [all …]
|
D | ikev2.c | 448 ikev2_process_ni(data, pl->nonce, pl->nonce_len) < 0) in ikev2_process_sa_init()
|
/external/boringssl/src/crypto/modes/ |
D | gcm_test.c | 302 size_t key_len, plaintext_len, additional_data_len, nonce_len, ciphertext_len, in run_test_case() local 315 !decode_hex(&nonce, &nonce_len, test->nonce, test_num, "nonce") || in run_test_case() 348 CRYPTO_gcm128_setiv(&ctx, &aes_key, nonce, nonce_len); in run_test_case() 364 CRYPTO_gcm128_setiv(&ctx, &aes_key, nonce, nonce_len); in run_test_case()
|
/external/wpa_supplicant_8/src/eap_common/ |
D | eap_eke_common.c | 516 data_len = label_len + id_s_len + id_p_len + 2 * sess->nonce_len; in eap_eke_derive_ka() 527 os_memcpy(pos, nonce_p, sess->nonce_len); in eap_eke_derive_ka() 528 pos += sess->nonce_len; in eap_eke_derive_ka() 529 os_memcpy(pos, nonce_s, sess->nonce_len); in eap_eke_derive_ka() 561 data_len = label_len + id_s_len + id_p_len + 2 * sess->nonce_len; in eap_eke_derive_msk() 572 os_memcpy(pos, nonce_p, sess->nonce_len); in eap_eke_derive_msk() 573 pos += sess->nonce_len; in eap_eke_derive_msk() 574 os_memcpy(pos, nonce_s, sess->nonce_len); in eap_eke_derive_msk() 730 sess->nonce_len = eap_eke_nonce_len(prf); in eap_eke_session_init() 735 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/wpa_supplicant_8/wpa_supplicant/ |
D | mesh_rsn.c | 385 size_t nonce_len = sizeof(sta->my_nonce); in mesh_rsn_derive_mtk() local 393 if (os_memcmp(sta->my_nonce, sta->peer_nonce, nonce_len) < 0) { in mesh_rsn_derive_mtk() 400 os_memcpy(ptr, min, nonce_len); in mesh_rsn_derive_mtk() 401 os_memcpy(ptr + nonce_len, max, nonce_len); in mesh_rsn_derive_mtk() 402 ptr += 2 * nonce_len; in mesh_rsn_derive_mtk()
|
/external/boringssl/src/include/openssl/ |
D | aead.h | 288 const uint8_t *nonce, size_t nonce_len, 313 const uint8_t *nonce, size_t nonce_len,
|
/external/boringssl/src/tool/ |
D | speed.cc | 181 const size_t nonce_len = EVP_AEAD_nonce_length(aead); in SpeedAEADChunk() local 186 std::unique_ptr<uint8_t[]> nonce(new uint8_t[nonce_len]); in SpeedAEADChunk() 187 memset(nonce.get(), 0, nonce_len); in SpeedAEADChunk() 207 if (!TimeFunction(&results, [chunk_len, overhead_len, nonce_len, ad_len, in, in SpeedAEADChunk() 213 nonce_len, in, chunk_len, ad.get(), ad_len); in SpeedAEADChunk()
|
/external/wpa_supplicant_8/src/ap/ |
D | wpa_auth_ie.h | 26 size_t nonce_len; member
|
D | peerkey_auth.c | 270 kde.nonce == NULL || kde.nonce_len < WPA_NONCE_LEN) { in wpa_smk_m3()
|
D | wpa_auth_ie.c | 829 ie->nonce_len = pos[1] - RSN_SELECTOR_LEN; in wpa_parse_generic()
|
/external/wpa_supplicant_8/src/rsn_supp/ |
D | wpa_ie.h | 28 size_t nonce_len; member
|
D | wpa_ie.c | 421 ie->nonce_len = pos[1] - RSN_SELECTOR_LEN; in wpa_parse_generic()
|