---
name: "RTE_CRYPTO_CIPHER_ZUC_EEA3"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_crypto_sym.h"
---

# RTE\_CRYPTO\_CIPHER\_ZUC\_EEA3(3)

Part of [rte\_crypto\_sym.h(3)](/rte_crypto_sym.h/3.md).

## NAME

rte\_crypto\_sym.h

## SYNOPSIS

`#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

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

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** }\
 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

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)\

### Variables

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

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

### 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*

*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* **186** *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.*

*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 digest*

- *RTE\_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*

*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*

*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 digest*

- *RTE\_CRYPTO\_AEAD\_OP\_DECRYPT*

  *Verify digest and decrypt*

*Definition at line* **490** *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* **562** *of file* **rte\_crypto\_sym.h***.*

## Function Documentation

### static 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* **885** *of file* **rte\_crypto\_sym.h***.*

### 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)` [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* **902** *of file* **rte\_crypto\_sym.h***.*

### static 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* **925** *of file* **rte\_crypto\_sym.h***.*

### 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)` [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 952 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**

## Author

**Generated automatically by Doxygen for DPDK from the source code.**
