/hostap-latest/wlantest/ |
D | ccmp.c | 20 u8 *aad, size_t *aad_len, u8 *nonce) in ccmp_aad_nonce() argument 26 nonce[0] = 0; in ccmp_aad_nonce() 43 nonce[0] = qc[0] & 0x0f; in ccmp_aad_nonce() 46 nonce[0] |= 0x10; /* Management */ in ccmp_aad_nonce() 78 os_memcpy(nonce + 1, a2, ETH_ALEN); in ccmp_aad_nonce() 80 os_memcpy(nonce + 1, hdr->addr2, ETH_ALEN); in ccmp_aad_nonce() 81 nonce[7] = data[7]; /* PN5 */ in ccmp_aad_nonce() 82 nonce[8] = data[6]; /* PN4 */ in ccmp_aad_nonce() 83 nonce[9] = data[5]; /* PN3 */ in ccmp_aad_nonce() 84 nonce[10] = data[4]; /* PN2 */ in ccmp_aad_nonce() [all …]
|
D | gcmp.c | 20 u8 *aad, size_t *aad_len, u8 *nonce) in gcmp_aad_nonce() argument 73 os_memcpy(nonce, a2, ETH_ALEN); in gcmp_aad_nonce() 75 os_memcpy(nonce, hdr->addr2, ETH_ALEN); in gcmp_aad_nonce() 76 nonce[6] = data[7]; /* PN5 */ in gcmp_aad_nonce() 77 nonce[7] = data[6]; /* PN4 */ in gcmp_aad_nonce() 78 nonce[8] = data[5]; /* PN3 */ in gcmp_aad_nonce() 79 nonce[9] = data[4]; /* PN2 */ in gcmp_aad_nonce() 80 nonce[10] = data[1]; /* PN1 */ in gcmp_aad_nonce() 81 nonce[11] = data[0]; /* PN0 */ in gcmp_aad_nonce() 89 u8 aad[30], nonce[12], *plain; in gcmp_decrypt() local [all …]
|
D | bip.c | 195 u8 nonce[12], *npos; in bip_gmac_protect() local 228 os_memcpy(nonce, hdr->addr2, ETH_ALEN); in bip_gmac_protect() 229 npos = nonce + ETH_ALEN; in bip_gmac_protect() 236 wpa_hexdump(MSG_EXCESSIVE, "BIP-GMAC: Nonce", nonce, sizeof(nonce)); in bip_gmac_protect() 239 if (aes_gmac(igtk, igtk_len, nonce, sizeof(nonce), in bip_gmac_protect() 264 u8 nonce[12], *npos; in bip_gmac_protect_s1g_beacon() local 352 os_memcpy(nonce, hdr->sa, ETH_ALEN); in bip_gmac_protect_s1g_beacon() 353 npos = nonce + ETH_ALEN; in bip_gmac_protect_s1g_beacon() 360 wpa_hexdump(MSG_EXCESSIVE, "S1G BIP-GMAC Nonce", nonce, sizeof(nonce)); in bip_gmac_protect_s1g_beacon() 363 if (aes_gmac(igtk, igtk_len, nonce, sizeof(nonce), buf, buf_len, pos) < in bip_gmac_protect_s1g_beacon()
|
D | rx_tdls.c | 77 const u8 *nonce[2]; in tdls_derive_tpk() local 95 nonce[0] = f->anonce; in tdls_derive_tpk() 96 nonce[1] = f->snonce; in tdls_derive_tpk() 98 nonce[0] = f->snonce; in tdls_derive_tpk() 99 nonce[1] = f->anonce; in tdls_derive_tpk() 101 sha256_vector(2, nonce, len, key_input); in tdls_derive_tpk()
|
/hostap-latest/src/crypto/ |
D | aes-ccm.c | 28 static void aes_ccm_auth_start(void *aes, size_t M, size_t L, const u8 *nonce, in aes_ccm_auth_start() argument 40 os_memcpy(&b[1], nonce, 15 - L); in aes_ccm_auth_start() 84 static void aes_ccm_encr_start(size_t L, const u8 *nonce, u8 *a) in aes_ccm_encr_start() argument 88 os_memcpy(&a[1], nonce, 15 - L); in aes_ccm_encr_start() 148 int aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, in aes_ccm_ae() argument 163 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, plain_len, x); in aes_ccm_ae() 167 aes_ccm_encr_start(L, nonce, a); in aes_ccm_ae() 178 int aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce, in aes_ccm_ad() argument 195 aes_ccm_encr_start(L, nonce, a); in aes_ccm_ad() 201 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, crypt_len, x); in aes_ccm_ad()
|
D | aes_wrap.h | 36 int __must_check aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, 38 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, 41 const u8 *nonce, size_t nonce_len, 45 const u8 *nonce, size_t nonce_len, 65 int __must_check aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, 68 int __must_check aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
|
D | aes-ctr.c | 25 int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, in aes_ctr_encrypt() argument 37 os_memcpy(counter, nonce, AES_BLOCK_SIZE); in aes_ctr_encrypt() 67 int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, in aes_128_ctr_encrypt() argument 70 return aes_ctr_encrypt(key, 16, nonce, data, data_len); in aes_128_ctr_encrypt()
|
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 53 os_memcpy(buf + 16, nonce, nonce_len); 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 117 os_memcpy(buf + 16, nonce, nonce_len); in aes_128_eax_decrypt()
|
D | crypto_module_tests.c | 305 u8 nonce[] = { 0xBE, 0xCA, 0xF0, 0x43, 0xB0, 0xA2, 0x3D, 0x84, in test_eax() local 314 if (aes_128_eax_encrypt(key, nonce, sizeof(nonce), hdr, sizeof(hdr), in test_eax() 330 if (aes_128_eax_decrypt(key, nonce, sizeof(nonce), hdr, sizeof(hdr), in test_eax()
|
/hostap-latest/src/eap_peer/ |
D | eap_psk.c | 184 u8 *buf, *rpchannel, nonce[16], *decrypted; in eap_psk_process_3() local 258 os_memset(nonce, 0, 12); in eap_psk_process_3() 259 os_memcpy(nonce + 12, pchannel, 4); in eap_psk_process_3() 270 nonce, sizeof(nonce)); in eap_psk_process_3() 282 if (aes_128_eax_decrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_3() 327 inc_byte_array(nonce, sizeof(nonce)); in eap_psk_process_3() 328 os_memcpy(rpchannel, nonce + 12, 4); in eap_psk_process_3() 346 if (aes_128_eax_encrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_3()
|
D | eap_fast.c | 623 _bind->nonce, sizeof(_bind->nonce)); in eap_fast_validate_crypto_binding() 653 os_memcpy(rbind->nonce, _bind->nonce, sizeof(_bind->nonce)); in eap_fast_write_crypto_binding() 654 inc_byte_array(rbind->nonce, sizeof(rbind->nonce)); in eap_fast_write_crypto_binding() 662 rbind->nonce, sizeof(rbind->nonce)); in eap_fast_write_crypto_binding()
|
D | eap_teap.c | 656 cb->nonce, sizeof(cb->nonce)); in eap_teap_validate_crypto_binding() 672 if (cb->nonce[EAP_TEAP_NONCE_LEN - 1] & 0x01) { in eap_teap_validate_crypto_binding() 702 os_memcpy(rbind->nonce, cb->nonce, sizeof(cb->nonce)); in eap_teap_write_crypto_binding() 703 inc_byte_array(rbind->nonce, sizeof(rbind->nonce)); in eap_teap_write_crypto_binding() 721 rbind->nonce, sizeof(rbind->nonce)); in eap_teap_write_crypto_binding()
|
/hostap-latest/src/eap_server/ |
D | eap_server_psk.c | 94 u8 *buf, *pchannel, nonce[16]; in eap_psk_build_3() local 133 os_memset(nonce, 0, sizeof(nonce)); in eap_psk_build_3() 135 os_memcpy(pchannel, nonce + 12, 4); in eap_psk_build_3() 140 if (aes_128_eax_encrypt(data->tek, nonce, sizeof(nonce), in eap_psk_build_3() 333 u8 *decrypted, nonce[16]; in eap_psk_process_4() local 365 os_memset(nonce, 0, 12); in eap_psk_process_4() 366 os_memcpy(nonce + 12, pos, 4); in eap_psk_process_4() 377 if (aes_128_eax_decrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_4()
|
D | eap_server_fast.c | 636 if (random_get_bytes(binding->nonce, sizeof(binding->nonce)) < 0) { in eap_fast_build_crypto_binding() 645 binding->nonce[sizeof(binding->nonce) - 1] &= ~0x01; in eap_fast_build_crypto_binding() 647 os_memcpy(data->crypto_binding_nonce, binding->nonce, in eap_fast_build_crypto_binding() 648 sizeof(binding->nonce)); in eap_fast_build_crypto_binding() 665 binding->nonce, sizeof(binding->nonce)); in eap_fast_build_crypto_binding() 1194 b->nonce, sizeof(b->nonce)); in eap_fast_validate_crypto_binding() 1213 if (os_memcmp_const(data->crypto_binding_nonce, b->nonce, 31) != 0 || in eap_fast_validate_crypto_binding() 1214 (data->crypto_binding_nonce[31] | 1) != b->nonce[31]) { in eap_fast_validate_crypto_binding()
|
D | eap_server_teap.c | 673 if (random_get_bytes(cb->nonce, sizeof(cb->nonce)) < 0) { in eap_teap_build_crypto_binding() 682 cb->nonce[sizeof(cb->nonce) - 1] &= ~0x01; in eap_teap_build_crypto_binding() 684 os_memcpy(data->crypto_binding_nonce, cb->nonce, sizeof(cb->nonce)); in eap_teap_build_crypto_binding() 705 cb->nonce, sizeof(cb->nonce)); in eap_teap_build_crypto_binding() 1425 cb->nonce, sizeof(cb->nonce)); in eap_teap_validate_crypto_binding() 1453 if (os_memcmp_const(data->crypto_binding_nonce, cb->nonce, in eap_teap_validate_crypto_binding() 1456 cb->nonce[EAP_TEAP_NONCE_LEN - 1]) { in eap_teap_validate_crypto_binding()
|
D | eap_server_eke.c | 594 u8 nonce[EAP_EKE_MAX_NONCE_LEN]; in eap_eke_process_confirm() local 612 decrypt_len = sizeof(nonce); in eap_eke_process_confirm() 614 nonce, &decrypt_len) < 0) { in eap_eke_process_confirm() 625 nonce, data->sess.nonce_len); in eap_eke_process_confirm() 626 if (os_memcmp(nonce, data->nonce_s, data->sess.nonce_len) != 0) { in eap_eke_process_confirm()
|
/hostap-latest/src/wps/ |
D | wps_validate.c | 870 static int wps_validate_r_snonce1(const u8 *nonce, int mandatory) in wps_validate_r_snonce1() argument 872 if (nonce == NULL) { in wps_validate_r_snonce1() 884 static int wps_validate_r_snonce2(const u8 *nonce, int mandatory) in wps_validate_r_snonce2() argument 886 if (nonce == NULL) { in wps_validate_r_snonce2() 898 static int wps_validate_e_snonce1(const u8 *nonce, int mandatory) in wps_validate_e_snonce1() argument 900 if (nonce == NULL) { in wps_validate_e_snonce1() 912 static int wps_validate_e_snonce2(const u8 *nonce, int mandatory) in wps_validate_e_snonce2() argument 914 if (nonce == NULL) { in wps_validate_e_snonce2()
|
/hostap-latest/src/eap_common/ |
D | ikev2_common.h | 290 const u8 *nonce, size_t nonce_len, 308 const u8 *nonce; member
|
D | ikev2_common.c | 317 payloads->nonce = pdata; in ikev2_parse_payloads() 373 const u8 *nonce, size_t nonce_len, in ikev2_derive_auth_data() argument 384 shared_secret == NULL || nonce == NULL || prf == NULL) in ikev2_derive_auth_data() 409 os_memcpy(pos, nonce, nonce_len); in ikev2_derive_auth_data()
|
D | eap_tlv_common.h | 76 u8 nonce[32]; member
|
D | eap_teap_common.h | 77 u8 nonce[EAP_TEAP_NONCE_LEN]; member
|
/hostap-latest/port/mbedtls/ |
D | supp_psa_api.h | 41 int aes_ctr_encrypt_psa(const u8 *key, size_t key_len, const u8 *nonce, u8 *data, size_t data_len);
|
D | supp_psa_api.c | 234 int aes_ctr_encrypt_psa(const u8 *key, size_t key_len, const u8 *nonce, u8 *data, size_t data_len) in aes_ctr_encrypt_psa() argument 259 status = psa_cipher_set_iv(&operation, nonce, PSA_CIPHER_IV_LENGTH(key_type, alg)); in aes_ctr_encrypt_psa()
|
/hostap-latest/src/rsn_supp/ |
D | tdls.c | 432 const u8 *nonce[2]; in wpa_tdls_generate_tpk() local 443 nonce[0] = peer->inonce; in wpa_tdls_generate_tpk() 444 nonce[1] = peer->rnonce; in wpa_tdls_generate_tpk() 446 nonce[0] = peer->rnonce; in wpa_tdls_generate_tpk() 447 nonce[1] = peer->inonce; in wpa_tdls_generate_tpk() 449 wpa_hexdump(MSG_DEBUG, "TDLS: min(Nonce)", nonce[0], WPA_NONCE_LEN); in wpa_tdls_generate_tpk() 450 wpa_hexdump(MSG_DEBUG, "TDLS: max(Nonce)", nonce[1], WPA_NONCE_LEN); in wpa_tdls_generate_tpk() 451 sha256_vector(2, nonce, len, key_input); in wpa_tdls_generate_tpk() 1929 static int tdls_nonce_set(const u8 *nonce) in tdls_nonce_set() argument 1934 if (nonce[i]) in tdls_nonce_set()
|
/hostap-latest/src/pasn/ |
D | pasn_initiator.c | 214 if (random_get_bytes(pasn->fils.nonce, FILS_NONCE_LEN) < 0 || in wpas_pasn_fils_build_auth() 218 wpa_hexdump(MSG_DEBUG, "PASN: FILS: Nonce", pasn->fils.nonce, in wpas_pasn_fils_build_auth() 244 wpabuf_put_data(buf, pasn->fils.nonce, FILS_NONCE_LEN); in wpas_pasn_fils_build_auth() 423 pasn->fils.nonce, anonce, NULL, 0, in wpas_pasn_wd_fils_rx()
|