DPDK
23.03.0

#include <rte_crypto_sym.h>
Data Fields  
enum rte_crypto_cipher_operation  op 
enum rte_crypto_cipher_algorithm  algo 
struct {  
const uint8_t * data  
uint16_t length  
}  key 
struct {  
uint16_t offset  
uint16_t length  
}  iv 
uint32_t  dataunit_len 
Symmetric Cipher Setup Data.
This structure contains data relating to Cipher (Encryption and Decryption) use to create a session.
Definition at line 202 of file rte_crypto_sym.h.
enum rte_crypto_cipher_operation op 
This parameter determines if the cipher operation is an encrypt or a decrypt operation. For the RC4 algorithm and the F8/CTR modes, only encrypt operations are valid.
Definition at line 203 of file rte_crypto_sym.h.
enum rte_crypto_cipher_algorithm algo 
Cipher algorithm
Definition at line 208 of file rte_crypto_sym.h.
const uint8_t* data 
pointer to key data
Definition at line 212 of file rte_crypto_sym.h.
uint16_t length 
key length in bytes
Length of valid IV data.
Definition at line 213 of file rte_crypto_sym.h.
struct { ... } key 
Cipher key
In case the PMD supports RTE_CRYPTODEV_FF_CIPHER_WRAPPED_KEY, the original key data provided may be wrapped(encrypted) using key wrap algorithm such as AES key wrap (rfc3394) and hence length of the key may increase beyond the PMD advertised supported key size. PMD shall validate the key length and report EMSGSIZE error while configuring the session and application can skip checking the capability key length in such cases.
For the RTE_CRYPTO_CIPHER_AES_F8 mode of operation, key.data will point to a concatenation of the AES encryption key followed by a keymask. As per RFC3711, the keymask should be padded with trailing bytes to match the length of the encryption key used.
Cipher key length is in bytes. For AES it can be 128 bits (16 bytes), 192 bits (24 bytes) or 256 bits (32 bytes).
For the RTE_CRYPTO_CIPHER_AES_F8 mode of operation, key.length should be set to the combined length of the encryption key and the keymask. Since the keymask and the encryption key are the same size, key.length should be set to 2 x the AES encryption key length.
For the AESXTS mode of operation:
uint16_t offset 
Starting point for Initialisation Vector or Counter, specified as number of bytes from start of crypto operation (rte_crypto_op).
For optimum performance, the data pointed to SHOULD be 8byte aligned.
Definition at line 247 of file rte_crypto_sym.h.
struct { ... } iv 
Initialisation vector parameters
uint32_t dataunit_len 
When RTE_CRYPTODEV_FF_CIPHER_MULTIPLE_DATA_UNITS is enabled, this is the dataunit length of the algorithm, otherwise or when the value is 0, use the operation length. The value should be in the range defined by the dataunit_set field in the cipher capability.
Definition at line 290 of file rte_crypto_sym.h.