OpenWrt Forum Archive

Topic: 63 character psk2 key not accepted on atheros wireless config.

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

When putting a 63 character key in the wireless config:

config wifi-device  wifi0
        option type     atheros

config wifi-iface
        option device   wifi0
        option network  wan
        option mode     sta
        option ssid     MySSID
        option encryption psk2
        option key      e7CXzwMp9IMRZMWZDF3TKryZ0uy7jUV14HgJAkGSIqkCcQI4ltpHUWDdrHuAdVO  <- (not really my key)

when running /sbin/wifi the following error is returned:

root@OpenWrt:/etc/config# /sbin/wifi
Line 7: Invalid passphrase length 64 (expected: 8..63) 'a09bf35449cf98b27d962841ad5a62dddf48442a19c22faa30112b879e719150"'.
Line 7: failed to parse psk '"a09bf35449cf98b27d962841ad5a62dddf48442a19c22faa30112b879e719150"'.
Line 8: WPA-PSK accepted for key management, but no PSK configured.
Line 8: failed to parse network block.
Failed to read or parse configuration '/var/run/wpa_supplicant-ath0.conf'.

Using a shorter key such as a 50 character key yields the same results.

I've been using this same configuration on previous Kamikaze builds,  Has a configuration requirement changed?

This many characters is only useful for dictionary keys.  For random keys, anything more than 128 bits is pretty safe.

But it's a bug, so it should be fixed...

Yeah, but at the moment it's broken for *any* sized key. /lib/wifi/madwifi.sh uses wpa_passphrase to convert any passphrase into a 64-character string, and this is rejected by wpa_supplicant.

The discussion might have continued from here.