DPDK  20.11.5
rte_crypto_asym.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Cavium Networks
3  */
4 
5 #ifndef _RTE_CRYPTO_ASYM_H_
6 #define _RTE_CRYPTO_ASYM_H_
7 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #include <string.h>
22 #include <stdint.h>
23 
24 #include <rte_memory.h>
25 #include <rte_mempool.h>
26 #include <rte_common.h>
27 
28 #include "rte_crypto_sym.h"
29 
37 typedef struct rte_crypto_param_t {
38  uint8_t *data;
42  size_t length;
45 
47 extern const char *
49 
51 extern const char *
53 
99 };
100 
119  RTE_CRYPTO_ASYM_OP_LIST_END
120 };
121 
136  RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
137 };
138 
155 };
156 
199 };
200 
220  enum rte_crypto_rsa_priv_key_type key_type;
221 
222  __extension__
223  union {
233  };
234 };
235 
257 };
258 
278 };
279 
302 };
303 
334 };
335 
341  RTE_CRYPTO_EC_GROUP_UNKNOWN = 0,
342  RTE_CRYPTO_EC_GROUP_SECP192R1 = 19,
343  RTE_CRYPTO_EC_GROUP_SECP224R1 = 21,
344  RTE_CRYPTO_EC_GROUP_SECP256R1 = 23,
345  RTE_CRYPTO_EC_GROUP_SECP384R1 = 24,
346  RTE_CRYPTO_EC_GROUP_SECP521R1 = 25,
347 };
348 
357 };
358 
368 };
369 
395 };
396 
408  __extension__
409  union {
429  };
430 };
431 
433 
508 };
509 
541 };
542 
570 };
571 
603 };
604 
617 };
618 
627  union {
632  };
633 
634  __extension__
635  union {
636  struct rte_crypto_rsa_op_param rsa;
637  struct rte_crypto_mod_op_param modex;
638  struct rte_crypto_mod_op_param modinv;
639  struct rte_crypto_dh_op_param dh;
640  struct rte_crypto_dsa_op_param dsa;
641  struct rte_crypto_ecdsa_op_param ecdsa;
642  struct rte_crypto_ecpm_op_param ecpm;
643  };
644 };
645 
646 #ifdef __cplusplus
647 }
648 #endif
649 
650 #endif /* _RTE_CRYPTO_ASYM_H_ */
rte_crypto_rsa_xform::d
rte_crypto_param d
Definition: rte_crypto_asym.h:224
rte_crypto_modex_xform::modulus
rte_crypto_param modulus
Definition: rte_crypto_asym.h:243
rte_crypto_dsa_xform::g
rte_crypto_param g
Definition: rte_crypto_asym.h:322
rte_crypto_dh_op_param::shared_secret
rte_crypto_param shared_secret
Definition: rte_crypto_asym.h:534
rte_crypto_rsa_priv_key_type
rte_crypto_rsa_priv_key_type
Definition: rte_crypto_asym.h:146
rte_crypto_rsa_op_param::cipher
rte_crypto_param cipher
Definition: rte_crypto_asym.h:460
rte_crypto_ecpm_op_param::p
struct rte_crypto_ec_point p
Definition: rte_crypto_asym.h:609
rte_memory.h
rte_crypto_asym_op
Definition: rte_crypto_asym.h:625
rte_crypto_dh_op_param::pub_key
rte_crypto_param pub_key
Definition: rte_crypto_asym.h:515
rte_crypto_ecdsa_op_param::r
rte_crypto_param r
Definition: rte_crypto_asym.h:593
rte_crypto_rsa_priv_key_qt::qInv
rte_crypto_param qInv
Definition: rte_crypto_asym.h:192
rte_crypto_asym_xform::dh
struct rte_crypto_dh_xform dh
Definition: rte_crypto_asym.h:419
rte_crypto_rsa_priv_key_qt
Definition: rte_crypto_asym.h:161
rte_iova_t
uint64_t rte_iova_t
Definition: rte_common.h:418
rte_crypto_ecpm_op_param::r
struct rte_crypto_ec_point r
Definition: rte_crypto_asym.h:612
RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE
@ RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE
Definition: rte_crypto_asym.h:113
rte_crypto_dsa_xform::q
rte_crypto_param q
Definition: rte_crypto_asym.h:316
rte_crypto_asym_xform::modex
struct rte_crypto_modex_xform modex
Definition: rte_crypto_asym.h:413
rte_crypto_modex_xform::exponent
rte_crypto_param exponent
Definition: rte_crypto_asym.h:252
rte_crypto_dh_op_param
Definition: rte_crypto_asym.h:514
rte_crypto_rsa_xform
Definition: rte_crypto_asym.h:207
rte_crypto_dsa_xform::p
rte_crypto_param p
Definition: rte_crypto_asym.h:311
rte_crypto_rsa_priv_key_qt::dP
rte_crypto_param dP
Definition: rte_crypto_asym.h:176
RTE_CRYPTO_ASYM_XFORM_NONE
@ RTE_CRYPTO_ASYM_XFORM_NONE
Definition: rte_crypto_asym.h:63
RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
@ RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
Definition: rte_crypto_asym.h:117
rte_crypto_ecdsa_op_param
Definition: rte_crypto_asym.h:575
rte_crypto_ecpm_op_param
Definition: rte_crypto_asym.h:608
rte_crypto_rsa_xform::qt
struct rte_crypto_rsa_priv_key_qt qt
Definition: rte_crypto_asym.h:231
rte_crypto_asym_xform::next
struct rte_crypto_asym_xform * next
Definition: rte_crypto_asym.h:403
rte_crypto_modinv_xform::modulus
rte_crypto_param modulus
Definition: rte_crypto_asym.h:266
rte_crypto_rsa_priv_key_qt::dQ
rte_crypto_param dQ
Definition: rte_crypto_asym.h:184
rte_crypto_mod_op_param
Definition: rte_crypto_asym.h:375
rte_crypto_param_t
Definition: rte_crypto_asym.h:37
rte_crypto_rsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:442
rte_crypto_dsa_op_param::y
rte_crypto_param y
Definition: rte_crypto_asym.h:564
rte_crypto_rsa_op_param::sign
rte_crypto_param sign
Definition: rte_crypto_asym.h:475
rte_crypto_mod_op_param::base
rte_crypto_param base
Definition: rte_crypto_asym.h:376
rte_crypto_asym_xform::modinv
struct rte_crypto_modinv_xform modinv
Definition: rte_crypto_asym.h:416
rte_crypto_dsa_xform::x
rte_crypto_param x
Definition: rte_crypto_asym.h:326
rte_crypto_dh_xform::type
enum rte_crypto_asym_op_type type
Definition: rte_crypto_asym.h:287
rte_crypto_dsa_xform
Definition: rte_crypto_asym.h:310
RTE_CRYPTO_ASYM_XFORM_ECPM
@ RTE_CRYPTO_ASYM_XFORM_ECPM
Definition: rte_crypto_asym.h:95
RTE_CRYPTO_ASYM_XFORM_RSA
@ RTE_CRYPTO_ASYM_XFORM_RSA
Definition: rte_crypto_asym.h:69
rte_crypto_asym_op_type
rte_crypto_asym_op_type
Definition: rte_crypto_asym.h:104
rte_crypto_asym_op::xform
struct rte_crypto_asym_xform * xform
Definition: rte_crypto_asym.h:630
rte_crypto_asym_xform_type
rte_crypto_asym_xform_type
Definition: rte_crypto_asym.h:60
rte_crypto_dh_xform
Definition: rte_crypto_asym.h:286
RTE_CRYPTO_RSA_PADDING_PKCS1_5
@ RTE_CRYPTO_RSA_PADDING_PKCS1_5
Definition: rte_crypto_asym.h:128
RTE_CRYPTO_ASYM_XFORM_MODINV
@ RTE_CRYPTO_ASYM_XFORM_MODINV
Definition: rte_crypto_asym.h:83
rte_crypto_ec_point
Definition: rte_crypto_asym.h:352
rte_crypto_rsa_op_param::pad
enum rte_crypto_rsa_padding_type pad
Definition: rte_crypto_asym.h:490
rte_crypto_ecdsa_op_param::k
rte_crypto_param k
Definition: rte_crypto_asym.h:588
rte_crypto_ec_xform::curve_id
enum rte_crypto_ec_group curve_id
Definition: rte_crypto_asym.h:366
RTE_CRYPTO_RSA_PADDING_PSS
@ RTE_CRYPTO_RSA_PADDING_PSS
Definition: rte_crypto_asym.h:134
RTE_CRYPTO_RSA_PADDING_NONE
@ RTE_CRYPTO_RSA_PADDING_NONE
Definition: rte_crypto_asym.h:126
rte_crypto_ecdsa_op_param::q
struct rte_crypto_ec_point q
Definition: rte_crypto_asym.h:582
rte_crypto_modex_xform
Definition: rte_crypto_asym.h:242
RTE_CRYPTO_ASYM_OP_ENCRYPT
@ RTE_CRYPTO_ASYM_OP_ENCRYPT
Definition: rte_crypto_asym.h:105
rte_crypto_sym.h
RTE_RSA_KEY_TYPE_EXP
@ RTE_RSA_KEY_TYPE_EXP
Definition: rte_crypto_asym.h:147
rte_crypto_asym_xform::dsa
struct rte_crypto_dsa_xform dsa
Definition: rte_crypto_asym.h:422
rte_crypto_dsa_op_param
Definition: rte_crypto_asym.h:547
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
@ RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
Definition: rte_crypto_asym.h:97
RTE_CRYPTO_RSA_PADDING_OAEP
@ RTE_CRYPTO_RSA_PADDING_OAEP
Definition: rte_crypto_asym.h:132
rte_common.h
rte_crypto_ecdsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:585
RTE_RSA_KET_TYPE_QT
@ RTE_RSA_KET_TYPE_QT
Definition: rte_crypto_asym.h:153
rte_crypto_ecdsa_op_param::s
rte_crypto_param s
Definition: rte_crypto_asym.h:598
rte_crypto_ecdsa_op_param::pkey
rte_crypto_param pkey
Definition: rte_crypto_asym.h:579
rte_crypto_asym_op_strings
const char * rte_crypto_asym_op_strings[]
RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE
@ RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE
Definition: rte_crypto_asym.h:115
RTE_CRYPTO_ASYM_XFORM_ECDSA
@ RTE_CRYPTO_ASYM_XFORM_ECDSA
Definition: rte_crypto_asym.h:91
rte_crypto_param_t::data
uint8_t * data
Definition: rte_crypto_asym.h:38
rte_crypto_rsa_op_param
Definition: rte_crypto_asym.h:438
rte_cryptodev_asym_session
Definition: rte_cryptodev.h:1017
rte_crypto_dsa_op_param::r
rte_crypto_param r
Definition: rte_crypto_asym.h:552
RTE_CRYPTO_ASYM_XFORM_DSA
@ RTE_CRYPTO_ASYM_XFORM_DSA
Definition: rte_crypto_asym.h:78
rte_crypto_ec_xform
Definition: rte_crypto_asym.h:365
rte_crypto_dsa_op_param::op_type
enum rte_crypto_asym_op_type op_type
Definition: rte_crypto_asym.h:548
rte_crypto_asym_xform_strings
const char * rte_crypto_asym_xform_strings[]
rte_crypto_rsa_priv_key_qt::q
rte_crypto_param q
Definition: rte_crypto_asym.h:169
RTE_STD_C11
#define RTE_STD_C11
Definition: rte_common.h:40
rte_crypto_modinv_xform
Definition: rte_crypto_asym.h:265
RTE_CRYPTO_ASYM_OP_DECRYPT
@ RTE_CRYPTO_ASYM_OP_DECRYPT
Definition: rte_crypto_asym.h:107
RTE_RSA_KEY_TYPE_QT
@ RTE_RSA_KEY_TYPE_QT
Definition: rte_crypto_asym.h:149
rte_crypto_ec_group
rte_crypto_ec_group
Definition: rte_crypto_asym.h:340
rte_mempool.h
rte_crypto_asym_xform::rsa
struct rte_crypto_rsa_xform rsa
Definition: rte_crypto_asym.h:410
rte_crypto_mod_op_param::result
rte_crypto_param result
Definition: rte_crypto_asym.h:386
rte_crypto_rsa_xform::e
rte_crypto_param e
Definition: rte_crypto_asym.h:214
RTE_CRYPTO_ASYM_XFORM_UNSPECIFIED
@ RTE_CRYPTO_ASYM_XFORM_UNSPECIFIED
Definition: rte_crypto_asym.h:61
rte_crypto_rsa_op_param::mgf1md
enum rte_crypto_auth_algorithm mgf1md
Definition: rte_crypto_asym.h:500
RTE_CRYPTO_ASYM_XFORM_DH
@ RTE_CRYPTO_ASYM_XFORM_DH
Definition: rte_crypto_asym.h:73
rte_crypto_ecdsa_op_param::op_type
enum rte_crypto_asym_op_type op_type
Definition: rte_crypto_asym.h:576
rte_crypto_auth_algorithm
rte_crypto_auth_algorithm
Definition: rte_crypto_sym.h:277
rte_crypto_param
struct rte_crypto_param_t rte_crypto_param
rte_crypto_rsa_xform::n
rte_crypto_param n
Definition: rte_crypto_asym.h:208
rte_crypto_dh_op_param::priv_key
rte_crypto_param priv_key
Definition: rte_crypto_asym.h:525
RTE_CRYPTO_ASYM_XFORM_MODEX
@ RTE_CRYPTO_ASYM_XFORM_MODEX
Definition: rte_crypto_asym.h:87
RTE_CRYPTO_ASYM_OP_VERIFY
@ RTE_CRYPTO_ASYM_OP_VERIFY
Definition: rte_crypto_asym.h:111
rte_crypto_dsa_op_param::s
rte_crypto_param s
Definition: rte_crypto_asym.h:558
rte_crypto_ecpm_op_param::scalar
rte_crypto_param scalar
Definition: rte_crypto_asym.h:615
rte_crypto_param_t::iova
rte_iova_t iova
Definition: rte_crypto_asym.h:40
rte_crypto_ec_point::y
rte_crypto_param y
Definition: rte_crypto_asym.h:355
rte_crypto_rsa_padding_type
rte_crypto_rsa_padding_type
Definition: rte_crypto_asym.h:125
RTE_CRYPTO_ASYM_OP_SIGN
@ RTE_CRYPTO_ASYM_OP_SIGN
Definition: rte_crypto_asym.h:109
rte_crypto_dh_xform::g
rte_crypto_param g
Definition: rte_crypto_asym.h:296
rte_crypto_rsa_op_param::op_type
enum rte_crypto_asym_op_type op_type
Definition: rte_crypto_asym.h:439
rte_crypto_rsa_op_param::md
enum rte_crypto_auth_algorithm md
Definition: rte_crypto_asym.h:493
rte_crypto_asym_op::session
struct rte_cryptodev_asym_session * session
Definition: rte_crypto_asym.h:628
rte_crypto_param_t::length
size_t length
Definition: rte_crypto_asym.h:42
rte_crypto_ec_point::x
rte_crypto_param x
Definition: rte_crypto_asym.h:353
rte_crypto_asym_xform::xform_type
enum rte_crypto_asym_xform_type xform_type
Definition: rte_crypto_asym.h:405
rte_crypto_asym_xform
Definition: rte_crypto_asym.h:402
rte_crypto_rsa_priv_key_qt::p
rte_crypto_param p
Definition: rte_crypto_asym.h:162
rte_crypto_dh_xform::p
rte_crypto_param p
Definition: rte_crypto_asym.h:290
rte_crypto_asym_xform::ec
struct rte_crypto_ec_xform ec
Definition: rte_crypto_asym.h:425
rte_crypto_dsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:550