DPDK  19.11.1
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 
30 typedef struct rte_crypto_param_t {
31  uint8_t *data;
33  rte_iova_t iova;
35  size_t length;
37 } rte_crypto_param;
38 
40 extern const char *
42 
44 extern const char *
46 
86 };
87 
106  RTE_CRYPTO_ASYM_OP_LIST_END
107 };
108 
123  RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
124 };
125 
140 };
141 
147  rte_crypto_param p;
154  rte_crypto_param q;
161  rte_crypto_param dP;
169  rte_crypto_param dQ;
177  rte_crypto_param qInv;
184 };
185 
193  rte_crypto_param n;
199  rte_crypto_param e;
205  enum rte_crypto_rsa_priv_key_type key_type;
206 
207  __extension__
208  union {
209  rte_crypto_param d;
218  };
219 };
220 
228  rte_crypto_param modulus;
237  rte_crypto_param exponent;
242 };
243 
251  rte_crypto_param modulus;
263 };
264 
275  rte_crypto_param p;
281  rte_crypto_param g;
287 };
288 
296  rte_crypto_param p;
301  rte_crypto_param q;
307  rte_crypto_param g;
311  rte_crypto_param x;
319 };
320 
327  rte_crypto_param base;
337  rte_crypto_param result;
346 };
347 
359  __extension__
360  union {
375  };
376 };
377 
379 
388  rte_crypto_param message;
406  rte_crypto_param cipher;
421  rte_crypto_param sign;
454 };
455 
461  rte_crypto_param pub_key;
471  rte_crypto_param priv_key;
480  rte_crypto_param shared_secret;
487 };
488 
496  rte_crypto_param message;
498  rte_crypto_param r;
504  rte_crypto_param s;
510  rte_crypto_param y;
516 };
517 
526  union {
531  };
532 
533  __extension__
534  union {
535  struct rte_crypto_rsa_op_param rsa;
536  struct rte_crypto_mod_op_param modex;
537  struct rte_crypto_mod_op_param modinv;
538  struct rte_crypto_dh_op_param dh;
539  struct rte_crypto_dsa_op_param dsa;
540  };
541 };
542 
543 #ifdef __cplusplus
544 }
545 #endif
546 
547 #endif /* _RTE_CRYPTO_ASYM_H_ */
rte_crypto_rsa_xform::d
rte_crypto_param d
Definition: rte_crypto_asym.h:209
rte_crypto_modex_xform::modulus
rte_crypto_param modulus
Definition: rte_crypto_asym.h:228
rte_crypto_dsa_xform::g
rte_crypto_param g
Definition: rte_crypto_asym.h:307
rte_crypto_dh_op_param::shared_secret
rte_crypto_param shared_secret
Definition: rte_crypto_asym.h:480
rte_crypto_rsa_priv_key_type
rte_crypto_rsa_priv_key_type
Definition: rte_crypto_asym.h:133
rte_crypto_rsa_op_param::cipher
rte_crypto_param cipher
Definition: rte_crypto_asym.h:406
rte_memory.h
rte_crypto_asym_op
Definition: rte_crypto_asym.h:524
rte_crypto_dh_op_param::pub_key
rte_crypto_param pub_key
Definition: rte_crypto_asym.h:461
rte_crypto_rsa_priv_key_qt::qInv
rte_crypto_param qInv
Definition: rte_crypto_asym.h:177
rte_crypto_asym_xform::dh
struct rte_crypto_dh_xform dh
Definition: rte_crypto_asym.h:370
rte_crypto_rsa_priv_key_qt
Definition: rte_crypto_asym.h:146
rte_iova_t
uint64_t rte_iova_t
Definition: rte_common.h:335
RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE
@ RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE
Definition: rte_crypto_asym.h:100
rte_crypto_dsa_xform::q
rte_crypto_param q
Definition: rte_crypto_asym.h:301
rte_crypto_asym_xform::modex
struct rte_crypto_modex_xform modex
Definition: rte_crypto_asym.h:364
rte_crypto_modex_xform::exponent
rte_crypto_param exponent
Definition: rte_crypto_asym.h:237
rte_crypto_dh_op_param
Definition: rte_crypto_asym.h:460
rte_crypto_rsa_xform
Definition: rte_crypto_asym.h:192
rte_crypto_dsa_xform::p
rte_crypto_param p
Definition: rte_crypto_asym.h:296
rte_crypto_rsa_priv_key_qt::dP
rte_crypto_param dP
Definition: rte_crypto_asym.h:161
RTE_CRYPTO_ASYM_XFORM_NONE
@ RTE_CRYPTO_ASYM_XFORM_NONE
Definition: rte_crypto_asym.h:56
RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
@ RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
Definition: rte_crypto_asym.h:104
rte_crypto_rsa_xform::qt
struct rte_crypto_rsa_priv_key_qt qt
Definition: rte_crypto_asym.h:216
rte_crypto_asym_xform::next
struct rte_crypto_asym_xform * next
Definition: rte_crypto_asym.h:354
rte_crypto_modinv_xform::modulus
rte_crypto_param modulus
Definition: rte_crypto_asym.h:251
rte_crypto_rsa_priv_key_qt::dQ
rte_crypto_param dQ
Definition: rte_crypto_asym.h:169
rte_crypto_mod_op_param
Definition: rte_crypto_asym.h:326
rte_crypto_rsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:388
rte_crypto_dsa_op_param::y
rte_crypto_param y
Definition: rte_crypto_asym.h:510
rte_crypto_rsa_op_param::sign
rte_crypto_param sign
Definition: rte_crypto_asym.h:421
rte_crypto_mod_op_param::base
rte_crypto_param base
Definition: rte_crypto_asym.h:327
rte_crypto_asym_xform::modinv
struct rte_crypto_modinv_xform modinv
Definition: rte_crypto_asym.h:367
rte_crypto_dsa_xform::x
rte_crypto_param x
Definition: rte_crypto_asym.h:311
rte_crypto_dh_xform::type
enum rte_crypto_asym_op_type type
Definition: rte_crypto_asym.h:272
rte_crypto_dsa_xform
Definition: rte_crypto_asym.h:295
RTE_CRYPTO_ASYM_XFORM_RSA
@ RTE_CRYPTO_ASYM_XFORM_RSA
Definition: rte_crypto_asym.h:62
rte_crypto_asym_op_type
rte_crypto_asym_op_type
Definition: rte_crypto_asym.h:91
rte_crypto_asym_op::xform
struct rte_crypto_asym_xform * xform
Definition: rte_crypto_asym.h:529
rte_crypto_asym_xform_type
rte_crypto_asym_xform_type
Definition: rte_crypto_asym.h:53
rte_crypto_dh_xform
Definition: rte_crypto_asym.h:271
RTE_CRYPTO_RSA_PADDING_PKCS1_5
@ RTE_CRYPTO_RSA_PADDING_PKCS1_5
Definition: rte_crypto_asym.h:115
RTE_CRYPTO_ASYM_XFORM_MODINV
@ RTE_CRYPTO_ASYM_XFORM_MODINV
Definition: rte_crypto_asym.h:76
rte_crypto_rsa_op_param::pad
enum rte_crypto_rsa_padding_type pad
Definition: rte_crypto_asym.h:436
RTE_CRYPTO_RSA_PADDING_PSS
@ RTE_CRYPTO_RSA_PADDING_PSS
Definition: rte_crypto_asym.h:121
RTE_CRYPTO_RSA_PADDING_NONE
@ RTE_CRYPTO_RSA_PADDING_NONE
Definition: rte_crypto_asym.h:113
rte_crypto_modex_xform
Definition: rte_crypto_asym.h:227
RTE_CRYPTO_ASYM_OP_ENCRYPT
@ RTE_CRYPTO_ASYM_OP_ENCRYPT
Definition: rte_crypto_asym.h:92
rte_crypto_sym.h
RTE_RSA_KEY_TYPE_EXP
@ RTE_RSA_KEY_TYPE_EXP
Definition: rte_crypto_asym.h:134
rte_crypto_asym_xform::dsa
struct rte_crypto_dsa_xform dsa
Definition: rte_crypto_asym.h:373
rte_crypto_dsa_op_param
Definition: rte_crypto_asym.h:493
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
@ RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
Definition: rte_crypto_asym.h:84
RTE_CRYPTO_RSA_PADDING_OAEP
@ RTE_CRYPTO_RSA_PADDING_OAEP
Definition: rte_crypto_asym.h:119
rte_common.h
RTE_RSA_KET_TYPE_QT
@ RTE_RSA_KET_TYPE_QT
Definition: rte_crypto_asym.h:136
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:102
rte_crypto_rsa_op_param
Definition: rte_crypto_asym.h:384
rte_cryptodev_asym_session
Definition: rte_cryptodev.h:989
rte_crypto_dsa_op_param::r
rte_crypto_param r
Definition: rte_crypto_asym.h:498
RTE_CRYPTO_ASYM_XFORM_DSA
@ RTE_CRYPTO_ASYM_XFORM_DSA
Definition: rte_crypto_asym.h:71
rte_crypto_dsa_op_param::op_type
enum rte_crypto_asym_op_type op_type
Definition: rte_crypto_asym.h:494
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:154
RTE_STD_C11
#define RTE_STD_C11
Definition: rte_common.h:40
rte_crypto_modinv_xform
Definition: rte_crypto_asym.h:250
RTE_CRYPTO_ASYM_OP_DECRYPT
@ RTE_CRYPTO_ASYM_OP_DECRYPT
Definition: rte_crypto_asym.h:94
rte_mempool.h
rte_crypto_asym_xform::rsa
struct rte_crypto_rsa_xform rsa
Definition: rte_crypto_asym.h:361
rte_crypto_mod_op_param::result
rte_crypto_param result
Definition: rte_crypto_asym.h:337
rte_crypto_rsa_xform::e
rte_crypto_param e
Definition: rte_crypto_asym.h:199
RTE_CRYPTO_ASYM_XFORM_UNSPECIFIED
@ RTE_CRYPTO_ASYM_XFORM_UNSPECIFIED
Definition: rte_crypto_asym.h:54
rte_crypto_rsa_op_param::mgf1md
enum rte_crypto_auth_algorithm mgf1md
Definition: rte_crypto_asym.h:446
RTE_CRYPTO_ASYM_XFORM_DH
@ RTE_CRYPTO_ASYM_XFORM_DH
Definition: rte_crypto_asym.h:66
rte_crypto_auth_algorithm
rte_crypto_auth_algorithm
Definition: rte_crypto_sym.h:189
rte_crypto_rsa_xform::n
rte_crypto_param n
Definition: rte_crypto_asym.h:193
rte_crypto_dh_op_param::priv_key
rte_crypto_param priv_key
Definition: rte_crypto_asym.h:471
RTE_CRYPTO_ASYM_XFORM_MODEX
@ RTE_CRYPTO_ASYM_XFORM_MODEX
Definition: rte_crypto_asym.h:80
RTE_CRYPTO_ASYM_OP_VERIFY
@ RTE_CRYPTO_ASYM_OP_VERIFY
Definition: rte_crypto_asym.h:98
rte_crypto_dsa_op_param::s
rte_crypto_param s
Definition: rte_crypto_asym.h:504
rte_crypto_rsa_padding_type
rte_crypto_rsa_padding_type
Definition: rte_crypto_asym.h:112
RTE_CRYPTO_ASYM_OP_SIGN
@ RTE_CRYPTO_ASYM_OP_SIGN
Definition: rte_crypto_asym.h:96
rte_crypto_dh_xform::g
rte_crypto_param g
Definition: rte_crypto_asym.h:281
rte_crypto_rsa_op_param::op_type
enum rte_crypto_asym_op_type op_type
Definition: rte_crypto_asym.h:385
rte_crypto_rsa_op_param::md
enum rte_crypto_auth_algorithm md
Definition: rte_crypto_asym.h:439
rte_crypto_asym_op::session
struct rte_cryptodev_asym_session * session
Definition: rte_crypto_asym.h:527
rte_crypto_asym_xform::xform_type
enum rte_crypto_asym_xform_type xform_type
Definition: rte_crypto_asym.h:356
rte_crypto_asym_xform
Definition: rte_crypto_asym.h:353
rte_crypto_rsa_priv_key_qt::p
rte_crypto_param p
Definition: rte_crypto_asym.h:147
rte_crypto_dh_xform::p
rte_crypto_param p
Definition: rte_crypto_asym.h:275
rte_crypto_dsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:496