#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) |
static int | pbkdf2_sha1_f (const char *passphrase, const char *ssid, size_t ssid_len, int iterations, unsigned int count, u8 *digest) |
int pbkdf2_sha1 | ( | const char * | passphrase, | |
const char * | ssid, | |||
size_t | ssid_len, | |||
int | iterations, | |||
u8 * | buf, | |||
size_t | buflen | |||
) |
pbkdf2_sha1 - SHA1-based key derivation function (PBKDF2) for IEEE 802.11i : ASCII passphrase : SSID : SSID length in bytes : Number of iterations to run : Buffer for the generated key : Length of the buffer in bytes Returns: 0 on success, -1 of failure
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 80 of file sha1-pbkdf2.c.
static int pbkdf2_sha1_f | ( | const char * | passphrase, | |
const char * | ssid, | |||
size_t | ssid_len, | |||
int | iterations, | |||
unsigned int | count, | |||
u8 * | digest | |||
) | [static] |
Definition at line 22 of file sha1-pbkdf2.c.