A couple of days ago I wrote a patch for connecting the wpa_passphrase utility from wpa_supplicant to the FreeBSD src build, but judging from the lack of interest on the freebsd-mobile mailing list, I thought I’d better explain the usefulness of this utility on my blog as well ;-)
I often use wpa_passphrase when assigning new WPA keys to users on my FreeBSD (and hostapd) based access points.
Instead of having to generate all the 256-bit pre-shared WPA keys from ASCII passphrases at runtime (cpu intensive operation when you have many keys configured), I just call wpa_passphrase with the given SSID, enter the ASCII passphrase and it gives me a static 256-bit key in return.
This furthermore allows me to give both the ASCII passphrase and the 256-bit pre-shared WPA key to any given user along with proper instructions.
The last part is especially helpful since quite a few vendor specific WPA configuration utilities for that “other” operating system accepts either an ASCII passphrase _or_ a WPA pre-shared key, meaning I would have to guess which vendor specific piece of software a given user has, and hand him/her either an ASCII passphrase or a WPA pre-shared key based on my guess.
Hopefully someone with src commit bit will eventually pick up the patch and get it included in FreeBSD proper.