Lines Matching refs:PTK

41 static int wpa_verify_key_mic(int akmp, size_t pmk_len, struct wpa_ptk *PTK,
864 struct wpa_ptk PTK; in wpa_try_alt_snonce() local
870 os_memset(&PTK, 0, sizeof(PTK)); in wpa_try_alt_snonce()
890 if (wpa_derive_ptk(sm, sm->alt_SNonce, pmk, pmk_len, &PTK) < 0) in wpa_try_alt_snonce()
893 if (wpa_verify_key_mic(sm->wpa_key_mgmt, pmk_len, &PTK, in wpa_try_alt_snonce()
923 os_memcpy(&sm->PTK, &PTK, sizeof(PTK)); in wpa_try_alt_snonce()
1240 wpa_verify_key_mic(sm->wpa_key_mgmt, sm->pmk_len, &sm->PTK, in wpa_receive()
1255 wpa_aead_decrypt(sm, &sm->PTK, data, data_len, in wpa_receive()
1529 sm->PTK.kek, sm->PTK.kek_len); in __wpa_send_eapol()
1534 if (aes_siv_encrypt(sm->PTK.kek, sm->PTK.kek_len, kde, kde_len, in __wpa_send_eapol()
1563 (unsigned int) sm->PTK.kek_len); in __wpa_send_eapol()
1564 if (aes_wrap(sm->PTK.kek, sm->PTK.kek_len, in __wpa_send_eapol()
1572 } else if (sm->PTK.kek_len == 16) { in __wpa_send_eapol()
1581 os_memcpy(ek + 16, sm->PTK.kek, sm->PTK.kek_len); in __wpa_send_eapol()
1603 if (wpa_eapol_key_mic(sm->PTK.kck, sm->PTK.kck_len, in __wpa_send_eapol()
1666 static int wpa_verify_key_mic(int akmp, size_t pmk_len, struct wpa_ptk *PTK, in wpa_verify_key_mic() argument
1685 if (wpa_eapol_key_mic(PTK->kck, PTK->kck_len, akmp, in wpa_verify_key_mic()
1698 os_memset(&sm->PTK, 0, sizeof(sm->PTK)); in wpa_remove_ptk()
1814 os_memset(&sm->PTK, 0, sizeof(sm->PTK)); in wpa_auth_sm_event()
1887 os_memset(&sm->PTK, 0, sizeof(sm->PTK)); in SM_STATE()
2207 &sm->PTK, ick, &ick_len, in fils_auth_pmk_to_ptk()
2492 if (aes_siv_decrypt(sm->PTK.kek, sm->PTK.kek_len, crypt, end - crypt, in fils_decrypt_assoc()
2569 if (aes_siv_encrypt(sm->PTK.kek, sm->PTK.kek_len, in fils_encrypt_assoc()
2696 sm->PTK.tk, klen)) { in fils_set_tk()
2756 struct wpa_ptk PTK; in SM_STATE() local
2772 os_memset(&PTK, 0, sizeof(PTK)); in SM_STATE()
2799 if (wpa_derive_ptk(sm, sm->SNonce, pmk, pmk_len, &PTK) < 0) in SM_STATE()
2803 wpa_verify_key_mic(sm->wpa_key_mgmt, pmk_len, &PTK, in SM_STATE()
2816 wpa_aead_decrypt(sm, &PTK, sm->last_rx_eapol_key, in SM_STATE()
2975 os_memcpy(&sm->PTK, &PTK, sizeof(PTK)); in SM_STATE()
3288 sm->PTK.tk, klen)) { in SM_STATE()
4318 sm->PTK.kck, sm->PTK.kck_len, in wpa_auth_pmksa_add()
4845 os_memcpy(fils_kek, sm->PTK.kek, WPA_KEK_MAX_LEN); in wpa_auth_get_fils_aead_params()
4846 *fils_kek_len = sm->PTK.kek_len; in wpa_auth_get_fils_aead_params()