Functions
eap_sake_common.c File Reference
#include "includes.h"
#include "common.h"
#include "wpabuf.h"
#include "crypto/sha1.h"
#include "eap_defs.h"
#include "eap_sake_common.h"
Include dependency graph for eap_sake_common.c:

Go to the source code of this file.

Functions

void eap_sake_add_attr (struct wpabuf *buf, u8 type, const u8 *data, size_t len)
int eap_sake_compute_mic (const u8 *tek_auth, const u8 *rand_s, const u8 *rand_p, const u8 *serverid, size_t serverid_len, const u8 *peerid, size_t peerid_len, int peer, const u8 *eap, size_t eap_len, const u8 *mic_pos, u8 *mic)
void eap_sake_derive_keys (const u8 *root_secret_a, const u8 *root_secret_b, const u8 *rand_s, const u8 *rand_p, u8 *tek, u8 *msk, u8 *emsk)
static void eap_sake_kdf (const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, const u8 *data2, size_t data2_len, u8 *buf, size_t buf_len)
static int eap_sake_parse_add_attr (struct eap_sake_parse_attr *attr, const u8 *pos)
int eap_sake_parse_attributes (const u8 *buf, size_t len, struct eap_sake_parse_attr *attr)

Function Documentation

void eap_sake_add_attr ( struct wpabuf buf,
u8  type,
const u8 *  data,
size_t  len 
)

Definition at line 384 of file eap_sake_common.c.

int eap_sake_compute_mic ( const u8 *  tek_auth,
const u8 *  rand_s,
const u8 *  rand_p,
const u8 *  serverid,
size_t  serverid_len,
const u8 *  peerid,
size_t  peerid_len,
int  peer,
const u8 *  eap,
size_t  eap_len,
const u8 *  mic_pos,
u8 *  mic 
)

eap_sake_compute_mic - Compute EAP-SAKE MIC for an EAP packet : 16-byte TEK-Auth : 16-byte RAND_S : 16-byte RAND_P : SERVERID : SERVERID length : PEERID : PEERID length : MIC calculation for 0 = Server, 1 = Peer message : EAP packet : EAP packet length : MIC position in the EAP packet (must be [eap .. eap + eap_len]) : Buffer for the computed 16-byte MIC

Definition at line 322 of file eap_sake_common.c.

void eap_sake_derive_keys ( const u8 *  root_secret_a,
const u8 *  root_secret_b,
const u8 *  rand_s,
const u8 *  rand_p,
u8 *  tek,
u8 *  msk,
u8 *  emsk 
)

eap_sake_derive_keys - Derive EAP-SAKE keys : 16-byte Root-Secret-A : 16-byte Root-Secret-B : 16-byte RAND_S : 16-byte RAND_P : Buffer for Temporary EAK Keys (TEK-Auth[16] | TEK-Cipher[16]) : Buffer for 64-byte MSK : Buffer for 64-byte EMSK

This function derives EAP-SAKE keys as defined in RFC 4763, section 3.2.6.

Definition at line 265 of file eap_sake_common.c.

static void eap_sake_kdf ( const u8 *  key,
size_t  key_len,
const char *  label,
const u8 *  data,
size_t  data_len,
const u8 *  data2,
size_t  data2_len,
u8 *  buf,
size_t  buf_len 
) [static]

eap_sake_kdf - EAP-SAKE Key Derivation Function (KDF) : Key for KDF : Length of the key in bytes : A unique label for each purpose of the KDF : Extra data (start) to bind into the key : Length of the data : Extra data (end) to bind into the key : Length of the data2 : Buffer for the generated pseudo-random key : Number of bytes of key to generate

This function is used to derive new, cryptographically separate keys from a given key (e.g., SMS). This is identical to the PRF used in IEEE 802.11i.

Definition at line 214 of file eap_sake_common.c.

static int eap_sake_parse_add_attr ( struct eap_sake_parse_attr attr,
const u8 *  pos 
) [static]

Definition at line 24 of file eap_sake_common.c.

int eap_sake_parse_attributes ( const u8 *  buf,
size_t  len,
struct eap_sake_parse_attr attr 
)

eap_sake_parse_attributes - Parse EAP-SAKE attributes : Packet payload (starting with the first attribute) : Payload length : Structure to be filled with found attributes Returns: 0 on success or -1 on failure

Definition at line 166 of file eap_sake_common.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:38