/hostap-3.7.0/port/mbedtls/ |
D | supp_psa_api.c | 44 static inline void supp_psa_set_attributes(psa_key_attributes_t *attributes, u32 type, u32 alg, u32… in supp_psa_set_attributes() argument 47 psa_set_key_algorithm(attributes, alg); in supp_psa_set_attributes() 51 static void supp_psa_get_hash_alg(mbedtls_md_type_t type, psa_algorithm_t *alg, int *block_size) in supp_psa_get_hash_alg() argument 56 *alg = PSA_ALG_MD5; in supp_psa_get_hash_alg() 59 *alg = PSA_ALG_SHA_1; in supp_psa_get_hash_alg() 62 *alg = PSA_ALG_SHA_224; in supp_psa_get_hash_alg() 65 *alg = PSA_ALG_SHA_256; in supp_psa_get_hash_alg() 68 *alg = PSA_ALG_SHA_384; in supp_psa_get_hash_alg() 71 *alg = PSA_ALG_SHA_512; in supp_psa_get_hash_alg() 74 *alg = PSA_ALG_RIPEMD160; in supp_psa_get_hash_alg() [all …]
|
/hostap-3.7.0/src/crypto/ |
D | crypto_nettle.c | 51 static int nettle_digest_vector(const struct nettle_hash *alg, size_t num_elem, in nettle_digest_vector() argument 60 ctx = os_malloc(alg->context_size); in nettle_digest_vector() 63 alg->init(ctx); in nettle_digest_vector() 65 alg->update(ctx, len[i], addr[i]); in nettle_digest_vector() 66 alg->digest(ctx, alg->digest_size, mac); in nettle_digest_vector() 67 bin_clear_free(ctx, alg->context_size); in nettle_digest_vector() 404 enum crypto_cipher_alg alg; member 411 struct crypto_cipher * crypto_cipher_init(enum crypto_cipher_alg alg, in crypto_cipher_init() argument 421 ctx->alg = alg; in crypto_cipher_init() 423 switch (alg) { in crypto_cipher_init() [all …]
|
D | crypto_internal-cipher.c | 18 enum crypto_cipher_alg alg; member 43 struct crypto_cipher * crypto_cipher_init(enum crypto_cipher_alg alg, in crypto_cipher_init() argument 53 ctx->alg = alg; in crypto_cipher_init() 55 switch (alg) { in crypto_cipher_init() 108 switch (ctx->alg) { in crypto_cipher_encrypt() 172 switch (ctx->alg) { in crypto_cipher_decrypt() 232 switch (ctx->alg) { in crypto_cipher_deinit()
|
D | crypto_internal.c | 20 enum crypto_hash_alg alg; member 39 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument 51 ctx->alg = alg; in crypto_hash_init() 53 switch (alg) { in crypto_hash_init() 148 switch (ctx->alg) { in crypto_hash_update() 192 switch (ctx->alg) { in crypto_hash_finish()
|
D | crypto_libtomcrypt.c | 145 enum crypto_hash_alg alg; member 154 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument 163 ctx->alg = alg; in crypto_hash_init() 165 switch (alg) { in crypto_hash_init() 200 switch (ctx->alg) { in crypto_hash_update() 233 switch (ctx->alg) { in crypto_hash_finish() 301 struct crypto_cipher * crypto_cipher_init(enum crypto_cipher_alg alg, in crypto_cipher_init() argument 308 switch (alg) { in crypto_cipher_init()
|
D | crypto_linux.c | 57 static int linux_af_alg_hash_vector(const char *alg, const u8 *key, in linux_af_alg_hash_vector() argument 67 s = linux_af_alg_socket("hash", alg); in linux_af_alg_hash_vector() 239 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument 249 switch (alg) { in crypto_hash_init() 415 linux_af_alg_skcipher(const char *alg, const u8 *key, size_t key_len) in linux_af_alg_skcipher() argument 424 skcipher->s = linux_af_alg_socket("skcipher", alg); in linux_af_alg_skcipher() 858 struct crypto_cipher * crypto_cipher_init(enum crypto_cipher_alg alg, in crypto_cipher_init() argument 875 switch (alg) { in crypto_cipher_init()
|
D | crypto_mbedtls.c | 115 crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, size_t key_len) in crypto_hash_init() argument 122 switch (alg) { in crypto_hash_init() 417 alg_to_mbedtls_cipher(enum crypto_cipher_alg alg, size_t key_len) in alg_to_mbedtls_cipher() argument 419 switch (alg) { in alg_to_mbedtls_cipher() 449 enum crypto_cipher_alg alg, const u8 *iv, const u8 *key, size_t key_len) in crypto_cipher_init() argument 460 cipher_type = alg_to_mbedtls_cipher(alg, key_len); in crypto_cipher_init()
|
D | crypto_wolfssl.c | 477 enum crypto_cipher_alg alg; member 482 struct crypto_cipher * crypto_cipher_init(enum crypto_cipher_alg alg, in crypto_cipher_init() argument 492 switch (alg) { in crypto_cipher_init() 538 ctx->alg = alg; in crypto_cipher_init() 547 switch (ctx->alg) { in crypto_cipher_encrypt() 577 switch (ctx->alg) { in crypto_cipher_decrypt() 886 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument 897 switch (alg) { in crypto_hash_init()
|
/hostap-3.7.0/src/tls/ |
D | pkcs5.c | 25 } alg; member 48 static int pkcs5_is_oid(struct asn1_oid *oid, unsigned long alg) in pkcs5_is_oid() argument 54 oid->oid[6] == alg; in pkcs5_is_oid() 58 static int enc_alg_is_oid(struct asn1_oid *oid, unsigned long alg) in enc_alg_is_oid() argument 63 oid->oid[5] == alg; in enc_alg_is_oid() 67 static int pkcs12_is_pbe_oid(struct asn1_oid *oid, unsigned long alg) in pkcs12_is_pbe_oid() argument 74 oid->oid[7] == alg; in pkcs12_is_pbe_oid() 283 params->alg = pkcs5_get_alg(&oid); in pkcs5_get_params() 284 if (params->alg == PKCS5_ALG_UNKNOWN) { in pkcs5_get_params() 290 if (params->alg == PKCS5_ALG_PBES2) in pkcs5_get_params() [all …]
|
D | tlsv1_client_ocsp.c | 67 static unsigned int ocsp_hash_data(struct asn1_oid *alg, const u8 *data, in ocsp_hash_data() argument 74 if (x509_sha1_oid(alg)) { in ocsp_hash_data() 81 if (x509_sha256_oid(alg)) { in ocsp_hash_data() 88 if (x509_sha384_oid(alg)) { in ocsp_hash_data() 95 if (x509_sha512_oid(alg)) { in ocsp_hash_data() 103 asn1_oid_to_str(alg, buf, sizeof(buf)); in ocsp_hash_data() 118 struct x509_algorithm_identifier alg; in tls_process_ocsp_single_response() local 157 if (x509_parse_algorithm_identifier(pos, end - pos, &alg, &pos)) in tls_process_ocsp_single_response() 175 hash_len = ocsp_hash_data(&alg.oid, issuer->subject_dn, in tls_process_ocsp_single_response() 197 hash_len = ocsp_hash_data(&alg.oid, issuer->public_key, in tls_process_ocsp_single_response() [all …]
|
D | tlsv1_common.c | 346 enum crypto_hash_alg alg; in tlsv12_key_x_server_params_hash() local 350 alg = CRYPTO_HASH_ALG_SHA256; in tlsv12_key_x_server_params_hash() 354 alg = CRYPTO_HASH_ALG_SHA384; in tlsv12_key_x_server_params_hash() 358 alg = CRYPTO_HASH_ALG_SHA512; in tlsv12_key_x_server_params_hash() 364 ctx = crypto_hash_init(alg, NULL, 0); in tlsv12_key_x_server_params_hash()
|
/hostap-3.7.0/src/common/ |
D | defs.h | 185 static inline int wpa_auth_alg_fils(int alg) in wpa_auth_alg_fils() argument 187 return !!(alg & (WPA_AUTH_ALG_FILS | WPA_AUTH_ALG_FILS_SK_PFS)); in wpa_auth_alg_fils() 206 static inline int wpa_alg_bip(enum wpa_alg alg) in wpa_alg_bip() argument 208 return alg == WPA_ALG_BIP_CMAC_128 || in wpa_alg_bip() 209 alg == WPA_ALG_BIP_GMAC_128 || in wpa_alg_bip() 210 alg == WPA_ALG_BIP_GMAC_256 || in wpa_alg_bip() 211 alg == WPA_ALG_BIP_CMAC_256; in wpa_alg_bip()
|
D | dpp_backup.c | 153 struct wpabuf *key = NULL, *attr, *alg, *priv_key = NULL; in dpp_build_key_pkg() local 159 alg = dpp_build_key_alg(auth->conf->curve); in dpp_build_key_pkg() 164 if (!priv_key || !attr || !alg) in dpp_build_key_pkg() 179 key = wpabuf_alloc(100 + wpabuf_len(alg) + wpabuf_len(priv_key) + in dpp_build_key_pkg() 187 wpabuf_put_buf(key, alg); in dpp_build_key_pkg() 199 wpabuf_free(alg); in dpp_build_key_pkg()
|
/hostap-3.7.0/src/eap_common/ |
D | ikev2_common.c | 56 int ikev2_integ_hash(int alg, const u8 *key, size_t key_len, const u8 *data, in ikev2_integ_hash() argument 61 switch (alg) { in ikev2_integ_hash() 97 int ikev2_prf_hash(int alg, const u8 *key, size_t key_len, in ikev2_prf_hash() argument 101 switch (alg) { in ikev2_prf_hash() 113 int ikev2_prf_plus(int alg, const u8 *key, size_t key_len, in ikev2_prf_plus() argument 125 prf = ikev2_get_prf(alg); in ikev2_prf_plus() 143 res = ikev2_prf_hash(alg, key, key_len, 2, &addr[1], in ikev2_prf_plus() 146 res = ikev2_prf_hash(alg, key, key_len, 3, addr, len, in ikev2_prf_plus() 175 int ikev2_encr_encrypt(int alg, const u8 *key, size_t key_len, const u8 *iv, in ikev2_encr_encrypt() argument 181 switch (alg) { in ikev2_encr_encrypt() [all …]
|
D | ikev2_common.h | 271 int ikev2_integ_hash(int alg, const u8 *key, size_t key_len, const u8 *data, 274 int ikev2_prf_hash(int alg, const u8 *key, size_t key_len, 277 int ikev2_prf_plus(int alg, const u8 *key, size_t key_len, 281 int ikev2_encr_encrypt(int alg, const u8 *key, size_t key_len, const u8 *iv, 283 int ikev2_encr_decrypt(int alg, const u8 *key, size_t key_len, const u8 *iv,
|
/hostap-3.7.0/tests/ |
D | test-rsa-sig-ver.c | 129 const struct asn1_oid *alg; in cavp_rsa_sig_ver() local 139 alg = &asn1_sha1_oid; in cavp_rsa_sig_ver() 146 alg = &asn1_sha256_oid; in cavp_rsa_sig_ver() 162 res = pkcs1_v15_sig_ver(pk, s, s_len, alg, in cavp_rsa_sig_ver()
|
/hostap-3.7.0/src/drivers/ |
D | driver_wext.c | 1704 ext->alg = IW_ENCODE_ALG_PMK; in wpa_driver_wext_set_psk() 1716 static int wpa_driver_wext_set_key_ext(void *priv, enum wpa_alg alg, in wpa_driver_wext_set_key_ext() argument 1741 if (alg == WPA_ALG_NONE) in wpa_driver_wext_set_key_ext() 1761 ext->alg = IW_ENCODE_ALG_PMK; in wpa_driver_wext_set_key_ext() 1763 switch (alg) { in wpa_driver_wext_set_key_ext() 1765 ext->alg = IW_ENCODE_ALG_NONE; in wpa_driver_wext_set_key_ext() 1768 ext->alg = IW_ENCODE_ALG_WEP; in wpa_driver_wext_set_key_ext() 1771 ext->alg = IW_ENCODE_ALG_TKIP; in wpa_driver_wext_set_key_ext() 1774 ext->alg = IW_ENCODE_ALG_CCMP; in wpa_driver_wext_set_key_ext() 1777 ext->alg = IW_ENCODE_ALG_AES_CMAC; in wpa_driver_wext_set_key_ext() [all …]
|
D | driver_hostap.c | 407 enum wpa_alg alg = params->alg; in wpa_driver_hostap_set_key() local 425 switch (alg) { in wpa_driver_hostap_set_key() 427 os_strlcpy((char *) param->u.crypt.alg, "NONE", in wpa_driver_hostap_set_key() 431 os_strlcpy((char *) param->u.crypt.alg, "WEP", in wpa_driver_hostap_set_key() 435 os_strlcpy((char *) param->u.crypt.alg, "TKIP", in wpa_driver_hostap_set_key() 439 os_strlcpy((char *) param->u.crypt.alg, "CCMP", in wpa_driver_hostap_set_key()
|
D | driver_privsep.c | 213 enum wpa_alg alg = params->alg; in wpa_driver_privsep_set_key() local 223 __func__, priv, alg, key_idx, set_tx); in wpa_driver_privsep_set_key() 226 cmd.alg = alg; in wpa_driver_privsep_set_key()
|
/hostap-3.7.0/src/ap/ |
D | ap_mlme.c | 23 static const char * mlme_auth_alg_str(int alg) in mlme_auth_alg_str() argument 25 switch (alg) { in mlme_auth_alg_str()
|
D | wpa_auth_glue.c | 437 static int hostapd_wpa_auth_set_key(void *ctx, int vlan_id, enum wpa_alg alg, in hostapd_wpa_auth_set_key() argument 464 sta->last_tk_alg = alg; in hostapd_wpa_auth_set_key() 470 } else if (alg == WPA_ALG_BIP_CMAC_128 || in hostapd_wpa_auth_set_key() 471 alg == WPA_ALG_BIP_GMAC_128 || in hostapd_wpa_auth_set_key() 472 alg == WPA_ALG_BIP_GMAC_256 || in hostapd_wpa_auth_set_key() 473 alg == WPA_ALG_BIP_CMAC_256) { in hostapd_wpa_auth_set_key() 475 hapd->last_igtk_alg = alg; in hostapd_wpa_auth_set_key() 481 hapd->last_bigtk_alg = alg; in hostapd_wpa_auth_set_key() 488 hapd->last_gtk_alg = alg; in hostapd_wpa_auth_set_key() 495 return hostapd_drv_set_key(ifname, hapd, alg, addr, idx, vlan_id, 1, in hostapd_wpa_auth_set_key()
|
/hostap-3.7.0/wpa_supplicant/ |
D | ibss_rsn.c | 146 static int supp_set_key(void *ctx, enum wpa_alg alg, in supp_set_key() argument 155 __func__, alg, MAC2STR(addr), key_idx, set_tx); in supp_set_key() 175 return wpa_drv_set_key(peer->ibss_rsn->wpa_s, alg, addr, key_idx, in supp_set_key() 315 static int auth_set_key(void *ctx, int vlan_id, enum wpa_alg alg, in auth_set_key() argument 327 __func__, alg, MAC2STR(addr), idx); in auth_set_key() 330 __func__, alg, idx); in auth_set_key() 355 return wpa_drv_set_key(ibss_rsn->wpa_s, alg, addr, idx, in auth_set_key()
|
D | pasn_supplicant.c | 144 u16 len, res, alg, seq, status; in wpas_pasn_wd_sae_rx() local 169 alg = WPA_GET_LE16(data); in wpas_pasn_wd_sae_rx() 174 alg, seq, status); in wpas_pasn_wd_sae_rx() 176 if (alg != WLAN_AUTH_SAE || seq != 1 || in wpas_pasn_wd_sae_rx() 214 alg = WPA_GET_LE16(data); in wpas_pasn_wd_sae_rx() 219 alg, seq, status); in wpas_pasn_wd_sae_rx() 221 if (alg != WLAN_AUTH_SAE || seq != 2 || status != WLAN_STATUS_SUCCESS) { in wpas_pasn_wd_sae_rx() 448 u16 alg, seq, status; in wpas_pasn_wd_fils_rx() local 466 alg = WPA_GET_LE16(data); in wpas_pasn_wd_fils_rx() 471 alg, seq, status); in wpas_pasn_wd_fils_rx() [all …]
|
/hostap-3.7.0/tests/fuzzing/eapol-key-auth/ |
D | eapol-key-auth.c | 170 static int auth_set_key(void *ctx, int vlan_id, enum wpa_alg alg, in auth_set_key() argument 178 __func__, vlan_id, alg, idx, (int) key_len, key_flag); in auth_set_key() 182 if (alg != WPA_ALG_NONE && idx == 0 && key_len > 0 && in auth_set_key()
|
/hostap-3.7.0/src/rsn_supp/ |
D | wpa_ft.c | 450 enum wpa_alg alg; in wpa_ft_install_ptk() local 461 alg = wpa_cipher_to_alg(sm->pairwise_cipher); in wpa_ft_install_ptk() 464 if (wpa_sm_set_key(sm, alg, bssid, 0, 1, null_rsc, sizeof(null_rsc), in wpa_ft_install_ptk() 759 enum wpa_alg alg; in wpa_ft_process_gtk_subelem() local 795 alg = wpa_cipher_to_alg(sm->group_cipher); in wpa_ft_process_gtk_subelem() 796 if (alg == WPA_ALG_NONE) { in wpa_ft_process_gtk_subelem() 826 if (wpa_sm_set_key(sm, alg, broadcast_ether_addr, keyidx, 0, in wpa_ft_process_gtk_subelem()
|