SHA1-based key derivation function (PBKDF2) for IEEE 802.11i. More...
#include "includes.h"
#include "common.h"
#include "sha1.h"
#include "md5.h"
#include "crypto.h"
Go to the source code of this file.
Functions | |
int | pbkdf2_sha1 (const char *passphrase, const char *ssid, size_t ssid_len, int iterations, u8 *buf, size_t buflen) |
SHA1-based key derivation function (PBKDF2) for IEEE 802.11i. |
SHA1-based key derivation function (PBKDF2) for IEEE 802.11i.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
Definition in file sha1-pbkdf2.c.
int pbkdf2_sha1 | ( | const char * | passphrase, | |
const char * | ssid, | |||
size_t | ssid_len, | |||
int | iterations, | |||
u8 * | buf, | |||
size_t | buflen | |||
) |
SHA1-based key derivation function (PBKDF2) for IEEE 802.11i.
passphrase | ASCII passphrase | |
ssid | SSID | |
ssid_len | SSID length in bytes | |
iterations | Number of iterations to run | |
buf | Buffer for the generated key | |
buflen | Length of the buffer in bytes |
This function is used to derive PSK for WPA-PSK. For this protocol, iterations is set to 4096 and buflen to 32. This function is described in IEEE Std 802.11-2004, Clause H.4. The main construction is from PKCS#5 v2.0.
Definition at line 82 of file sha1-pbkdf2.c.