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

SHA1 T-PRF for EAP-FAST. More...

#include "includes.h"
#include "common.h"
#include "sha1.h"
#include "crypto.h"

Functions

int sha1_t_prf (const u8 *key, size_t key_len, const char *label, const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len)
 EAP-FAST Pseudo-Random Function (T-PRF) More...
 

Detailed Description

SHA1 T-PRF for EAP-FAST.

Function Documentation

int sha1_t_prf ( const u8 *  key,
size_t  key_len,
const char *  label,
const u8 *  seed,
size_t  seed_len,
u8 *  buf,
size_t  buf_len 
)

EAP-FAST Pseudo-Random Function (T-PRF)

Parameters
keyKey for PRF
key_lenLength of the key in bytes
labelA unique label for each purpose of the PRF
seedSeed value to bind into the key
seed_lenLength of the seed
bufBuffer for the generated pseudo-random key
buf_lenNumber of bytes of key to generate
Returns
0 on success, -1 of failure

This function is used to derive new, cryptographically separate keys from a given key for EAP-FAST. T-PRF is defined in RFC 4851, Section 5.5.