FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
main.c File Reference
+ Include dependency graph for main.c:

Go to the source code of this file.

Data Structures

struct  openssl_per_thread_data_t
 

Macros

#define foreach_openssl_aes_evp_op
 
#define foreach_openssl_chacha20_evp_op   _(chacha20_poly1305, CHACHA20_POLY1305, EVP_chacha20_poly1305) \
 
#define foreach_openssl_evp_op
 
#define foreach_openssl_hmac_op
 

Functions

static_always_inline u32 openssl_ops_enc_cbc (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher)
 
static_always_inline u32 openssl_ops_dec_cbc (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher)
 
static_always_inline u32 openssl_ops_enc_aead (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, int is_gcm)
 
static_always_inline u32 openssl_ops_enc_gcm (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher)
 
static_always_inline u32 openssl_ops_enc_chacha20_poly1305 (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher)
 
static_always_inline u32 openssl_ops_dec_aead (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, int is_gcm)
 
static_always_inline u32 openssl_ops_dec_gcm (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher)
 
static_always_inline u32 openssl_ops_dec_chacha20_poly1305 (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher)
 
static_always_inline u32 openssl_ops_hmac (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_MD *md)
 
clib_error_tcrypto_openssl_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

static openssl_per_thread_data_tper_thread_data = 0
 
 foreach_openssl_evp_op
 
 foreach_openssl_hmac_op
 

Macro Definition Documentation

◆ foreach_openssl_aes_evp_op

#define foreach_openssl_aes_evp_op
Value:
_(cbc, DES_CBC, EVP_des_cbc) \
_(cbc, 3DES_CBC, EVP_des_ede3_cbc) \
_(cbc, AES_128_CBC, EVP_aes_128_cbc) \
_(cbc, AES_192_CBC, EVP_aes_192_cbc) \
_(cbc, AES_256_CBC, EVP_aes_256_cbc) \
_(gcm, AES_128_GCM, EVP_aes_128_gcm) \
_(gcm, AES_192_GCM, EVP_aes_192_gcm) \
_(gcm, AES_256_GCM, EVP_aes_256_gcm) \
_(cbc, AES_128_CTR, EVP_aes_128_ctr) \
_(cbc, AES_192_CTR, EVP_aes_192_ctr) \
_(cbc, AES_256_CTR, EVP_aes_256_ctr) \

Definition at line 39 of file main.c.

◆ foreach_openssl_chacha20_evp_op

#define foreach_openssl_chacha20_evp_op   _(chacha20_poly1305, CHACHA20_POLY1305, EVP_chacha20_poly1305) \

Definition at line 52 of file main.c.

◆ foreach_openssl_evp_op

#define foreach_openssl_evp_op
Value:
foreach_openssl_aes_evp_op \
foreach_openssl_chacha20_evp_op

Definition at line 56 of file main.c.

◆ foreach_openssl_hmac_op

#define foreach_openssl_hmac_op
Value:
_(MD5, EVP_md5) \
_(SHA1, EVP_sha1) \
_(SHA224, EVP_sha224) \
_(SHA256, EVP_sha256) \
_(SHA384, EVP_sha384) \
_(SHA512, EVP_sha512)

Definition at line 70 of file main.c.

Function Documentation

◆ crypto_openssl_init()

clib_error_t* crypto_openssl_init ( vlib_main_t vm)

Definition at line 413 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_dec_aead()

static_always_inline u32 openssl_ops_dec_aead ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
int  is_gcm 
)

Definition at line 266 of file main.c.

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

◆ openssl_ops_dec_cbc()

static_always_inline u32 openssl_ops_dec_cbc ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher 
)

Definition at line 147 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_dec_chacha20_poly1305()

static_always_inline u32 openssl_ops_dec_chacha20_poly1305 ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher 
)

Definition at line 321 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_dec_gcm()

static_always_inline u32 openssl_ops_dec_gcm ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher 
)

Definition at line 312 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_enc_aead()

static_always_inline u32 openssl_ops_enc_aead ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
int  is_gcm 
)

Definition at line 205 of file main.c.

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

◆ openssl_ops_enc_cbc()

static_always_inline u32 openssl_ops_enc_cbc ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher 
)

Definition at line 79 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_enc_chacha20_poly1305()

static_always_inline u32 openssl_ops_enc_chacha20_poly1305 ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher 
)

Definition at line 257 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_enc_gcm()

static_always_inline u32 openssl_ops_enc_gcm ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher 
)

Definition at line 248 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_hmac()

static_always_inline u32 openssl_ops_hmac ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_MD *  md 
)

Definition at line 330 of file main.c.

+ Here is the call graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ foreach_openssl_evp_op

foreach_openssl_evp_op

Definition at line 396 of file main.c.

◆ foreach_openssl_hmac_op

foreach_openssl_hmac_op

Definition at line 408 of file main.c.

◆ per_thread_data

Definition at line 37 of file main.c.