doc/connectivity/networking/api/wifi_crypto.rst
.. _wifi_crypto_mapping:
Wi-Fi feature to crypto mapping ###############################
This page maps Wi-Fi features supported in Zephyr (via the hostap-based wpa_supplicant) to the
underlying MbedTLS crypto primitives. Use it to see which features need bignum, ECDH, TLS, etc.,
and which code paths use Legacy crypto (MbedTLS legacy APIs) vs PSA crypto (Platform
Security Architecture APIs) when :kconfig:option:CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA
is enabled.
The implementation lives in the hostap module: crypto_mbedtls_alt.c (generic crypto) and
tls_mbedtls_alt.c (TLS/EAP). Only the MbedTLS backend is considered here.
Feature set (from hostap Kconfig)
Features are gated by Kconfig. Relevant options include:
CONFIG_WIFI_NM_WPA_SUPPLICANT_WEP — WEP (legacy)CONFIG_WIFI_NM_WPA_SUPPLICANT_WPA3 — WPA3-SAE (default on)CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP — Wi-Fi Easy Connect (DPP)CONFIG_WIFI_NM_WPA_SUPPLICANT_WPS — Wi-Fi Protected SetupCONFIG_WIFI_NM_WPA_SUPPLICANT_P2P — P2P / Wi-Fi Direct (implies WPS)CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE — EAP (EAP-TLS, EAP-TTLS-MSCHAPV2,
EAP-PEAP-MSCHAPV2, EAP-PEAP-GTC, EAP-PEAP-TLS)WPA2-PSK and WPA2-PSK-256 are available whenever crypto is not set to CRYPTO_NONE.
Feature → crypto primitives (MbedTLS)
.. list-table:: Wi-Fi feature to crypto mapping :widths: 18 22 30 30 :header-rows: 1
.. note::
WEP must be explicitly enabled with :kconfig:option:CONFIG_WIFI_NM_WPA_SUPPLICANT_WEP. It is
deprecated and insecure; use only for legacy networks.
Summary: Legacy vs PSA (MbedTLS backend)
When :kconfig:option:CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA is enabled, the
implementation in crypto_mbedtls_alt.c (and supp_psa_api.h / supp_psa_api.c) splits
as below. Use this table to see which operations use PSA vs Legacy MbedTLS.
.. list-table:: Legacy vs PSA by crypto operation :widths: 28 10 42 :header-rows: 1
MBEDTLS_ECDH_C / CONFIG_PSA_WANT_ALG_ECDH; wrapper layer commontls_mbedtls_alt.cSo: WPA2-PSK and WPA2-PSK-256 use only PSA for their crypto; WPA3-SAE, DPP, SAE-PK, WPS, and Enterprise EAP still rely on legacy bignum, EC, or TLS. See the feature table above for per-feature impact.