DPDK  22.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 
30 struct rte_cryptodev_asym_session;
31 
33 extern const char *
35 
37 extern const char *
39 
41 extern const char *
43 
44 #define RTE_CRYPTO_ASYM_FLAG_PUB_KEY_NO_PADDING RTE_BIT32(0)
45 
50 #define RTE_CRYPTO_ASYM_FLAG_SHARED_KEY_NO_PADDING RTE_BIT32(1)
51 
67  RTE_CRYPTO_EC_GROUP_SECP192R1 = 19,
68  RTE_CRYPTO_EC_GROUP_SECP224R1 = 21,
69  RTE_CRYPTO_EC_GROUP_SECP256R1 = 23,
70  RTE_CRYPTO_EC_GROUP_SECP384R1 = 24,
71  RTE_CRYPTO_EC_GROUP_SECP521R1 = 25
72 };
73 
123 };
124 
137  RTE_CRYPTO_ASYM_OP_LIST_END
138 };
139 
154 };
155 
170  RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
171 };
172 
187 };
188 
201 typedef struct rte_crypto_param_t {
202  uint8_t *data;
206  size_t length;
209 
212 
221 };
222 
228  rte_crypto_uint p;
230  rte_crypto_uint q;
232  rte_crypto_uint dP;
234  rte_crypto_uint dQ;
236  rte_crypto_uint qInv;
238 };
239 
279  uint16_t pss_saltlen;
294 };
295 
303  rte_crypto_uint n;
305  rte_crypto_uint e;
308  enum rte_crypto_rsa_priv_key_type key_type;
309 
311  union {
312  rte_crypto_uint d;
316  };
317 };
318 
326  rte_crypto_uint modulus;
328  rte_crypto_uint exponent;
330 };
331 
339  rte_crypto_uint modulus;
341 };
342 
350  rte_crypto_uint p;
352  rte_crypto_uint g;
354 };
355 
363  rte_crypto_uint p;
365  rte_crypto_uint q;
367  rte_crypto_uint g;
369  rte_crypto_uint x;
371 };
372 
380  enum rte_crypto_curve_id curve_id;
382 };
383 
390  rte_crypto_uint base;
392  rte_crypto_uint result;
394 };
395 
449  struct rte_crypto_rsa_padding padding;
451 };
452 
460  rte_crypto_uint priv_key;
474  rte_crypto_uint pub_key;
482  rte_crypto_uint shared_secret;
487 };
488 
495  rte_crypto_uint priv_key;
509  struct rte_crypto_ec_point pub_key;
518  struct rte_crypto_ec_point shared_secret;
523 };
524 
534  rte_crypto_uint k;
540  rte_crypto_uint r;
546  rte_crypto_uint s;
552  rte_crypto_uint y;
556 };
557 
565  rte_crypto_uint pkey;
574  rte_crypto_uint k;
581  rte_crypto_uint r;
586  rte_crypto_uint s;
591 };
592 
605 };
606 
619  union {
626  struct rte_crypto_modinv_xform modinv;
639  };
640 };
641 
650  union {
651  struct rte_cryptodev_asym_session *session;
655  };
656 
658  union {
659  struct rte_crypto_rsa_op_param rsa;
660  struct rte_crypto_mod_op_param modex;
661  struct rte_crypto_mod_op_param modinv;
662  struct rte_crypto_dh_op_param dh;
663  struct rte_crypto_ecdh_op_param ecdh;
664  struct rte_crypto_dsa_op_param dsa;
665  struct rte_crypto_ecdsa_op_param ecdsa;
666  struct rte_crypto_ecpm_op_param ecpm;
667  };
668  uint16_t flags;
673 };
674 
675 #ifdef __cplusplus
676 }
677 #endif
678 
679 #endif /* _RTE_CRYPTO_ASYM_H_ */
rte_crypto_curve_id
rte_crypto_param cipher
rte_crypto_rsa_padding_type
const char * rte_crypto_asym_ke_strings[]
rte_crypto_param message
uint64_t rte_iova_t
Definition: rte_common.h:458
rte_crypto_asym_xform_type
rte_crypto_uint shared_secret
struct rte_crypto_asym_xform * xform
rte_crypto_rsa_priv_key_type
const char * rte_crypto_asym_xform_strings[]
rte_crypto_param message
rte_crypto_asym_op_type
rte_crypto_uint priv_key
rte_crypto_param rte_crypto_uint
rte_crypto_uint pub_key
rte_crypto_uint exponent
rte_crypto_asym_ke_type
const char * rte_crypto_asym_op_strings[]
rte_crypto_uint modulus
rte_crypto_param oaep_label
enum rte_crypto_asym_xform_type xform_type
#define RTE_STD_C11
Definition: rte_common.h:39
rte_crypto_uint p
rte_crypto_auth_algorithm
struct rte_crypto_asym_xform * next
struct rte_cryptodev_asym_session * session
rte_crypto_uint g
struct rte_crypto_param_t rte_crypto_param
rte_crypto_param y
rte_crypto_param x