Details of the calculation
For WPA-PSK encryption, the binary key is derived from the passphrase according to the following formula: Key = PBKDF2(passphrase, ssid, 4096, 256)
The function PBKDF2 is a standardized method to derive a key from a passphrase. It is specified in RFC2898 with a clear explanation on how to compute it. The function needs an underlying pseudorandom function. In the case of WPA, the underlying function is HMAC-SHA1.
SHA1 is a function that computes a 160-bit hash from an arbitrary amount of input data. It is clearly explained in RFC3174. HMAC is a standardized method to turn a cryptographic hash function into a keyed message authentication function. It is specified in RFC2104.
To summarize, the key derivation process involves iterating a HMAC-SHA1 function 4096 times, and then doing that again to produce more key bits. The amount of computation involved is equivalent to computing the SHA1 hash over 1 MByte of data. Perhaps that explains why the Javascript on this page is so slow.
Main Topics
Browse All Topics





by: asavenerPosted on 2009-06-23 at 08:52:42ID: 24693077
WPA key calculation: From passphrase to hexadecimal key
is/wpapsk. html
http://www.xs4all.nl/~rjor