Home
last modified time | relevance | path

Searched refs:mic (Results 1 – 25 of 27) sorted by relevance

12

/hostap-latest/wlantest/
Dtkip.c205 size_t data_len, u8 *mic) in michael_mic() argument
251 WPA_PUT_LE32(mic, l); in michael_mic()
252 WPA_PUT_LE32(mic + 4, r); in michael_mic()
305 u8 mic[8]; in tkip_decrypt() local
404 mic); in tkip_decrypt()
405 if (os_memcmp(mic, full_payload + full_payload_len - 8, 8) != 0) { in tkip_decrypt()
408 wpa_hexdump(MSG_DEBUG, "TKIP: Calculated MIC", mic, 8); in tkip_decrypt()
442 u8 mic[8]; in tkip_encrypt() local
459 michael_mic(mic_key, michael_hdr, frame + hdrlen, len - hdrlen, mic); in tkip_encrypt()
460 wpa_hexdump(MSG_EXCESSIVE, "TKIP: MIC", mic, sizeof(mic)); in tkip_encrypt()
[all …]
Drx_tdls.c139 u8 mic[16]; in tdls_verify_mic() local
178 os_memset(tmp_ftie->mic, 0, 16); in tdls_verify_mic()
183 ret = omac1_aes_128(tdls->tpk.kck, buf, pos - buf, mic); in tdls_verify_mic()
187 wpa_hexdump(MSG_DEBUG, "TDLS: FTIE MIC", mic, 16); in tdls_verify_mic()
190 if (os_memcmp(mic, rx_ftie->mic, 16) == 0) { in tdls_verify_mic()
487 u8 mic[16]; in tdls_verify_mic_teardown() local
517 os_memset(tmp_ftie->mic, 0, 16); in tdls_verify_mic_teardown()
522 ret = omac1_aes_128(tdls->tpk.kck, buf, pos - buf, mic); in tdls_verify_mic_teardown()
526 wpa_hexdump(MSG_DEBUG, "TDLS: FTIE MIC", mic, 16); in tdls_verify_mic_teardown()
529 if (os_memcmp(mic, rx_ftie->mic, 16) == 0) { in tdls_verify_mic_teardown()
Drx_eapol.c95 const u8 *key_data, *mic; in rx_data_eapol_key_1_of_4() local
129 mic = (const u8 *) (hdr + 1); in rx_data_eapol_key_1_of_4()
146 key_data = mic + mic_len + 2; in rx_data_eapol_key_1_of_4()
147 key_data_len = WPA_GET_BE16(mic + mic_len); in rx_data_eapol_key_1_of_4()
361 const u8 *key_data, *kck, *mic; in rx_data_eapol_key_2_of_4() local
396 mic = (const u8 *) (hdr + 1); in rx_data_eapol_key_2_of_4()
410 key_data = mic + mic_len + 2; in rx_data_eapol_key_2_of_4()
411 key_data_len = WPA_GET_BE16(mic + mic_len); in rx_data_eapol_key_2_of_4()
582 const u8 *mic, *keydata; in decrypt_eapol_key_data() local
584 mic = (const u8 *) (hdr + 1); in decrypt_eapol_key_data()
[all …]
Dbip.c21 u8 mic[16]; in bip_protect() local
55 if (omac1_aes_128(igtk, buf, plen + 20 - 24, mic) < 0) { in bip_protect()
62 os_memcpy(pos, mic, igtk_len == 32 ? 16 : 8); in bip_protect()
78 u8 mic[16]; in bip_protect_s1g_beacon() local
173 if (omac1_aes_128(igtk, buf, buf_len, mic) < 0) { in bip_protect_s1g_beacon()
180 os_memcpy(pos, mic, mic_len); in bip_protect_s1g_beacon()
Dtest_vectors.c601 u8 mic[16]; member
651 .mic = {
707 .mic = {
759 if (os_memcmp(vector->mic, enc + enc_len - sizeof(vector->mic), in run_gcmp()
760 sizeof(vector->mic)) != 0) { in run_gcmp()
Drx_mgmt.c1570 u8 mic[WPA_EAPOL_KEY_MIC_MAX_LEN]; in rx_mgmt_reassoc_req() local
1635 fte_mic = fte->mic; in rx_mgmt_reassoc_req()
1648 fte_mic = fte->mic; in rx_mgmt_reassoc_req()
1735 mic) < 0) { in rx_mgmt_reassoc_req()
1742 if (os_memcmp_const(mic, fte_mic, mic_len) != 0) { in rx_mgmt_reassoc_req()
1752 mic, mic_len); in rx_mgmt_reassoc_req()
2187 u8 mic[WPA_EAPOL_KEY_MIC_MAX_LEN]; in rx_mgmt_reassoc_resp() local
2252 fte_mic = fte->mic; in rx_mgmt_reassoc_resp()
2265 fte_mic = fte->mic; in rx_mgmt_reassoc_resp()
2430 mic) < 0) { in rx_mgmt_reassoc_resp()
[all …]
/hostap-latest/src/pasn/
Dpasn_responder.c431 u8 mic[WPA_PASN_MAX_MIC_LEN]; in handle_auth_pasn_resp() local
560 frame, frame_len, mic); in handle_auth_pasn_resp()
570 mic[0] = ~mic[0]; in handle_auth_pasn_resp()
574 os_memcpy(ptr, mic, mic_len); in handle_auth_pasn_resp()
921 u8 mic[WPA_PASN_MAX_MIC_LEN], out_mic[WPA_PASN_MAX_MIC_LEN]; in handle_auth_pasn_3() local
938 if (!elems.mic || elems.mic_len != mic_len) { in handle_auth_pasn_3()
943 os_memcpy(mic, elems.mic, mic_len); in handle_auth_pasn_3()
968 mic_offset = elems.mic - (const u8 *) &mgmt->u.auth; in handle_auth_pasn_3()
983 wpa_hexdump_key(MSG_DEBUG, "PASN: Frame MIC", mic, mic_len); in handle_auth_pasn_3()
984 if (ret || os_memcmp(mic, out_mic, mic_len) != 0) { in handle_auth_pasn_3()
Dpasn_initiator.c622 u8 mic[WPA_PASN_MAX_MIC_LEN]; in wpas_pasn_build_auth_3() local
670 pasn->hash, mic_len * 2, data, data_len, mic); in wpas_pasn_build_auth_3()
679 mic[0] = ~mic[0]; in wpas_pasn_build_auth_3()
683 os_memcpy(ptr, mic, mic_len); in wpas_pasn_build_auth_3()
1068 u8 mic[WPA_PASN_MAX_MIC_LEN], out_mic[WPA_PASN_MAX_MIC_LEN]; in wpa_pasn_auth_rx() local
1108 if (!elems.mic || elems.mic_len != mic_len) { in wpa_pasn_auth_rx()
1114 os_memcpy(mic, elems.mic, mic_len); in wpa_pasn_auth_rx()
1257 if (!elems.mic) in wpa_pasn_auth_rx()
1259 mic_offset = elems.mic - (const u8 *) &mgmt->u.auth; in wpa_pasn_auth_rx()
1316 wpa_hexdump_key(MSG_DEBUG, "PASN: Frame MIC", mic, mic_len); in wpa_pasn_auth_rx()
[all …]
/hostap-latest/src/eap_server/
Deap_server_gpsk.c247 u8 mic[EAP_GPSK_MAX_MIC_LEN]; in eap_gpsk_process_gpsk_2() local
447 data->specifier, payload, pos - payload, mic) in eap_gpsk_process_gpsk_2()
453 if (os_memcmp_const(mic, pos, miclen) != 0) { in eap_gpsk_process_gpsk_2()
456 wpa_hexdump(MSG_DEBUG, "EAP-GPSK: Computed MIC", mic, miclen); in eap_gpsk_process_gpsk_2()
479 u8 mic[EAP_GPSK_MAX_MIC_LEN]; in eap_gpsk_process_gpsk_4() local
516 data->specifier, payload, pos - payload, mic) in eap_gpsk_process_gpsk_4()
522 if (os_memcmp_const(mic, pos, miclen) != 0) { in eap_gpsk_process_gpsk_4()
525 wpa_hexdump(MSG_DEBUG, "EAP-GPSK: Computed MIC", mic, miclen); in eap_gpsk_process_gpsk_4()
Deap_server_sake.c185 u8 *mic; in eap_sake_build_confirm() local
199 mic = wpabuf_put(msg, EAP_SAKE_MIC_LEN); in eap_sake_build_confirm()
203 wpabuf_head(msg), wpabuf_len(msg), mic, mic)) in eap_sake_build_confirm()
/hostap-latest/src/rsn_supp/
Dtdls.c56 u8 mic[TDLS_MIC_LEN]; member
496 const u8 *fte, size_t fte_len, u8 *mic) in wpa_tdls_ftie_mic() argument
532 os_memset(_ftie->mic, 0, TDLS_MIC_LEN); in wpa_tdls_ftie_mic()
537 ret = omac1_aes_128(kck, buf, pos - buf, mic); in wpa_tdls_ftie_mic()
539 wpa_hexdump(MSG_DEBUG, "TDLS: FTIE MIC", mic, 16); in wpa_tdls_ftie_mic()
559 const u8 *fte, size_t fte_len, u8 *mic) in wpa_tdls_key_mic_teardown() argument
592 os_memset(_ftie->mic, 0, TDLS_MIC_LEN); in wpa_tdls_key_mic_teardown()
597 ret = omac1_aes_128(kck, buf, pos - buf, mic); in wpa_tdls_key_mic_teardown()
599 wpa_hexdump(MSG_DEBUG, "TDLS: FTIE MIC", mic, 16); in wpa_tdls_key_mic_teardown()
610 u8 mic[16]; in wpa_supplicant_verify_tdls_mic() local
[all …]
Dwpa_ft.c363 fte_mic = ftie->mic; in wpa_ft_gen_req_ies()
377 fte_mic = ftie->mic; in wpa_ft_gen_req_ies()
389 fte_mic = ftie->mic; in wpa_ft_gen_req_ies()
1030 u8 mic[WPA_EAPOL_KEY_MIC_MAX_LEN]; in wpa_ft_validate_reassoc_resp() local
1165 mic) < 0) { in wpa_ft_validate_reassoc_resp()
1170 if (os_memcmp_const(mic, parse.fte_mic, mic_len) != 0) { in wpa_ft_validate_reassoc_resp()
1174 wpa_hexdump(MSG_MSGDUMP, "FT: Calculated MIC", mic, mic_len); in wpa_ft_validate_reassoc_resp()
Dwpa.c225 u8 *rbuf, *key_mic, *mic; in wpa_sm_key_request() local
277 mic = (u8 *) (reply + 1); in wpa_sm_key_request()
278 WPA_PUT_BE16(mic + mic_len, 0); in wpa_sm_key_request()
282 key_mic = mic; in wpa_sm_key_request()
3433 u8 mic[WPA_EAPOL_KEY_MIC_MAX_LEN]; in wpa_supplicant_verify_eapol_key_mic() local
3437 os_memcpy(mic, key + 1, mic_len); in wpa_supplicant_verify_eapol_key_mic()
3443 os_memcmp_const(mic, key + 1, mic_len) != 0) { in wpa_supplicant_verify_eapol_key_mic()
3477 os_memcmp_const(mic, key + 1, mic_len) != 0) { in wpa_supplicant_verify_eapol_key_mic()
3625 const u8 *mic, unsigned int mic_len) in wpa_eapol_key_dump() argument
3654 wpa_hexdump(MSG_DEBUG, " key_mic", mic, mic_len); in wpa_eapol_key_dump()
[all …]
/hostap-latest/src/eap_common/
Deap_gpsk_common.c501 const u8 *data, size_t len, u8 *mic) in eap_gpsk_compute_mic_aes() argument
509 return omac1_aes_128(sk, data, len, mic); in eap_gpsk_compute_mic_aes()
525 int specifier, const u8 *data, size_t len, u8 *mic) in eap_gpsk_compute_mic() argument
534 ret = eap_gpsk_compute_mic_aes(sk, sk_len, data, len, mic); in eap_gpsk_compute_mic()
538 ret = hmac_sha256(sk, sk_len, data, len, mic); in eap_gpsk_compute_mic()
Deap_gpsk_common.h64 int specifier, const u8 *data, size_t len, u8 *mic);
Deap_sake_common.c340 const u8 *mic_pos, u8 *mic) in eap_sake_compute_mic() argument
390 mic, EAP_SAKE_MIC_LEN); in eap_sake_compute_mic()
Deap_sake_common.h92 const u8 *mic_pos, u8 *mic);
/hostap-latest/wpa_supplicant/
Dmesh_rsn.c660 elems->mic ? (elems->mic - 2) - cat : 0 }; in mesh_rsn_process_ampe()
682 if (!elems->mic || elems->mic_len < AES_BLOCK_SIZE) { in mesh_rsn_process_ampe()
687 ampe_buf = (u8 *) elems->mic + elems->mic_len; in mesh_rsn_process_ampe()
691 crypt_len = elems_len - (elems->mic - start); in mesh_rsn_process_ampe()
705 os_memcpy(crypt, elems->mic, crypt_len); in mesh_rsn_process_ampe()
/hostap-latest/src/common/
Dwpa_common.h408 u8 mic[16]; member
416 u8 mic[24]; member
424 u8 mic[32]; member
463 const u8 *buf, size_t len, u8 *mic);
495 u8 *mic);
780 const u8 *frame, size_t frame_len, u8 *mic);
Dwpa_common.c209 const u8 *buf, size_t len, u8 *mic) in wpa_eapol_key_mic() argument
223 return hmac_md5(key, key_len, buf, len, mic); in wpa_eapol_key_mic()
229 os_memcpy(mic, hash, MD5_MAC_LEN); in wpa_eapol_key_mic()
233 return omac1_aes_128(key, buf, len, mic); in wpa_eapol_key_mic()
241 return omac1_aes_128(key, buf, len, mic); in wpa_eapol_key_mic()
266 os_memcpy(mic, hash, key_len); in wpa_eapol_key_mic()
273 return omac1_aes_128(key, buf, len, mic); in wpa_eapol_key_mic()
281 os_memcpy(mic, hash, MD5_MAC_LEN); in wpa_eapol_key_mic()
290 os_memcpy(mic, hash, 24); in wpa_eapol_key_mic()
313 os_memcpy(mic, hash, key_len); in wpa_eapol_key_mic()
[all …]
Dieee802_11_common.h79 const u8 *mic; member
/hostap-latest/src/eap_peer/
Deap_gpsk.c549 u8 mic[EAP_GPSK_MAX_MIC_LEN]; in eap_gpsk_validate_gpsk_3_mic() local
563 data->specifier, payload, pos - payload, mic) in eap_gpsk_validate_gpsk_3_mic()
568 if (os_memcmp_const(mic, pos, miclen) != 0) { in eap_gpsk_validate_gpsk_3_mic()
571 wpa_hexdump(MSG_DEBUG, "EAP-GPSK: Computed MIC", mic, miclen); in eap_gpsk_validate_gpsk_3_mic()
/hostap-latest/src/drivers/
Ddriver_bsd.c732 struct ieee80211_michael_event *mic; in bsd_wireless_event_receive() local
795 mic = (struct ieee80211_michael_event *) &ifan[1]; in bsd_wireless_event_receive()
798 "keyix=%u src_addr=" MACSTR, mic->iev_keyix, in bsd_wireless_event_receive()
799 MAC2STR(mic->iev_src)); in bsd_wireless_event_receive()
802 !IEEE80211_IS_MULTICAST(mic->iev_dst); in bsd_wireless_event_receive()
803 event.michael_mic_failure.src = mic->iev_src; in bsd_wireless_event_receive()
Ddriver_wext.c300 const struct iw_michaelmicfailure *mic; in wpa_driver_wext_event_wireless_michaelmicfailure() local
303 if (len < sizeof(*mic)) in wpa_driver_wext_event_wireless_michaelmicfailure()
306 mic = (const struct iw_michaelmicfailure *) ev; in wpa_driver_wext_event_wireless_michaelmicfailure()
309 "flags=0x%x src_addr=" MACSTR, mic->flags, in wpa_driver_wext_event_wireless_michaelmicfailure()
310 MAC2STR(mic->src_addr.sa_data)); in wpa_driver_wext_event_wireless_michaelmicfailure()
313 data.michael_mic_failure.unicast = !(mic->flags & IW_MICFAILURE_GROUP); in wpa_driver_wext_event_wireless_michaelmicfailure()
/hostap-latest/src/ap/
Dwpa_auth.c1546 u8 *mic; local
1565 mic = (u8 *) (key + 1);
1567 key_data = mic + mic_len + 2;
1568 key_data_length = WPA_GET_BE16(mic + mic_len);
1577 mic, mic_len);
2259 u8 mic[WPA_EAPOL_KEY_MIC_MAX_LEN], *mic_pos; local
2269 os_memcpy(mic, mic_pos, mic_len);
2274 os_memcmp_const(mic, mic_pos, mic_len) != 0)
2276 os_memcpy(mic_pos, mic, mic_len);
3636 const u8 *eapol_key_ie, *key_data, *mic; local
[all …]

12