Defines | Functions
eap_gpsk_common.c File Reference
#include "includes.h"
#include "common.h"
#include "crypto/aes_wrap.h"
#include "crypto/sha256.h"
#include "eap_defs.h"
#include "eap_gpsk_common.h"
Include dependency graph for eap_gpsk_common.c:

Go to the source code of this file.

Defines

#define EAP_GPSK_PK_LEN_AES   16
#define EAP_GPSK_SK_LEN_AES   16

Functions

int eap_gpsk_compute_mic (const u8 *sk, size_t sk_len, int vendor, int specifier, const u8 *data, size_t len, u8 *mic)
static int eap_gpsk_compute_mic_aes (const u8 *sk, size_t sk_len, const u8 *data, size_t len, u8 *mic)
int eap_gpsk_derive_keys (const u8 *psk, size_t psk_len, int vendor, int specifier, const u8 *rand_peer, const u8 *rand_server, const u8 *id_peer, size_t id_peer_len, const u8 *id_server, size_t id_server_len, u8 *msk, u8 *emsk, u8 *sk, size_t *sk_len, u8 *pk, size_t *pk_len)
static int eap_gpsk_derive_keys_aes (const u8 *psk, size_t psk_len, const u8 *seed, size_t seed_len, u8 *msk, u8 *emsk, u8 *sk, size_t *sk_len, u8 *pk, size_t *pk_len)
static int eap_gpsk_derive_keys_helper (u32 csuite_specifier, u8 *kdf_out, size_t kdf_out_len, const u8 *psk, size_t psk_len, const u8 *seed, size_t seed_len, u8 *msk, u8 *emsk, u8 *sk, size_t sk_len, u8 *pk, size_t pk_len)
static int eap_gpsk_gkdf_cmac (const u8 *psk, const u8 *data, size_t data_len, u8 *buf, size_t len)
size_t eap_gpsk_mic_len (int vendor, int specifier)
int eap_gpsk_supported_ciphersuite (int vendor, int specifier)

Define Documentation

#define EAP_GPSK_PK_LEN_AES   16
#define EAP_GPSK_SK_LEN_AES   16

Function Documentation

int eap_gpsk_compute_mic ( const u8 *  sk,
size_t  sk_len,
int  vendor,
int  specifier,
const u8 *  data,
size_t  len,
u8 *  mic 
)

eap_gpsk_compute_mic - Compute EAP-GPSK MIC for an EAP packet : Session key SK from eap_gpsk_derive_keys() : SK length in bytes from eap_gpsk_derive_keys() : CSuite/Vendor : CSuite/Specifier : Input data to MIC : Input data length in bytes : Buffer for the computed MIC, eap_gpsk_mic_len(cipher) bytes Returns: 0 on success, -1 on failure

Definition at line 397 of file eap_gpsk_common.c.

static int eap_gpsk_compute_mic_aes ( const u8 *  sk,
size_t  sk_len,
const u8 *  data,
size_t  len,
u8 *  mic 
) [static]

Definition at line 373 of file eap_gpsk_common.c.

int eap_gpsk_derive_keys ( const u8 *  psk,
size_t  psk_len,
int  vendor,
int  specifier,
const u8 *  rand_peer,
const u8 *  rand_server,
const u8 *  id_peer,
size_t  id_peer_len,
const u8 *  id_server,
size_t  id_server_len,
u8 *  msk,
u8 *  emsk,
u8 *  sk,
size_t *  sk_len,
u8 *  pk,
size_t *  pk_len 
)

eap_gpsk_derive_keys - Derive EAP-GPSK keys : Pre-shared key : Length of psk in bytes : CSuite/Vendor : CSuite/Specifier : 32-byte RAND_Peer : 32-byte RAND_Server : ID_Peer : Length of ID_Peer : ID_Server : Length of ID_Server : Buffer for 64-byte MSK : Buffer for 64-byte EMSK : Buffer for SK (at least EAP_GPSK_MAX_SK_LEN bytes) : Buffer for returning length of SK : Buffer for PK (at least EAP_GPSK_MAX_PK_LEN bytes) : Buffer for returning length of PK Returns: 0 on success, -1 on failure

Definition at line 284 of file eap_gpsk_common.c.

static int eap_gpsk_derive_keys_aes ( const u8 *  psk,
size_t  psk_len,
const u8 *  seed,
size_t  seed_len,
u8 *  msk,
u8 *  emsk,
u8 *  sk,
size_t *  sk_len,
u8 *  pk,
size_t *  pk_len 
) [static]

Definition at line 194 of file eap_gpsk_common.c.

static int eap_gpsk_derive_keys_helper ( u32  csuite_specifier,
u8 *  kdf_out,
size_t  kdf_out_len,
const u8 *  psk,
size_t  psk_len,
const u8 *  seed,
size_t  seed_len,
u8 *  msk,
u8 *  emsk,
u8 *  sk,
size_t  sk_len,
u8 *  pk,
size_t  pk_len 
) [static]

Definition at line 113 of file eap_gpsk_common.c.

static int eap_gpsk_gkdf_cmac ( const u8 *  psk,
const u8 *  data,
size_t  data_len,
u8 *  buf,
size_t  len 
) [static]

Definition at line 44 of file eap_gpsk_common.c.

size_t eap_gpsk_mic_len ( int  vendor,
int  specifier 
)

eap_gpsk_mic_len - Get the length of the MIC : CSuite/Vendor : CSuite/Specifier Returns: MIC length in bytes

Definition at line 355 of file eap_gpsk_common.c.

int eap_gpsk_supported_ciphersuite ( int  vendor,
int  specifier 
)

eap_gpsk_supported_ciphersuite - Check whether ciphersuite is supported : CSuite/Vendor : CSuite/Specifier Returns: 1 if ciphersuite is support, or 0 if not

Definition at line 30 of file eap_gpsk_common.c.



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