Classes | Defines | Enumerations | Functions
eap_sim_common.h File Reference

Go to the source code of this file.

Classes

struct  eap_sim_attrs

Defines

#define EAP_AKA_AUTN_LEN   16
#define EAP_AKA_AUTS_LEN   14
#define EAP_AKA_BIDDING_FLAG_D   0x8000
#define EAP_AKA_CHECKCODE_LEN   20
#define EAP_AKA_CK_LEN   16
#define EAP_AKA_IK_LEN   16
#define EAP_AKA_MAX_FAST_REAUTHS   1000
#define EAP_AKA_MAX_RES_LEN   16
#define EAP_AKA_MIN_RES_LEN   4
#define EAP_AKA_PRIME_CHECKCODE_LEN   32
#define EAP_AKA_PRIME_K_AUT_LEN   32
#define EAP_AKA_PRIME_K_RE_LEN   32
#define EAP_AKA_PRIME_KDF   1
#define EAP_AKA_PRIME_KDF_MAX   10
#define EAP_AKA_RAND_LEN   16
#define EAP_AKA_RES_MAX_LEN   16
#define EAP_AKA_SUBTYPE_AUTHENTICATION_REJECT   2
#define EAP_AKA_SUBTYPE_CHALLENGE   1
#define EAP_AKA_SUBTYPE_CLIENT_ERROR   14
#define EAP_AKA_SUBTYPE_IDENTITY   5
#define EAP_AKA_SUBTYPE_NOTIFICATION   12
#define EAP_AKA_SUBTYPE_REAUTHENTICATION   13
#define EAP_AKA_SUBTYPE_SYNCHRONIZATION_FAILURE   4
#define EAP_AKA_UNABLE_TO_PROCESS_PACKET   0
#define EAP_SIM_AT_ANY_ID_REQ   13
#define EAP_SIM_AT_AUTN   2 /* only AKA */
#define EAP_SIM_AT_AUTS   4 /* only AKA, only peer->server */
#define EAP_SIM_AT_BIDDING   136
#define EAP_SIM_AT_CHECKCODE   134 /* only AKA */
#define EAP_SIM_AT_CLIENT_ERROR_CODE   22 /* only send */
#define EAP_SIM_AT_COUNTER   19 /* only encrypted */
#define EAP_SIM_AT_COUNTER_TOO_SMALL   20 /* only encrypted */
#define EAP_SIM_AT_ENCR_DATA   130
#define EAP_SIM_AT_FULLAUTH_ID_REQ   17
#define EAP_SIM_AT_IDENTITY   14 /* only send */
#define EAP_SIM_AT_IV   129
#define EAP_SIM_AT_KDF   24 /* only AKA' */
#define EAP_SIM_AT_KDF_INPUT   23 /* only AKA' */
#define EAP_SIM_AT_MAC   11
#define EAP_SIM_AT_NEXT_PSEUDONYM   132 /* only encrypted */
#define EAP_SIM_AT_NEXT_REAUTH_ID   133 /* only encrypted */
#define EAP_SIM_AT_NONCE_MT   7 /* only SIM, only send */
#define EAP_SIM_AT_NONCE_S   21 /* only encrypted */
#define EAP_SIM_AT_NOTIFICATION   12
#define EAP_SIM_AT_PADDING   6 /* only encrypted */
#define EAP_SIM_AT_PERMANENT_ID_REQ   10
#define EAP_SIM_AT_RAND   1
#define EAP_SIM_AT_RES   3 /* only AKA, only peer->server */
#define EAP_SIM_AT_RESULT_IND   135
#define EAP_SIM_AT_SELECTED_VERSION   16 /* only SIM */
#define EAP_SIM_AT_VERSION_LIST   15 /* only SIM */
#define EAP_SIM_GENERAL_FAILURE_AFTER_AUTH   0
#define EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH   16384
#define EAP_SIM_INSUFFICIENT_NUM_OF_CHAL   2
#define EAP_SIM_IV_LEN   16
#define EAP_SIM_K_AUT_LEN   16
#define EAP_SIM_K_ENCR_LEN   16
#define EAP_SIM_KC_LEN   8
#define EAP_SIM_KEYING_DATA_LEN   64
#define EAP_SIM_MAC_LEN   16
#define EAP_SIM_MAX_CHAL   3
#define EAP_SIM_MAX_FAST_REAUTHS   1000
#define EAP_SIM_MK_LEN   20
#define EAP_SIM_NONCE_MT_LEN   16
#define EAP_SIM_NONCE_S_LEN   16
#define EAP_SIM_NOT_SUBSCRIBED   1031
#define EAP_SIM_RAND_NOT_FRESH   3
#define EAP_SIM_SRES_LEN   4
#define EAP_SIM_SUBTYPE_CHALLENGE   11
#define EAP_SIM_SUBTYPE_CLIENT_ERROR   14
#define EAP_SIM_SUBTYPE_NOTIFICATION   12
#define EAP_SIM_SUBTYPE_REAUTHENTICATION   13
#define EAP_SIM_SUBTYPE_START   10
#define EAP_SIM_SUCCESS   32768
#define EAP_SIM_TEMPORARILY_DENIED   1026
#define EAP_SIM_UNABLE_TO_PROCESS_PACKET   0
#define EAP_SIM_UNSUPPORTED_VERSION   1
#define EAP_SIM_VERSION   1
#define GSM_RAND_LEN   16

Enumerations

enum  eap_sim_id_req { NO_ID_REQ, ANY_ID, FULLAUTH_ID, PERMANENT_ID }

Functions

void eap_aka_derive_mk (const u8 *identity, size_t identity_len, const u8 *ik, const u8 *ck, u8 *mk)
static void eap_aka_prime_derive_keys (const u8 *identity, size_t identity_len, const u8 *ik, const u8 *ck, u8 *k_encr, u8 *k_aut, u8 *k_re, u8 *msk, u8 *emsk)
static int eap_aka_prime_derive_keys_reauth (const u8 *k_re, u16 counter, const u8 *identity, size_t identity_len, const u8 *nonce_s, u8 *msk, u8 *emsk)
void eap_sim_add_mac (const u8 *k_aut, const u8 *msg, size_t msg_len, u8 *mac, const u8 *extra, size_t extra_len)
int eap_sim_derive_keys (const u8 *mk, u8 *k_encr, u8 *k_aut, u8 *msk, u8 *emsk)
int eap_sim_derive_keys_reauth (u16 _counter, const u8 *identity, size_t identity_len, const u8 *nonce_s, const u8 *mk, u8 *msk, u8 *emsk)
void eap_sim_derive_mk (const u8 *identity, size_t identity_len, const u8 *nonce_mt, u16 selected_version, const u8 *ver_list, size_t ver_list_len, int num_chal, const u8 *kc, u8 *mk)
u8 * eap_sim_msg_add (struct eap_sim_msg *msg, u8 attr, u16 value, const u8 *data, size_t len)
int eap_sim_msg_add_encr_end (struct eap_sim_msg *msg, u8 *k_encr, int attr_pad)
int eap_sim_msg_add_encr_start (struct eap_sim_msg *msg, u8 attr_iv, u8 attr_encr)
u8 * eap_sim_msg_add_full (struct eap_sim_msg *msg, u8 attr, const u8 *data, size_t len)
u8 * eap_sim_msg_add_mac (struct eap_sim_msg *msg, u8 attr)
struct wpabufeap_sim_msg_finish (struct eap_sim_msg *msg, const u8 *k_aut, const u8 *extra, size_t extra_len)
void eap_sim_msg_free (struct eap_sim_msg *msg)
struct eap_sim_msgeap_sim_msg_init (int code, int id, int type, int subtype)
int eap_sim_parse_attr (const u8 *start, const u8 *end, struct eap_sim_attrs *attr, int aka, int encr)
u8 * eap_sim_parse_encr (const u8 *k_encr, const u8 *encr_data, size_t encr_data_len, const u8 *iv, struct eap_sim_attrs *attr, int aka)
void eap_sim_report_notification (void *msg_ctx, int notification, int aka)
int eap_sim_verify_mac (const u8 *k_aut, const struct wpabuf *req, const u8 *mac, const u8 *extra, size_t extra_len)
static int eap_sim_verify_mac_sha256 (const u8 *k_aut, const struct wpabuf *req, const u8 *mac, const u8 *extra, size_t extra_len)

Define Documentation

#define EAP_AKA_AUTN_LEN   16

Definition at line 64 of file eap_sim_common.h.

#define EAP_AKA_AUTS_LEN   14

Definition at line 65 of file eap_sim_common.h.

#define EAP_AKA_BIDDING_FLAG_D   0x8000

Definition at line 181 of file eap_sim_common.h.

#define EAP_AKA_CHECKCODE_LEN   20

Definition at line 72 of file eap_sim_common.h.

#define EAP_AKA_CK_LEN   16

Definition at line 68 of file eap_sim_common.h.

#define EAP_AKA_IK_LEN   16

Definition at line 67 of file eap_sim_common.h.

#define EAP_AKA_MAX_FAST_REAUTHS   1000

Definition at line 69 of file eap_sim_common.h.

#define EAP_AKA_MAX_RES_LEN   16

Definition at line 71 of file eap_sim_common.h.

#define EAP_AKA_MIN_RES_LEN   4

Definition at line 70 of file eap_sim_common.h.

#define EAP_AKA_PRIME_CHECKCODE_LEN   32

Definition at line 75 of file eap_sim_common.h.

#define EAP_AKA_PRIME_K_AUT_LEN   32

Definition at line 74 of file eap_sim_common.h.

#define EAP_AKA_PRIME_K_RE_LEN   32

Definition at line 76 of file eap_sim_common.h.

#define EAP_AKA_PRIME_KDF   1

Definition at line 178 of file eap_sim_common.h.

#define EAP_AKA_PRIME_KDF_MAX   10

Definition at line 205 of file eap_sim_common.h.

#define EAP_AKA_RAND_LEN   16

Definition at line 63 of file eap_sim_common.h.

#define EAP_AKA_RES_MAX_LEN   16

Definition at line 66 of file eap_sim_common.h.

Definition at line 53 of file eap_sim_common.h.

#define EAP_AKA_SUBTYPE_CHALLENGE   1

Definition at line 52 of file eap_sim_common.h.

Definition at line 58 of file eap_sim_common.h.

#define EAP_AKA_SUBTYPE_IDENTITY   5

Definition at line 55 of file eap_sim_common.h.

Definition at line 56 of file eap_sim_common.h.

Definition at line 57 of file eap_sim_common.h.

Definition at line 54 of file eap_sim_common.h.

Definition at line 61 of file eap_sim_common.h.

#define EAP_SIM_AT_ANY_ID_REQ   13

Definition at line 151 of file eap_sim_common.h.

#define EAP_SIM_AT_AUTN   2 /* only AKA */

Definition at line 143 of file eap_sim_common.h.

#define EAP_SIM_AT_AUTS   4 /* only AKA, only peer->server */

Definition at line 145 of file eap_sim_common.h.

#define EAP_SIM_AT_BIDDING   136

Definition at line 168 of file eap_sim_common.h.

#define EAP_SIM_AT_CHECKCODE   134 /* only AKA */

Definition at line 166 of file eap_sim_common.h.

#define EAP_SIM_AT_CLIENT_ERROR_CODE   22 /* only send */

Definition at line 159 of file eap_sim_common.h.

#define EAP_SIM_AT_COUNTER   19 /* only encrypted */

Definition at line 156 of file eap_sim_common.h.

#define EAP_SIM_AT_COUNTER_TOO_SMALL   20 /* only encrypted */

Definition at line 157 of file eap_sim_common.h.

#define EAP_SIM_AT_ENCR_DATA   130

Definition at line 163 of file eap_sim_common.h.

#define EAP_SIM_AT_FULLAUTH_ID_REQ   17

Definition at line 155 of file eap_sim_common.h.

#define EAP_SIM_AT_IDENTITY   14 /* only send */

Definition at line 152 of file eap_sim_common.h.

#define EAP_SIM_AT_IV   129

Definition at line 162 of file eap_sim_common.h.

#define EAP_SIM_AT_KDF   24 /* only AKA' */

Definition at line 161 of file eap_sim_common.h.

#define EAP_SIM_AT_KDF_INPUT   23 /* only AKA' */

Definition at line 160 of file eap_sim_common.h.

#define EAP_SIM_AT_MAC   11

Definition at line 149 of file eap_sim_common.h.

#define EAP_SIM_AT_NEXT_PSEUDONYM   132 /* only encrypted */

Definition at line 164 of file eap_sim_common.h.

#define EAP_SIM_AT_NEXT_REAUTH_ID   133 /* only encrypted */

Definition at line 165 of file eap_sim_common.h.

#define EAP_SIM_AT_NONCE_MT   7 /* only SIM, only send */

Definition at line 147 of file eap_sim_common.h.

#define EAP_SIM_AT_NONCE_S   21 /* only encrypted */

Definition at line 158 of file eap_sim_common.h.

#define EAP_SIM_AT_NOTIFICATION   12

Definition at line 150 of file eap_sim_common.h.

#define EAP_SIM_AT_PADDING   6 /* only encrypted */

Definition at line 146 of file eap_sim_common.h.

#define EAP_SIM_AT_PERMANENT_ID_REQ   10

Definition at line 148 of file eap_sim_common.h.

#define EAP_SIM_AT_RAND   1

Definition at line 142 of file eap_sim_common.h.

#define EAP_SIM_AT_RES   3 /* only AKA, only peer->server */

Definition at line 144 of file eap_sim_common.h.

#define EAP_SIM_AT_RESULT_IND   135

Definition at line 167 of file eap_sim_common.h.

#define EAP_SIM_AT_SELECTED_VERSION   16 /* only SIM */

Definition at line 154 of file eap_sim_common.h.

#define EAP_SIM_AT_VERSION_LIST   15 /* only SIM */

Definition at line 153 of file eap_sim_common.h.

Definition at line 171 of file eap_sim_common.h.

Definition at line 174 of file eap_sim_common.h.

Definition at line 43 of file eap_sim_common.h.

#define EAP_SIM_IV_LEN   16

Definition at line 25 of file eap_sim_common.h.

#define EAP_SIM_K_AUT_LEN   16

Definition at line 22 of file eap_sim_common.h.

#define EAP_SIM_K_ENCR_LEN   16

Definition at line 23 of file eap_sim_common.h.

#define EAP_SIM_KC_LEN   8

Definition at line 26 of file eap_sim_common.h.

#define EAP_SIM_KEYING_DATA_LEN   64

Definition at line 24 of file eap_sim_common.h.

#define EAP_SIM_MAC_LEN   16

Definition at line 20 of file eap_sim_common.h.

#define EAP_SIM_MAX_CHAL   3

Definition at line 48 of file eap_sim_common.h.

#define EAP_SIM_MAX_FAST_REAUTHS   1000

Definition at line 46 of file eap_sim_common.h.

#define EAP_SIM_MK_LEN   20

Definition at line 21 of file eap_sim_common.h.

#define EAP_SIM_NONCE_MT_LEN   16

Definition at line 19 of file eap_sim_common.h.

#define EAP_SIM_NONCE_S_LEN   16

Definition at line 18 of file eap_sim_common.h.

#define EAP_SIM_NOT_SUBSCRIBED   1031

Definition at line 173 of file eap_sim_common.h.

#define EAP_SIM_RAND_NOT_FRESH   3

Definition at line 44 of file eap_sim_common.h.

#define EAP_SIM_SRES_LEN   4

Definition at line 27 of file eap_sim_common.h.

#define EAP_SIM_SUBTYPE_CHALLENGE   11

Definition at line 35 of file eap_sim_common.h.

Definition at line 38 of file eap_sim_common.h.

Definition at line 36 of file eap_sim_common.h.

Definition at line 37 of file eap_sim_common.h.

#define EAP_SIM_SUBTYPE_START   10

Definition at line 34 of file eap_sim_common.h.

#define EAP_SIM_SUCCESS   32768

Definition at line 175 of file eap_sim_common.h.

#define EAP_SIM_TEMPORARILY_DENIED   1026

Definition at line 172 of file eap_sim_common.h.

Definition at line 41 of file eap_sim_common.h.

Definition at line 42 of file eap_sim_common.h.

#define EAP_SIM_VERSION   1

Definition at line 31 of file eap_sim_common.h.

#define GSM_RAND_LEN   16

Definition at line 29 of file eap_sim_common.h.


Enumeration Type Documentation

Enumerator:
NO_ID_REQ 
ANY_ID 
FULLAUTH_ID 
PERMANENT_ID 

Definition at line 184 of file eap_sim_common.h.


Function Documentation

void eap_aka_derive_mk ( const u8 *  identity,
size_t  identity_len,
const u8 *  ik,
const u8 *  ck,
u8 *  mk 
)

Definition at line 61 of file eap_sim_common.c.

static void eap_aka_prime_derive_keys ( const u8 *  identity,
size_t  identity_len,
const u8 *  ik,
const u8 *  ck,
u8 *  k_encr,
u8 *  k_aut,
u8 *  k_re,
u8 *  msk,
u8 *  emsk 
) [inline, static]

Definition at line 114 of file eap_sim_common.h.

static int eap_aka_prime_derive_keys_reauth ( const u8 *  k_re,
u16  counter,
const u8 *  identity,
size_t  identity_len,
const u8 *  nonce_s,
u8 *  msk,
u8 *  emsk 
) [inline, static]

Definition at line 122 of file eap_sim_common.h.

void eap_sim_add_mac ( const u8 *  k_aut,
const u8 *  msg,
size_t  msg_len,
u8 *  mac,
const u8 *  extra,
size_t  extra_len 
)

Definition at line 210 of file eap_sim_common.c.

int eap_sim_derive_keys ( const u8 *  mk,
u8 *  k_encr,
u8 *  k_aut,
u8 *  msk,
u8 *  emsk 
)

Definition at line 82 of file eap_sim_common.c.

int eap_sim_derive_keys_reauth ( u16  _counter,
const u8 *  identity,
size_t  identity_len,
const u8 *  nonce_s,
const u8 *  mk,
u8 *  msk,
u8 *  emsk 
)

Definition at line 112 of file eap_sim_common.c.

void eap_sim_derive_mk ( const u8 *  identity,
size_t  identity_len,
const u8 *  nonce_mt,
u16  selected_version,
const u8 *  ver_list,
size_t  ver_list_len,
int  num_chal,
const u8 *  kc,
u8 *  mk 
)

Definition at line 33 of file eap_sim_common.c.

u8* eap_sim_msg_add ( struct eap_sim_msg msg,
u8  attr,
u16  value,
const u8 *  data,
size_t  len 
)

Definition at line 1080 of file eap_sim_common.c.

int eap_sim_msg_add_encr_end ( struct eap_sim_msg msg,
u8 *  k_encr,
int  attr_pad 
)

Definition at line 1141 of file eap_sim_common.c.

int eap_sim_msg_add_encr_start ( struct eap_sim_msg msg,
u8  attr_iv,
u8  attr_encr 
)

Definition at line 1117 of file eap_sim_common.c.

u8* eap_sim_msg_add_full ( struct eap_sim_msg msg,
u8  attr,
const u8 *  data,
size_t  len 
)

Definition at line 1056 of file eap_sim_common.c.

u8* eap_sim_msg_add_mac ( struct eap_sim_msg msg,
u8  attr 
)

Definition at line 1108 of file eap_sim_common.c.

struct wpabuf* eap_sim_msg_finish ( struct eap_sim_msg msg,
const u8 *  k_aut,
const u8 *  extra,
size_t  extra_len 
) [read]

Definition at line 1014 of file eap_sim_common.c.

void eap_sim_msg_free ( struct eap_sim_msg msg)

Definition at line 1047 of file eap_sim_common.c.

struct eap_sim_msg* eap_sim_msg_init ( int  code,
int  id,
int  type,
int  subtype 
) [read]

Definition at line 984 of file eap_sim_common.c.

int eap_sim_parse_attr ( const u8 *  start,
const u8 *  end,
struct eap_sim_attrs attr,
int  aka,
int  encr 
)

Definition at line 502 of file eap_sim_common.c.

u8* eap_sim_parse_encr ( const u8 *  k_encr,
const u8 *  encr_data,
size_t  encr_data_len,
const u8 *  iv,
struct eap_sim_attrs attr,
int  aka 
)

Definition at line 940 of file eap_sim_common.c.

void eap_sim_report_notification ( void *  msg_ctx,
int  notification,
int  aka 
)

Definition at line 1174 of file eap_sim_common.c.

int eap_sim_verify_mac ( const u8 *  k_aut,
const struct wpabuf req,
const u8 *  mac,
const u8 *  extra,
size_t  extra_len 
)

Definition at line 170 of file eap_sim_common.c.

static int eap_sim_verify_mac_sha256 ( const u8 *  k_aut,
const struct wpabuf req,
const u8 *  mac,
const u8 *  extra,
size_t  extra_len 
) [inline, static]

Definition at line 131 of file eap_sim_common.h.



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