> What exactly is the criteria for "ASCII-encoded" here? Just that they must be 8-bit chars with the high bit unset? Are non-printable characters allowed?
Wikipedia's Wi-Fi Protected Access says the WPA-PSK passphrase is 8 to 63 printable ASCII characters, and includes this reference as a footnote:
Each character in the pass-phrase must have an encoding in the range of 32 to 126 (decimal), inclusive. (IEEE Std. 802.11i-2004, Annex H.4.1)
The space character is included in this range.
> Come to think of it... Does my approach of randomly generating a passphrase make any sense? Would it be better to just generate 64 random bytes and use that as a key?
> I think I'll still just generate 256 bits using a secure RNG...
Does your wireless router and every device you want to connect to your wireless network let you manually enter the WPA-PSK key as 64 hex characters? If not, then you may have to use an ASCII passphrase to be able to enter it in all of your devices.
Ubuntu is very tricky and very "delicate" when working with this kind of connections. WPA, WPA2, WEP... etc...
Assuming that you've already checked your /etc/network/interfaces.conf
and all is correct,
You have 2 ways. The Easyone and the not so easy one:
Easy.
Just Edit your connections
. Up in the left side of the volume icon. There, select your wireless connection and just delete it. At this point I'd suggest a restart
(For both, your pc and your AP). Now, when you pc turns on, try to connect to My connection
and procceed normally.
That should work.. sometimes you have to wait a while but it works the most of the times.
.
Now. The not so easy way
I like to use command line. So, if you are not used to it.. well.. this way won't be so fast.. but you can learn a lot.
With this method you will be working with a file called wpa_supplicant.conf
which, as its name says, it will beg for a WPA connection.
now, With
iwlist scanning
You can see all your available AP (Access Points)
You should see My Connection
.
Make the wpa_supplicant.conf with:
linux:~# /usr/bin/wpa_passphrase SSID_HERE SECRET_WIFI_PASS_HERE | tee -a /etc/wpa_supplicant.conf
And you will get something like this as output:
network={
ssid="SSID_HERE"
#psk="SECRET_WIFI_PASS_HERE"
psk=6f7590250c4496ff7bf8dd25199ac3bb5a614d4bc069975aa884bcf084da73bc
}
..The last one is the encrypted pass which is usefull in the /etc/network/interfaces file
then, you'll need the fresh new wpa_supplicant.conf
to stablish the connection with:
linux:~# /sbin/wpa_supplicant wpa_supplicant -d wext -i wlan0 -c /etc/wpa_supplicant.conf -B
-d wext is for the wireless extention
-B tells the wpa_supplicant to make a background connection to prevent the wireless to disconect if the console gets closed.
After that, you should have a fress active connection.
Hope this helps for you. If it doesn't, let me know and i'll try to help.
Best Answer
Yes, the whole world has to use ASCII for their WPA-/WPA2-PSK passphrases.
This may not be a big a burden as you may think, as ASCII has been so pervasive in computing since it was first invented, that the computer-using populace worldwide is well versed in using ASCII. For example, hostnames and domain names were ASCII-only for quite a long time (have internationalized (Unicode-based) domain names even caught on anywhere yet?). Most programming languages are still ASCII-only, or "Unicode-unfriendly" at best. Command-line environments tend to also be ASCII-only or Unicode-unfriendly, etc.
Because of this legacy, understanding how to deal with ASCII is, sadly, just a part of becoming "computer literate" in any culture.