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/
H A Daes-eax.c20 * @nonce_len: Nonce length in bytes
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()
84 * @nonce_len: Nonce length in bytes
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()
[all...]
H A 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/
H A Daes-eax.c20 * @nonce_len: Nonce length in bytes
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()
84 * @nonce_len: Nonce length in bytes
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()
[all...]
H A 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/
H A Ddpp_auth.c61 size_t nonce_len, in dpp_auth_build_req()
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()
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()
59 dpp_auth_build_req(struct dpp_authentication *auth, const struct wpabuf *pi, size_t nonce_len, const u8 *r_pubkey_hash, const u8 *i_pubkey_hash, unsigned int neg_freq) dpp_auth_build_req() argument
233 dpp_auth_build_resp(struct dpp_authentication *auth, enum dpp_status_error status, const struct wpabuf *pr, size_t nonce_len, const u8 *r_pubkey_hash, const u8 *i_pubkey_hash, const u8 *r_nonce, const u8 *i_nonce, const u8 *wrapped_r_auth, size_t wrapped_r_auth_len, const u8 *siv_key) dpp_auth_build_resp() argument
420 size_t nonce_len; dpp_auth_build_resp_ok() local
1170 size_t nonce_len; dpp_auth_init() local
[all...]
H A 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...]
H A 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()
954 size_t nonce_len; dpp_gen_i_auth() local
[all...]
H A 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()
3091 size_t nonce_len, clear_len, attr_len; dpp_build_conf_result() local
3309 size_t nonce_len, clear_len, attr_len; dpp_build_conn_status_result() local
[all...]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_server/
H A 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/
H A 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/src/eap_peer/
H A 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/
H A 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/src/eap_common/
H A 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 < in eap_eke_session_init()
[all...]
H A Dikev2_common.c318 payloads->nonce_len = pdatalen; in ikev2_parse_payloads()
373 const u8 *nonce, size_t nonce_len, in ikev2_derive_auth_data()
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()
369 ikev2_derive_auth_data(int prf_alg, const struct wpabuf *sign_msg, const u8 *ID, size_t ID_len, u8 ID_type, struct ikev2_keys *keys, int initiator, const u8 *shared_secret, size_t shared_secret_len, const u8 *nonce, size_t nonce_len, const u8 *key_pad, size_t key_pad_len, u8 *auth_data) ikev2_derive_auth_data() argument
H A Dikev2_common.h290 const u8 *nonce, size_t nonce_len,
309 size_t nonce_len; member
H A Deap_eke_common.h74 int nonce_len; member
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_common/
H A 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 < in eap_eke_session_init()
[all...]
H A Dikev2_common.c318 payloads->nonce_len = pdatalen; in ikev2_parse_payloads()
373 const u8 *nonce, size_t nonce_len, in ikev2_derive_auth_data()
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()
369 ikev2_derive_auth_data(int prf_alg, const struct wpabuf *sign_msg, const u8 *ID, size_t ID_len, u8 ID_type, struct ikev2_keys *keys, int initiator, const u8 *shared_secret, size_t shared_secret_len, const u8 *nonce, size_t nonce_len, const u8 *key_pad, size_t key_pad_len, u8 *auth_data) ikev2_derive_auth_data() argument
H A Dikev2_common.h290 const u8 *nonce, size_t nonce_len,
309 size_t nonce_len; member
/third_party/node/deps/openssl/openssl/crypto/evp/
H A 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/crypto/evp/
H A 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/mbedtls/library/
H A Dctr_drbg.c435 * mbedtls_ctr_drbg_reseed(ctx, additional, len, nonce_len)
443 * for (ctx->entropy_len + nonce_len) bytes
450 size_t nonce_len) in mbedtls_ctr_drbg_reseed_internal()
459 if (nonce_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len) { in mbedtls_ctr_drbg_reseed_internal()
462 if (len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len - nonce_len) { in mbedtls_ctr_drbg_reseed_internal()
475 if (nonce_len != 0) { in mbedtls_ctr_drbg_reseed_internal()
476 if (0 != ctx->f_entropy(ctx->p_entropy, seed + seedlen, nonce_len)) { in mbedtls_ctr_drbg_reseed_internal()
479 seedlen += nonce_len; in mbedtls_ctr_drbg_reseed_internal()
543 size_t nonce_len; in mbedtls_ctr_drbg_seed() local
562 nonce_len in mbedtls_ctr_drbg_seed()
447 mbedtls_ctr_drbg_reseed_internal(mbedtls_ctr_drbg_context *ctx, const unsigned char *additional, size_t len, size_t nonce_len) mbedtls_ctr_drbg_reseed_internal() argument
[all...]
/third_party/node/deps/openssl/openssl/providers/implementations/rands/
H A 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/openssl/providers/implementations/rands/
H A 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/
H A 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()
1760 WPA_PUT_LE16(pos, nonce_len - 1); in dpp_auth_build_req()
1762 os_memcpy(pos, auth->i_nonce, nonce_len in dpp_auth_build_req()
1669 dpp_auth_build_req(struct dpp_authentication *auth, const struct wpabuf *pi, size_t nonce_len, const u8 *r_pubkey_hash, const u8 *i_pubkey_hash, unsigned int neg_freq) dpp_auth_build_req() argument
1841 dpp_auth_build_resp(struct dpp_authentication *auth, enum dpp_status_error status, const struct wpabuf *pr, size_t nonce_len, const u8 *r_pubkey_hash, const u8 *i_pubkey_hash, const u8 *r_nonce, const u8 *i_nonce, const u8 *wrapped_r_auth, size_t wrapped_r_auth_len, const u8 *siv_key) dpp_auth_build_resp() argument
2229 size_t nonce_len; dpp_auth_init() local
2364 size_t nonce_len; dpp_build_conf_req_attr() local
2538 size_t nonce_len; dpp_gen_r_auth() local
2617 size_t nonce_len; dpp_gen_i_auth() local
2824 size_t nonce_len; dpp_auth_build_resp_ok() local
6100 size_t nonce_len, clear_len, attr_len; dpp_build_conf_result() local
[all...]

Completed in 30 milliseconds

12