DPDK  18.11.11
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 typedef struct rte_crypto_param_t {
29  uint8_t *data;
31  rte_iova_t iova;
33  size_t length;
35 } rte_crypto_param;
36 
38 extern const char *
40 
42 extern const char *
44 
84 };
85 
104  RTE_CRYPTO_ASYM_OP_LIST_END
105 };
106 
129  RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
130 };
131 
146 };
147 
153  rte_crypto_param p;
160  rte_crypto_param q;
167  rte_crypto_param dP;
175  rte_crypto_param dQ;
183  rte_crypto_param qInv;
190 };
191 
199  rte_crypto_param n;
205  rte_crypto_param e;
211  enum rte_crypto_rsa_priv_key_type key_type;
212 
213  __extension__
214  union {
215  rte_crypto_param d;
224  };
225 };
226 
234  rte_crypto_param modulus;
240  rte_crypto_param exponent;
245 };
246 
254  rte_crypto_param modulus;
260 };
261 
272  rte_crypto_param p;
278  rte_crypto_param g;
284 };
285 
293  rte_crypto_param p;
298  rte_crypto_param q;
304  rte_crypto_param g;
308  rte_crypto_param x;
316 };
317 
324  rte_crypto_param base;
329 };
330 
342  __extension__
343  union {
344  struct rte_crypto_rsa_xform rsa;
353  struct rte_crypto_dh_xform dh;
356  struct rte_crypto_dsa_xform dsa;
358  };
359 };
360 
362 
371  rte_crypto_param message;
380  rte_crypto_param sign;
408 };
409 
415  rte_crypto_param pub_key;
425  rte_crypto_param priv_key;
434  rte_crypto_param shared_secret;
441 };
442 
450  rte_crypto_param message;
452  rte_crypto_param r;
458  rte_crypto_param s;
464  rte_crypto_param y;
470 };
471 
482  __extension__
483  union {
484  struct rte_crypto_rsa_op_param rsa;
485  struct rte_crypto_mod_op_param modex;
486  struct rte_crypto_mod_op_param modinv;
487  struct rte_crypto_dh_op_param dh;
488  struct rte_crypto_dsa_op_param dsa;
489  };
491 
492 #ifdef __cplusplus
493 }
494 #endif
495 
496 #endif /* _RTE_CRYPTO_ASYM_H_ */
rte_crypto_rsa_xform::d
rte_crypto_param d
Definition: rte_crypto_asym.h:215
rte_crypto_modex_xform::modulus
rte_crypto_param modulus
Definition: rte_crypto_asym.h:234
rte_crypto_dsa_xform::g
rte_crypto_param g
Definition: rte_crypto_asym.h:304
rte_crypto_dh_op_param::shared_secret
rte_crypto_param shared_secret
Definition: rte_crypto_asym.h:434
rte_crypto_rsa_priv_key_type
rte_crypto_rsa_priv_key_type
Definition: rte_crypto_asym.h:139
rte_memory.h
rte_crypto_asym_op
Definition: rte_crypto_asym.h:478
rte_crypto_dh_op_param::pub_key
rte_crypto_param pub_key
Definition: rte_crypto_asym.h:415
rte_crypto_rsa_priv_key_qt::qInv
rte_crypto_param qInv
Definition: rte_crypto_asym.h:183
rte_crypto_asym_xform::dh
struct rte_crypto_dh_xform dh
Definition: rte_crypto_asym.h:353
rte_crypto_rsa_priv_key_qt
Definition: rte_crypto_asym.h:152
RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE
@ RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE
Definition: rte_crypto_asym.h:98
rte_crypto_dsa_xform::q
rte_crypto_param q
Definition: rte_crypto_asym.h:298
rte_crypto_asym_xform::modex
struct rte_crypto_modex_xform modex
Definition: rte_crypto_asym.h:347
rte_crypto_modex_xform::exponent
rte_crypto_param exponent
Definition: rte_crypto_asym.h:240
rte_crypto_dh_op_param
Definition: rte_crypto_asym.h:414
rte_crypto_rsa_xform
Definition: rte_crypto_asym.h:198
rte_crypto_dsa_xform::p
rte_crypto_param p
Definition: rte_crypto_asym.h:293
rte_crypto_rsa_priv_key_qt::dP
rte_crypto_param dP
Definition: rte_crypto_asym.h:167
RTE_CRYPTO_ASYM_XFORM_NONE
@ RTE_CRYPTO_ASYM_XFORM_NONE
Definition: rte_crypto_asym.h:54
RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
@ RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
Definition: rte_crypto_asym.h:102
rte_crypto_rsa_xform::qt
struct rte_crypto_rsa_priv_key_qt qt
Definition: rte_crypto_asym.h:222
rte_crypto_asym_xform::next
struct rte_crypto_asym_xform * next
Definition: rte_crypto_asym.h:337
rte_crypto_modinv_xform::modulus
rte_crypto_param modulus
Definition: rte_crypto_asym.h:254
rte_crypto_rsa_priv_key_qt::dQ
rte_crypto_param dQ
Definition: rte_crypto_asym.h:175
rte_crypto_mod_op_param
Definition: rte_crypto_asym.h:323
rte_crypto_rsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:371
rte_crypto_dsa_op_param::y
rte_crypto_param y
Definition: rte_crypto_asym.h:464
rte_crypto_rsa_op_param::sign
rte_crypto_param sign
Definition: rte_crypto_asym.h:380
rte_crypto_mod_op_param::base
rte_crypto_param base
Definition: rte_crypto_asym.h:324
rte_crypto_asym_xform::modinv
struct rte_crypto_modinv_xform modinv
Definition: rte_crypto_asym.h:350
rte_crypto_dsa_xform::x
rte_crypto_param x
Definition: rte_crypto_asym.h:308
rte_crypto_dh_xform::type
enum rte_crypto_asym_op_type type
Definition: rte_crypto_asym.h:269
rte_crypto_dsa_xform
Definition: rte_crypto_asym.h:292
RTE_CRYPTO_ASYM_XFORM_RSA
@ RTE_CRYPTO_ASYM_XFORM_RSA
Definition: rte_crypto_asym.h:60
rte_crypto_asym_op_type
rte_crypto_asym_op_type
Definition: rte_crypto_asym.h:89
rte_crypto_asym_xform_type
rte_crypto_asym_xform_type
Definition: rte_crypto_asym.h:51
rte_crypto_dh_xform
Definition: rte_crypto_asym.h:268
RTE_CRYPTO_ASYM_XFORM_MODINV
@ RTE_CRYPTO_ASYM_XFORM_MODINV
Definition: rte_crypto_asym.h:74
rte_crypto_rsa_op_param::pad
enum rte_crypto_rsa_padding_type pad
Definition: rte_crypto_asym.h:390
RTE_CRYPTO_RSA_PADDING_PSS
@ RTE_CRYPTO_RSA_PADDING_PSS
Definition: rte_crypto_asym.h:127
RTE_CRYPTO_RSA_PADDING_NONE
@ RTE_CRYPTO_RSA_PADDING_NONE
Definition: rte_crypto_asym.h:111
rte_crypto_modex_xform
Definition: rte_crypto_asym.h:233
RTE_CRYPTO_ASYM_OP_ENCRYPT
@ RTE_CRYPTO_ASYM_OP_ENCRYPT
Definition: rte_crypto_asym.h:90
RTE_RSA_KEY_TYPE_EXP
@ RTE_RSA_KEY_TYPE_EXP
Definition: rte_crypto_asym.h:140
rte_crypto_asym_xform::dsa
struct rte_crypto_dsa_xform dsa
Definition: rte_crypto_asym.h:356
rte_crypto_dsa_op_param
Definition: rte_crypto_asym.h:447
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
@ RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
Definition: rte_crypto_asym.h:82
RTE_CRYPTO_RSA_PADDING_OAEP
@ RTE_CRYPTO_RSA_PADDING_OAEP
Definition: rte_crypto_asym.h:125
rte_common.h
RTE_RSA_KET_TYPE_QT
@ RTE_RSA_KET_TYPE_QT
Definition: rte_crypto_asym.h:142
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:100
RTE_CRYPTO_RSA_PKCS1_V1_5_BT2
@ RTE_CRYPTO_RSA_PKCS1_V1_5_BT2
Definition: rte_crypto_asym.h:121
rte_crypto_rsa_op_param
Definition: rte_crypto_asym.h:367
rte_cryptodev_asym_session
Definition: rte_cryptodev.h:962
rte_crypto_dsa_op_param::r
rte_crypto_param r
Definition: rte_crypto_asym.h:452
RTE_CRYPTO_ASYM_XFORM_DSA
@ RTE_CRYPTO_ASYM_XFORM_DSA
Definition: rte_crypto_asym.h:69
rte_crypto_dsa_op_param::op_type
enum rte_crypto_asym_op_type op_type
Definition: rte_crypto_asym.h:448
rte_crypto_asym_xform_strings
const char * rte_crypto_asym_xform_strings[]
RTE_CRYPTO_RSA_PKCS1_V1_5_BT0
@ RTE_CRYPTO_RSA_PKCS1_V1_5_BT0
Definition: rte_crypto_asym.h:113
rte_crypto_rsa_priv_key_qt::q
rte_crypto_param q
Definition: rte_crypto_asym.h:160
rte_crypto_modinv_xform
Definition: rte_crypto_asym.h:253
RTE_CRYPTO_ASYM_OP_DECRYPT
@ RTE_CRYPTO_ASYM_OP_DECRYPT
Definition: rte_crypto_asym.h:92
rte_iova_t
uint64_t rte_iova_t
Definition: rte_memory.h:82
RTE_CRYPTO_RSA_PKCS1_V1_5_BT1
@ RTE_CRYPTO_RSA_PKCS1_V1_5_BT1
Definition: rte_crypto_asym.h:117
rte_mempool.h
rte_crypto_asym_xform::rsa
struct rte_crypto_rsa_xform rsa
Definition: rte_crypto_asym.h:344
rte_crypto_rsa_xform::e
rte_crypto_param e
Definition: rte_crypto_asym.h:205
RTE_CRYPTO_ASYM_XFORM_UNSPECIFIED
@ RTE_CRYPTO_ASYM_XFORM_UNSPECIFIED
Definition: rte_crypto_asym.h:52
rte_crypto_rsa_op_param::mgf1md
enum rte_crypto_auth_algorithm mgf1md
Definition: rte_crypto_asym.h:400
RTE_CRYPTO_ASYM_XFORM_DH
@ RTE_CRYPTO_ASYM_XFORM_DH
Definition: rte_crypto_asym.h:64
rte_crypto_auth_algorithm
rte_crypto_auth_algorithm
Definition: rte_crypto_sym.h:200
rte_crypto_rsa_xform::n
rte_crypto_param n
Definition: rte_crypto_asym.h:199
rte_crypto_dh_op_param::priv_key
rte_crypto_param priv_key
Definition: rte_crypto_asym.h:425
RTE_CRYPTO_ASYM_XFORM_MODEX
@ RTE_CRYPTO_ASYM_XFORM_MODEX
Definition: rte_crypto_asym.h:78
RTE_CRYPTO_ASYM_OP_VERIFY
@ RTE_CRYPTO_ASYM_OP_VERIFY
Definition: rte_crypto_asym.h:96
rte_crypto_dsa_op_param::s
rte_crypto_param s
Definition: rte_crypto_asym.h:458
rte_crypto_rsa_padding_type
rte_crypto_rsa_padding_type
Definition: rte_crypto_asym.h:110
__rte_cache_aligned
#define __rte_cache_aligned
Definition: rte_memory.h:66
RTE_CRYPTO_ASYM_OP_SIGN
@ RTE_CRYPTO_ASYM_OP_SIGN
Definition: rte_crypto_asym.h:94
rte_crypto_dh_xform::g
rte_crypto_param g
Definition: rte_crypto_asym.h:278
rte_crypto_rsa_op_param::op_type
enum rte_crypto_asym_op_type op_type
Definition: rte_crypto_asym.h:368
rte_crypto_rsa_op_param::md
enum rte_crypto_auth_algorithm md
Definition: rte_crypto_asym.h:393
rte_crypto_asym_op::session
struct rte_cryptodev_asym_session * session
Definition: rte_crypto_asym.h:479
rte_crypto_asym_xform::xform_type
enum rte_crypto_asym_xform_type xform_type
Definition: rte_crypto_asym.h:339
rte_crypto_asym_xform
Definition: rte_crypto_asym.h:336
rte_crypto_rsa_priv_key_qt::p
rte_crypto_param p
Definition: rte_crypto_asym.h:153
rte_crypto_dh_xform::p
rte_crypto_param p
Definition: rte_crypto_asym.h:272
rte_crypto_dsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:450