I was thinking of generating a WPA-PSK passphrase, and I see in the OpenBSD manpage for wpa-psk(8): The passphrase must be a sequence of between 8 . The details of the calculation for obtaining the key are described in the link you mentioned: For WPA-PSK encryption, the binary key is derived from the passphrase according to the following formula: Key = PBKDF2(passphrase, ssid, , ) The function PBKDF2 is a standardized method to derive a key from a passphrase. If ASCII characters are used, the bit key is calculated by applying the PBKDF2 key derivation function to the passphrase, using the SSID as the salt and iterations of HMAC-SHA1. For more information see WPA Key Calculation.