rte_crypto_sym.h(3)
π rte_crypto_sym.h(3) π
okay bestie, gather round, because this is the manual page for rte_crypto_sym.h β a whole header file full of symmetric crypto definitions, and she is serving. This is part 1 of 2, so buckle up, we're not even done yet. π
π NAME π
rte_crypto_sym.h β like, the file. That's her name. That's the whole vibe. π
β¨ SYNOPSIS β¨
so first you gotta pull her in, right? the include stack is giving very "I need all my friends with me":
#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 cast list, the main characters, no skips:
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 πΈ
every single one, verbatim, because we do NOT summarize our queens:
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 }
enum rte_crypto_cipher_operation { RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_OP_DECRYPT }
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 }
enum rte_crypto_auth_operation { RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_AUTH_OP_GENERATE }
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 }
enum rte_crypto_aead_operation { RTE_CRYPTO_AEAD_OP_ENCRYPT,
RTE_CRYPTO_AEAD_OP_DECRYPT }
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 π
watch her do her little signature moves:
static void __rte_crypto_sym_op_reset (struct rte_crypto_sym_op *op)
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)
static int __rte_crypto_sym_op_attach_sym_session (struct
rte_crypto_sym_op *sym_op, void *sess)
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)
heads up bestie:rte_crypto_mbuf_to_vecis marked__rte_experimental, so she's still in her experimental era. π
β Variables β
the string tables, our beloved little label-makers:
const char * rte_crypto_cipher_operation_strings []const char * rte_crypto_auth_operation_strings []const char * rte_crypto_aead_operation_strings []
π Detailed Description π
RTE Definitions for Symmetric Cryptography
so like, this header defines the symmetric cipher and authentication algorithms and modes, plus all the supported symmetric crypto operation combinations. it's the whole aesthetic, both the algorithms and how you're allowed to combine them. π
Definition in file rte_crypto_sym.h.
π§ Enumeration Type Documentation π§
π enum rte_crypto_cipher_algorithm π
Symmetric Cipher Algorithms
okay before we get into the list, there's a rule here and it's giving "don't touch the display or the whole shelf falls over":
Note, to avoid ABI breakage across releases
LIST_ENDshould not be added to this enum- the order of enums should not be changed
- new algorithms should only be added to the end
fr fr. no cap. respect the order. πΈ
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 mode
Definition at line 120 of file rte_crypto_sym.h.
π enum rte_crypto_cipher_operation π
Symmetric Cipher Direction
which way are we going, bestie, and be honest:
Enumerator
RTE_CRYPTO_CIPHER_OP_ENCRYPTβ Encrypt cipher operationRTE_CRYPTO_CIPHER_OP_DECRYPTβ Decrypt cipher operation
Definition at line 186 of file rte_crypto_sym.h.
π enum rte_crypto_auth_algorithm π
Symmetric Authentication / Hash Algorithms
same energy as before, the ABI is fragile and we protect her:
Note, to avoid ABI breakage across releases
LIST_ENDshould 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_lengthto 12 bytes 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.
Definition at line 311 of file rte_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 line 390 of file rte_crypto_sym.h.
π«Ά enum rte_crypto_aead_algorithm π«Ά
Symmetric AEAD Algorithms
you already know the rules by now, but here they are again because consistency is iconic:
Note, to avoid ABI breakage across releases
LIST_ENDshould 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 mode
Definition at line 480 of file rte_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 line 492 of file rte_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 line 564 of file rte_crypto_sym.h.
okay and that's only part one, bestie β she keeps going. π β¨
π Function Documentation π
π«Ά __rte_crypto_sym_op_reset
void __rte_crypto_sym_op_reset (struct rte_crypto_sym_op * op)
okay so this lil guy is [inline] and [static], and what it does is reset the fields of a symmetric operation back to their default values. like a little factory-reset button for your op, no cap. π
Parameters
opβ the crypto operation you wanna reset. that's it, that's the whole job.
Definition at line 887 of file rte_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)
also [inline], also [static], and bestie this one is a whole moment. it allocates space for symmetric crypto xforms inside the private data space of the crypto operation. and not only that β it also defaults the crypto xform type to RTE_CRYPTO_SYM_XFORM_NOT_SPECIFIED and configures the chaining of the xforms in the crypto operation. multitasking queen π
Returns
- on success, you get a pointer to the first crypto xform in the crypto operations chain π
- on failure, you get
NULLπ
Definition at line 904 of file rte_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] again (the trio really said consistency β¨). this one attaches a session to a symmetric crypto operation. basically matchmaking but for ops and sessions π
Parameters
sym_opβ the crypto operation.sessβ the cryptodev session.
Definition at line 927 of file rte_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)
s[inline], [static], and heads up β it's tagged __rte_experimental, so treat it like a new drop that might still change π
what it does: converts a portion of mbuf data into a vector representation. each segment gets its own separate entry in the vec array. it expects that the ofs + len you gave it does not exceed the mbuf's pkt_len. it's giving strict boundaries, honestly.
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
- the number of successfully filled entries in the
vecarray π - a negative number of elements in the
vecarray required (so it can also tell you "girl you didn't give me enough room" π)
Definition at line 954 of file rte_crypto_sym.h.
π Variable Documentation π
const char* rte_crypto_cipher_operation_strings[][extern]β cipher operation name strings πconst char* rte_crypto_auth_operation_strings[][extern]β authentication operation name strings πconst char* rte_crypto_aead_operation_strings[][extern]β authentication operation name strings π (yes bestie, it says authentication for the aead one too β that's literally what the page says, we don't question the source, we just report fr fr π)
π Author
Generated automatically by Doxygen for DPDK from the source code. so technically the author is a robot and the robot ate, periodt π€β¨
okay and that's a wrap on this whole page π this was DPDK Version 25.11.3, page rte_crypto_sym.h(3) β go forth, attach your sessions, allocate your xforms, and slay π«Άπ
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms