FD.io VPP  v19.04.1-1-ge4a0f9f
Vector Packet Processing
ipsecmb.c File Reference
+ Include dependency graph for ipsecmb.c:

Go to the source code of this file.

Data Structures

struct  ipsecmb_per_thread_data_t
 
struct  ipsecmb_main_t_
 
struct  ipsecmb_gcm_pre_vft_t_
 

Macros

#define INIT_IPSEC_MB_GCM_PRE(_arch)
 
#define foreach_ipsecmb_hmac_op
 
#define foreach_ipsecmb_cbc_cipher_op
 
#define foreach_ipsecmb_gcm_cipher_op
 
#define EXPANDED_KEY_N_BYTES   (16 * 15)
 

Typedefs

typedef struct ipsecmb_main_t_ ipsecmb_main_t
 
typedef void(* ase_gcm_pre_t) (const void *key, struct gcm_key_data *key_data)
 AES GCM key=expansion VFT. More...
 
typedef struct ipsecmb_gcm_pre_vft_t_ ipsecmb_gcm_pre_vft_t
 

Functions

static void hash_expand_keys (const MB_MGR *mgr, const u8 *key, u32 length, u8 block_size, u8 ipad[256], u8 opad[256], hash_one_block_t fn)
 
static void ipsecmb_retire_hmac_job (JOB_AES_HMAC *job, u32 *n_fail)
 
static_always_inline u32 ipsecmb_ops_hmac_inline (vlib_main_t *vm, const ipsecmb_per_thread_data_t *ptd, vnet_crypto_op_t *ops[], u32 n_ops, u32 block_size, hash_one_block_t fn, JOB_HASH_ALG alg)
 
static void ipsecmb_retire_cipher_job (JOB_AES_HMAC *job, u32 *n_fail)
 
static_always_inline u32 ipsecmb_ops_cbc_cipher_inline (vlib_main_t *vm, ipsecmb_per_thread_data_t *ptd, vnet_crypto_op_t *ops[], u32 n_ops, u32 key_len, u32 iv_len, keyexp_t fn, JOB_CIPHER_DIRECTION direction)
 
static void ipsecmb_retire_gcm_cipher_job (JOB_AES_HMAC *job, u32 *n_fail, JOB_CIPHER_DIRECTION direction)
 
static_always_inline u32 ipsecmb_ops_gcm_cipher_inline (vlib_main_t *vm, ipsecmb_per_thread_data_t *ptd, vnet_crypto_op_t *ops[], u32 n_ops, u32 key_len, u32 iv_len, ase_gcm_pre_t fn, JOB_CIPHER_DIRECTION direction)
 
clib_error_tcrypto_ipsecmb_iv_init (ipsecmb_main_t *imbm)
 
static clib_error_tcrypto_ipsecmb_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

static ipsecmb_gcm_pre_vft_t ipsecmb_gcm_pre_vft
 
static ipsecmb_main_t ipsecmb_main
 
 foreach_ipsecmb_hmac_op
 
 foreach_ipsecmb_cbc_cipher_op
 
 foreach_ipsecmb_gcm_cipher_op
 

Macro Definition Documentation

#define EXPANDED_KEY_N_BYTES   (16 * 15)

Definition at line 219 of file ipsecmb.c.

#define foreach_ipsecmb_cbc_cipher_op
Value:
_(AES_128_CBC, 128, 16, 16) \
_(AES_192_CBC, 192, 24, 16) \
_(AES_256_CBC, 256, 32, 16)

Definition at line 70 of file ipsecmb.c.

#define foreach_ipsecmb_gcm_cipher_op
Value:
_(AES_128_GCM, 128, 16, 12) \
_(AES_192_GCM, 192, 24, 12) \
_(AES_256_GCM, 256, 32, 12)

Definition at line 78 of file ipsecmb.c.

#define foreach_ipsecmb_hmac_op
Value:
_(SHA1, SHA1, sha1) \
_(SHA256, SHA_256, sha256) \
_(SHA384, SHA_384, sha384) \
_(SHA512, SHA_512, sha512)

Definition at line 61 of file ipsecmb.c.

#define INIT_IPSEC_MB_GCM_PRE (   _arch)
Value:
ipsecmb_gcm_pre_vft.ase_gcm_pre_128 = aes_gcm_pre_128_##_arch; \
ipsecmb_gcm_pre_vft.ase_gcm_pre_192 = aes_gcm_pre_192_##_arch; \
ipsecmb_gcm_pre_vft.ase_gcm_pre_256 = aes_gcm_pre_256_##_arch;
ase_gcm_pre_t ase_gcm_pre_256
Definition: ipsecmb.c:49
ase_gcm_pre_t ase_gcm_pre_128
Definition: ipsecmb.c:47
ase_gcm_pre_t ase_gcm_pre_192
Definition: ipsecmb.c:48
static ipsecmb_gcm_pre_vft_t ipsecmb_gcm_pre_vft
Definition: ipsecmb.c:52

Definition at line 54 of file ipsecmb.c.

Typedef Documentation

typedef void(* ase_gcm_pre_t) (const void *key, struct gcm_key_data *key_data)

AES GCM key=expansion VFT.

Definition at line 42 of file ipsecmb.c.

Function Documentation

static clib_error_t* crypto_ipsecmb_init ( vlib_main_t vm)
static

Definition at line 515 of file ipsecmb.c.

+ Here is the call graph for this function:

clib_error_t* crypto_ipsecmb_iv_init ( ipsecmb_main_t imbm)

Definition at line 491 of file ipsecmb.c.

+ Here is the caller graph for this function:

static void hash_expand_keys ( const MB_MGR *  mgr,
const u8 key,
u32  length,
u8  block_size,
u8  ipad[256],
u8  opad[256],
hash_one_block_t  fn 
)
inlinestatic

Definition at line 84 of file ipsecmb.c.

+ Here is the caller graph for this function:

static_always_inline u32 ipsecmb_ops_cbc_cipher_inline ( vlib_main_t vm,
ipsecmb_per_thread_data_t ptd,
vnet_crypto_op_t ops[],
u32  n_ops,
u32  key_len,
u32  iv_len,
keyexp_t  fn,
JOB_CIPHER_DIRECTION  direction 
)

Definition at line 236 of file ipsecmb.c.

+ Here is the call graph for this function:

static_always_inline u32 ipsecmb_ops_gcm_cipher_inline ( vlib_main_t vm,
ipsecmb_per_thread_data_t ptd,
vnet_crypto_op_t ops[],
u32  n_ops,
u32  key_len,
u32  iv_len,
ase_gcm_pre_t  fn,
JOB_CIPHER_DIRECTION  direction 
)

Definition at line 365 of file ipsecmb.c.

+ Here is the call graph for this function:

static_always_inline u32 ipsecmb_ops_hmac_inline ( vlib_main_t vm,
const ipsecmb_per_thread_data_t ptd,
vnet_crypto_op_t ops[],
u32  n_ops,
u32  block_size,
hash_one_block_t  fn,
JOB_HASH_ALG  alg 
)

Definition at line 140 of file ipsecmb.c.

+ Here is the call graph for this function:

static void ipsecmb_retire_cipher_job ( JOB_AES_HMAC *  job,
u32 n_fail 
)
inlinestatic

Definition at line 222 of file ipsecmb.c.

+ Here is the caller graph for this function:

static void ipsecmb_retire_gcm_cipher_job ( JOB_AES_HMAC *  job,
u32 n_fail,
JOB_CIPHER_DIRECTION  direction 
)
inlinestatic

Definition at line 341 of file ipsecmb.c.

+ Here is the caller graph for this function:

static void ipsecmb_retire_hmac_job ( JOB_AES_HMAC *  job,
u32 n_fail 
)
inlinestatic

Definition at line 115 of file ipsecmb.c.

+ Here is the caller graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

Variable Documentation

foreach_ipsecmb_cbc_cipher_op

Definition at line 318 of file ipsecmb.c.

foreach_ipsecmb_gcm_cipher_op

Definition at line 468 of file ipsecmb.c.

foreach_ipsecmb_hmac_op

Definition at line 216 of file ipsecmb.c.

ipsecmb_gcm_pre_vft_t ipsecmb_gcm_pre_vft
static

Definition at line 52 of file ipsecmb.c.

ipsecmb_main_t ipsecmb_main
static

Definition at line 59 of file ipsecmb.c.