FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
aes_gcm.c File Reference
+ Include dependency graph for aes_gcm.c:

Go to the source code of this file.

Data Structures

struct  aes_gcm_key_data_t
 
struct  aes_gcm_counter_t
 

Macros

#define NUM_HI   8
 
#define foreach_aes_gcm_handler_type   _(128) _(192) _(256)
 

Enumerations

enum  aes_gcm_flags_t { AES_GCM_F_WITH_GHASH = (1 << 0), AES_GCM_F_LAST_ROUND = (1 << 1), AES_GCM_F_ENCRYPT = (1 << 2), AES_GCM_F_DECRYPT = (1 << 3) }
 

Functions

static_always_inline void aes_gcm_enc_first_round (u8x16 *r, aes_gcm_counter_t *ctr, u8x16 k, int n_blocks)
 
static_always_inline void aes_gcm_enc_round (u8x16 *r, u8x16 k, int n_blocks)
 
static_always_inline void aes_gcm_enc_last_round (u8x16 *r, u8x16 *d, u8x16 const *k, int rounds, int n_blocks)
 
static_always_inline u8x16 aes_gcm_ghash_blocks (u8x16 T, aes_gcm_key_data_t *kd, u8x16u *in, int n_blocks)
 
static_always_inline u8x16 aes_gcm_ghash (u8x16 T, aes_gcm_key_data_t *kd, u8x16u *in, u32 n_left)
 
static_always_inline u8x16 aes_gcm_calc (u8x16 T, aes_gcm_key_data_t *kd, u8x16 *d, aes_gcm_counter_t *ctr, u8x16u *inv, u8x16u *outv, int rounds, int n, int last_block_bytes, aes_gcm_flags_t f)
 
static_always_inline u8x16 aes_gcm_calc_double (u8x16 T, aes_gcm_key_data_t *kd, u8x16 *d, aes_gcm_counter_t *ctr, u8x16u *inv, u8x16u *outv, int rounds, aes_gcm_flags_t f)
 
static_always_inline u8x16 aes_gcm_ghash_last (u8x16 T, aes_gcm_key_data_t *kd, u8x16 *d, int n_blocks, int n_bytes)
 
static_always_inline u8x16 aes_gcm_enc (u8x16 T, aes_gcm_key_data_t *kd, aes_gcm_counter_t *ctr, u8x16u *inv, u8x16u *outv, u32 n_left, int rounds)
 
static_always_inline u8x16 aes_gcm_dec (u8x16 T, aes_gcm_key_data_t *kd, aes_gcm_counter_t *ctr, u8x16u *inv, u8x16u *outv, u32 n_left, int rounds)
 
static_always_inline int aes_gcm (u8x16u *in, u8x16u *out, u8x16u *addt, u8x16u *iv, u8x16u *tag, u32 data_bytes, u32 aad_bytes, u8 tag_len, aes_gcm_key_data_t *kd, int aes_rounds, int is_encrypt)
 
static_always_inline u32 aes_ops_enc_aes_gcm (vlib_main_t *vm, vnet_crypto_op_t *ops[], u32 n_ops, aes_key_size_t ks)
 
static_always_inline u32 aes_ops_dec_aes_gcm (vlib_main_t *vm, vnet_crypto_op_t *ops[], u32 n_ops, aes_key_size_t ks)
 
static_always_inline void * aes_gcm_key_exp (vnet_crypto_key_t *key, aes_key_size_t ks)
 
clib_error_tcrypto_native_aes_gcm_init_slm (vlib_main_t *vm)
 

Variables

static const u32x4 ctr_inv_1 = { 0, 0, 0, 1 << 24 }
 
 foreach_aes_gcm_handler_type
 

Macro Definition Documentation

◆ foreach_aes_gcm_handler_type

#define foreach_aes_gcm_handler_type   _(128) _(192) _(256)

Definition at line 1182 of file aes_gcm.c.

◆ NUM_HI

#define NUM_HI   8

Definition at line 32 of file aes_gcm.c.

Enumeration Type Documentation

◆ aes_gcm_flags_t

Enumerator
AES_GCM_F_WITH_GHASH 
AES_GCM_F_LAST_ROUND 
AES_GCM_F_ENCRYPT 
AES_GCM_F_DECRYPT 

Definition at line 56 of file aes_gcm.c.

Function Documentation

◆ aes_gcm()

static_always_inline int aes_gcm ( u8x16u *  in,
u8x16u *  out,
u8x16u *  addt,
u8x16u *  iv,
u8x16u *  tag,
u32  data_bytes,
u32  aad_bytes,
u8  tag_len,
aes_gcm_key_data_t kd,
int  aes_rounds,
int  is_encrypt 
)

Definition at line 1017 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_calc()

static_always_inline u8x16 aes_gcm_calc ( u8x16  T,
aes_gcm_key_data_t kd,
u8x16 *  d,
aes_gcm_counter_t ctr,
u8x16u *  inv,
u8x16u *  outv,
int  rounds,
int  n,
int  last_block_bytes,
aes_gcm_flags_t  f 
)

Definition at line 165 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_calc_double()

static_always_inline u8x16 aes_gcm_calc_double ( u8x16  T,
aes_gcm_key_data_t kd,
u8x16 *  d,
aes_gcm_counter_t ctr,
u8x16u *  inv,
u8x16u *  outv,
int  rounds,
aes_gcm_flags_t  f 
)

Definition at line 259 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_dec()

static_always_inline u8x16 aes_gcm_dec ( u8x16  T,
aes_gcm_key_data_t kd,
aes_gcm_counter_t ctr,
u8x16u *  inv,
u8x16u *  outv,
u32  n_left,
int  rounds 
)

Definition at line 934 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_enc()

static_always_inline u8x16 aes_gcm_enc ( u8x16  T,
aes_gcm_key_data_t kd,
aes_gcm_counter_t ctr,
u8x16u *  inv,
u8x16u *  outv,
u32  n_left,
int  rounds 
)

Definition at line 748 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_enc_first_round()

static_always_inline void aes_gcm_enc_first_round ( u8x16 *  r,
aes_gcm_counter_t ctr,
u8x16  k,
int  n_blocks 
)

Definition at line 67 of file aes_gcm.c.

+ Here is the caller graph for this function:

◆ aes_gcm_enc_last_round()

static_always_inline void aes_gcm_enc_last_round ( u8x16 *  r,
u8x16 *  d,
u8x16 const *  k,
int  rounds,
int  n_blocks 
)

Definition at line 98 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_enc_round()

static_always_inline void aes_gcm_enc_round ( u8x16 *  r,
u8x16  k,
int  n_blocks 
)

Definition at line 91 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_ghash()

static_always_inline u8x16 aes_gcm_ghash ( u8x16  T,
aes_gcm_key_data_t kd,
u8x16u *  in,
u32  n_left 
)

Definition at line 125 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_ghash_blocks()

static_always_inline u8x16 aes_gcm_ghash_blocks ( u8x16  T,
aes_gcm_key_data_t kd,
u8x16u *  in,
int  n_blocks 
)

Definition at line 111 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_ghash_last()

static_always_inline u8x16 aes_gcm_ghash_last ( u8x16  T,
aes_gcm_key_data_t kd,
u8x16 *  d,
int  n_blocks,
int  n_bytes 
)

Definition at line 397 of file aes_gcm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ aes_gcm_key_exp()

static_always_inline void* aes_gcm_key_exp ( vnet_crypto_key_t key,
aes_key_size_t  ks 
)

Definition at line 1160 of file aes_gcm.c.

+ Here is the call graph for this function:

◆ aes_ops_dec_aes_gcm()

static_always_inline u32 aes_ops_dec_aes_gcm ( vlib_main_t vm,
vnet_crypto_op_t ops[],
u32  n_ops,
aes_key_size_t  ks 
)

Definition at line 1124 of file aes_gcm.c.

+ Here is the call graph for this function:

◆ aes_ops_enc_aes_gcm()

static_always_inline u32 aes_ops_enc_aes_gcm ( vlib_main_t vm,
vnet_crypto_op_t ops[],
u32  n_ops,
aes_key_size_t  ks 
)

Definition at line 1098 of file aes_gcm.c.

+ Here is the call graph for this function:

◆ crypto_native_aes_gcm_init_slm()

clib_error_t* crypto_native_aes_gcm_init_slm ( vlib_main_t vm)

Definition at line 1207 of file aes_gcm.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ ctr_inv_1

const u32x4 ctr_inv_1 = { 0, 0, 0, 1 << 24 }
static

Definition at line 64 of file aes_gcm.c.

◆ foreach_aes_gcm_handler_type

foreach_aes_gcm_handler_type

Definition at line 1194 of file aes_gcm.c.