Defines | Functions | Variables
ikev2_common.c File Reference
#include "includes.h"
#include "common.h"
#include "crypto/crypto.h"
#include "crypto/md5.h"
#include "crypto/sha1.h"
#include "ikev2_common.h"
Include dependency graph for ikev2_common.c:

Go to the source code of this file.

Defines

#define NUM_ENCR_ALGS   (sizeof(ikev2_encr_algs) / sizeof(ikev2_encr_algs[0]))
#define NUM_INTEG_ALGS   (sizeof(ikev2_integ_algs) / sizeof(ikev2_integ_algs[0]))
#define NUM_PRF_ALGS   (sizeof(ikev2_prf_algs) / sizeof(ikev2_prf_algs[0]))

Functions

int ikev2_build_encrypted (int encr_id, int integ_id, struct ikev2_keys *keys, int initiator, struct wpabuf *msg, struct wpabuf *plain, u8 next_payload)
u8 * ikev2_decrypt_payload (int encr_id, int integ_id, struct ikev2_keys *keys, int initiator, const struct ikev2_hdr *hdr, const u8 *encrypted, size_t encrypted_len, size_t *res_len)
int ikev2_derive_auth_data (int prf_alg, const struct wpabuf *sign_msg, const u8 *ID, size_t ID_len, u8 ID_type, struct ikev2_keys *keys, int initiator, const u8 *shared_secret, size_t shared_secret_len, const u8 *nonce, size_t nonce_len, const u8 *key_pad, size_t key_pad_len, u8 *auth_data)
int ikev2_derive_sk_keys (const struct ikev2_prf_alg *prf, const struct ikev2_integ_alg *integ, const struct ikev2_encr_alg *encr, const u8 *skeyseed, const u8 *data, size_t data_len, struct ikev2_keys *keys)
int ikev2_encr_decrypt (int alg, const u8 *key, size_t key_len, const u8 *iv, const u8 *crypt, u8 *plain, size_t len)
int ikev2_encr_encrypt (int alg, const u8 *key, size_t key_len, const u8 *iv, const u8 *plain, u8 *crypt, size_t len)
void ikev2_free_keys (struct ikev2_keys *keys)
struct ikev2_encr_algikev2_get_encr (int id)
struct ikev2_integ_algikev2_get_integ (int id)
struct ikev2_prf_algikev2_get_prf (int id)
int ikev2_integ_hash (int alg, const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *hash)
int ikev2_keys_set (struct ikev2_keys *keys)
int ikev2_parse_payloads (struct ikev2_payloads *payloads, u8 next_payload, const u8 *pos, const u8 *end)
int ikev2_prf_hash (int alg, const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *hash)
int ikev2_prf_plus (int alg, const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *out, size_t out_len)
void ikev2_update_hdr (struct wpabuf *msg)

Variables

static struct ikev2_encr_alg ikev2_encr_algs []
static struct ikev2_integ_alg ikev2_integ_algs []
static struct ikev2_prf_alg ikev2_prf_algs []

Define Documentation

#define NUM_ENCR_ALGS   (sizeof(ikev2_encr_algs) / sizeof(ikev2_encr_algs[0]))

Definition at line 45 of file ikev2_common.c.

#define NUM_INTEG_ALGS   (sizeof(ikev2_integ_algs) / sizeof(ikev2_integ_algs[0]))

Definition at line 29 of file ikev2_common.c.

#define NUM_PRF_ALGS   (sizeof(ikev2_prf_algs) / sizeof(ikev2_prf_algs[0]))

Definition at line 37 of file ikev2_common.c.


Function Documentation

int ikev2_build_encrypted ( int  encr_id,
int  integ_id,
struct ikev2_keys keys,
int  initiator,
struct wpabuf msg,
struct wpabuf plain,
u8  next_payload 
)

Definition at line 597 of file ikev2_common.c.

u8* ikev2_decrypt_payload ( int  encr_id,
int  integ_id,
struct ikev2_keys keys,
int  initiator,
const struct ikev2_hdr hdr,
const u8 *  encrypted,
size_t  encrypted_len,
size_t *  res_len 
)

Definition at line 495 of file ikev2_common.c.

int ikev2_derive_auth_data ( int  prf_alg,
const struct wpabuf sign_msg,
const u8 *  ID,
size_t  ID_len,
u8  ID_type,
struct ikev2_keys keys,
int  initiator,
const u8 *  shared_secret,
size_t  shared_secret_len,
const u8 *  nonce,
size_t  nonce_len,
const u8 *  key_pad,
size_t  key_pad_len,
u8 *  auth_data 
)

Definition at line 436 of file ikev2_common.c.

int ikev2_derive_sk_keys ( const struct ikev2_prf_alg prf,
const struct ikev2_integ_alg integ,
const struct ikev2_encr_alg encr,
const u8 *  skeyseed,
const u8 *  data,
size_t  data_len,
struct ikev2_keys keys 
)

Definition at line 696 of file ikev2_common.c.

int ikev2_encr_decrypt ( int  alg,
const u8 *  key,
size_t  key_len,
const u8 *  iv,
const u8 *  crypt,
u8 *  plain,
size_t  len 
)

Definition at line 253 of file ikev2_common.c.

int ikev2_encr_encrypt ( int  alg,
const u8 *  key,
size_t  key_len,
const u8 *  iv,
const u8 *  plain,
u8 *  crypt,
size_t  len 
)

Definition at line 194 of file ikev2_common.c.

void ikev2_free_keys ( struct ikev2_keys keys)

Definition at line 682 of file ikev2_common.c.

struct ikev2_encr_alg* ikev2_get_encr ( int  id) [read]

Definition at line 168 of file ikev2_common.c.

struct ikev2_integ_alg* ikev2_get_integ ( int  id) [read]

Definition at line 48 of file ikev2_common.c.

struct ikev2_prf_alg* ikev2_get_prf ( int  id) [read]

Definition at line 87 of file ikev2_common.c.

int ikev2_integ_hash ( int  alg,
const u8 *  key,
size_t  key_len,
const u8 *  data,
size_t  data_len,
u8 *  hash 
)

Definition at line 61 of file ikev2_common.c.

int ikev2_keys_set ( struct ikev2_keys keys)

Definition at line 675 of file ikev2_common.c.

int ikev2_parse_payloads ( struct ikev2_payloads payloads,
u8  next_payload,
const u8 *  pos,
const u8 *  end 
)

Definition at line 316 of file ikev2_common.c.

int ikev2_prf_hash ( int  alg,
const u8 *  key,
size_t  key_len,
size_t  num_elem,
const u8 *  addr[],
const size_t *  len,
u8 *  hash 
)

Definition at line 100 of file ikev2_common.c.

int ikev2_prf_plus ( int  alg,
const u8 *  key,
size_t  key_len,
const u8 *  data,
size_t  data_len,
u8 *  out,
size_t  out_len 
)

Definition at line 119 of file ikev2_common.c.

void ikev2_update_hdr ( struct wpabuf msg)

Definition at line 587 of file ikev2_common.c.


Variable Documentation

struct ikev2_encr_alg ikev2_encr_algs[] [static]
Initial value:
 {
        { ENCR_AES_CBC, 16, 16 }, 
        { ENCR_3DES, 24, 8 }
}

Definition at line 40 of file ikev2_common.c.

struct ikev2_integ_alg ikev2_integ_algs[] [static]
Initial value:
 {
        { AUTH_HMAC_SHA1_96, 20, 12 },
        { AUTH_HMAC_MD5_96, 16, 12 }
}

Definition at line 24 of file ikev2_common.c.

struct ikev2_prf_alg ikev2_prf_algs[] [static]
Initial value:
 {
        { PRF_HMAC_SHA1, 20, 20 },
        { PRF_HMAC_MD5, 16, 16 }
}

Definition at line 32 of file ikev2_common.c.



wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:33:24