1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
9 #define ROC_AE_MAJOR_OP_MODEX 0x03
10 #define ROC_AE_MAJOR_OP_ECDSA 0x04
11 #define ROC_AE_MAJOR_OP_ECC 0x05
12 #define ROC_AE_MINOR_OP_MODEX 0x01
13 #define ROC_AE_MINOR_OP_PKCS_ENC 0x02
14 #define ROC_AE_MINOR_OP_PKCS_ENC_CRT 0x03
15 #define ROC_AE_MINOR_OP_PKCS_DEC 0x04
16 #define ROC_AE_MINOR_OP_PKCS_DEC_CRT 0x05
17 #define ROC_AE_MINOR_OP_MODEX_CRT 0x06
18 #define ROC_AE_MINOR_OP_ECDSA_SIGN 0x01
19 #define ROC_AE_MINOR_OP_ECDSA_VERIFY 0x02
20 #define ROC_AE_MINOR_OP_ECC_UMP 0x03
23 * Enumeration roc_ae_ec_id
25 * Enumerates supported elliptic curves
28 ROC_AE_EC_ID_P192 = 0,
29 ROC_AE_EC_ID_P224 = 1,
30 ROC_AE_EC_ID_P256 = 2,
31 ROC_AE_EC_ID_P384 = 3,
32 ROC_AE_EC_ID_P521 = 4,
33 ROC_AE_EC_ID_P160 = 5,
34 ROC_AE_EC_ID_P320 = 6,
35 ROC_AE_EC_ID_P512 = 7,
39 /* Prime and order fields of built-in elliptic curves */
40 struct roc_ae_ec_group {
42 /* P521 maximum length */
48 /* P521 maximum length */
54 /* P521 maximum length */
60 /* P521 maximum length */
66 struct roc_ae_ec_ctx {
67 /* Prime length defined by microcode for EC operations */
72 struct roc_ae_buf_ptr {
76 int __roc_api roc_ae_ec_grp_get(struct roc_ae_ec_group **tbl);
77 void __roc_api roc_ae_ec_grp_put(void);
78 #endif /* __ROC_AE_H__ */