wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
fips_prf_openssl.c File Reference

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

#include "includes.h"
#include <openssl/sha.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. More...
 

Detailed Description

FIPS 186-2 PRF for libcrypto.

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.