.TH "rte_crypto_asym.h" 3 "Version 25.11.0" "DPDK" \" -*- nroff -*-
.ad l
.nh
.SH NAME
rte_crypto_asym.h
.SH SYNOPSIS
.br
.PP
\fR#include <string\&.h>\fP
.br
\fR#include <stdint\&.h>\fP
.br
\fR#include <rte_memory\&.h>\fP
.br
\fR#include <rte_mempool\&.h>\fP
.br
\fR#include <rte_common\&.h>\fP
.br
\fR#include 'rte_crypto_sym\&.h'\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBrte_crypto_param_t\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ec_point\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_rsa_priv_key_qt\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_rsa_padding\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_rsa_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_modex_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_modinv_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_dh_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_dsa_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ec_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_mod_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_rsa_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_dh_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ecdh_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_dsa_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ecdsa_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_eddsa_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ecpm_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_sm2_op_param\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_kem_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_kem_keygen_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_kem_keyver_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_kem_encap_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_kem_decap_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_kem_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_dsa_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_dsa_keygen_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_dsa_siggen_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_dsa_sigver_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_ml_dsa_op\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_asym_xform\fP"
.br
.ti -1c
.RI "struct \fBrte_crypto_asym_op\fP"
.br
.in -1c
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBRTE_CRYPTO_ASYM_FLAG_PUB_KEY_NO_PADDING\fP   \fBRTE_BIT32\fP(0)"
.br
.ti -1c
.RI "#define \fBRTE_CRYPTO_ASYM_FLAG_SHARED_KEY_NO_PADDING\fP   \fBRTE_BIT32\fP(1)"
.br
.ti -1c
.RI "#define \fBRTE_CRYPTO_ASYM_FLAG_PUB_KEY_COMPRESSED\fP   \fBRTE_BIT32\fP(2)"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "\fBtypedef\fP struct \fBrte_crypto_param_t\fP \fBrte_crypto_param\fP"
.br
.ti -1c
.RI "\fBtypedef\fP \fBrte_crypto_param\fP \fBrte_crypto_uint\fP"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBrte_crypto_curve_id\fP "
.br
.ti -1c
.RI "enum \fBrte_crypto_edward_instance\fP "
.br
.ti -1c
.RI "enum \fBrte_crypto_asym_xform_type\fP { \fBRTE_CRYPTO_ASYM_XFORM_UNSPECIFIED\fP = 0, \fBRTE_CRYPTO_ASYM_XFORM_NONE\fP, \fBRTE_CRYPTO_ASYM_XFORM_RSA\fP, \fBRTE_CRYPTO_ASYM_XFORM_DH\fP, \fBRTE_CRYPTO_ASYM_XFORM_DSA\fP, \fBRTE_CRYPTO_ASYM_XFORM_MODINV\fP, \fBRTE_CRYPTO_ASYM_XFORM_MODEX\fP, \fBRTE_CRYPTO_ASYM_XFORM_ECDSA\fP, \fBRTE_CRYPTO_ASYM_XFORM_ECDH\fP, \fBRTE_CRYPTO_ASYM_XFORM_ECPM\fP, \fBRTE_CRYPTO_ASYM_XFORM_ECFPM\fP, \fBRTE_CRYPTO_ASYM_XFORM_SM2\fP, \fBRTE_CRYPTO_ASYM_XFORM_EDDSA\fP, \fBRTE_CRYPTO_ASYM_XFORM_ML_KEM\fP, \fBRTE_CRYPTO_ASYM_XFORM_ML_DSA\fP }"
.br
.ti -1c
.RI "enum \fBrte_crypto_asym_op_type\fP { \fBRTE_CRYPTO_ASYM_OP_ENCRYPT\fP, \fBRTE_CRYPTO_ASYM_OP_DECRYPT\fP, \fBRTE_CRYPTO_ASYM_OP_SIGN\fP, \fBRTE_CRYPTO_ASYM_OP_VERIFY\fP, \fBRTE_CRYPTO_ASYM_OP_LIST_END\fP }"
.br
.ti -1c
.RI "enum \fBrte_crypto_asym_ke_type\fP { \fBRTE_CRYPTO_ASYM_KE_PRIV_KEY_GENERATE\fP, \fBRTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE\fP, \fBRTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE\fP, \fBRTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY\fP }"
.br
.ti -1c
.RI "enum \fBrte_crypto_rsa_padding_type\fP { \fBRTE_CRYPTO_RSA_PADDING_NONE\fP = 0, \fBRTE_CRYPTO_RSA_PADDING_PKCS1_5\fP, \fBRTE_CRYPTO_RSA_PADDING_OAEP\fP, \fBRTE_CRYPTO_RSA_PADDING_PSS\fP }"
.br
.ti -1c
.RI "enum \fBrte_crypto_rsa_priv_key_type\fP { \fBRTE_RSA_KEY_TYPE_EXP\fP, \fBRTE_RSA_KEY_TYPE_QT\fP }"
.br
.ti -1c
.RI "enum \fBrte_crypto_sm2_op_capa\fP { \fBRTE_CRYPTO_SM2_RNG\fP, \fBRTE_CRYPTO_SM2_PH\fP, \fBRTE_CRYPTO_SM2_PARTIAL\fP }"
.br
.ti -1c
.RI "enum \fBrte_crypto_ml_kem_type\fP "
.br
.ti -1c
.RI "enum \fBrte_crypto_ml_kem_op_type\fP "
.br
.ti -1c
.RI "enum \fBrte_crypto_ml_dsa_type\fP "
.br
.ti -1c
.RI "enum \fBrte_crypto_ml_dsa_op_type\fP "
.br
.in -1c
.SS "Variables"

.in +1c
.ti -1c
.RI "const char * \fBrte_crypto_asym_ke_strings\fP []"
.br
.ti -1c
.RI "const char * \fBrte_crypto_asym_op_strings\fP []"
.br
.ti -1c
.RI "const uint16_t \fBrte_crypto_ml_kem_pubkey_size\fP []"
.br
.in -1c
.SH "Detailed Description"
.PP 
RTE Definitions for Asymmetric Cryptography

.PP
Defines asymmetric algorithms and modes, as well as supported asymmetric crypto operations\&. 
.PP
Definition in file \fBrte_crypto_asym\&.h\fP\&.
.SH "Macro Definition Documentation"
.PP 
.SS "#define RTE_CRYPTO_ASYM_FLAG_PUB_KEY_NO_PADDING   \fBRTE_BIT32\fP(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) 
.PP
Definition at line \fB58\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "#define RTE_CRYPTO_ASYM_FLAG_SHARED_KEY_NO_PADDING   \fBRTE_BIT32\fP(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) 
.PP
Definition at line \fB64\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "#define RTE_CRYPTO_ASYM_FLAG_PUB_KEY_COMPRESSED   \fBRTE_BIT32\fP(2)"
Flag to denote public key will be returned in compressed form 
.PP
Definition at line \fB70\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SH "Typedef Documentation"
.PP 
.SS "\fBtypedef\fP struct \fBrte_crypto_param_t\fP \fBrte_crypto_param\fP"
Buffer to hold crypto params required for asym operations\&.

.PP
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\&.

.PP
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\&. 
.SS "\fBtypedef\fP \fBrte_crypto_param\fP \fBrte_crypto_uint\fP"
Unsigned big-integer in big-endian format 
.PP
Definition at line \fB255\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBrte_crypto_curve_id\fP"
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 
.PP
Definition at line \fB84\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_edward_instance\fP"
List of Edwards curve instances as per RFC 8032 (Section 5)\&. 
.PP
Definition at line \fB98\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_asym_xform_type\fP"
Asymmetric crypto transformation types\&. Each xform type maps to one asymmetric algorithm performing specific operation 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_UNSPECIFIED \fP
Invalid xform\&. 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_NONE \fP
Xform type None\&. May be supported by PMD to support passthrough op for debugging purpose\&. if xform_type none , op_type is disregarded\&. 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_RSA \fP
RSA\&. Performs Encrypt, Decrypt, Sign and Verify\&. Refer to \fBrte_crypto_asym_op_type\fP 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_DH \fP
Diffie-Hellman\&. Performs Key Generate and Shared Secret Compute\&. Refer to \fBrte_crypto_asym_op_type\fP 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_DSA \fP
Digital Signature Algorithm Performs Signature Generation and Verification\&. Refer to \fBrte_crypto_asym_op_type\fP 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_MODINV \fP
Modular Multiplicative Inverse Perform Modular Multiplicative Inverse b^(-1) mod n 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_MODEX \fP
Modular Exponentiation Perform Modular Exponentiation b^e mod n 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_ECDSA \fP
Elliptic Curve Digital Signature Algorithm Perform Signature Generation and Verification\&. 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_ECDH \fP
Elliptic Curve Diffie Hellman 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_ECPM \fP
Elliptic Curve Point Multiplication 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_ECFPM \fP
Elliptic Curve Fixed Point Multiplication 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_SM2 \fP
ShangMi 2 Performs Encrypt, Decrypt, Sign and Verify\&. Refer to \fBrte_crypto_asym_op_type\fP\&. 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_EDDSA \fP
Edwards Curve Digital Signature Algorithm Perform Signature Generation and Verification\&. 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_ML_KEM \fP
Module Lattice based Key Encapsulation Mechanism Performs Key Pair Generation, Encapsulation and Decapsulation\&. 
.TP
\f(BIRTE_CRYPTO_ASYM_XFORM_ML_DSA \fP
Module Lattice based Digital Signature Algorithm Performs Key Pair Generation, Signature Generation and Verification\&. 
.PP
Definition at line \fB111\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_asym_op_type\fP"
Asymmetric crypto operation type variants 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_CRYPTO_ASYM_OP_ENCRYPT \fP
Asymmetric Encrypt operation 
.TP
\f(BIRTE_CRYPTO_ASYM_OP_DECRYPT \fP
Asymmetric Decrypt operation 
.TP
\f(BIRTE_CRYPTO_ASYM_OP_SIGN \fP
Signature Generation operation 
.TP
\f(BIRTE_CRYPTO_ASYM_OP_VERIFY \fP
Signature Verification operation 
.PP
Definition at line \fB174\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_asym_ke_type\fP"
Asymmetric crypto key exchange operation type 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_CRYPTO_ASYM_KE_PRIV_KEY_GENERATE \fP
Private Key generation operation 
.TP
\f(BIRTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE \fP
Public Key generation operation 
.TP
\f(BIRTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE \fP
Shared Secret compute operation 
.TP
\f(BIRTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY \fP
Public Key Verification - can be used for elliptic curve point validation\&. 
.PP
Definition at line \fB189\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_rsa_padding_type\fP"
Padding types for RSA signature\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_CRYPTO_RSA_PADDING_NONE \fP
RSA no padding scheme 
.TP
\f(BIRTE_CRYPTO_RSA_PADDING_PKCS1_5 \fP
RSA PKCS#1 PKCS1-v1_5 padding scheme\&. For signatures block type 01, for encryption block type 02 are used\&. 
.TP
\f(BIRTE_CRYPTO_RSA_PADDING_OAEP \fP
RSA PKCS#1 OAEP padding scheme 
.TP
\f(BIRTE_CRYPTO_RSA_PADDING_PSS \fP
RSA PKCS#1 PSS padding scheme 
.PP
Definition at line \fB205\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_rsa_priv_key_type\fP"
RSA private key type enumeration

.PP
enumerates private key format required to perform RSA crypto transform\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_RSA_KEY_TYPE_EXP \fP
RSA private key is an exponent 
.TP
\f(BIRTE_RSA_KEY_TYPE_QT \fP
RSA private key is in quintuple format See \fBrte_crypto_rsa_priv_key_qt\fP 
.PP
Definition at line \fB224\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_sm2_op_capa\fP"
SM2 operation capabilities 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_CRYPTO_SM2_RNG \fP
Random number generator supported in SM2 ops\&. 
.TP
\f(BIRTE_CRYPTO_SM2_PH \fP
Prehash message before crypto op\&. 
.TP
\f(BIRTE_CRYPTO_SM2_PARTIAL \fP
Calculate elliptic curve points only\&. 
.PP
Definition at line \fB674\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_ml_kem_type\fP"
PQC ML-KEM parameter type

.PP
List of ML-KEM parameter types used in PQC 
.PP
Definition at line \fB778\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_ml_kem_op_type\fP"
PQC ML-KEM op type

.PP
List of ML-KEM op types in PQC 
.PP
Definition at line \fB790\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_ml_dsa_type\fP"
PQC ML-DSA parameter type

.PP
List of ML-DSA parameter types used in PQC 
.PP
Definition at line \fB921\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SS "enum \fBrte_crypto_ml_dsa_op_type\fP"
PQC ML-DSA op type

.PP
List of ML-DSA op types in PQC 
.PP
Definition at line \fB933\fP of file \fBrte_crypto_asym\&.h\fP\&.
.SH "Variable Documentation"
.PP 
.SS "const char* rte_crypto_asym_ke_strings[]\fR [extern]\fP"
asym key exchange operation type name strings 
.SS "const char* rte_crypto_asym_op_strings[]\fR [extern]\fP"
asym operations type name strings 
.SS "const uint16_t rte_crypto_ml_kem_pubkey_size[]\fR [extern]\fP"
PQC ML crypto op parameters size 
.SH "Author"
.PP 
Generated automatically by Doxygen for DPDK from the source code\&.
