Home
last modified time | relevance | path

Searched refs:data_len (Results 1 – 25 of 145) sorted by relevance

123456

/hostap-3.7.0/src/eap_common/
Deap_eke_common.c184 size_t data_len, const u8 *data2, size_t data2_len, in eap_eke_prf() argument
192 len[0] = data_len; in eap_eke_prf()
209 size_t data_len, u8 *res, size_t len) in eap_eke_prf_hmac_sha1() argument
221 vlen[1] = data_len; in eap_eke_prf_hmac_sha1()
250 size_t data_len, u8 *res, size_t len) in eap_eke_prf_hmac_sha256() argument
262 vlen[1] = data_len; in eap_eke_prf_hmac_sha256()
291 const u8 *data, size_t data_len, u8 *res, size_t len) in eap_eke_prfplus() argument
294 return eap_eke_prf_hmac_sha1(key, key_len, data, data_len, res, in eap_eke_prfplus()
297 return eap_eke_prf_hmac_sha256(key, key_len, data, data_len, in eap_eke_prfplus()
429 size_t data_len; in eap_eke_derive_ke_ki() local
[all …]
Deap_gpsk_common.c39 const u8 *data /* Z */, size_t data_len, in eap_gpsk_gkdf_cmac() argument
53 vlen[1] = data_len; in eap_gpsk_gkdf_cmac()
74 const u8 *data /* Z */, size_t data_len, in eap_gpsk_gkdf_sha256() argument
88 vlen[1] = data_len; in eap_gpsk_gkdf_sha256()
117 size_t data_len, mk_len; in eap_gpsk_derive_keys_helper() local
140 data_len = 2 + psk_len + 6 + seed_len; in eap_gpsk_derive_keys_helper()
141 data = os_malloc(data_len); in eap_gpsk_derive_keys_helper()
155 data, data_len); in eap_gpsk_derive_keys_helper()
157 if (gkdf(psk, data, data_len, mk, mk_len) < 0) { in eap_gpsk_derive_keys_helper()
349 size_t data_len; in eap_gpsk_derive_mid_helper() local
[all …]
/hostap-3.7.0/src/crypto/
Daes-eax.c30 u8 *data, size_t data_len, u8 *tag) in aes_128_eax_encrypt() argument
38 if (nonce_len > data_len) in aes_128_eax_encrypt()
41 buf_len = data_len; in aes_128_eax_encrypt()
62 if (aes_128_ctr_encrypt(key, nonce_mac, data, data_len)) in aes_128_eax_encrypt()
65 os_memcpy(buf + 16, data, data_len); in aes_128_eax_encrypt()
66 if (omac1_aes_128(key, buf, 16 + data_len, data_mac)) in aes_128_eax_encrypt()
94 u8 *data, size_t data_len, const u8 *tag) in aes_128_eax_decrypt() argument
102 if (nonce_len > data_len) in aes_128_eax_decrypt()
105 buf_len = data_len; in aes_128_eax_decrypt()
131 os_memcpy(buf + 16, data, data_len); in aes_128_eax_decrypt()
[all …]
Daes_wrap.h31 int __must_check omac1_aes_128(const u8 *key, const u8 *data, size_t data_len,
33 int __must_check omac1_aes_256(const u8 *key, const u8 *data, size_t data_len,
37 u8 *data, size_t data_len);
39 u8 *data, size_t data_len);
43 u8 *data, size_t data_len, u8 *tag);
47 u8 *data, size_t data_len, const u8 *tag);
49 size_t data_len);
51 size_t data_len);
Dcrypto_mbedtls.c226 const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) in hmac_sha384() argument
228 return hmac_sha384_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha384()
240 const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) in hmac_sha256() argument
242 return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha256()
254 const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) in hmac_md5() argument
256 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5()
268 const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) in hmac_sha1() argument
270 return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha1()
335 int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len) in aes_128_cbc_encrypt() argument
351 &ctx, MBEDTLS_AES_ENCRYPT, data_len, cbc, data, data); in aes_128_cbc_encrypt()
[all …]
Dcrypto_linux.c179 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument
182 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5()
194 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument
197 return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha1()
210 size_t data_len, u8 *mac) in hmac_sha256() argument
212 return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha256()
225 size_t data_len, u8 *mac) in hmac_sha384() argument
227 return hmac_sha384_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha384()
538 u8 *data, size_t data_len) in rc4_skip() argument
561 io[1].iov_len = data_len; in rc4_skip()
[all …]
Daes-ctr.c26 u8 *data, size_t data_len) in aes_ctr_encrypt() argument
29 size_t j, len, left = data_len; in aes_ctr_encrypt()
68 u8 *data, size_t data_len) in aes_128_ctr_encrypt() argument
70 return aes_ctr_encrypt(key, 16, nonce, data, data_len); in aes_128_ctr_encrypt()
Daes-siv.c72 size_t data_len[1]; in aes_s2v() local
78 data_len[0] = sizeof(tmp); in aes_s2v()
79 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v()
83 data_len[0] = sizeof(zero); in aes_s2v()
84 ret = omac1_aes_vector(key, key_len, 1, data, data_len, tmp); in aes_s2v()
114 data_len[0] = sizeof(tmp); in aes_s2v()
115 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v()
Dsha256-prf.c31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha256_prf() argument
33 return sha256_prf_bits(key, key_len, label, data, data_len, buf, in sha256_prf()
55 const u8 *data, size_t data_len, u8 *buf, in sha256_prf_bits() argument
71 len[2] = data_len; in sha256_prf_bits()
Dsha384-prf.c31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha384_prf() argument
33 return sha384_prf_bits(key, key_len, label, data, data_len, buf, in sha384_prf()
55 const u8 *data, size_t data_len, u8 *buf, in sha384_prf_bits() argument
71 len[2] = data_len; in sha384_prf_bits()
Dsha512-prf.c31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha512_prf() argument
33 return sha512_prf_bits(key, key_len, label, data, data_len, buf, in sha512_prf()
55 const u8 *data, size_t data_len, u8 *buf, in sha512_prf_bits() argument
71 len[2] = data_len; in sha512_prf_bits()
Daes-cbc.c24 int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len) in aes_128_cbc_encrypt() argument
39 blocks = data_len / AES_BLOCK_SIZE; in aes_128_cbc_encrypt()
60 int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len) in aes_128_cbc_decrypt() argument
75 blocks = data_len / AES_BLOCK_SIZE; in aes_128_cbc_decrypt()
Dcrypto_nettle.c126 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument
129 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5()
151 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument
154 return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha1()
179 size_t data_len, u8 *mac) in hmac_sha256() argument
181 return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha256()
208 size_t data_len, u8 *mac) in hmac_sha384() argument
210 return hmac_sha384_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha384()
237 size_t data_len, u8 *mac) in hmac_sha512() argument
239 return hmac_sha512_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha512()
Daes-omac1.c152 int omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, u8 *mac) in omac1_aes_128() argument
154 return omac1_aes_128_vector(key, 1, &data, &data_len, mac); in omac1_aes_128()
170 int omac1_aes_256(const u8 *key, const u8 *data, size_t data_len, u8 *mac) in omac1_aes_256() argument
172 return omac1_aes_vector(key, 32, 1, &data, &data_len, mac); in omac1_aes_256()
Dcrypto_gnutls.c136 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument
139 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5()
151 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument
154 return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha1()
169 size_t data_len, u8 *mac) in hmac_sha256() argument
171 return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha256()
188 size_t data_len, u8 *mac) in hmac_sha384() argument
190 return hmac_sha384_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha384()
207 size_t data_len, u8 *mac) in hmac_sha512() argument
209 return hmac_sha512_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha512()
/hostap-3.7.0/wlantest/
Dwep.c47 size_t data_len, u8 *plain) in try_wep() argument
60 os_memcpy(plain, data, data_len); in try_wep()
61 wep_crypt(k, plain, data_len); in try_wep()
62 icv = crc32(plain, data_len - 4); in try_wep()
63 rx_icv = WPA_GET_LE32(plain + data_len - 4); in try_wep()
72 const u8 *data, size_t data_len, size_t *decrypted_len) in wep_decrypt() argument
82 if (data_len < 4 + 4) in wep_decrypt()
84 plain = os_malloc(data_len - 4); in wep_decrypt()
91 if (try_wep(key, 3 + w->key_len, data + 4, data_len - 4, plain) in wep_decrypt()
102 *decrypted_len = data_len - 4 - 4; in wep_decrypt()
/hostap-3.7.0/tests/fuzzing/eapol-supp/
Deapol-supp.c21 size_t data_len; member
34 wpa_hexdump(MSG_MSGDUMP, "fuzzer - EAPOL", ctx->data, ctx->data_len); in test_send_eapol()
47 if (eapol_sm_rx_eapol(ctx->eapol, src, ctx->data, ctx->data_len) <= 0) in test_send_eapol()
48 wpa_sm_rx_eapol(ctx->wpa, src, ctx->data, ctx->data_len); in test_send_eapol()
71 const void *data, u16 data_len, in alloc_eapol() argument
76 *msg_len = sizeof(*hdr) + data_len; in alloc_eapol()
83 hdr->length = host_to_be16(data_len); in alloc_eapol()
86 os_memcpy(hdr + 1, data, data_len); in alloc_eapol()
88 os_memset(hdr + 1, 0, data_len); in alloc_eapol()
178 ctx.data_len = size; in LLVMFuzzerTestOneInput()
/hostap-3.7.0/port/mbedtls/
Dsupp_psa_api.c145 int aes_128_cbc_encrypt_psa(const u8 *key, const u8 *iv, u8 *data, size_t data_len) in aes_128_cbc_encrypt_psa() argument
155 if (data_len > SUPP_PSA_MAX_OUTPUT_SIZE) in aes_128_cbc_encrypt_psa()
157 printk("%s invalid input len %d", __func__, data_len); in aes_128_cbc_encrypt_psa()
173 memset(supp_psa_outbuf, 0x0, data_len); in aes_128_cbc_encrypt_psa()
174 …status = supp_psa_cipher_operation(&operation, data, data_len, PSA_BLOCK_CIPHER_BLOCK_LENGTH(key_t… in aes_128_cbc_encrypt_psa()
175 supp_psa_outbuf, data_len, &out_len); in aes_128_cbc_encrypt_psa()
188 int aes_128_cbc_decrypt_psa(const u8 *key, const u8 *iv, u8 *data, size_t data_len) in aes_128_cbc_decrypt_psa() argument
198 if (data_len > SUPP_PSA_MAX_OUTPUT_SIZE) in aes_128_cbc_decrypt_psa()
200 printk("%s invalid input len %d", __func__, data_len); in aes_128_cbc_decrypt_psa()
216 memset(supp_psa_outbuf, 0x0, data_len); in aes_128_cbc_decrypt_psa()
[all …]
/hostap-3.7.0/src/drivers/
Ddriver_ndis_.c25 const u8 *data, size_t data_len);
46 size_t data_len = 0; in wpa_driver_ndis_event_process() local
56 data_len = (int) *pos++ << 8; in wpa_driver_ndis_event_process()
57 data_len += *pos++; in wpa_driver_ndis_event_process()
58 if (data_len > (size_t) (buf + len - pos)) { in wpa_driver_ndis_event_process()
63 wpa_hexdump(MSG_MSGDUMP, "NDIS: event data", data, data_len); in wpa_driver_ndis_event_process()
74 wpa_driver_ndis_event_media_specific(drv, data, data_len); in wpa_driver_ndis_event_process()
/hostap-3.7.0/tests/fuzzing/p2p/
Dp2p.c102 size_t data_len; member
113 wpa_hexdump(MSG_MSGDUMP, "fuzzer - IEs", ctx->data, ctx->data_len); in test_send()
117 &rx_time, 0, ctx->data, ctx->data_len); in test_send()
123 ctx->data, ctx->data_len, 2412, 0); in test_send()
125 if (ctx->data_len >= IEEE80211_HDRLEN + 1) { in test_send()
134 ctx->data_len - IEEE80211_HDRLEN - 1, 2412); in test_send()
165 ctx.data_len = size; in LLVMFuzzerTestOneInput()
/hostap-3.7.0/tests/fuzzing/eapol-key-supp/
Deapol-key-supp.c19 size_t data_len; member
46 if (wpa->data_len - wpa->data_offset < 2) { in read_msg()
57 if (msg_len > 0 && wpa->data_len - wpa->data_offset < msg_len) { in read_msg()
123 u16 data_len, size_t *msg_len, void **data_pos) in supp_alloc_eapol() argument
128 __func__, type, data_len); in supp_alloc_eapol()
130 *msg_len = sizeof(*hdr) + data_len; in supp_alloc_eapol()
137 hdr->length = host_to_be16(data_len); in supp_alloc_eapol()
140 os_memcpy(hdr + 1, data, data_len); in supp_alloc_eapol()
142 os_memset(hdr + 1, 0, data_len); in supp_alloc_eapol()
305 wpa.data_len = size; in LLVMFuzzerTestOneInput()
/hostap-3.7.0/src/ap/
Dwpa_auth_glue.c509 const u8 *data, size_t data_len, in hostapd_wpa_auth_send_eapol() argument
518 size_t hex_len = 2 * data_len + 1; in hostapd_wpa_auth_send_eapol()
523 wpa_snprintf_hex(hex, hex_len, data, data_len); in hostapd_wpa_auth_send_eapol()
535 return hostapd_drv_hapd_send_eapol(hapd, addr, data, data_len, in hostapd_wpa_auth_send_eapol()
594 size_t data_len; member
608 data->data_len); in hostapd_wpa_ft_rrb_rx_later()
620 size_t data_len; member
652 data = os_zalloc(sizeof(*data) + idata->data_len); in hostapd_wpa_auth_ft_iter()
657 os_memcpy(data + 1, idata->data, idata->data_len); in hostapd_wpa_auth_ft_iter()
658 data->data_len = idata->data_len; in hostapd_wpa_auth_ft_iter()
[all …]
Dtaxonomy.c54 const u8 *data, size_t data_len) in get_wps_name() argument
59 while (data_len >= 4) { in get_wps_name()
65 data_len -= 4; in get_wps_name()
67 if (elen > data_len) in get_wps_name()
78 data_len -= elen; in get_wps_name()
140 size_t data_len = elen - 4; in ie_to_string() local
144 data_len)) { in ie_to_string()
/hostap-3.7.0/tests/fuzzing/wnm/
Dwnm.c25 size_t data_len; member
39 wpa_hexdump(MSG_MSGDUMP, "fuzzer - WNM", ctx->data, ctx->data_len); in test_send_wnm()
42 ieee802_11_rx_wnm_action(&ctx->wpa_s, mgmt, ctx->data_len); in test_send_wnm()
83 ctx.data_len = size; in LLVMFuzzerTestOneInput()
/hostap-3.7.0/wpa_supplicant/
Dpreauth_test.c51 const void *data, u16 data_len, in wpa_alloc_eapol() argument
56 *msg_len = sizeof(*hdr) + data_len; in wpa_alloc_eapol()
63 hdr->length = htons(data_len); in wpa_alloc_eapol()
66 os_memcpy(hdr + 1, data, data_len); in wpa_alloc_eapol()
68 os_memset(hdr + 1, 0, data_len); in wpa_alloc_eapol()
78 const void *data, u16 data_len, in _wpa_alloc_eapol() argument
81 return wpa_alloc_eapol(wpa_s, type, data, data_len, msg_len, data_pos); in _wpa_alloc_eapol()

123456