rte_crypto_sym.h(3)
π NAME π
rte_crypto_sym.h β okay bestie, this is the Library Functions Manual page for rte_crypto_sym.h(3), and the name is literally the header, no extra lore. β¨
β¨ SYNOPSIS β¨
Here's the include lineup, exact and untouched:
#include <string.h>
#include <rte_compat.h>
#include <rte_mbuf.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_common.h>
π Data Structures π
The structs and union in this header, all exact β don't rename these, bestie:
struct rte_crypto_vecstruct rte_crypto_sglstruct rte_crypto_va_iova_ptrstruct rte_crypto_sym_vecunion rte_crypto_sym_ofsstruct rte_crypto_cipher_xformstruct rte_crypto_auth_xformstruct rte_crypto_sym_xformstruct rte_crypto_sym_op
π Enumerations π
These enums are the whole menu. Names and values are literal, periodt.
enum rte_crypto_cipher_algorithm β the cipher algorithm lineup:
enum rte_crypto_cipher_algorithm { RTE_CRYPTO_CIPHER_NULL = 1,
RTE_CRYPTO_CIPHER_3DES_CBC, RTE_CRYPTO_CIPHER_3DES_CTR,
RTE_CRYPTO_CIPHER_3DES_ECB, RTE_CRYPTO_CIPHER_AES_CBC,
RTE_CRYPTO_CIPHER_AES_CTR, RTE_CRYPTO_CIPHER_AES_ECB,
RTE_CRYPTO_CIPHER_AES_F8, RTE_CRYPTO_CIPHER_AES_XTS,
RTE_CRYPTO_CIPHER_ARC4, RTE_CRYPTO_CIPHER_KASUMI_F8,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2, RTE_CRYPTO_CIPHER_ZUC_EEA3,
RTE_CRYPTO_CIPHER_DES_CBC, RTE_CRYPTO_CIPHER_AES_DOCSISBPI,
RTE_CRYPTO_CIPHER_DES_DOCSISBPI, RTE_CRYPTO_CIPHER_SM4_ECB,
RTE_CRYPTO_CIPHER_SM4_CBC, RTE_CRYPTO_CIPHER_SM4_CTR,
RTE_CRYPTO_CIPHER_SM4_OFB, RTE_CRYPTO_CIPHER_SM4_CFB,
RTE_CRYPTO_CIPHER_SM4_XTS, RTE_CRYPTO_CIPHER_SNOW5G_NEA4,
RTE_CRYPTO_CIPHER_AES_NEA5, RTE_CRYPTO_CIPHER_ZUC_NEA6 }
enum rte_crypto_cipher_operation β encrypt or decrypt, iconic:
enum rte_crypto_cipher_operation { RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_OP_DECRYPT }
enum rte_crypto_auth_algorithm β the auth algorithm lineup:
enum rte_crypto_auth_algorithm { RTE_CRYPTO_AUTH_NULL = 1,
RTE_CRYPTO_AUTH_AES_CBC_MAC, RTE_CRYPTO_AUTH_AES_CMAC,
RTE_CRYPTO_AUTH_AES_GMAC, RTE_CRYPTO_AUTH_AES_XCBC_MAC,
RTE_CRYPTO_AUTH_KASUMI_F9, RTE_CRYPTO_AUTH_MD5,
RTE_CRYPTO_AUTH_MD5_HMAC, RTE_CRYPTO_AUTH_SHA1,
RTE_CRYPTO_AUTH_SHA1_HMAC, RTE_CRYPTO_AUTH_SHA224,
RTE_CRYPTO_AUTH_SHA224_HMAC, RTE_CRYPTO_AUTH_SHA256,
RTE_CRYPTO_AUTH_SHA256_HMAC, RTE_CRYPTO_AUTH_SHA384,
RTE_CRYPTO_AUTH_SHA384_HMAC, RTE_CRYPTO_AUTH_SHA512,
RTE_CRYPTO_AUTH_SHA512_HMAC, RTE_CRYPTO_AUTH_SNOW3G_UIA2,
RTE_CRYPTO_AUTH_ZUC_EIA3, RTE_CRYPTO_AUTH_SHA3_224,
RTE_CRYPTO_AUTH_SHA3_224_HMAC, RTE_CRYPTO_AUTH_SHA3_256,
RTE_CRYPTO_AUTH_SHA3_256_HMAC, RTE_CRYPTO_AUTH_SHA3_384,
RTE_CRYPTO_AUTH_SHA3_384_HMAC, RTE_CRYPTO_AUTH_SHA3_512,
RTE_CRYPTO_AUTH_SHA3_512_HMAC, RTE_CRYPTO_AUTH_SM3,
RTE_CRYPTO_AUTH_SHAKE_128, RTE_CRYPTO_AUTH_SHAKE_256,
RTE_CRYPTO_AUTH_SM3_HMAC, RTE_CRYPTO_AUTH_SNOW5G_NIA4,
RTE_CRYPTO_AUTH_AES_NIA5, RTE_CRYPTO_AUTH_ZUC_NIA6 }
enum rte_crypto_auth_operation β verify or generate:
enum rte_crypto_auth_operation { RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_AUTH_OP_GENERATE }
enum rte_crypto_aead_algorithm β the AEAD algorithm lineup:
enum rte_crypto_aead_algorithm { RTE_CRYPTO_AEAD_AES_CCM = 1,
RTE_CRYPTO_AEAD_AES_GCM, RTE_CRYPTO_AEAD_CHACHA20_POLY1305,
RTE_CRYPTO_AEAD_SM4_GCM, RTE_CRYPTO_AEAD_SNOW5G_NCA4,
RTE_CRYPTO_AEAD_AES_NCA5, RTE_CRYPTO_AEAD_ZUC_NCA6 }
enum rte_crypto_aead_operation β encrypt or decrypt, AEAD edition:
enum rte_crypto_aead_operation { RTE_CRYPTO_AEAD_OP_ENCRYPT,
RTE_CRYPTO_AEAD_OP_DECRYPT }
enum rte_crypto_sym_xform_type β the xform type menu:
enum rte_crypto_sym_xform_type { RTE_CRYPTO_SYM_XFORM_NOT_SPECIFIED = 0,
RTE_CRYPTO_SYM_XFORM_AUTH, RTE_CRYPTO_SYM_XFORM_CIPHER,
RTE_CRYPTO_SYM_XFORM_AEAD }
π§ Functions π§
These signatures are exact β copy them character for character, no "fixing" the spacing vibe:
static void __rte_crypto_sym_op_reset (struct rte_crypto_sym_op *op)β the reset one, exact signature.static struct rte_crypto_sym_xform * __rte_crypto_sym_op_sym_xforms_alloc (struct rte_crypto_sym_op *sym_op, void *priv_data, uint8_t nb_xforms)β the xforms alloc one, exact signature.static int __rte_crypto_sym_op_attach_sym_session (struct rte_crypto_sym_op *sym_op, void *sess)β the attach-sym-session one, exact signature.static __rte_experimental int rte_crypto_mbuf_to_vec (const struct rte_mbuf *mb, uint32_t ofs, uint32_t len, struct rte_crypto_vec vec[], uint32_t num)β the mbuf-to-vec one, exact signature.
πΈ Variables πΈ
The string arrays, exact:
const char * rte_crypto_cipher_operation_strings []const char * rte_crypto_auth_operation_strings []const char * rte_crypto_aead_operation_strings []
π Detailed Description π
This header is literally the RTE Definitions for Symmetric Cryptography. It defines symmetric cipher and authentication algorithms and modes, as well as supported symmetric crypto operation combinations. π
Definition in file rte_crypto_sym.h.
π Enumeration Type Documentation π
okay bestie, this is the enum lore section and it is long, but every single enumerator is here because we do not skip details in this group chat π β¨
enum rte_crypto_cipher_algorithm
Symmetric Cipher Algorithms π
β οΈ Note, to avoid ABI breakage across releases: - LIST_END should not be added to this enum - the order of enums should not be changed - new algorithms should only be added to the end
Enumerator
RTE_CRYPTO_CIPHER_NULLβ NULL cipher algorithm. No mode applies to the NULL algorithm.RTE_CRYPTO_CIPHER_3DES_CBCβ Triple DES algorithm in CBC modeRTE_CRYPTO_CIPHER_3DES_CTRβ Triple DES algorithm in CTR modeRTE_CRYPTO_CIPHER_3DES_ECBβ Triple DES algorithm in ECB modeRTE_CRYPTO_CIPHER_AES_CBCβ AES algorithm in CBC modeRTE_CRYPTO_CIPHER_AES_CTRβ AES algorithm in Counter modeRTE_CRYPTO_CIPHER_AES_ECBβ AES algorithm in ECB modeRTE_CRYPTO_CIPHER_AES_F8β AES algorithm in F8 modeRTE_CRYPTO_CIPHER_AES_XTSβ AES algorithm in XTS modeRTE_CRYPTO_CIPHER_ARC4β (A)RC4 cipher algorithmRTE_CRYPTO_CIPHER_KASUMI_F8β KASUMI algorithm in F8 modeRTE_CRYPTO_CIPHER_SNOW3G_UEA2β SNOW 3G algorithm in UEA2 modeRTE_CRYPTO_CIPHER_ZUC_EEA3β ZUC algorithm in EEA3 modeRTE_CRYPTO_CIPHER_DES_CBCβ DES algorithm in CBC modeRTE_CRYPTO_CIPHER_AES_DOCSISBPIβ AES algorithm using modes required by DOCSIS Baseline Privacy Plus Spec. Chained mbufs are not supported in this mode, i.e.rte_mbuf.nextform_srcandm_dstin therte_crypto_sym_opmust beNULL.RTE_CRYPTO_CIPHER_DES_DOCSISBPIβ DES algorithm using modes required by DOCSIS Baseline Privacy Plus Spec. Chained mbufs are not supported in this mode, i.e.rte_mbuf.nextform_srcandm_dstin therte_crypto_sym_opmust beNULL.RTE_CRYPTO_CIPHER_SM4_ECBβ ShangMi 4 (SM4) algorithm in ECB modeRTE_CRYPTO_CIPHER_SM4_CBCβ ShangMi 4 (SM4) algorithm in CBC modeRTE_CRYPTO_CIPHER_SM4_CTRβ ShangMi 4 (SM4) algorithm in CTR modeRTE_CRYPTO_CIPHER_SM4_OFBβ ShangMi 4 (SM4) algorithm in OFB modeRTE_CRYPTO_CIPHER_SM4_CFBβ ShangMi 4 (SM4) algorithm in CFB modeRTE_CRYPTO_CIPHER_SM4_XTSβ ShangMi 4 (SM4) algorithm in XTS modeRTE_CRYPTO_CIPHER_SNOW5G_NEA4β Snow 5G algorithm in NEA4 modeRTE_CRYPTO_CIPHER_AES_NEA5β AES algorithm in NEA5 modeRTE_CRYPTO_CIPHER_ZUC_NEA6β ZUC-256 algorithm in NEA6 mode
π Definition at line120of filerte_crypto_sym.h.
enum rte_crypto_cipher_operation
Symmetric Cipher Direction π§
Enumerator
RTE_CRYPTO_CIPHER_OP_ENCRYPTβ Encrypt cipher operationRTE_CRYPTO_CIPHER_OP_DECRYPTβ Decrypt cipher operation
π Definition at line193of filerte_crypto_sym.h.
enum rte_crypto_auth_algorithm
Symmetric Authentication / Hash Algorithms π§¬
β οΈ Note, to avoid ABI breakage across releases: - LIST_END should not be added to this enum - the order of enums should not be changed - new algorithms should only be added to the end
Enumerator
RTE_CRYPTO_AUTH_NULLβ NULL hash algorithm.RTE_CRYPTO_AUTH_AES_CBC_MACβ AES-CBC-MAC algorithm. Only 128-bit keys are supported.RTE_CRYPTO_AUTH_AES_CMACβ AES CMAC algorithm.RTE_CRYPTO_AUTH_AES_GMACβ AES GMAC algorithm.RTE_CRYPTO_AUTH_AES_XCBC_MACβ AES XCBC algorithm.RTE_CRYPTO_AUTH_KASUMI_F9β KASUMI algorithm in F9 mode.RTE_CRYPTO_AUTH_MD5β MD5 algorithmRTE_CRYPTO_AUTH_MD5_HMACβ HMAC using MD5 algorithmRTE_CRYPTO_AUTH_SHA1β 160 bit SHA algorithm.RTE_CRYPTO_AUTH_SHA1_HMACβ HMAC using 160 bit SHA algorithm. HMAC-SHA-1-96 can be generated by settingdigest_lengthto12bytes in auth/aead xforms.RTE_CRYPTO_AUTH_SHA224β 224 bit SHA algorithm.RTE_CRYPTO_AUTH_SHA224_HMACβ HMAC using 224 bit SHA algorithm.RTE_CRYPTO_AUTH_SHA256β 256 bit SHA algorithm.RTE_CRYPTO_AUTH_SHA256_HMACβ HMAC using 256 bit SHA algorithm.RTE_CRYPTO_AUTH_SHA384β 384 bit SHA algorithm.RTE_CRYPTO_AUTH_SHA384_HMACβ HMAC using 384 bit SHA algorithm.RTE_CRYPTO_AUTH_SHA512β 512 bit SHA algorithm.RTE_CRYPTO_AUTH_SHA512_HMACβ HMAC using 512 bit SHA algorithm.RTE_CRYPTO_AUTH_SNOW3G_UIA2β SNOW 3G algorithm in UIA2 mode.RTE_CRYPTO_AUTH_ZUC_EIA3β ZUC algorithm in EIA3 modeRTE_CRYPTO_AUTH_SHA3_224β 224 bit SHA3 algorithm.RTE_CRYPTO_AUTH_SHA3_224_HMACβ HMAC using 224 bit SHA3 algorithm.RTE_CRYPTO_AUTH_SHA3_256β 256 bit SHA3 algorithm.RTE_CRYPTO_AUTH_SHA3_256_HMACβ HMAC using 256 bit SHA3 algorithm.RTE_CRYPTO_AUTH_SHA3_384β 384 bit SHA3 algorithm.RTE_CRYPTO_AUTH_SHA3_384_HMACβ HMAC using 384 bit SHA3 algorithm.RTE_CRYPTO_AUTH_SHA3_512β 512 bit SHA3 algorithm.RTE_CRYPTO_AUTH_SHA3_512_HMACβ HMAC using 512 bit SHA3 algorithm.RTE_CRYPTO_AUTH_SM3β ShangMi 3 (SM3) algorithmRTE_CRYPTO_AUTH_SHAKE_128β 128 bit SHAKE algorithm.RTE_CRYPTO_AUTH_SHAKE_256β 256 bit SHAKE algorithm.RTE_CRYPTO_AUTH_SNOW5G_NIA4β the original doc text here is literally< HMAC using ShangMi 3 (SM3) algorithm Snow 5G algorithm in NIA4 modeβ yes, bestie, that stray< HMAC using ShangMi 3 (SM3) algorithmis in the source text and I am not cleaning it up πRTE_CRYPTO_AUTH_AES_NIA5β AES algorithm in NIA5 modeRTE_CRYPTO_AUTH_ZUC_NIA6β ZUC-256 algorithm in NIA6 mode
π Definition at line318of filerte_crypto_sym.h.
enum rte_crypto_auth_operation
Symmetric Authentication / Hash Operations β
Enumerator
RTE_CRYPTO_AUTH_OP_VERIFYβ Verify authentication digestRTE_CRYPTO_AUTH_OP_GENERATEβ Generate authentication digest
π Definition at line405of filerte_crypto_sym.h.
enum rte_crypto_aead_algorithm
Symmetric AEAD Algorithms π‘οΈ
β οΈ Note, to avoid ABI breakage across releases: - LIST_END should not be added to this enum - the order of enums should not be changed - new algorithms should only be added to the end
Enumerator
RTE_CRYPTO_AEAD_AES_CCMβ AES algorithm in CCM mode.RTE_CRYPTO_AEAD_AES_GCMβ AES algorithm in GCM mode.RTE_CRYPTO_AEAD_CHACHA20_POLY1305β Chacha20 cipher with poly1305 authenticatorRTE_CRYPTO_AEAD_SM4_GCMβ SM4 cipher in GCM modeRTE_CRYPTO_AEAD_SNOW5G_NCA4β Snow 5G algorithm in NCA4 modeRTE_CRYPTO_AEAD_AES_NCA5β AES algorithm in NCA5 modeRTE_CRYPTO_AEAD_ZUC_NCA6β ZUC-256 algorithm in NCA6 mode
π Definition at line495of filerte_crypto_sym.h.
enum rte_crypto_aead_operation
Symmetric AEAD Operations π
Enumerator
RTE_CRYPTO_AEAD_OP_ENCRYPTβ Encrypt and generate digestRTE_CRYPTO_AEAD_OP_DECRYPTβ Verify digest and decrypt
π Definition at line514of filerte_crypto_sym.h.
enum rte_crypto_sym_xform_type
Crypto transformation types π¦
Enumerator
RTE_CRYPTO_SYM_XFORM_NOT_SPECIFIEDβ No xform specifiedRTE_CRYPTO_SYM_XFORM_AUTHβ Authentication xformRTE_CRYPTO_SYM_XFORM_CIPHERβ Cipher xformRTE_CRYPTO_SYM_XFORM_AEADβ AEAD xform
π Definition at line586of filerte_crypto_sym.h.
β¨ Function Documentation β¨
__rte_crypto_sym_op_reset
void __rte_crypto_sym_op_reset (struct rte_crypto_sym_op * op) [inline], [static]
Reset the fields of a symmetric operation to their default values π
Parameters
opβ The crypto operation to be reset.
π Definition at line921of filerte_crypto_sym.h.
__rte_crypto_sym_op_sym_xforms_alloc
struct rte_crypto_sym_xform * __rte_crypto_sym_op_sym_xforms_alloc (struct rte_crypto_sym_op * sym_op, void * priv_data, uint8_t nb_xforms) [inline], [static]
Allocate space for symmetric crypto xforms in the private data space of the crypto operation. This also defaults the crypto xform type to RTE_CRYPTO_SYM_XFORM_NOT_SPECIFIED and configures the chaining of the xforms in the crypto operation π§
Returns
- On success returns pointer to first crypto xform in crypto operations chain
- On failure returns
NULL
π Definition at line938of filerte_crypto_sym.h.
__rte_crypto_sym_op_attach_sym_session
int __rte_crypto_sym_op_attach_sym_session (struct rte_crypto_sym_op * sym_op, void * sess) [inline], [static]
Attach a session to a symmetric crypto operation π
Parameters
sym_opβ crypto operationsessβ cryptodev session
π Definition at line961of filerte_crypto_sym.h.
rte_crypto_mbuf_to_vec
__rte_experimental int rte_crypto_mbuf_to_vec (const struct rte_mbuf * mb, uint32_t ofs, uint32_t len, struct rte_crypto_vec vec[], uint32_t num) [inline], [static]
Converts portion of mbuf data into a vector representation. Each segment will be represented as a separate entry in vec array. Expects that provided ofs + len not to exceed mbuf's pkt_len π§
Parameters
mbβ Pointer to therte_mbufobject.ofsβ Offset within mbuf data to start with.lenβ Length of data to represent.vecβ Pointer to an output array of IO vectors.numβ Size of an output array.
Returns
- number of successfully filled entries in
vecarray. - negative number of elements in
vecarray required.
π Definition at line988of filerte_crypto_sym.h.
π Variable Documentation π
const char* rte_crypto_cipher_operation_strings[][extern]β Cipher operation name stringsconst char* rte_crypto_auth_operation_strings[][extern]β Authentication operation name stringsconst char* rte_crypto_aead_operation_strings[][extern]β Authentication operation name strings
π yes, the rte_crypto_aead_operation_strings[] description says βAuthentication operation name stringsβ too β that is literally what the page says, bestie, no cap.
π Author π
Generated automatically by Doxygen for DPDK from the source code.
π thatβs the whole page, bestie β sourced from DPDK Version 26.03.0, page rte_crypto_sym.h(3), and yes the footerβs date slot is doing its little page-reference thing. mwah π
β¨
π¦ where this page comes from
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms