wpa_supplicant / hostapd 2.0
Functions

fips_prf_gnutls.c File Reference

FIPS 186-2 PRF for libgcrypt. More...

#include "includes.h"
#include <gcrypt.h>
#include "common.h"
#include "crypto.h"

Functions

int fips186_2_prf (const u8 *seed, size_t seed_len, u8 *x, size_t xlen)
 NIST FIPS Publication 186-2 change notice 1 PRF.

Detailed Description

FIPS 186-2 PRF for libgcrypt.

Copyright
Copyright (c) 2004-2009, Jouni Malinen <j@w1.fi>

This software may be distributed under the terms of the BSD license. See README for more details.


Function Documentation

int fips186_2_prf ( const u8 *  seed,
size_t  seed_len,
u8 *  x,
size_t  xlen 
)

NIST FIPS Publication 186-2 change notice 1 PRF.

Parameters:
seedSeed/key for the PRF
seed_lenSeed length in bytes
xBuffer for PRF output
xlenOutput length in bytes
Returns:
0 on success, -1 on failure

This function implements random number generation specified in NIST FIPS Publication 186-2 for EAP-SIM. This PRF uses a function that is similar to SHA-1, but has different message padding.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines