FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
aes.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AES_KEY_ROUNDS(x)   (10 + x * 2)
 
#define AES_KEY_BYTES(x)   (16 + x * 8)
 
#define aes_keygen_assist(a, b)   (u8x16) _mm_aeskeygenassist_si128((__m128i) a, b)
 

Enumerations

enum  aes_key_size_t { AES_KEY_128 = 0, AES_KEY_192 = 1, AES_KEY_256 = 2 }
 

Functions

static_always_inline u8x16 aes_block_load (u8 *p)
 
static_always_inline u8x16 aes_enc_round (u8x16 a, u8x16 k)
 
static_always_inline u8x16 aes_enc_last_round (u8x16 a, u8x16 k)
 
static_always_inline u8x16 aes_dec_round (u8x16 a, u8x16 k)
 
static_always_inline u8x16 aes_dec_last_round (u8x16 a, u8x16 k)
 
static_always_inline void aes_block_store (u8 *p, u8x16 r)
 
static_always_inline u8x16 aes_byte_mask (u8x16 x, u8 n_bytes)
 
static_always_inline u8x16 aes_load_partial (u8x16u *p, int n_bytes)
 
static_always_inline void aes_store_partial (void *p, u8x16 r, int n_bytes)
 
static_always_inline u8x16 aes_encrypt_block (u8x16 block, const u8x16 *round_keys, aes_key_size_t ks)
 
static_always_inline u8x16 aes_inv_mix_column (u8x16 a)
 
static_always_inline void aes128_key_assist (u8x16 *rk, u8x16 r)
 
static_always_inline void aes128_key_expand (u8x16 *rk, u8x16 const *k)
 
static_always_inline void aes192_key_assist (u8x16 *r1, u8x16 *r2, u8x16 key_assist)
 
static_always_inline void aes192_key_expand (u8x16 *rk, u8x16u const *k)
 
static_always_inline void aes256_key_assist (u8x16 *rk, int i, u8x16 key_assist)
 
static_always_inline void aes256_key_expand (u8x16 *rk, u8x16u const *k)
 
static_always_inline void aes_key_expand (u8x16 *key_schedule, u8 const *key, aes_key_size_t ks)
 
static_always_inline void aes_key_enc_to_dec (u8x16 *ke, u8x16 *kd, aes_key_size_t ks)
 

Variables

static const u8x16 byte_mask_scale
 

Macro Definition Documentation

◆ AES_KEY_BYTES

#define AES_KEY_BYTES (   x)    (16 + x * 8)

Definition at line 29 of file aes.h.

◆ AES_KEY_ROUNDS

#define AES_KEY_ROUNDS (   x)    (10 + x * 2)

Definition at line 28 of file aes.h.

◆ aes_keygen_assist

#define aes_keygen_assist (   a,
 
)    (u8x16) _mm_aeskeygenassist_si128((__m128i) a, b)

Definition at line 163 of file aes.h.

Enumeration Type Documentation

◆ aes_key_size_t

Enumerator
AES_KEY_128 
AES_KEY_192 
AES_KEY_256 

Definition at line 21 of file aes.h.

Function Documentation

◆ aes128_key_assist()

static_always_inline void aes128_key_assist ( u8x16 *  rk,
u8x16  r 
)

Definition at line 171 of file aes.h.

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

◆ aes128_key_expand()

static_always_inline void aes128_key_expand ( u8x16 *  rk,
u8x16 const *  k 
)

Definition at line 181 of file aes.h.

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

◆ aes192_key_assist()

static_always_inline void aes192_key_assist ( u8x16 *  r1,
u8x16 *  r2,
u8x16  key_assist 
)

Definition at line 197 of file aes.h.

+ Here is the caller graph for this function:

◆ aes192_key_expand()

static_always_inline void aes192_key_expand ( u8x16 *  rk,
u8x16u const *  k 
)

Definition at line 209 of file aes.h.

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

◆ aes256_key_assist()

static_always_inline void aes256_key_assist ( u8x16 *  rk,
int  i,
u8x16  key_assist 
)

Definition at line 251 of file aes.h.

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

◆ aes256_key_expand()

static_always_inline void aes256_key_expand ( u8x16 *  rk,
u8x16u const *  k 
)

Definition at line 275 of file aes.h.

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

◆ aes_block_load()

static_always_inline u8x16 aes_block_load ( u8 p)

Definition at line 36 of file aes.h.

+ Here is the caller graph for this function:

◆ aes_block_store()

static_always_inline void aes_block_store ( u8 p,
u8x16  r 
)

Definition at line 103 of file aes.h.

+ Here is the caller graph for this function:

◆ aes_byte_mask()

static_always_inline u8x16 aes_byte_mask ( u8x16  x,
u8  n_bytes 
)

Definition at line 109 of file aes.h.

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

◆ aes_dec_last_round()

static_always_inline u8x16 aes_dec_last_round ( u8x16  a,
u8x16  k 
)

Definition at line 96 of file aes.h.

+ Here is the caller graph for this function:

◆ aes_dec_round()

static_always_inline u8x16 aes_dec_round ( u8x16  a,
u8x16  k 
)

Definition at line 90 of file aes.h.

+ Here is the caller graph for this function:

◆ aes_enc_last_round()

static_always_inline u8x16 aes_enc_last_round ( u8x16  a,
u8x16  k 
)

Definition at line 78 of file aes.h.

+ Here is the caller graph for this function:

◆ aes_enc_round()

static_always_inline u8x16 aes_enc_round ( u8x16  a,
u8x16  k 
)

Definition at line 42 of file aes.h.

+ Here is the caller graph for this function:

◆ aes_encrypt_block()

static_always_inline u8x16 aes_encrypt_block ( u8x16  block,
const u8x16 *  round_keys,
aes_key_size_t  ks 
)

Definition at line 143 of file aes.h.

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

◆ aes_inv_mix_column()

static_always_inline u8x16 aes_inv_mix_column ( u8x16  a)

Definition at line 153 of file aes.h.

+ Here is the caller graph for this function:

◆ aes_key_enc_to_dec()

static_always_inline void aes_key_enc_to_dec ( u8x16 *  ke,
u8x16 *  kd,
aes_key_size_t  ks 
)

Definition at line 427 of file aes.h.

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

◆ aes_key_expand()

static_always_inline void aes_key_expand ( u8x16 *  key_schedule,
u8 const *  key,
aes_key_size_t  ks 
)

Definition at line 410 of file aes.h.

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

◆ aes_load_partial()

static_always_inline u8x16 aes_load_partial ( u8x16u *  p,
int  n_bytes 
)

Definition at line 115 of file aes.h.

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

◆ aes_store_partial()

static_always_inline void aes_store_partial ( void *  p,
u8x16  r,
int  n_bytes 
)

Definition at line 127 of file aes.h.

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

Variable Documentation

◆ byte_mask_scale

const u8x16 byte_mask_scale
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
}

Definition at line 31 of file aes.h.