sha1-pbkdf2.c File Reference

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"
Include dependency graph for sha1-pbkdf2.c:

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.

Detailed Description

SHA1-based key derivation function (PBKDF2) for IEEE 802.11i.

Copyright
Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>

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.


Function Documentation

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.

Parameters:
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
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 82 of file sha1-pbkdf2.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:19:43 2009 for hostapd by  doxygen 1.6.1