rte_crypto_sym.h(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

πŸ’– 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_vec
  • struct rte_crypto_sgl
  • struct rte_crypto_va_iova_ptr
  • struct rte_crypto_sym_vec
  • union rte_crypto_sym_ofs
  • struct rte_crypto_cipher_xform
  • struct rte_crypto_auth_xform
  • struct rte_crypto_sym_xform
  • struct 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 mode
  • RTE_CRYPTO_CIPHER_3DES_CTR β€” Triple DES algorithm in CTR mode
  • RTE_CRYPTO_CIPHER_3DES_ECB β€” Triple DES algorithm in ECB mode
  • RTE_CRYPTO_CIPHER_AES_CBC β€” AES algorithm in CBC mode
  • RTE_CRYPTO_CIPHER_AES_CTR β€” AES algorithm in Counter mode
  • RTE_CRYPTO_CIPHER_AES_ECB β€” AES algorithm in ECB mode
  • RTE_CRYPTO_CIPHER_AES_F8 β€” AES algorithm in F8 mode
  • RTE_CRYPTO_CIPHER_AES_XTS β€” AES algorithm in XTS mode
  • RTE_CRYPTO_CIPHER_ARC4 β€” (A)RC4 cipher algorithm
  • RTE_CRYPTO_CIPHER_KASUMI_F8 β€” KASUMI algorithm in F8 mode
  • RTE_CRYPTO_CIPHER_SNOW3G_UEA2 β€” SNOW 3G algorithm in UEA2 mode
  • RTE_CRYPTO_CIPHER_ZUC_EEA3 β€” ZUC algorithm in EEA3 mode
  • RTE_CRYPTO_CIPHER_DES_CBC β€” DES algorithm in CBC mode
  • RTE_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.next for m_src and m_dst in the rte_crypto_sym_op must be NULL.
  • 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.next for m_src and m_dst in the rte_crypto_sym_op must be NULL.
  • RTE_CRYPTO_CIPHER_SM4_ECB β€” ShangMi 4 (SM4) algorithm in ECB mode
  • RTE_CRYPTO_CIPHER_SM4_CBC β€” ShangMi 4 (SM4) algorithm in CBC mode
  • RTE_CRYPTO_CIPHER_SM4_CTR β€” ShangMi 4 (SM4) algorithm in CTR mode
  • RTE_CRYPTO_CIPHER_SM4_OFB β€” ShangMi 4 (SM4) algorithm in OFB mode
  • RTE_CRYPTO_CIPHER_SM4_CFB β€” ShangMi 4 (SM4) algorithm in CFB mode
  • RTE_CRYPTO_CIPHER_SM4_XTS β€” ShangMi 4 (SM4) algorithm in XTS mode
  • RTE_CRYPTO_CIPHER_SNOW5G_NEA4 β€” Snow 5G algorithm in NEA4 mode
  • RTE_CRYPTO_CIPHER_AES_NEA5 β€” AES algorithm in NEA5 mode
  • RTE_CRYPTO_CIPHER_ZUC_NEA6 β€” ZUC-256 algorithm in NEA6 mode
πŸ“ Definition at line 120 of file rte_crypto_sym.h.

enum rte_crypto_cipher_operation

Symmetric Cipher Direction 🧭

Enumerator

  • RTE_CRYPTO_CIPHER_OP_ENCRYPT β€” Encrypt cipher operation
  • RTE_CRYPTO_CIPHER_OP_DECRYPT β€” Decrypt cipher operation
πŸ“ Definition at line 193 of file rte_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 algorithm
  • RTE_CRYPTO_AUTH_MD5_HMAC β€” HMAC using MD5 algorithm
  • RTE_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 setting digest_length to 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 mode
  • RTE_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) algorithm
  • RTE_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) algorithm is in the source text and I am not cleaning it up 😭
  • RTE_CRYPTO_AUTH_AES_NIA5 β€” AES algorithm in NIA5 mode
  • RTE_CRYPTO_AUTH_ZUC_NIA6 β€” ZUC-256 algorithm in NIA6 mode
πŸ“ Definition at line 318 of file rte_crypto_sym.h.

enum rte_crypto_auth_operation

Symmetric Authentication / Hash Operations βœ…

Enumerator

  • RTE_CRYPTO_AUTH_OP_VERIFY β€” Verify authentication digest
  • RTE_CRYPTO_AUTH_OP_GENERATE β€” Generate authentication digest
πŸ“ Definition at line 405 of file rte_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 authenticator
  • RTE_CRYPTO_AEAD_SM4_GCM β€” SM4 cipher in GCM mode
  • RTE_CRYPTO_AEAD_SNOW5G_NCA4 β€” Snow 5G algorithm in NCA4 mode
  • RTE_CRYPTO_AEAD_AES_NCA5 β€” AES algorithm in NCA5 mode
  • RTE_CRYPTO_AEAD_ZUC_NCA6 β€” ZUC-256 algorithm in NCA6 mode
πŸ“ Definition at line 495 of file rte_crypto_sym.h.

enum rte_crypto_aead_operation

Symmetric AEAD Operations πŸ”

Enumerator

  • RTE_CRYPTO_AEAD_OP_ENCRYPT β€” Encrypt and generate digest
  • RTE_CRYPTO_AEAD_OP_DECRYPT β€” Verify digest and decrypt
πŸ“ Definition at line 514 of file rte_crypto_sym.h.

enum rte_crypto_sym_xform_type

Crypto transformation types πŸ¦‹

Enumerator

  • RTE_CRYPTO_SYM_XFORM_NOT_SPECIFIED β€” No xform specified
  • RTE_CRYPTO_SYM_XFORM_AUTH β€” Authentication xform
  • RTE_CRYPTO_SYM_XFORM_CIPHER β€” Cipher xform
  • RTE_CRYPTO_SYM_XFORM_AEAD β€” AEAD xform
πŸ“ Definition at line 586 of file rte_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 line 921 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) [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 line 938 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]

Attach a session to a symmetric crypto operation πŸ”—

Parameters

  • sym_op β€” crypto operation
  • sess β€” cryptodev session
πŸ“ Definition at line 961 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) [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 the rte_mbuf object.
  • 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 vec array.
  • negative number of elements in vec array required.
πŸ“ Definition at line 988 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, 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