Home
last modified time | relevance | path

Searched refs:nonce_len (Results 1 – 25 of 28) sorted by relevance

12

/external/boringssl/src/ssl/
Dssl_aead_ctx.c181 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/
Daes-eax.c28 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()
Daes_wrap.h39 const u8 *nonce, size_t nonce_len,
43 const u8 *nonce, size_t nonce_len,
/external/boringssl/src/crypto/cipher/
De_chacha20poly1305.c210 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()
Daead.c27 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()
Dinternal.h76 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,
De_aes.c1102 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 …]
De_ssl3.c128 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()
De_tls.c105 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/
Deap_server_eke.c320 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/
Deap_eke.c466 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 …]
Dikev2.c448 ikev2_process_ni(data, pl->nonce, pl->nonce_len) < 0) in ikev2_process_sa_init()
/external/boringssl/src/crypto/modes/
Dgcm_test.c302 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/
Deap_eke_common.c516 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()
Dikev2_common.c318 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()
Dikev2_common.h290 const u8 *nonce, size_t nonce_len,
309 size_t nonce_len; member
Deap_eke_common.h74 int nonce_len; member
/external/wpa_supplicant_8/wpa_supplicant/
Dmesh_rsn.c385 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/
Daead.h288 const uint8_t *nonce, size_t nonce_len,
313 const uint8_t *nonce, size_t nonce_len,
/external/boringssl/src/tool/
Dspeed.cc181 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/
Dwpa_auth_ie.h26 size_t nonce_len; member
Dpeerkey_auth.c270 kde.nonce == NULL || kde.nonce_len < WPA_NONCE_LEN) { in wpa_smk_m3()
Dwpa_auth_ie.c829 ie->nonce_len = pos[1] - RSN_SELECTOR_LEN; in wpa_parse_generic()
/external/wpa_supplicant_8/src/rsn_supp/
Dwpa_ie.h28 size_t nonce_len; member
Dwpa_ie.c421 ie->nonce_len = pos[1] - RSN_SELECTOR_LEN; in wpa_parse_generic()

12