/hostap-latest/wlantest/ |
D | test_vectors.c | 46 u8 *enc, *plain; in test_vector_tkip() local 56 enc = tkip_encrypt(tk, frame, sizeof(frame), 24, NULL, pn, 0, &enc_len); in test_vector_tkip() 57 if (enc == NULL) { in test_vector_tkip() 62 wpa_hexdump(MSG_INFO, "Encrypted MPDU (without FCS)", enc, enc_len); in test_vector_tkip() 65 plain = tkip_decrypt(tk, (const struct ieee80211_hdr *) enc, in test_vector_tkip() 66 enc + 24, enc_len - 24, &plain_len, NULL, NULL); in test_vector_tkip() 68 os_free(enc); in test_vector_tkip() 98 u8 *enc, *plain; in test_vector_ccmp() local 110 enc = ccmp_encrypt(tk, frame, sizeof(frame), 24, NULL, NULL, NULL, NULL, in test_vector_ccmp() 112 if (enc == NULL) { in test_vector_ccmp() [all …]
|
/hostap-latest/src/crypto/ |
D | crypto_gnutls.c | 397 gcry_cipher_hd_t enc; member 418 res = gcry_cipher_open(&ctx->enc, a, GCRY_CIPHER_MODE_STREAM, in crypto_cipher_init() 429 res = gcry_cipher_open(&ctx->enc, a, GCRY_CIPHER_MODE_CBC, 0); in crypto_cipher_init() 434 res = gcry_cipher_open(&ctx->enc, a, GCRY_CIPHER_MODE_CBC, 0); in crypto_cipher_init() 439 res = gcry_cipher_open(&ctx->enc, a, GCRY_CIPHER_MODE_CBC, 0); in crypto_cipher_init() 447 res = gcry_cipher_open(&ctx->enc, a, GCRY_CIPHER_MODE_CBC, 0); in crypto_cipher_init() 460 if (gcry_cipher_setkey(ctx->enc, key, key_len) != GPG_ERR_NO_ERROR || in crypto_cipher_init() 462 gcry_cipher_close(ctx->enc); in crypto_cipher_init() 469 if (gcry_cipher_setiv(ctx->enc, iv, ivlen) != GPG_ERR_NO_ERROR || in crypto_cipher_init() 471 gcry_cipher_close(ctx->enc); in crypto_cipher_init() [all …]
|
D | crypto_module_tests.c | 2205 const char *enc; member 2220 ….enc = "04a92719c6195d5085104f469a8b9814d5838ff72b60501e2c4466e5e67b325ac98536d7b61a1af4b78e5b7f95… 2235 ….enc = "0493ed86735bdfb978cc055c98b45695ad7ce61ce748f4dd63c525a3b8d53a15565c6897888070070c1579db1f… 2250 ….enc = "040138b385ca16bb0d5fa0c0665fbbd7e69e3ee29f63991d3e9b5fa740aab8900aaeed46ed73a49055758425a0… 2265 ….enc = "04b30bea96d0e51582033b02a4d676d0464a5eb2d858be86cda1c4e6f8b2aa9fb80f5365483f781b1b3a8b3b8e… 2280 ….enc = "047a25e309c7ee50ec27f13d44734a3ccd8c703e3affcc728513df416511ef9bf02f5e7750e7415de8b5f306eb… 2295 ….enc = "0415d49dedc5bc1ffe9f8de9022c266bb605ec6cd7b77b6ce68974095398856f8aefa4b7abbfbd496b99a2dda3… 2310 ….enc = "04158d18473aeb3b283d3345b1a87d3de2b192ff9e41b5a98f91daacfb24be72e698cbc04c33078681e507bf34… 2320 struct wpabuf *info, *pk_r, *sk_r, *enc, *pt, *aad, *ct; in run_hpke_test() local 2331 enc = wpabuf_parse_bin(test->enc); in run_hpke_test() [all …]
|
D | crypto_openssl.c | 849 EVP_CIPHER_CTX *enc; member 911 if (!(ctx->enc = EVP_CIPHER_CTX_new()) || in crypto_cipher_init() 912 !EVP_EncryptInit_ex(ctx->enc, cipher, NULL, NULL, NULL) || in crypto_cipher_init() 913 !EVP_CIPHER_CTX_set_padding(ctx->enc, 0) || in crypto_cipher_init() 914 !EVP_CIPHER_CTX_set_key_length(ctx->enc, key_len) || in crypto_cipher_init() 915 !EVP_EncryptInit_ex(ctx->enc, NULL, NULL, key, iv)) { in crypto_cipher_init() 916 if (ctx->enc) in crypto_cipher_init() 917 EVP_CIPHER_CTX_free(ctx->enc); in crypto_cipher_init() 927 EVP_CIPHER_CTX_free(ctx->enc); in crypto_cipher_init() 942 if (!EVP_EncryptUpdate(ctx->enc, crypt, &outl, plain, len)) in crypto_cipher_encrypt() [all …]
|
D | Makefile | 19 aes-internal-enc.o \
|
D | crypto_linux.c | 449 int enc, const u8 *in, u8 *out) in linux_af_alg_skcipher_oper() argument 471 *op = enc ? ALG_OP_ENCRYPT : ALG_OP_DECRYPT; in linux_af_alg_skcipher_oper() 675 static int aes_128_cbc_oper(const u8 *key, int enc, const u8 *iv, in aes_128_cbc_oper() argument 707 *op = enc ? ALG_OP_ENCRYPT : ALG_OP_DECRYPT; in aes_128_cbc_oper()
|
D | crypto_wolfssl.c | 768 union wolfssl_cipher enc; member 786 wc_Arc4SetKey(&ctx->enc.arc4, key, key_len); in crypto_cipher_init() 802 if (wc_AesSetKey(&ctx->enc.aes, key, key_len, iv, in crypto_cipher_init() 814 wc_Des3_SetKey(&ctx->enc.des3, key, iv, DES_ENCRYPTION) || in crypto_cipher_init() 841 wc_Arc4Process(&ctx->enc.arc4, crypt, plain, len); in crypto_cipher_encrypt() 847 if (wc_AesCbcEncrypt(&ctx->enc.aes, crypt, plain, len) != 0) in crypto_cipher_encrypt() 853 if (wc_Des3_CbcEncrypt(&ctx->enc.des3, crypt, plain, len) != 0) in crypto_cipher_encrypt()
|
/hostap-latest/src/eap_peer/ |
D | eap_sim.c | 518 struct wpabuf *imsi_buf, *enc; in eap_sim_encrypt_identity() local 528 enc = crypto_rsa_oaep_sha256_encrypt(imsi_privacy_key, imsi_buf); in eap_sim_encrypt_identity() 530 if (!enc) in eap_sim_encrypt_identity() 533 b64 = base64_encode_no_lf(wpabuf_head(enc), wpabuf_len(enc), &b64_len); in eap_sim_encrypt_identity() 534 wpabuf_free(enc); in eap_sim_encrypt_identity() 541 enc = wpabuf_alloc(len); in eap_sim_encrypt_identity() 542 if (!enc) { in eap_sim_encrypt_identity() 546 wpabuf_put_u8(enc, '\0'); in eap_sim_encrypt_identity() 547 wpabuf_put_data(enc, b64, b64_len); in eap_sim_encrypt_identity() 550 wpabuf_put_u8(enc, ','); in eap_sim_encrypt_identity() [all …]
|
D | eap_aka.c | 650 struct wpabuf *imsi_buf, *enc; in eap_aka_encrypt_identity() local 660 enc = crypto_rsa_oaep_sha256_encrypt(imsi_privacy_key, imsi_buf); in eap_aka_encrypt_identity() 662 if (!enc) in eap_aka_encrypt_identity() 665 b64 = base64_encode_no_lf(wpabuf_head(enc), wpabuf_len(enc), &b64_len); in eap_aka_encrypt_identity() 666 wpabuf_free(enc); in eap_aka_encrypt_identity() 673 enc = wpabuf_alloc(len); in eap_aka_encrypt_identity() 674 if (!enc) { in eap_aka_encrypt_identity() 678 wpabuf_put_u8(enc, '\0'); in eap_aka_encrypt_identity() 679 wpabuf_put_data(enc, b64, b64_len); in eap_aka_encrypt_identity() 682 wpabuf_put_u8(enc, ','); in eap_aka_encrypt_identity() [all …]
|
/hostap-latest/src/ap/ |
D | wpa_auth_ft.c | 75 const u8 *enc, size_t enc_len, in wpa_ft_rrb_decrypt() argument 86 wpa_hexdump(MSG_DEBUG, "FT(RRB): encrypted TLVs", enc, enc_len); in wpa_ft_rrb_decrypt() 90 *plain = os_memdup(enc, enc_len); in wpa_ft_rrb_decrypt() 109 if (aes_siv_decrypt(key, key_len, enc, enc_len, 3, ad, ad_len, in wpa_ft_rrb_decrypt() 118 if (aes_siv_decrypt(key, key_len, enc, enc_len, 3, ad, ad_len, in wpa_ft_rrb_decrypt() 481 const u8 *src_addr, u8 type, u8 *enc) in wpa_ft_rrb_encrypt() argument 495 os_memcpy(enc, plain, plain_len); in wpa_ft_rrb_encrypt() 497 3, ad, ad_len, enc) < 0) { in wpa_ft_rrb_encrypt() 502 enc, plain_len + AES_BLOCK_SIZE); in wpa_ft_rrb_encrypt() 913 u8 *enc; member [all …]
|
/hostap-latest/src/drivers/ |
D | driver_nl80211_capa.c | 456 info->capa->enc |= WPA_DRIVER_CAPA_ENC_CCMP_256; in wiphy_info_cipher_suites() 459 info->capa->enc |= WPA_DRIVER_CAPA_ENC_GCMP_256; in wiphy_info_cipher_suites() 462 info->capa->enc |= WPA_DRIVER_CAPA_ENC_CCMP; in wiphy_info_cipher_suites() 465 info->capa->enc |= WPA_DRIVER_CAPA_ENC_GCMP; in wiphy_info_cipher_suites() 468 info->capa->enc |= WPA_DRIVER_CAPA_ENC_TKIP; in wiphy_info_cipher_suites() 471 info->capa->enc |= WPA_DRIVER_CAPA_ENC_WEP104; in wiphy_info_cipher_suites() 474 info->capa->enc |= WPA_DRIVER_CAPA_ENC_WEP40; in wiphy_info_cipher_suites() 477 info->capa->enc |= WPA_DRIVER_CAPA_ENC_BIP; in wiphy_info_cipher_suites() 480 info->capa->enc |= WPA_DRIVER_CAPA_ENC_BIP_GMAC_128; in wiphy_info_cipher_suites() 483 info->capa->enc |= WPA_DRIVER_CAPA_ENC_BIP_GMAC_256; in wiphy_info_cipher_suites() [all …]
|
D | driver_ndis.c | 1711 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; in wpa_driver_ndis_get_wpa_capability() 1717 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; in wpa_driver_ndis_get_wpa_capability() 1723 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | in wpa_driver_ndis_get_wpa_capability() 1743 drv->capa.enc & (WPA_DRIVER_CAPA_ENC_TKIP | in wpa_driver_ndis_get_wpa_capability() 1753 drv->capa.key_mgmt, drv->capa.enc, drv->capa.auth); in wpa_driver_ndis_get_wpa_capability() 1825 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40; in wpa_driver_ndis_get_capability() 1826 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP104; in wpa_driver_ndis_get_capability() 1829 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; in wpa_driver_ndis_get_capability() 1832 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; in wpa_driver_ndis_get_capability() 1841 drv->capa.key_mgmt, drv->capa.enc, drv->capa.auth); in wpa_driver_ndis_get_capability() [all …]
|
D | driver_bsd.c | 1492 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | in wpa_driver_bsd_capa() 1495 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; in wpa_driver_bsd_capa() 1497 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; in wpa_driver_bsd_capa() 1516 drv->capa.enc = WPA_DRIVER_CAPA_ENC_WEP40 | in wpa_driver_bsd_capa()
|
D | driver_wext.c | 1648 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | in wpa_driver_wext_get_range() 1650 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP128; in wpa_driver_wext_get_range() 1652 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; in wpa_driver_wext_get_range() 1654 drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; in wpa_driver_wext_get_range() 1665 drv->capa.key_mgmt, drv->capa.enc, in wpa_driver_wext_get_range()
|
D | driver.h | 2139 unsigned int enc; member
|
D | driver_nl80211.c | 6849 !(drv->capa.enc & WPA_DRIVER_CAPA_ENC_GTK_NOT_USED)) { in nl80211_connect_common() 11187 drv->capa.enc, in wpa_driver_nl80211_status()
|
/hostap-latest/src/eap_server/ |
D | eap_server_sim.c | 575 struct wpabuf *enc, *dec; in eap_sim_process_start() local 605 enc = wpabuf_alloc_copy(decoded_id, decoded_id_len); in eap_sim_process_start() 607 if (!enc) in eap_sim_process_start() 610 enc); in eap_sim_process_start() 611 wpabuf_free(enc); in eap_sim_process_start()
|
D | eap_server_aka.c | 831 struct wpabuf *enc, *dec; in eap_aka_determine_identity() local 861 enc = wpabuf_alloc_copy(decoded_id, decoded_id_len); in eap_aka_determine_identity() 863 if (!enc) in eap_aka_determine_identity() 866 enc); in eap_aka_determine_identity() 867 wpabuf_free(enc); in eap_aka_determine_identity()
|
/hostap-latest/wpa_supplicant/dbus/ |
D | dbus_new_handlers.c | 3262 ((capa.enc & WPA_DRIVER_CAPA_ENC_CCMP_256) && in wpas_dbus_getter_capabilities() 3265 ((capa.enc & WPA_DRIVER_CAPA_ENC_GCMP_256) && in wpas_dbus_getter_capabilities() 3268 ((capa.enc & WPA_DRIVER_CAPA_ENC_CCMP) && in wpas_dbus_getter_capabilities() 3271 ((capa.enc & WPA_DRIVER_CAPA_ENC_GCMP) && in wpas_dbus_getter_capabilities() 3275 ((capa.enc & WPA_DRIVER_CAPA_ENC_TKIP) && in wpas_dbus_getter_capabilities() 3310 ((capa.enc & WPA_DRIVER_CAPA_ENC_CCMP_256) && in wpas_dbus_getter_capabilities() 3313 ((capa.enc & WPA_DRIVER_CAPA_ENC_GCMP_256) && in wpas_dbus_getter_capabilities() 3316 ((capa.enc & WPA_DRIVER_CAPA_ENC_CCMP) && in wpas_dbus_getter_capabilities() 3319 ((capa.enc & WPA_DRIVER_CAPA_ENC_GCMP) && in wpas_dbus_getter_capabilities() 3323 ((capa.enc & WPA_DRIVER_CAPA_ENC_TKIP) && in wpas_dbus_getter_capabilities() [all …]
|
/hostap-latest/tests/hwsim/ |
D | test_ap_psk.py | 1836 enc = AES.new(kek, AES.MODE_ECB).encrypt 1840 b = enc(struct.pack('>Q', a) + r[i - 1])
|
/hostap-latest/wpa_supplicant/ |
D | wps_supplicant.c | 270 (capa.enc & WPA_DRIVER_CAPA_ENC_CCMP)) { in wpas_wps_security_workaround()
|
D | ctrl_iface.c | 4127 if (!ciphers[i].group_only && capa->enc & ciphers[i].capa) { in ctrl_iface_get_capability_pairwise() 4175 if (capa->enc & ciphers[i].capa) { in ctrl_iface_get_capability_group() 4204 if (capa->enc & ciphers_group_mgmt[i].capa) { in ctrl_iface_get_capability_group_mgmt()
|
D | wpa_supplicant.c | 7193 wpa_s->drv_enc = capa.enc; in wpa_supplicant_init_iface()
|