#include "includes.h"
#include "common.h"
#include "wpabuf.h"
#include "crypto/aes_wrap.h"
#include "crypto/crypto.h"
#include "crypto/sha1.h"
#include "crypto/sha256.h"
#include "eap_common/eap_defs.h"
#include "eap_common/eap_sim_common.h"
Go to the source code of this file.
Classes | |
struct | eap_sim_msg |
Defines | |
#define | EAP_SIM_INIT_LEN 128 |
Functions | |
void | eap_aka_derive_mk (const u8 *identity, size_t identity_len, const u8 *ik, const u8 *ck, u8 *mk) |
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 wpabuf * | eap_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_msg * | eap_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) |
static int | eap_sim_prf (const u8 *key, u8 *x, size_t xlen) |
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) |
#define EAP_SIM_INIT_LEN 128 |
Definition at line 975 of file eap_sim_common.c.
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.
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.
static int eap_sim_prf | ( | const u8 * | key, |
u8 * | x, | ||
size_t | xlen | ||
) | [static] |
Definition at line 27 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.