eap_sake_common.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  eap_sake_hdr
struct  eap_sake_parse_attr

Defines

#define EAP_SAKE_AT_ANY_ID_REQ   9
#define EAP_SAKE_AT_ENCR_DATA   128
#define EAP_SAKE_AT_IV   129
#define EAP_SAKE_AT_MIC_P   4
#define EAP_SAKE_AT_MIC_S   3
#define EAP_SAKE_AT_MSK_LIFE   132
#define EAP_SAKE_AT_NEXT_TMPID   131
#define EAP_SAKE_AT_PADDING   130
#define EAP_SAKE_AT_PEERID   6
#define EAP_SAKE_AT_PERM_ID_REQ   10
#define EAP_SAKE_AT_RAND_P   2
#define EAP_SAKE_AT_RAND_S   1
#define EAP_SAKE_AT_SERVERID   5
#define EAP_SAKE_AT_SPI_P   8
#define EAP_SAKE_AT_SPI_S   7
#define EAP_SAKE_MIC_LEN   16
#define EAP_SAKE_RAND_LEN   16
#define EAP_SAKE_ROOT_SECRET_LEN   16
#define EAP_SAKE_SMS_LEN   16
#define EAP_SAKE_SUBTYPE_AUTH_REJECT   3
#define EAP_SAKE_SUBTYPE_CHALLENGE   1
#define EAP_SAKE_SUBTYPE_CONFIRM   2
#define EAP_SAKE_SUBTYPE_IDENTITY   4
#define EAP_SAKE_TEK_AUTH_LEN   16
#define EAP_SAKE_TEK_CIPHER_LEN   16
#define EAP_SAKE_TEK_LEN   (EAP_SAKE_TEK_AUTH_LEN + EAP_SAKE_TEK_CIPHER_LEN)
#define EAP_SAKE_VERSION   2

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)
int eap_sake_parse_attributes (const u8 *buf, size_t len, struct eap_sake_parse_attr *attr)

Variables

struct eap_sake_hdr STRUCT_PACKED

Define Documentation

#define EAP_SAKE_AT_ANY_ID_REQ   9

Definition at line 33 of file eap_sake_common.h.

#define EAP_SAKE_AT_ENCR_DATA   128

Definition at line 35 of file eap_sake_common.h.

#define EAP_SAKE_AT_IV   129

Definition at line 36 of file eap_sake_common.h.

#define EAP_SAKE_AT_MIC_P   4

Definition at line 28 of file eap_sake_common.h.

#define EAP_SAKE_AT_MIC_S   3

Definition at line 27 of file eap_sake_common.h.

#define EAP_SAKE_AT_MSK_LIFE   132

Definition at line 39 of file eap_sake_common.h.

#define EAP_SAKE_AT_NEXT_TMPID   131

Definition at line 38 of file eap_sake_common.h.

#define EAP_SAKE_AT_PADDING   130

Definition at line 37 of file eap_sake_common.h.

#define EAP_SAKE_AT_PEERID   6

Definition at line 30 of file eap_sake_common.h.

#define EAP_SAKE_AT_PERM_ID_REQ   10

Definition at line 34 of file eap_sake_common.h.

#define EAP_SAKE_AT_RAND_P   2

Definition at line 26 of file eap_sake_common.h.

#define EAP_SAKE_AT_RAND_S   1

Definition at line 25 of file eap_sake_common.h.

#define EAP_SAKE_AT_SERVERID   5

Definition at line 29 of file eap_sake_common.h.

#define EAP_SAKE_AT_SPI_P   8

Definition at line 32 of file eap_sake_common.h.

#define EAP_SAKE_AT_SPI_S   7

Definition at line 31 of file eap_sake_common.h.

#define EAP_SAKE_MIC_LEN   16

Definition at line 42 of file eap_sake_common.h.

#define EAP_SAKE_RAND_LEN   16

Definition at line 41 of file eap_sake_common.h.

#define EAP_SAKE_ROOT_SECRET_LEN   16

Definition at line 43 of file eap_sake_common.h.

#define EAP_SAKE_SMS_LEN   16

Definition at line 44 of file eap_sake_common.h.

#define EAP_SAKE_SUBTYPE_AUTH_REJECT   3

Definition at line 22 of file eap_sake_common.h.

#define EAP_SAKE_SUBTYPE_CHALLENGE   1

Definition at line 20 of file eap_sake_common.h.

#define EAP_SAKE_SUBTYPE_CONFIRM   2

Definition at line 21 of file eap_sake_common.h.

#define EAP_SAKE_SUBTYPE_IDENTITY   4

Definition at line 23 of file eap_sake_common.h.

#define EAP_SAKE_TEK_AUTH_LEN   16

Definition at line 45 of file eap_sake_common.h.

#define EAP_SAKE_TEK_CIPHER_LEN   16

Definition at line 46 of file eap_sake_common.h.

#define EAP_SAKE_TEK_LEN   (EAP_SAKE_TEK_AUTH_LEN + EAP_SAKE_TEK_CIPHER_LEN)

Definition at line 47 of file eap_sake_common.h.

#define EAP_SAKE_VERSION   2

Definition at line 18 of file eap_sake_common.h.


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.

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.


Variable Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Fri Jan 11 10:02:01 2013