All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
eap_sim.h File Reference
#include "eap_types.h"
+ Include dependency graph for eap_sim.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  eapsim_keys
 

Macros

#define EAP_SIM_VERSION   0x0001
 
#define EAPSIM_AUTH_SIZE   16
 
#define EAPSIM_CALCMAC_SIZE   20
 
#define EAPSIM_KC_SIZE   8
 
#define EAPSIM_NONCEMT_SIZE   16
 
#define EAPSIM_RAND_SIZE   16
 
#define EAPSIM_SRES_SIZE   4
 

Enumerations

enum  eapsim_clientstates {
  EAPSIM_CLIENT_INIT = 0,
  EAPSIM_CLIENT_START = 1,
  EAPSIM_CLIENT_MAXSTATES
}
 
enum  eapsim_serverstates {
  EAPSIM_SERVER_START = 0,
  EAPSIM_SERVER_CHALLENGE = 1,
  EAPSIM_SERVER_SUCCESS = 10,
  EAPSIM_SERVER_MAXSTATES
}
 
enum  eapsim_subtype {
  EAPSIM_START = 10,
  EAPSIM_CHALLENGE = 11,
  EAPSIM_NOTIFICATION = 12,
  EAPSIM_REAUTH = 13,
  EAPSIM_CLIENT_ERROR = 14,
  EAPSIM_MAX_SUBTYPE = 15
}
 

Functions

void eapsim_calculate_keys (struct eapsim_keys *ek)
 
int eapsim_checkmac (TALLOC_CTX *ctx, VALUE_PAIR *rvps, uint8_t key[8], uint8_t *extra, int extralen, uint8_t calcmac[20])
 
void eapsim_dump_mk (struct eapsim_keys *ek)
 
int map_eapsim_basictypes (RADIUS_PACKET *r, eap_packet_t *ep)
 
char const * sim_state2name (enum eapsim_clientstates state, char *buf, int buflen)
 
char const * sim_subtype2name (enum eapsim_subtype subtype, char *buf, int buflen)
 
int unmap_eapsim_basictypes (RADIUS_PACKET *r, uint8_t *attr, unsigned int attrlen)
 

Data Structure Documentation

struct eapsim_keys

Definition at line 86 of file eap_sim.h.

Data Fields
uint8_t emsk[64]
uint8_t identity[MAX_STRING_LEN]
unsigned int identitylen
uint8_t K_aut[EAPSIM_AUTH_SIZE]
uint8_t K_encr[16]
uint8_t Kc[3][EAPSIM_KC_SIZE]
uint8_t master_key[20]
uint8_t msk[64]
uint8_t nonce_mt[EAPSIM_NONCEMT_SIZE]
uint8_t rand[3][EAPSIM_RAND_SIZE]
uint8_t sres[3][EAPSIM_SRES_SIZE]
uint8_t versionlist[MAX_STRING_LEN]
uint8_t versionlistlen
uint8_t versionselect[2]

Macro Definition Documentation

#define EAP_SIM_VERSION   0x0001

Definition at line 31 of file eap_sim.h.

#define EAPSIM_AUTH_SIZE   16

Definition at line 84 of file eap_sim.h.

#define EAPSIM_CALCMAC_SIZE   20

Definition at line 82 of file eap_sim.h.

#define EAPSIM_KC_SIZE   8

Definition at line 81 of file eap_sim.h.

#define EAPSIM_NONCEMT_SIZE   16

Definition at line 83 of file eap_sim.h.

#define EAPSIM_RAND_SIZE   16

Definition at line 80 of file eap_sim.h.

#define EAPSIM_SRES_SIZE   4

Definition at line 79 of file eap_sim.h.

Enumeration Type Documentation

Enumerator
EAPSIM_CLIENT_INIT 
EAPSIM_CLIENT_START 
EAPSIM_CLIENT_MAXSTATES 

Definition at line 42 of file eap_sim.h.

Enumerator
EAPSIM_SERVER_START 
EAPSIM_SERVER_CHALLENGE 
EAPSIM_SERVER_SUCCESS 
EAPSIM_SERVER_MAXSTATES 

Definition at line 53 of file eap_sim.h.

Enumerator
EAPSIM_START 
EAPSIM_CHALLENGE 
EAPSIM_NOTIFICATION 
EAPSIM_REAUTH 
EAPSIM_CLIENT_ERROR 
EAPSIM_MAX_SUBTYPE 

Definition at line 33 of file eap_sim.h.

Function Documentation

void eapsim_calculate_keys ( struct eapsim_keys ek)

Definition at line 37 of file eapcrypto.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int eapsim_checkmac ( TALLOC_CTX *  ctx,
VALUE_PAIR rvps,
uint8_t  key[8],
uint8_t *  extra,
int  extralen,
uint8_t  calcmac[20] 
)

+ Here is the caller graph for this function:

void eapsim_dump_mk ( struct eapsim_keys ek)

Definition at line 103 of file eapcrypto.c.

+ Here is the caller graph for this function:

int map_eapsim_basictypes ( RADIUS_PACKET r,
eap_packet_t ep 
)

Definition at line 63 of file eapsimlib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char const* sim_state2name ( enum eapsim_clientstates  state,
char *  buf,
int  buflen 
)

Definition at line 437 of file eapsimlib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char const* sim_subtype2name ( enum eapsim_subtype  subtype,
char *  buf,
int  buflen 
)

Definition at line 459 of file eapsimlib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int unmap_eapsim_basictypes ( RADIUS_PACKET r,
uint8_t *  attr,
unsigned int  attrlen 
)

Definition at line 284 of file eapsimlib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: