Conversation
Re-adds `Wpa3Personal` and `Wpa2Wpa3Personal` to `AuthenticationMethodConfig` (dropped in esp-rs#6146 as unsupported) now that the esp32 supplicant in esp-wifi-sys is built with SAE on mbedTLS crypto (esp-rs/esp-wireless-drivers-3rdparty#11, esp-rs/esp-wifi-sys#511). Station only: `AccessPointConfig::validate` refuses the two methods with `WifiError::Unsupported` until a WPA3 soft-AP has been verified. The station config already sets PMF capable and `sae_pwe_h2e = 3` (hunt-and-peck and hash-to-element), which is what the hardware test used. Module docs updated. Closes esp-rs#1600.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for your contribution!
Submission Checklist 📝
cargo xtask fmtcommand to ensure that all changed code is formatted correctly.skip-changelogormanual-changeloglabel as appropriate.Extra:
Pull Request Details 📖
Description
WPA3-Personal (SAE) for the station, closing #1600.
The missing piece was never in esp-radio: the
libwpa_supplicant.ain esp-wifi-sys is built withCONFIG_ESP_WIFI_ENABLE_WPA3_SAE=n/CONFIG_ESP_WIFI_MBEDTLS_CRYPTO=n, so the open-source supplicant has no SAE client, and the closed blobs (which reach SAE only through thewpa_funcstable the supplicant registers) report a WPA3-only AP asWIFI_AUTH_OPEN→NoAccessPointFound. Two companion PRs rebuild the esp32 supplicant with SAE on mbedTLS crypto and ship thelibmbedcrypto.ait needs:build.rslinkingmbedcryptoThis PR is the esp-radio side, kept to what is needed:
AuthenticationMethodConfiggetsWpa3Personal(Password)andWpa2Wpa3Personal(Password)back (removed in Introduce AuthenticationMethodConfig #6146 as unsupported), mapped to the existingAuthenticationMethod::{Wpa3Personal, Wpa2Wpa3Personal}. The station config already sets PMF capable andsae_pwe_h2e = 3(hunt-and-peck + hash-to-element) — that is exactly the configuration the hardware test used, so nothing else inapply_sta_configchanges.AccessPointConfig::validaterefuses both withWifiError::Unsupported+ a warning: the supplicant is also built withCONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT(IDF default once SAE is on), but I have not verified a WPA3 soft-AP and would rather not expose a silently failing option — the very complaint in Support connecting to a WPA3 AP from ESP32 support #1600. Easy to lift once someone tests it.from_rawcomment no longer say WPA3 is unsupported.No compat shim is needed: the mbedTLS build in the companion PRs uses libc
calloc/free, no threading, no PSA key storage, solibmbedcrypto.areferences nothing esp-radio does not already provide (cargo xtask build embassy_dhcp esp32links against the new archives with no other change).Depends on esp-rs/esp-wifi-sys#511:
esp-radio/Cargo.tomlmust bump the esp-wifi-sysrevto a commit containing it (not done here — the rev does not exist upstream yet). Only esp32 archives are rebuilt in the companion PRs; on other chips these two variants will behave as before (driver reports the AP as open) until their libraries are rebuilt — see the "all chips?" question in the 3rdparty PR. Draft for that reason.Testing
esp-wifi-sys-esp32 0.2.0; its supplicant is byte-identical to 3rdpartybf1e59a2) with esp-radio 1.0.0-beta.0, against a WPA3-only AP (SSID/BSSID withheld). Before: scan classifies the AP asNone, every threshold incl. BSSID/channel pinning ends inNoAccessPointFound, a WPA2 AP on the same radio joins. After: scan reportsWpa3Personal;connect_async()with the weakest threshold succeeds — SAE commit/confirm + 4-way in 0.95 / 1.35 / 2.9 s over three boots (software P-256 on the LX6); heap peak +7 KiB during SAE (89.4 KiB used vs 82.4 KiB after); image +63.9 KiB flash; IRAM (.rwtext.wifi51 800 B) unchanged; DHCP and TCP normal afterwards.main+ the v6.1 archives from esp-wifi-sys#511 via[patch]):cargo xtask build embassy_dhcp esp32links,cargo xtask lint esp-radio esp32clean,cargo +nightly fmtclean. The ELF containssae_prepare_commit,sae_process_commit,esp_wifi_register_wpa3_cb,mbedtls_ecp_mul,psa_import_key. Versusmainwith the current archives:.text+69 767 B,.rodata+10 896 B,.bss+420 B, IRAM unchanged (≈ +81 KiB flash; IDF 6.1's mbedTLS 4 / TF-PSA-Crypto costs more than 5.5's). Not run on hardware with the v6.1 archives — my board is on esp-hal 1.1 / IDF 5.5 libraries.Changelog
esp-radio
AuthenticationMethodConfig::Wpa3PersonalandAuthenticationMethodConfig::Wpa2Wpa3Personal— WPA3-Personal (SAE) for the station, with the SAE-enabled supplicant from esp-wifi-sys.AccessPointConfigrejects WPA3 authentication methods withWifiError::Unsupporteduntil a WPA3 soft-AP is verified.