User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

wpa-psk or wpa-passphrase?

Mon Jan 27, 2014 1:44 am

I've always used wpa-passphrase in the /etc/network/interfaces file with a string value representing a LOOOOOONG password...in fact, so long it's called a passphrase instead of a password.

The syntax would be something like:

wpa-passphrase "Thisisawholelotofwords,actuallyASCIIcharacters-upto64ofthem"

OTOH, I've never used wpa-psk in the file because I've always considered that to be the hex key that was generated from the passphrase. That key is 64 hex characters long NOT surrounded by quotes:

wpa-psk 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

But...

Looking around these forums, this site, other sites, numerous Google Search results, etc etc I see many many people using wpa-psk as if it were the holder of the passphrase instead (or maybe even in addition to!) a hex key.

This is strange.

In any case, I've made a couple posts here referencing a working /etc/network/interfaces file that uses wpa-passphrase with a multiword quoted string as its argument so I certainly know THAT works.

Bottomline question: Does using instead wpa-psk with a multiword quoted string ALSO work?

User avatar
joan
Posts: 14886
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: wpa-psk or wpa-passphrase?

Mon Jan 27, 2014 9:13 am

Perhaps they are synonyms?

8-63 ASCII characters in the range 32-126 (decimal).

Aren't they both just converted into a 256 bit key anyhow?

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: wpa-psk or wpa-passphrase?

Mon Jan 27, 2014 11:19 am

joan wrote:Perhaps they are synonyms?

8-63 ASCII characters in the range 32-126 (decimal).

Aren't they both just converted into a 256 bit key anyhow?
Not to my knowledge, no - but that IS my question since, as noted, it appears a LOT of people are treating them as synonyms and that MIGHT be the problem behind some people's inability to get various wifi stuff working. There was a fairly recent post on the Beginner board, for example, that had a problem described about a wifi dongle where the poster gives a couple lines from his/her interfaces files where the pertinent line was like "wpa-psk "mysecretpassword"" when, AFAIK, that SHOULD have been something like "wpa-password "mysecretpassword"".

But I don't KNOW that and considerable searching around the 'Net hasn't resolved it satisfactorily. hence this thread.

AFAIK, the passphrase is the password and the psk is the passphrase converted to hex (64 - EXACTLY 64 - hex characters or the 256 bits you mention).

Post-post Addendum It should be noted that there may be a "confusing factor" underlying some implementations of wifi connectivity - namely, some folks, like myself, use the interfaces file with no overt interaction with wpa_supplicant while others use wpa_supplicant's own configuration file(s) and SOME people are using BOTH the interfaces file AND wpa_supplicant's configuration file(s). I have NO CLUE how conflicts between what's in the interfaces file and what's in the wpa_supplicant's configuration files get resolved if wpa_supplicant is overtly being used - it MAY be that the interfaces file essentially gets ignored in whole or in part - thus someone with something like 'wpa-psk "Mysecret ppassword"" in their interfaces file may THINK that is correct when actually the wpa_supplicant config file(s) are correcting for it. Or something.

Yet Another Addendum - here's a link to a PSK creator (from a passphrase) for readers who are wondering about the relationship: http://www.wireshark.org/tools/wpa-psk.html
Last edited by Raspruss on Mon Jan 27, 2014 12:36 pm, edited 2 times in total.

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: wpa-psk or wpa-passphrase?

Mon Jan 27, 2014 12:34 pm

I have seen cases where the use of double quotes around SSID and password caused a failure to authenticate to the wifi AP.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: wpa-psk or wpa-passphrase?

Mon Jan 27, 2014 12:53 pm

Richard-TX wrote:I have seen cases where the use of double quotes around SSID and password caused a failure to authenticate to the wifi AP.
That would be a different problem for another thread - while searching for the answer to the first post's question I found a number of pages noting that there are devices out there in the world that are not compliant with the passphrase syntax - those devices might have problems with, for example, spaces in the passphrase - of course, if one HAS spaces in the passphrase then a quoted string is pretty much necessary.

Return to “Beginners”