Support WPA2-PSK
It may be possible to do this through specifying a key_mgmt field like the Raspberry Pi wifi_supplicant.conf file.
key_mgmt: Specifies the key management protocol, which is typically WPA-PSK for WPA2 networks.
network={
ssid="YourNetworkSSID"
psk="YourNetworkPassword"
key_mgmt=WPA-PSK
}
We do need to check what encryption method is used for the psk field.
We also need to check if this is possible with arduino-esp32 or the ESP-IDF
Additionally, we can use setting key_mgmt=NONE for networks without a psk
https://linux.die.net/man/8/wpa_passphrase https://www.rfc-editor.org/rfc/rfc2898#appendix-A.2 https://github.com/aosp-mirror/platform_external_wpa_supplicant/blob/master/wpa_passphrase.c
I'm pretty sure it's not really encrypted, more like obfuscated, using a salted hash based on some machine salt. The PSK / hash actually equates to the real password, you can literally type it in on your phone to join the same network.