DPDK  19.11.12
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 
142 };
143 
149  rte_crypto_param p;
156  rte_crypto_param q;
163  rte_crypto_param dP;
171  rte_crypto_param dQ;
179  rte_crypto_param qInv;
186 };
187 
195  rte_crypto_param n;
201  rte_crypto_param e;
207  enum rte_crypto_rsa_priv_key_type key_type;
208 
209  __extension__
210  union {
211  rte_crypto_param d;
220  };
221 };
222 
230  rte_crypto_param modulus;
239  rte_crypto_param exponent;
244 };
245 
253  rte_crypto_param modulus;
265 };
266 
277  rte_crypto_param p;
283  rte_crypto_param g;
289 };
290 
298  rte_crypto_param p;
303  rte_crypto_param q;
309  rte_crypto_param g;
313  rte_crypto_param x;
321 };
322 
329  rte_crypto_param base;
339  rte_crypto_param result;
348 };
349 
361  __extension__
362  union {
377  };
378 };
379 
381 
390  rte_crypto_param message;
408  rte_crypto_param cipher;
423  rte_crypto_param sign;
456 };
457 
463  rte_crypto_param pub_key;
473  rte_crypto_param priv_key;
482  rte_crypto_param shared_secret;
489 };
490 
498  rte_crypto_param message;
500  rte_crypto_param r;
506  rte_crypto_param s;
512  rte_crypto_param y;
518 };
519 
528  union {
533  };
534 
535  __extension__
536  union {
537  struct rte_crypto_rsa_op_param rsa;
538  struct rte_crypto_mod_op_param modex;
539  struct rte_crypto_mod_op_param modinv;
540  struct rte_crypto_dh_op_param dh;
541  struct rte_crypto_dsa_op_param dsa;
542  };
543 };
544 
545 #ifdef __cplusplus
546 }
547 #endif
548 
549 #endif /* _RTE_CRYPTO_ASYM_H_ */
rte_crypto_rsa_xform::d
rte_crypto_param d
Definition: rte_crypto_asym.h:211
rte_crypto_modex_xform::modulus
rte_crypto_param modulus
Definition: rte_crypto_asym.h:230
rte_crypto_dsa_xform::g
rte_crypto_param g
Definition: rte_crypto_asym.h:309
rte_crypto_dh_op_param::shared_secret
rte_crypto_param shared_secret
Definition: rte_crypto_asym.h:482
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:408
rte_memory.h
rte_crypto_asym_op
Definition: rte_crypto_asym.h:526
rte_crypto_dh_op_param::pub_key
rte_crypto_param pub_key
Definition: rte_crypto_asym.h:463
rte_crypto_rsa_priv_key_qt::qInv
rte_crypto_param qInv
Definition: rte_crypto_asym.h:179
rte_crypto_asym_xform::dh
struct rte_crypto_dh_xform dh
Definition: rte_crypto_asym.h:372
rte_crypto_rsa_priv_key_qt
Definition: rte_crypto_asym.h:148
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:303
rte_crypto_asym_xform::modex
struct rte_crypto_modex_xform modex
Definition: rte_crypto_asym.h:366
rte_crypto_modex_xform::exponent
rte_crypto_param exponent
Definition: rte_crypto_asym.h:239
rte_crypto_dh_op_param
Definition: rte_crypto_asym.h:462
rte_crypto_rsa_xform
Definition: rte_crypto_asym.h:194
rte_crypto_dsa_xform::p
rte_crypto_param p
Definition: rte_crypto_asym.h:298
rte_crypto_rsa_priv_key_qt::dP
rte_crypto_param dP
Definition: rte_crypto_asym.h:163
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:218
rte_crypto_asym_xform::next
struct rte_crypto_asym_xform * next
Definition: rte_crypto_asym.h:356
rte_crypto_modinv_xform::modulus
rte_crypto_param modulus
Definition: rte_crypto_asym.h:253
rte_crypto_rsa_priv_key_qt::dQ
rte_crypto_param dQ
Definition: rte_crypto_asym.h:171
rte_crypto_mod_op_param
Definition: rte_crypto_asym.h:328
rte_crypto_rsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:390
rte_crypto_dsa_op_param::y
rte_crypto_param y
Definition: rte_crypto_asym.h:512
rte_crypto_rsa_op_param::sign
rte_crypto_param sign
Definition: rte_crypto_asym.h:423
rte_crypto_mod_op_param::base
rte_crypto_param base
Definition: rte_crypto_asym.h:329
rte_crypto_asym_xform::modinv
struct rte_crypto_modinv_xform modinv
Definition: rte_crypto_asym.h:369
rte_crypto_dsa_xform::x
rte_crypto_param x
Definition: rte_crypto_asym.h:313
rte_crypto_dh_xform::type
enum rte_crypto_asym_op_type type
Definition: rte_crypto_asym.h:274
rte_crypto_dsa_xform
Definition: rte_crypto_asym.h:297
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:531
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:273
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:438
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:229
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:375
rte_crypto_dsa_op_param
Definition: rte_crypto_asym.h:495
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:140
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:386
rte_cryptodev_asym_session
Definition: rte_cryptodev.h:989
rte_crypto_dsa_op_param::r
rte_crypto_param r
Definition: rte_crypto_asym.h:500
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:496
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:156
RTE_STD_C11
#define RTE_STD_C11
Definition: rte_common.h:40
rte_crypto_modinv_xform
Definition: rte_crypto_asym.h:252
RTE_CRYPTO_ASYM_OP_DECRYPT
@ RTE_CRYPTO_ASYM_OP_DECRYPT
Definition: rte_crypto_asym.h:94
RTE_RSA_KEY_TYPE_QT
@ RTE_RSA_KEY_TYPE_QT
Definition: rte_crypto_asym.h:136
rte_mempool.h
rte_crypto_asym_xform::rsa
struct rte_crypto_rsa_xform rsa
Definition: rte_crypto_asym.h:363
rte_crypto_mod_op_param::result
rte_crypto_param result
Definition: rte_crypto_asym.h:339
rte_crypto_rsa_xform::e
rte_crypto_param e
Definition: rte_crypto_asym.h:201
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:448
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:195
rte_crypto_dh_op_param::priv_key
rte_crypto_param priv_key
Definition: rte_crypto_asym.h:473
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:506
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:283
rte_crypto_rsa_op_param::op_type
enum rte_crypto_asym_op_type op_type
Definition: rte_crypto_asym.h:387
rte_crypto_rsa_op_param::md
enum rte_crypto_auth_algorithm md
Definition: rte_crypto_asym.h:441
rte_crypto_asym_op::session
struct rte_cryptodev_asym_session * session
Definition: rte_crypto_asym.h:529
rte_crypto_asym_xform::xform_type
enum rte_crypto_asym_xform_type xform_type
Definition: rte_crypto_asym.h:358
rte_crypto_asym_xform
Definition: rte_crypto_asym.h:355
rte_crypto_rsa_priv_key_qt::p
rte_crypto_param p
Definition: rte_crypto_asym.h:149
rte_crypto_dh_xform::p
rte_crypto_param p
Definition: rte_crypto_asym.h:277
rte_crypto_dsa_op_param::message
rte_crypto_param message
Definition: rte_crypto_asym.h:498