Home
last modified time | relevance | path

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

12

/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/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.h41 const u8 *nonce, size_t nonce_len,
45 const u8 *nonce, size_t nonce_len,
/third_party/wpa_supplicant/wpa_supplicant-2.9/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.h41 const u8 *nonce, size_t nonce_len,
45 const u8 *nonce, size_t nonce_len,
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/
Ddpp_auth.c61 size_t nonce_len, in dpp_auth_build_req() argument
152 WPA_PUT_LE16(pos, nonce_len - 1); in dpp_auth_build_req()
154 os_memcpy(pos, auth->i_nonce, nonce_len - 1); in dpp_auth_build_req()
155 pos += nonce_len - 1; in dpp_auth_build_req()
163 WPA_PUT_LE16(pos, nonce_len); in dpp_auth_build_req()
165 os_memcpy(pos, auth->i_nonce, nonce_len); in dpp_auth_build_req()
166 pos += nonce_len; in dpp_auth_build_req()
236 size_t nonce_len, in dpp_auth_build_resp() argument
315 WPA_PUT_LE16(pos, nonce_len); in dpp_auth_build_resp()
317 os_memcpy(pos, r_nonce, nonce_len); in dpp_auth_build_resp()
[all …]
Ddpp_reconfig.c137 4 + auth->curve->nonce_len; in dpp_reconfig_build_req()
159 wpabuf_put_le16(msg, auth->curve->nonce_len); in dpp_reconfig_build_req()
160 wpabuf_put_data(msg, auth->c_nonce, auth->curve->nonce_len); in dpp_reconfig_build_req()
294 if (random_get_bytes(auth->c_nonce, auth->curve->nonce_len)) { in dpp_reconfig_init()
324 clear_len = 4 + auth->curve->nonce_len + in dpp_reconfig_build_resp()
332 wpabuf_put_le16(clear, auth->curve->nonce_len); in dpp_reconfig_build_resp()
333 wpabuf_put_data(clear, auth->c_nonce, auth->curve->nonce_len); in dpp_reconfig_build_resp()
346 4 + auth->curve->nonce_len + in dpp_reconfig_build_resp()
372 wpabuf_put_le16(msg, auth->curve->nonce_len); in dpp_reconfig_build_resp()
373 wpabuf_put_data(msg, auth->e_nonce, auth->curve->nonce_len); in dpp_reconfig_build_resp()
[all …]
Ddpp_crypto.c426 size_t nonce_len = auth->curve->nonce_len; in dpp_derive_bk_ke() local
441 os_memcpy(nonces, auth->i_nonce, nonce_len); in dpp_derive_bk_ke()
442 os_memcpy(&nonces[nonce_len], auth->r_nonce, nonce_len); in dpp_derive_bk_ke()
459 res = dpp_hmac_vector(hash_len, nonces, 2 * nonce_len, in dpp_derive_bk_ke()
871 size_t nonce_len; in dpp_gen_r_auth() local
876 nonce_len = auth->curve->nonce_len; in dpp_gen_r_auth()
903 len[num_elem] = nonce_len; in dpp_gen_r_auth()
907 len[num_elem] = nonce_len; in dpp_gen_r_auth()
954 size_t nonce_len; in dpp_gen_i_auth() local
959 nonce_len = auth->curve->nonce_len; in dpp_gen_i_auth()
[all …]
Ddpp.c660 size_t nonce_len; in dpp_build_conf_req_attr() local
668 nonce_len = auth->curve->nonce_len; in dpp_build_conf_req_attr()
669 if (random_get_bytes(auth->e_nonce, nonce_len)) { in dpp_build_conf_req_attr()
673 wpa_hexdump(MSG_DEBUG, "DPP: E-nonce", auth->e_nonce, nonce_len); in dpp_build_conf_req_attr()
678 clear_len = 4 + nonce_len + 4 + json_len; in dpp_build_conf_req_attr()
697 wpabuf_put_le16(clear, nonce_len - 1); in dpp_build_conf_req_attr()
698 wpabuf_put_data(clear, auth->e_nonce, nonce_len - 1); in dpp_build_conf_req_attr()
709 wpabuf_put_le16(clear, nonce_len); in dpp_build_conf_req_attr()
710 wpabuf_put_data(clear, auth->e_nonce, nonce_len); in dpp_build_conf_req_attr()
1942 if (!e_nonce || e_nonce_len != auth->curve->nonce_len) { in dpp_conf_req_rx()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/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()
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 …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/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()
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 …]
/third_party/mbedtls/library/
Dctr_drbg.c351 size_t nonce_len ) in mbedtls_ctr_drbg_reseed_internal() argument
359 if( nonce_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len ) in mbedtls_ctr_drbg_reseed_internal()
361 if( len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len - nonce_len ) in mbedtls_ctr_drbg_reseed_internal()
374 if( nonce_len != 0 ) in mbedtls_ctr_drbg_reseed_internal()
376 if( 0 != ctx->f_entropy( ctx->p_entropy, seed + seedlen, nonce_len ) ) in mbedtls_ctr_drbg_reseed_internal()
380 seedlen += nonce_len; in mbedtls_ctr_drbg_reseed_internal()
442 size_t nonce_len; in mbedtls_ctr_drbg_seed() local
462 nonce_len = ( ctx->reseed_counter >= 0 ? in mbedtls_ctr_drbg_seed()
475 nonce_len ) ) != 0 ) in mbedtls_ctr_drbg_seed()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_peer/
Deap_eke.c464 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 …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_peer/
Deap_eke.c464 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 …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_common/
Deap_eke_common.c494 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()
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
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_common/
Deap_eke_common.c494 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()
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
/third_party/openssl/providers/implementations/rands/
Dtest_rng.c46 size_t entropy_len, entropy_pos, nonce_len; member
136 memcpy(out, t->nonce, t->nonce_len); in test_rng_nonce()
137 return t->nonce_len; in test_rng_nonce()
202 t->nonce_len = size; in test_rng_set_ctx_params()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/common/
Ddpp.c1579 size_t nonce_len; in dpp_derive_ke() local
1597 nonce_len = auth->curve->nonce_len; in dpp_derive_ke()
1598 os_memcpy(nonces, auth->i_nonce, nonce_len); in dpp_derive_ke()
1599 os_memcpy(&nonces[nonce_len], auth->r_nonce, nonce_len); in dpp_derive_ke()
1616 res = dpp_hmac_vector(hash_len, nonces, 2 * nonce_len, in dpp_derive_ke()
1671 size_t nonce_len, in dpp_auth_build_req() argument
1760 WPA_PUT_LE16(pos, nonce_len - 1); in dpp_auth_build_req()
1762 os_memcpy(pos, auth->i_nonce, nonce_len - 1); in dpp_auth_build_req()
1763 pos += nonce_len - 1; in dpp_auth_build_req()
1771 WPA_PUT_LE16(pos, nonce_len); in dpp_auth_build_req()
[all …]
/third_party/openssl/crypto/evp/
De_chacha20_poly1305.c159 int aad, mac_inited, tag_len, nonce_len; member
186 if (actx->nonce_len <= CHACHA_CTR_SIZE) in chacha20_poly1305_init_key()
187 memcpy(temp + CHACHA_CTR_SIZE - actx->nonce_len, iv, in chacha20_poly1305_init_key()
188 actx->nonce_len); in chacha20_poly1305_init_key()
515 actx->nonce_len = 12; in chacha20_poly1305_ctrl()
534 *(int *)ptr = actx->nonce_len; in chacha20_poly1305_ctrl()
540 actx->nonce_len = arg; in chacha20_poly1305_ctrl()
/third_party/openssl/providers/implementations/ciphers/
Dcipher_chacha20_poly1305.c56 ctx->nonce_len = CHACHA20_POLY1305_IVLEN; in chacha20_poly1305_newctx()
88 if (!OSSL_PARAM_set_size_t(p, ctx->nonce_len)) { in chacha20_poly1305_get_ctx_params()
176 ctx->nonce_len = len; in chacha20_poly1305_set_ctx_params()
Dcipher_chacha20_poly1305.h28 size_t tag_len, nonce_len; member
Dcipher_chacha20_poly1305_hw.c89 if (ctx->nonce_len <= CHACHA_CTR_SIZE) { in chacha20_poly1305_initiv()
90 memcpy(tempiv + CHACHA_CTR_SIZE - ctx->nonce_len, bctx->oiv, in chacha20_poly1305_initiv()
91 ctx->nonce_len); in chacha20_poly1305_initiv()

12