DPDK  24.03.0
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 
40 #define RTE_CRYPTO_ASYM_FLAG_PUB_KEY_NO_PADDING RTE_BIT32(0)
41 
46 #define RTE_CRYPTO_ASYM_FLAG_SHARED_KEY_NO_PADDING RTE_BIT32(1)
47 
63  RTE_CRYPTO_EC_GROUP_SECP192R1 = 19,
64  RTE_CRYPTO_EC_GROUP_SECP224R1 = 21,
65  RTE_CRYPTO_EC_GROUP_SECP256R1 = 23,
66  RTE_CRYPTO_EC_GROUP_SECP384R1 = 24,
67  RTE_CRYPTO_EC_GROUP_SECP521R1 = 25,
68  RTE_CRYPTO_EC_GROUP_SM2 = 41,
69 };
70 
124 };
125 
138  RTE_CRYPTO_ASYM_OP_LIST_END
139 };
140 
155 };
156 
171  RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
172 };
173 
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 
302  rte_crypto_uint n;
304  rte_crypto_uint e;
307  enum rte_crypto_rsa_priv_key_type key_type;
308 
309  union {
310  rte_crypto_uint d;
314  };
315 };
316 
323  rte_crypto_uint modulus;
325  rte_crypto_uint exponent;
327 };
328 
335  rte_crypto_uint modulus;
337 };
338 
345  rte_crypto_uint p;
347  rte_crypto_uint g;
349 };
350 
357  rte_crypto_uint p;
359  rte_crypto_uint q;
361  rte_crypto_uint g;
363  rte_crypto_uint x;
365 };
366 
373  enum rte_crypto_curve_id curve_id;
376  rte_crypto_uint pkey;
381 };
382 
388  rte_crypto_uint base;
390  rte_crypto_uint result;
392 };
393 
451  struct rte_crypto_rsa_padding padding;
453 };
454 
462  rte_crypto_uint priv_key;
476  rte_crypto_uint pub_key;
484  rte_crypto_uint shared_secret;
489 };
490 
497  rte_crypto_uint priv_key;
511  struct rte_crypto_ec_point pub_key;
520  struct rte_crypto_ec_point shared_secret;
525 };
526 
535  rte_crypto_uint k;
541  rte_crypto_uint r;
547  rte_crypto_uint s;
553  rte_crypto_uint y;
557 };
558 
569  rte_crypto_uint k;
576  rte_crypto_uint r;
581  rte_crypto_uint s;
586 };
587 
600 };
601 
613  union {
620  struct rte_crypto_modinv_xform modinv;
633  };
634 };
635 
676  rte_crypto_uint id;
679  rte_crypto_uint k;
686  rte_crypto_uint r;
692  rte_crypto_uint s;
698 };
699 
706  union {
707  struct rte_cryptodev_asym_session *session;
711  };
712 
713  union {
714  struct rte_crypto_rsa_op_param rsa;
715  struct rte_crypto_mod_op_param modex;
716  struct rte_crypto_mod_op_param modinv;
717  struct rte_crypto_dh_op_param dh;
718  struct rte_crypto_ecdh_op_param ecdh;
719  struct rte_crypto_dsa_op_param dsa;
720  struct rte_crypto_ecdsa_op_param ecdsa;
721  struct rte_crypto_ecpm_op_param ecpm;
722  struct rte_crypto_sm2_op_param sm2;
723  };
724  uint16_t flags;
729 };
730 
731 #ifdef __cplusplus
732 }
733 #endif
734 
735 #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
rte_crypto_uint pkey
uint64_t rte_iova_t
Definition: rte_common.h:584
rte_crypto_asym_xform_type
rte_crypto_uint shared_secret
struct rte_crypto_asym_xform * xform
rte_crypto_rsa_priv_key_type
rte_crypto_param message
rte_crypto_asym_op_type
rte_crypto_uint priv_key
rte_crypto_param rte_crypto_uint
rte_crypto_param message
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
rte_crypto_param cipher
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