---
name: "RTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY"
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_asym.h"
---

# RTE\_CRYPTO\_ASYM\_KE\_PUB\_KEY\_VERIFY(3)

Part of [rte\_crypto\_asym.h(3)](/rte_crypto_asym.h/3.md).

## NAME

rte\_crypto\_asym.h

## SYNOPSIS

`#include <string.h>`\
 `#include <stdint.h>`\
 `#include <rte_memory.h>`\
 `#include <rte_mempool.h>`\
 `#include <rte_common.h>`\
 `#include 'rte_crypto_sym.h'`\

### Data Structures

struct **rte\_crypto\_param\_t**\
 struct **rte\_crypto\_ec\_point**\
 struct **rte\_crypto\_rsa\_priv\_key\_qt**\
 struct **rte\_crypto\_rsa\_padding**\
 struct **rte\_crypto\_rsa\_xform**\
 struct **rte\_crypto\_modex\_xform**\
 struct **rte\_crypto\_modinv\_xform**\
 struct **rte\_crypto\_dh\_xform**\
 struct **rte\_crypto\_dsa\_xform**\
 struct **rte\_crypto\_ec\_xform**\
 struct **rte\_crypto\_mod\_op\_param**\
 struct **rte\_crypto\_rsa\_op\_param**\
 struct **rte\_crypto\_dh\_op\_param**\
 struct **rte\_crypto\_ecdh\_op\_param**\
 struct **rte\_crypto\_dsa\_op\_param**\
 struct **rte\_crypto\_ecdsa\_op\_param**\
 struct **rte\_crypto\_eddsa\_op\_param**\
 struct **rte\_crypto\_ecpm\_op\_param**\
 struct **rte\_crypto\_sm2\_op\_param**\
 struct **rte\_crypto\_asym\_xform**\
 struct **rte\_crypto\_asym\_op**\

### Macros

\#define **RTE\_CRYPTO\_ASYM\_FLAG\_PUB\_KEY\_NO\_PADDING**   **RTE\_BIT32**(0)\
 \#define **RTE\_CRYPTO\_ASYM\_FLAG\_SHARED\_KEY\_NO\_PADDING**   **RTE\_BIT32**(1)\
 \#define **RTE\_CRYPTO\_ASYM\_FLAG\_PUB\_KEY\_COMPRESSED**   **RTE\_BIT32**(2)\

### Typedefs

**typedef** struct **rte\_crypto\_param\_t** **rte\_crypto\_param**\
 **typedef** **rte\_crypto\_param** **rte\_crypto\_uint**\

### Enumerations

enum **rte\_crypto\_curve\_id** \
 enum **rte\_crypto\_edward\_instance** \
 enum **rte\_crypto\_asym\_xform\_type** { **RTE\_CRYPTO\_ASYM\_XFORM\_UNSPECIFIED** = 0, **RTE\_CRYPTO\_ASYM\_XFORM\_NONE**, **RTE\_CRYPTO\_ASYM\_XFORM\_RSA**, **RTE\_CRYPTO\_ASYM\_XFORM\_DH**, **RTE\_CRYPTO\_ASYM\_XFORM\_DSA**, **RTE\_CRYPTO\_ASYM\_XFORM\_MODINV**, **RTE\_CRYPTO\_ASYM\_XFORM\_MODEX**, **RTE\_CRYPTO\_ASYM\_XFORM\_ECDSA**, **RTE\_CRYPTO\_ASYM\_XFORM\_ECDH**, **RTE\_CRYPTO\_ASYM\_XFORM\_ECPM**, **RTE\_CRYPTO\_ASYM\_XFORM\_ECFPM**, **RTE\_CRYPTO\_ASYM\_XFORM\_SM2**, **RTE\_CRYPTO\_ASYM\_XFORM\_EDDSA** }\
 enum **rte\_crypto\_asym\_op\_type** { **RTE\_CRYPTO\_ASYM\_OP\_ENCRYPT**, **RTE\_CRYPTO\_ASYM\_OP\_DECRYPT**, **RTE\_CRYPTO\_ASYM\_OP\_SIGN**, **RTE\_CRYPTO\_ASYM\_OP\_VERIFY**, **RTE\_CRYPTO\_ASYM\_OP\_LIST\_END** }\
 enum **rte\_crypto\_asym\_ke\_type** { **RTE\_CRYPTO\_ASYM\_KE\_PRIV\_KEY\_GENERATE**, **RTE\_CRYPTO\_ASYM\_KE\_PUB\_KEY\_GENERATE**, **RTE\_CRYPTO\_ASYM\_KE\_SHARED\_SECRET\_COMPUTE**, **RTE\_CRYPTO\_ASYM\_KE\_PUB\_KEY\_VERIFY** }\
 enum **rte\_crypto\_rsa\_padding\_type** { **RTE\_CRYPTO\_RSA\_PADDING\_NONE** = 0, **RTE\_CRYPTO\_RSA\_PADDING\_PKCS1\_5**, **RTE\_CRYPTO\_RSA\_PADDING\_OAEP**, **RTE\_CRYPTO\_RSA\_PADDING\_PSS** }\
 enum **rte\_crypto\_rsa\_priv\_key\_type** { **RTE\_RSA\_KEY\_TYPE\_EXP**, **RTE\_RSA\_KEY\_TYPE\_QT** }\
 enum **rte\_crypto\_sm2\_op\_capa** { **RTE\_CRYPTO\_SM2\_RNG**, **RTE\_CRYPTO\_SM2\_PH** }\

### Variables

const char \* **rte\_crypto\_asym\_ke\_strings** \[\]\
 const char \* **rte\_crypto\_asym\_op\_strings** \[\]\

## Detailed Description

RTE Definitions for Asymmetric Cryptography

Defines asymmetric algorithms and modes, as well as supported asymmetric crypto operations.

Definition in file **rte\_crypto\_asym.h**.

## Macro Definition Documentation

### #define RTE\_CRYPTO\_ASYM\_FLAG\_PUB\_KEY\_NO\_PADDING RTE\_BIT32(0)

Flag to denote public key will be returned without leading zero bytes and if the flag is not set, public key will be padded to the left with zeros to the size of the underlying algorithm (default)

Definition at line **41** of file **rte\_crypto\_asym.h**.

### #define RTE\_CRYPTO\_ASYM\_FLAG\_SHARED\_KEY\_NO\_PADDING RTE\_BIT32(1)

Flag to denote shared secret will be returned without leading zero bytes and if the flag is not set, shared secret will be padded to the left with zeros to the size of the underlying algorithm (default)

Definition at line **47** of file **rte\_crypto\_asym.h**.

### #define RTE\_CRYPTO\_ASYM\_FLAG\_PUB\_KEY\_COMPRESSED RTE\_BIT32(2)

Flag to denote public key will be returned in compressed form

Definition at line **51** of file **rte\_crypto\_asym.h**.

## Typedef Documentation

### typedef struct rte\_crypto\_param\_t rte\_crypto\_param

Buffer to hold crypto params required for asym operations.

These buffers can be used for both input to PMD and output from PMD. When used for output from PMD, application has to ensure the buffer is large enough to hold the target data.

If an operation requires the PMD to generate a random number, and the device supports CSRNG, 'data' should be set to NULL. The crypto parameter in question will not be used by the PMD, as it is internally generated.

### typedef rte\_crypto\_param rte\_crypto\_uint

Unsigned big-integer in big-endian format

Definition at line **225** of file **rte\_crypto\_asym.h**.

## Enumeration Type Documentation

### enum rte\_crypto\_curve\_id

List of elliptic curves. This enum aligns with TLS 'Supported Groups' registry (previously known as NamedCurve registry). FFDH groups are not, and will not be included in this list. Deprecation for selected curve in TLS does not deprecate the selected curve in Cryptodev. https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml

Definition at line **62** of file **rte\_crypto\_asym.h**.

### enum rte\_crypto\_edward\_instance

List of Edwards curve instances as per RFC 8032 (Section 5).

Definition at line **76** of file **rte\_crypto\_asym.h**.

### enum rte\_crypto\_asym\_xform\_type

Asymmetric crypto transformation types. Each xform type maps to one asymmetric algorithm performing specific operation

**Enumerator**

- *RTE\_CRYPTO\_ASYM\_XFORM\_UNSPECIFIED*

  *Invalid xform.*

- *RTE\_CRYPTO\_ASYM\_XFORM\_NONE*

  *Xform type None. May be supported by PMD to support passthrough op for debugging purpose. if xform\_type none , op\_type is disregarded.*

- *RTE\_CRYPTO\_ASYM\_XFORM\_RSA*

  *RSA. Performs Encrypt, Decrypt, Sign and Verify. Refer to rte\_crypto\_asym\_op\_type*

- *RTE\_CRYPTO\_ASYM\_XFORM\_DH*

  *Diffie-Hellman. Performs Key Generate and Shared Secret Compute. Refer to rte\_crypto\_asym\_op\_type*

- *RTE\_CRYPTO\_ASYM\_XFORM\_DSA*

  *Digital Signature Algorithm Performs Signature Generation and Verification. Refer to rte\_crypto\_asym\_op\_type*

- *RTE\_CRYPTO\_ASYM\_XFORM\_MODINV*

  *Modular Multiplicative Inverse Perform Modular Multiplicative Inverse b^(-1) mod n*

- *RTE\_CRYPTO\_ASYM\_XFORM\_MODEX*

  *Modular Exponentiation Perform Modular Exponentiation b^e mod n*

- *RTE\_CRYPTO\_ASYM\_XFORM\_ECDSA*

  *Elliptic Curve Digital Signature Algorithm Perform Signature Generation and Verification.*

- *RTE\_CRYPTO\_ASYM\_XFORM\_ECDH*

  *Elliptic Curve Diffie Hellman*

- *RTE\_CRYPTO\_ASYM\_XFORM\_ECPM*

  *Elliptic Curve Point Multiplication*

- *RTE\_CRYPTO\_ASYM\_XFORM\_ECFPM*

  *Elliptic Curve Fixed Point Multiplication*

- *RTE\_CRYPTO\_ASYM\_XFORM\_SM2*

  *ShangMi 2 Performs Encrypt, Decrypt, Sign and Verify. Refer to rte\_crypto\_asym\_op\_type.*

- *RTE\_CRYPTO\_ASYM\_XFORM\_EDDSA*

  *Edwards Curve Digital Signature Algorithm Perform Signature Generation and Verification.*

*Definition at line* **89** *of file* **rte\_crypto\_asym.h***.*

### enum rte\_crypto\_asym\_op\_type

*Asymmetric crypto operation type variants*

**Enumerator**

- *RTE\_CRYPTO\_ASYM\_OP\_ENCRYPT*

  *Asymmetric Encrypt operation*

- *RTE\_CRYPTO\_ASYM\_OP\_DECRYPT*

  *Asymmetric Decrypt operation*

- *RTE\_CRYPTO\_ASYM\_OP\_SIGN*

  *Signature Generation operation*

- *RTE\_CRYPTO\_ASYM\_OP\_VERIFY*

  *Signature Verification operation*

*Definition at line* **144** *of file* **rte\_crypto\_asym.h***.*

### enum rte\_crypto\_asym\_ke\_type

*Asymmetric crypto key exchange operation type*

**Enumerator**

- *RTE\_CRYPTO\_ASYM\_KE\_PRIV\_KEY\_GENERATE*

  *Private Key generation operation*

- *RTE\_CRYPTO\_ASYM\_KE\_PUB\_KEY\_GENERATE*

  *Public Key generation operation*

- *RTE\_CRYPTO\_ASYM\_KE\_SHARED\_SECRET\_COMPUTE*

  *Shared Secret compute operation*

- *RTE\_CRYPTO\_ASYM\_KE\_PUB\_KEY\_VERIFY*

  *Public Key Verification - can be used for elliptic curve point validation.*

*Definition at line* **159** *of file* **rte\_crypto\_asym.h***.*

### enum rte\_crypto\_rsa\_padding\_type

*Padding types for RSA signature.*

**Enumerator**

- *RTE\_CRYPTO\_RSA\_PADDING\_NONE*

  *RSA no padding scheme*

- *RTE\_CRYPTO\_RSA\_PADDING\_PKCS1\_5*

  *RSA PKCS#1 PKCS1-v1\_5 padding scheme. For signatures block type 01, for encryption block type 02 are used.*

- *RTE\_CRYPTO\_RSA\_PADDING\_OAEP*

  *RSA PKCS#1 OAEP padding scheme*

- *RTE\_CRYPTO\_RSA\_PADDING\_PSS*

  *RSA PKCS#1 PSS padding scheme*

*Definition at line* **175** *of file* **rte\_crypto\_asym.h***.*

### enum rte\_crypto\_rsa\_priv\_key\_type

*RSA private key type enumeration*

*enumerates private key format required to perform RSA crypto transform.*

**Enumerator**

- *RTE\_RSA\_KEY\_TYPE\_EXP*

  *RSA private key is an exponent*

- *RTE\_RSA\_KEY\_TYPE\_QT*

  *RSA private key is in quintuple format See* **rte\_crypto\_rsa\_priv\_key\_qt**

*Definition at line* **194** *of file* **rte\_crypto\_asym.h***.*

### enum rte\_crypto\_sm2\_op\_capa

*SM2 operation capabilities*

**Enumerator**

- *RTE\_CRYPTO\_SM2\_RNG*

  *Random number generator supported in SM2 ops.*

- *RTE\_CRYPTO\_SM2\_PH*

  *Prehash message before crypto op.*

*Definition at line* **644** *of file* **rte\_crypto\_asym.h***.*

## Variable Documentation

### const char\* rte\_crypto\_asym\_ke\_strings\[\]` [extern]`

*asym key exchange operation type name strings*

### const char\* rte\_crypto\_asym\_op\_strings\[\]` [extern]`

*asym operations type name strings*

## Author

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