Classes | Defines | Enumerations | Functions | Variables
ikev2_common.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ikev2_encr_alg
struct  ikev2_hdr
struct  ikev2_integ_alg
struct  ikev2_keys
struct  ikev2_payload_hdr
struct  ikev2_payloads
struct  ikev2_prf_alg
struct  ikev2_proposal
struct  ikev2_transform

Defines

#define IKEV2_HDR_INITIATOR   0x08
#define IKEV2_HDR_RESPONSE   0x20
#define IKEV2_HDR_VERSION   0x10
#define IKEV2_MAX_HASH_LEN   20
#define IKEV2_MjVer   2
#define IKEV2_MnVer   0
#define IKEV2_NONCE_MAX_LEN   256
#define IKEV2_NONCE_MIN_LEN   16
#define IKEV2_PAYLOAD_FLAGS_CRITICAL   0x01
#define IKEV2_SPI_LEN   8
#define IKEV2_VERSION   (((IKEV2_MjVer) << 4) | (IKEV2_MnVer))

Enumerations

enum  { IKE_SA_INIT = 34, IKE_SA_AUTH = 35, CREATE_CHILD_SA = 36, INFORMATION = 37 }
enum  {
  IKEV2_PAYLOAD_NO_NEXT_PAYLOAD = 0, IKEV2_PAYLOAD_SA = 33, IKEV2_PAYLOAD_KEY_EXCHANGE = 34, IKEV2_PAYLOAD_IDi = 35,
  IKEV2_PAYLOAD_IDr = 36, IKEV2_PAYLOAD_CERTIFICATE = 37, IKEV2_PAYLOAD_CERT_REQ = 38, IKEV2_PAYLOAD_AUTHENTICATION = 39,
  IKEV2_PAYLOAD_NONCE = 40, IKEV2_PAYLOAD_NOTIFICATION = 41, IKEV2_PAYLOAD_VENDOD_ID = 43, IKEV2_PAYLOAD_ENCRYPTED = 46,
  IKEV2_PAYLOAD_NEXT_FAST_ID = 121
}
enum  { IKEV2_PROTOCOL_RESERVED = 0, IKEV2_PROTOCOL_IKE = 1, IKEV2_PROTOCOL_AH = 2, IKEV2_PROTOCOL_ESP = 3 }
enum  {
  IKEV2_TRANSFORM_ENCR = 1, IKEV2_TRANSFORM_PRF = 2, IKEV2_TRANSFORM_INTEG = 3, IKEV2_TRANSFORM_DH = 4,
  IKEV2_TRANSFORM_ESN = 5
}
enum  {
  ENCR_DES_IV64 = 1, ENCR_DES = 2, ENCR_3DES = 3, ENCR_RC5 = 4,
  ENCR_IDEA = 5, ENCR_CAST = 6, ENCR_BLOWFISH = 7, ENCR_3IDEA = 8,
  ENCR_DES_IV32 = 9, ENCR_NULL = 11, ENCR_AES_CBC = 12, ENCR_AES_CTR = 13
}
enum  { PRF_HMAC_MD5 = 1, PRF_HMAC_SHA1 = 2, PRF_HMAC_TIGER = 3, PRF_AES128_XCBC = 4 }
enum  {
  AUTH_HMAC_MD5_96 = 1, AUTH_HMAC_SHA1_96 = 2, AUTH_DES_MAC = 3, AUTH_KPDK_MD5 = 4,
  AUTH_AES_XCBC_96 = 5
}
enum  {
  DH_GROUP1_768BIT_MODP = 1, DH_GROUP2_1024BIT_MODP = 2, DH_GROUP5_1536BIT_MODP = 5, DH_GROUP5_2048BIT_MODP = 14,
  DH_GROUP5_3072BIT_MODP = 15, DH_GROUP5_4096BIT_MODP = 16, DH_GROUP5_6144BIT_MODP = 17, DH_GROUP5_8192BIT_MODP = 18
}
enum  {
  ID_IPV4_ADDR = 1, ID_FQDN = 2, ID_RFC822_ADDR = 3, ID_IPV6_ADDR = 5,
  ID_DER_ASN1_DN = 9, ID_DER_ASN1_GN = 10, ID_KEY_ID = 11
}
enum  {
  CERT_ENCODING_PKCS7_X509 = 1, CERT_ENCODING_PGP_CERT = 2, CERT_ENCODING_DNS_SIGNED_KEY = 3, CERT_ENCODING_X509_CERT_SIGN = 4,
  CERT_ENCODING_KERBEROS_TOKEN = 6, CERT_ENCODING_CRL = 7, CERT_ENCODING_ARL = 8, CERT_ENCODING_SPKI_CERT = 9,
  CERT_ENCODING_X509_CERT_ATTR = 10, CERT_ENCODING_RAW_RSA_KEY = 11, CERT_ENCODING_HASH_AND_URL_X509_CERT = 12, CERT_ENCODING_HASH_AND_URL_X509_BUNDLE = 13
}
enum  { AUTH_RSA_SIGN = 1, AUTH_SHARED_KEY_MIC = 2, AUTH_DSS_SIGN = 3 }
enum  {
  UNSUPPORTED_CRITICAL_PAYLOAD = 1, INVALID_IKE_SPI = 4, INVALID_MAJOR_VERSION = 5, INVALID_SYNTAX = 7,
  INVALID_MESSAGE_ID = 9, INVALID_SPI = 11, NO_PROPOSAL_CHOSEN = 14, INVALID_KE_PAYLOAD = 17,
  AUTHENTICATION_FAILED = 24, SINGLE_PAIR_REQUIRED = 34, NO_ADDITIONAL_SAS = 35, INTERNAL_ADDRESS_FAILURE = 36,
  FAILED_CP_REQUIRED = 37, TS_UNACCEPTABLE = 38, INVALID_SELECTORS = 39
}

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

struct ikev2_hdr STRUCT_PACKED

Define Documentation

#define IKEV2_HDR_INITIATOR   0x08

Definition at line 97 of file ikev2_common.h.

#define IKEV2_HDR_RESPONSE   0x20

Definition at line 99 of file ikev2_common.h.

#define IKEV2_HDR_VERSION   0x10

Definition at line 98 of file ikev2_common.h.

#define IKEV2_MAX_HASH_LEN   20

Definition at line 260 of file ikev2_common.h.

#define IKEV2_MjVer   2

Definition at line 77 of file ikev2_common.h.

#define IKEV2_MnVer   0

Definition at line 78 of file ikev2_common.h.

#define IKEV2_NONCE_MAX_LEN   256

Definition at line 23 of file ikev2_common.h.

#define IKEV2_NONCE_MIN_LEN   16

Definition at line 22 of file ikev2_common.h.

#define IKEV2_PAYLOAD_FLAGS_CRITICAL   0x01

Definition at line 102 of file ikev2_common.h.

#define IKEV2_SPI_LEN   8

Definition at line 30 of file ikev2_common.h.

#define IKEV2_VERSION   (((IKEV2_MjVer) << 4) | (IKEV2_MnVer))

Definition at line 82 of file ikev2_common.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
IKE_SA_INIT 
IKE_SA_AUTH 
CREATE_CHILD_SA 
INFORMATION 

Definition at line 86 of file ikev2_common.h.

anonymous enum
Enumerator:
IKEV2_PAYLOAD_NO_NEXT_PAYLOAD 
IKEV2_PAYLOAD_SA 
IKEV2_PAYLOAD_KEY_EXCHANGE 
IKEV2_PAYLOAD_IDi 
IKEV2_PAYLOAD_IDr 
IKEV2_PAYLOAD_CERTIFICATE 
IKEV2_PAYLOAD_CERT_REQ 
IKEV2_PAYLOAD_AUTHENTICATION 
IKEV2_PAYLOAD_NONCE 
IKEV2_PAYLOAD_NOTIFICATION 
IKEV2_PAYLOAD_VENDOD_ID 
IKEV2_PAYLOAD_ENCRYPTED 
IKEV2_PAYLOAD_NEXT_FAST_ID 

Definition at line 107 of file ikev2_common.h.

anonymous enum
Enumerator:
IKEV2_PROTOCOL_RESERVED 
IKEV2_PROTOCOL_IKE 
IKEV2_PROTOCOL_AH 
IKEV2_PROTOCOL_ESP 

Definition at line 125 of file ikev2_common.h.

anonymous enum
Enumerator:
IKEV2_TRANSFORM_ENCR 
IKEV2_TRANSFORM_PRF 
IKEV2_TRANSFORM_INTEG 
IKEV2_TRANSFORM_DH 
IKEV2_TRANSFORM_ESN 

Definition at line 134 of file ikev2_common.h.

anonymous enum
Enumerator:
ENCR_DES_IV64 
ENCR_DES 
ENCR_3DES 
ENCR_RC5 
ENCR_IDEA 
ENCR_CAST 
ENCR_BLOWFISH 
ENCR_3IDEA 
ENCR_DES_IV32 
ENCR_NULL 
ENCR_AES_CBC 
ENCR_AES_CTR 

Definition at line 143 of file ikev2_common.h.

anonymous enum
Enumerator:
PRF_HMAC_MD5 
PRF_HMAC_SHA1 
PRF_HMAC_TIGER 
PRF_AES128_XCBC 

Definition at line 159 of file ikev2_common.h.

anonymous enum
Enumerator:
AUTH_HMAC_MD5_96 
AUTH_HMAC_SHA1_96 
AUTH_DES_MAC 
AUTH_KPDK_MD5 
AUTH_AES_XCBC_96 

Definition at line 167 of file ikev2_common.h.

anonymous enum
Enumerator:
DH_GROUP1_768BIT_MODP 
DH_GROUP2_1024BIT_MODP 
DH_GROUP5_1536BIT_MODP 
DH_GROUP5_2048BIT_MODP 
DH_GROUP5_3072BIT_MODP 
DH_GROUP5_4096BIT_MODP 
DH_GROUP5_6144BIT_MODP 
DH_GROUP5_8192BIT_MODP 

Definition at line 176 of file ikev2_common.h.

anonymous enum
Enumerator:
ID_IPV4_ADDR 
ID_FQDN 
ID_RFC822_ADDR 
ID_IPV6_ADDR 
ID_DER_ASN1_DN 
ID_DER_ASN1_GN 
ID_KEY_ID 

Definition at line 189 of file ikev2_common.h.

anonymous enum
Enumerator:
CERT_ENCODING_PKCS7_X509 
CERT_ENCODING_PGP_CERT 
CERT_ENCODING_DNS_SIGNED_KEY 
CERT_ENCODING_X509_CERT_SIGN 
CERT_ENCODING_KERBEROS_TOKEN 
CERT_ENCODING_CRL 
CERT_ENCODING_ARL 
CERT_ENCODING_SPKI_CERT 
CERT_ENCODING_X509_CERT_ATTR 
CERT_ENCODING_RAW_RSA_KEY 
CERT_ENCODING_HASH_AND_URL_X509_CERT 
CERT_ENCODING_HASH_AND_URL_X509_BUNDLE 

Definition at line 201 of file ikev2_common.h.

anonymous enum
Enumerator:
AUTH_RSA_SIGN 
AUTH_SHARED_KEY_MIC 
AUTH_DSS_SIGN 

Definition at line 222 of file ikev2_common.h.

anonymous enum
Enumerator:
UNSUPPORTED_CRITICAL_PAYLOAD 
INVALID_IKE_SPI 
INVALID_MAJOR_VERSION 
INVALID_SYNTAX 
INVALID_MESSAGE_ID 
INVALID_SPI 
NO_PROPOSAL_CHOSEN 
INVALID_KE_PAYLOAD 
AUTHENTICATION_FAILED 
SINGLE_PAIR_REQUIRED 
NO_ADDITIONAL_SAS 
INTERNAL_ADDRESS_FAILURE 
FAILED_CP_REQUIRED 
TS_UNACCEPTABLE 
INVALID_SELECTORS 

Definition at line 230 of file ikev2_common.h.


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



wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:17