/hostap-latest/wlantest/ |
D | test_vectors.c | 20 u8 tk[] = { in test_vector_tkip() local 52 wpa_hexdump(MSG_INFO, "TK", tk, sizeof(tk)); in test_vector_tkip() 56 enc = tkip_encrypt(tk, frame, sizeof(frame), 24, NULL, pn, 0, &enc_len); in test_vector_tkip() 65 plain = tkip_decrypt(tk, (const struct ieee80211_hdr *) enc, in test_vector_tkip() 87 u8 tk[] = { 0xc9, 0x7c, 0x1f, 0x67, 0xce, 0x37, 0x11, 0x85, in test_vector_ccmp() local 105 wpa_hexdump(MSG_INFO, "TK", tk, sizeof(tk)); in test_vector_ccmp() 110 enc = ccmp_encrypt(tk, frame, sizeof(frame), 24, NULL, NULL, NULL, NULL, in test_vector_ccmp() 122 plain = ccmp_decrypt(tk, (const struct ieee80211_hdr *) enc, in test_vector_ccmp() 145 u8 tk[] = { 0xc9, 0x7c, 0x1f, 0x67, 0xce, 0x37, 0x11, 0x85, in test_vector_ccmp_pv1() local 196 wpa_hexdump(MSG_INFO, "TK", tk, sizeof(tk)); in test_vector_ccmp_pv1() [all …]
|
D | rx_data.c | 164 decrypted = ccmp_decrypt(ptk->tk, hdr, a1, a2, a3, data, in try_ptk() 168 decrypted = ccmp_256_decrypt(ptk->tk, hdr, a1, a2, a3, data, in try_ptk() 174 decrypted = gcmp_decrypt(ptk->tk, tk_len, hdr, a1, a2, a3, in try_ptk() 180 decrypted = tkip_decrypt(ptk->tk, hdr, data, data_len, in try_ptk() 210 write_decrypted_note(wt, decrypted, ptk->ptk.tk, in try_all_ptk() 384 const u8 *tk, size_t tk_len, size_t *dlen) in try_ptk_decrypt() argument 389 decrypted = ccmp_256_decrypt(tk, hdr, a1, a2, a3, in try_ptk_decrypt() 393 decrypted = gcmp_decrypt(tk, tk_len, hdr, a1, a2, a3, in try_ptk_decrypt() 396 decrypted = ccmp_decrypt(tk, hdr, a1, a2, a3, data, len, dlen); in try_ptk_decrypt() 397 write_decrypted_note(wt, decrypted, tk, tk_len, keyid); in try_ptk_decrypt() [all …]
|
D | inject.c | 174 const u8 *tk = NULL; in wlantest_inject_prot() local 204 tk = tdls->tpk.tk; in wlantest_inject_prot() 210 if (tk == NULL && sta == NULL) { in wlantest_inject_prot() 218 if (tk == NULL && !sta->ptk_set) { in wlantest_inject_prot() 235 if (tk) { in wlantest_inject_prot() 247 if (tk) in wlantest_inject_prot() 248 crypt = ccmp_encrypt(incorrect_key ? stub : tk, in wlantest_inject_prot() 252 crypt = tkip_encrypt(incorrect_key ? stub : sta->ptk.tk, in wlantest_inject_prot() 256 crypt = ccmp_encrypt(incorrect_key ? stub : sta->ptk.tk, in wlantest_inject_prot()
|
D | wlantest.h | 134 u8 tk[16]; member 263 const u8 *tk, size_t tk_len, int keyid); 325 u8 * ccmp_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr, 328 u8 * ccmp_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, 331 u8 * ccmp_encrypt_pv1(const u8 *tk, const u8 *a1, const u8 *a2, const u8 *a3, 336 u8 * ccmp_256_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr, 339 u8 * ccmp_256_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, 348 u8 * tkip_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr, 351 u8 * tkip_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, u8 *qos, 369 u8 * gcmp_decrypt(const u8 *tk, size_t tk_len, const struct ieee80211_hdr *hdr, [all …]
|
D | ccmp.c | 153 u8 * ccmp_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr, in ccmp_decrypt() argument 177 if (aes_ccm_ad(tk, 16, nonce, 8, data + 8, mlen, aad, aad_len, in ccmp_decrypt() 207 u8 * ccmp_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, in ccmp_encrypt() argument 242 if (aes_ccm_ae(tk, 16, nonce, 8, frame + hdrlen, plen, aad, aad_len, in ccmp_encrypt() 256 u8 * ccmp_encrypt_pv1(const u8 *tk, const u8 *a1, const u8 *a2, const u8 *a3, in ccmp_encrypt_pv1() argument 284 if (aes_ccm_ae(tk, 16, nonce, 8, frame + hdrlen, plen, aad, aad_len, in ccmp_encrypt_pv1() 298 u8 * ccmp_256_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr, in ccmp_256_decrypt() argument 321 if (aes_ccm_ad(tk, 32, nonce, 16, data + 8, mlen, aad, aad_len, in ccmp_256_decrypt() 340 u8 * ccmp_256_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, in ccmp_256_encrypt() argument 375 if (aes_ccm_ae(tk, 32, nonce, 16, frame + hdrlen, plen, aad, aad_len, in ccmp_256_encrypt()
|
D | tkip.c | 292 u8 * tkip_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr, in tkip_decrypt() argument 321 tkip_mixing_phase1(ttak, tk, hdr->addr2, iv32); in tkip_decrypt() 323 tkip_mixing_phase2(rc4key, tk, ttak, iv16); in tkip_decrypt() 402 mic_key = tk + ((fc & WLAN_FC_FROMDS) ? 16 : 24); in tkip_decrypt() 438 u8 * tkip_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, u8 *qos, in tkip_encrypt() argument 458 mic_key = tk + ((fc & WLAN_FC_FROMDS) ? 16 : 24); in tkip_encrypt() 464 tkip_mixing_phase1(ttak, tk, hdr->addr2, iv32); in tkip_encrypt() 466 tkip_mixing_phase2(rc4key, tk, ttak, iv16); in tkip_encrypt()
|
D | gcmp.c | 85 u8 * gcmp_decrypt(const u8 *tk, size_t tk_len, const struct ieee80211_hdr *hdr, in gcmp_decrypt() argument 108 if (aes_gcm_ad(tk, tk_len, nonce, sizeof(nonce), m, mlen, aad, aad_len, in gcmp_decrypt() 126 u8 * gcmp_encrypt(const u8 *tk, size_t tk_len, const u8 *frame, size_t len, in gcmp_encrypt() argument 159 if (aes_gcm_ae(tk, tk_len, nonce, sizeof(nonce), frame + hdrlen, plen, in gcmp_encrypt()
|
D | wlantest.c | 239 os_memcpy(p->ptk.tk, ptk, ptk_len); in add_ptk_file() 247 os_memcpy(p->ptk.tk, ptk + 32, ptk_len - 32); in add_ptk_file() 336 const u8 *tk, size_t tk_len, int keyid) in write_decrypted_note() argument 343 wpa_snprintf_hex(tk_hex, sizeof(tk_hex), tk, tk_len); in write_decrypted_note()
|
D | rx_mgmt.c | 3239 decrypted = ccmp_decrypt(ptk->tk, hdr, NULL, NULL, NULL, in try_tk() 3242 decrypted = gcmp_decrypt(ptk->tk, 16, hdr, NULL, NULL, in try_tk() 3246 decrypted = ccmp_256_decrypt(ptk->tk, hdr, NULL, NULL, NULL, in try_tk() 3249 decrypted = gcmp_decrypt(ptk->tk, 32, hdr, NULL, NULL, in try_tk() 3286 write_decrypted_note(wt, decrypted, ptk->ptk.tk, in mgmt_decrypt_tk() 3383 decrypted = ccmp_256_decrypt(sta->ptk.tk, hdr, NULL, NULL, NULL, in mgmt_decrypt() 3385 write_decrypted_note(wt, decrypted, sta->ptk.tk, 32, keyid); in mgmt_decrypt() 3388 decrypted = gcmp_decrypt(sta->ptk.tk, sta->ptk.tk_len, hdr, in mgmt_decrypt() 3391 write_decrypted_note(wt, decrypted, sta->ptk.tk, in mgmt_decrypt() 3394 decrypted = ccmp_decrypt(sta->ptk.tk, hdr, NULL, NULL, NULL, in mgmt_decrypt() [all …]
|
D | rx_tdls.c | 128 tdls->tpk.tk, sizeof(tdls->tpk.tk)); in tdls_derive_tpk()
|
/hostap-latest/src/crypto/ |
D | sha1.c | 30 unsigned char tk[20]; in hmac_sha1_vector() local 45 if (sha1_vector(1, &key, &key_len, tk)) in hmac_sha1_vector() 47 key = tk; in hmac_sha1_vector() 90 forced_memzero(tk, sizeof(tk)); in hmac_sha1_vector()
|
D | md5.c | 30 u8 tk[16]; in hmac_md5_vector() local 45 if (md5_vector(1, &key, &key_len, tk)) in hmac_md5_vector() 47 key = tk; in hmac_md5_vector() 91 os_memset(tk, 0, sizeof(tk)); in hmac_md5_vector()
|
D | sha256.c | 30 unsigned char tk[32]; in hmac_sha256_vector() local 45 if (sha256_vector(1, &key, &key_len, tk) < 0) in hmac_sha256_vector() 47 key = tk; in hmac_sha256_vector() 94 forced_memzero(tk, sizeof(tk)); in hmac_sha256_vector()
|
D | crypto_internal.c | 44 u8 tk[32]; in crypto_hash_init() local 79 MD5Final(tk, &ctx->u.md5); in crypto_hash_init() 80 key = tk; in crypto_hash_init() 98 SHA1Final(tk, &ctx->u.sha1); in crypto_hash_init() 99 key = tk; in crypto_hash_init() 118 sha256_done(&ctx->u.sha256, tk); in crypto_hash_init() 119 key = tk; in crypto_hash_init()
|
D | sha384.c | 30 unsigned char tk[48]; in hmac_sha384_vector() local 44 if (sha384_vector(1, &key, &key_len, tk) < 0) in hmac_sha384_vector() 46 key = tk; in hmac_sha384_vector()
|
D | sha512.c | 30 unsigned char tk[64]; in hmac_sha512_vector() local 44 if (sha512_vector(1, &key, &key_len, tk) < 0) in hmac_sha512_vector() 46 key = tk; in hmac_sha512_vector()
|
/hostap-latest/src/common/ |
D | common_module_tests.c | 637 const u8 tk[] = { in pasn_test_pasn_auth() local 665 if (ptk.tk_len != sizeof(tk) || in pasn_test_pasn_auth() 666 os_memcmp(tk, ptk.tk, sizeof(tk)) != 0) { in pasn_test_pasn_auth() 716 const u8 tk[] = { in pasn_test_no_pasn_auth() local 750 if (ptk.tk_len != sizeof(tk) || in pasn_test_no_pasn_auth() 751 os_memcmp(tk, ptk.tk, sizeof(tk)) != 0) { in pasn_test_no_pasn_auth()
|
D | wpa_common.c | 573 os_memcpy(ptk->tk, tmp + ptk->kck_len + ptk->kek_len, ptk->tk_len); in wpa_pmk_to_ptk() 574 wpa_hexdump_key(MSG_DEBUG, "WPA: TK", ptk->tk, ptk->tk_len); in wpa_pmk_to_ptk() 775 os_memcpy(ptk->tk, tmp + offset, ptk->tk_len); in fils_pmk_to_ptk() 776 wpa_hexdump_key(MSG_DEBUG, "FILS: TK", ptk->tk, ptk->tk_len); in fils_pmk_to_ptk() 1542 os_memcpy(ptk->tk, tmp + WPA_PASN_KCK_LEN, ptk->tk_len); in pasn_pmk_to_ptk() 1543 wpa_hexdump_key(MSG_DEBUG, "PASN: TK:", ptk->tk, ptk->tk_len); in pasn_pmk_to_ptk() 2553 os_memcpy(ptk->tk, tmp + offset, ptk->tk_len); in wpa_pmk_r1_to_ptk() 2572 wpa_hexdump_key(MSG_DEBUG, "FT: TK", ptk->tk, ptk->tk_len); in wpa_pmk_r1_to_ptk()
|
D | ptksa_cache.c | 197 ret = wpa_snprintf_hex(pos, buf + len - pos, e->ptk.tk, in ptksa_cache_list()
|
/hostap-latest/src/eap_server/ |
D | eap_server_peap.c | 329 u8 *tk; in eap_peap_derive_cmk() local 350 tk = eap_server_tls_derive_key(sm, &data->ssl, label, in eap_peap_derive_cmk() 353 if (tk == NULL) in eap_peap_derive_cmk() 355 wpa_hexdump_key(MSG_DEBUG, "EAP-PEAP: TK", tk, 60); in eap_peap_derive_cmk() 359 os_memcpy(data->ipmk, tk, 40); in eap_peap_derive_cmk() 362 os_memcpy(data->cmk, tk + 40, 20); in eap_peap_derive_cmk() 365 os_free(tk); in eap_peap_derive_cmk() 379 wpa_hexdump_key(MSG_DEBUG, "EAP-PEAP: TempKey", tk, 40); in eap_peap_derive_cmk() 380 res = peap_prfplus(data->peap_version, tk, 40, in eap_peap_derive_cmk() 385 os_free(tk); in eap_peap_derive_cmk() [all …]
|
/hostap-latest/src/eap_peer/ |
D | eap_peap.c | 269 u8 *tk; in eap_peap_derive_cmk() local 277 tk = data->key_data; in eap_peap_derive_cmk() 278 if (tk == NULL) in eap_peap_derive_cmk() 280 wpa_hexdump_key(MSG_DEBUG, "EAP-PEAP: TK", tk, 60); in eap_peap_derive_cmk() 289 os_memcpy(data->ipmk, tk, 40); in eap_peap_derive_cmk() 292 os_memcpy(data->cmk, tk + 40, 20); in eap_peap_derive_cmk() 309 wpa_hexdump_key(MSG_DEBUG, "EAP-PEAP: TempKey", tk, 40); in eap_peap_derive_cmk() 310 res = peap_prfplus(data->peap_version, tk, 40, in eap_peap_derive_cmk()
|
/hostap-latest/tests/hwsim/ |
D | test_erp.py | 416 tk = ptk[32:48] 453 verify_not_present(buf, tk, fname, "TK") 489 tk = ptk[32:48] 504 verify_not_present(buf, tk, fname, "TK") 524 verify_not_present(buf, tk, fname, "TK")
|
D | test_wpas_ap.py | 1129 tk = ptk[32:48] 1151 verify_not_present(buf2, tk, fname, "TK") 1160 verify_not_present(buf3, tk, fname, "TK")
|
/hostap-latest/wpa_supplicant/ |
D | driver_i.h | 1146 const u8 *tk, in wpa_drv_set_secure_ranging_ctx() argument 1164 params.tk = tk; in wpa_drv_set_secure_ranging_ctx()
|
/hostap-latest/src/ap/ |
D | ap_drv_ops.c | 1231 u32 cipher, u8 tk_len, const u8 *tk, in hostapd_drv_set_secure_ranging_ctx() argument 1245 params.tk = tk; in hostapd_drv_set_secure_ranging_ctx()
|