rte_crypto_asym.h(3)

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_ml_kem_xform
struct rte_crypto_ml_kem_keygen_op
struct rte_crypto_ml_kem_keyver_op
struct rte_crypto_ml_kem_encap_op
struct rte_crypto_ml_kem_decap_op
struct rte_crypto_ml_kem_op
struct rte_crypto_ml_dsa_xform
struct rte_crypto_ml_dsa_keygen_op
struct rte_crypto_ml_dsa_siggen_op
struct rte_crypto_ml_dsa_sigver_op
struct rte_crypto_ml_dsa_op
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, RTE_CRYPTO_ASYM_XFORM_ML_KEM, RTE_CRYPTO_ASYM_XFORM_ML_DSA }
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, RTE_CRYPTO_SM2_PARTIAL }
enum rte_crypto_ml_kem_type
enum rte_crypto_ml_kem_op_type
enum rte_crypto_ml_dsa_type
enum rte_crypto_ml_dsa_op_type

  Variables

const char * rte_crypto_asym_ke_strings []
const char * rte_crypto_asym_op_strings []
const uint16_t rte_crypto_ml_kem_pubkey_size []

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 58 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 64 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 70 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 255 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 84 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 98 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.

RTE_CRYPTO_ASYM_XFORM_ML_KEM
    Module Lattice based Key Encapsulation Mechanism Performs Key Pair Generation, Encapsulation and Decapsulation.

RTE_CRYPTO_ASYM_XFORM_ML_DSA
    Module Lattice based Digital Signature Algorithm Performs Key Pair Generation, Signature Generation and Verification.

Definition at line 111 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 174 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 189 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 205 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 224 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.

RTE_CRYPTO_SM2_PARTIAL
    Calculate elliptic curve points only.

Definition at line 674 of file rte_crypto_asym.h.

  enum rte_crypto_ml_kem_type
PQC ML-KEM parameter type

List of ML-KEM parameter types used in PQC

Definition at line 778 of file rte_crypto_asym.h.

  enum rte_crypto_ml_kem_op_type
PQC ML-KEM op type

List of ML-KEM op types in PQC

Definition at line 790 of file rte_crypto_asym.h.

  enum rte_crypto_ml_dsa_type
PQC ML-DSA parameter type

List of ML-DSA parameter types used in PQC

Definition at line 921 of file rte_crypto_asym.h.

  enum rte_crypto_ml_dsa_op_type
PQC ML-DSA op type

List of ML-DSA op types in PQC

Definition at line 933 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

  const uint16_t rte_crypto_ml_kem_pubkey_size[] [extern]
PQC ML crypto op parameters size

Author

Generated automatically by Doxygen for DPDK from the source code.