1 /*
2  * SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #pragma once
7 
8 typedef enum {
9     ECC_MODE_POINT_MUL       = 0x0,         // (Rx, Ry) = K * (Px, Py)
10     ECC_MODE_INVERSE_MUL,                   // R = K^(-1) * Py
11     ECC_MODE_VERIFY,                        // Check if (Px, Py) are points on the curve
12     ECC_MODE_VERIFY_THEN_POINT_MUL,         // Verify and then perform point multiplication
13     ECC_MODE_JACOBIAN_POINT_MUL,
14     ECC_MODE_POINT_ADD,
15     ECC_MODE_JACOBIAN_POINT_VERIFY,
16     ECC_MODE_POINT_VERIFY_JACOBIAN_MUL,
17     ECC_MODE_MOD_ADD,
18     ECC_MODE_MOD_SUB,
19     ECC_MODE_MOD_MUL,
20 } ecc_mode_t;
21 
22 typedef enum {
23     ECC_CURVE_SECP192R1           = 0x0,
24     ECC_CURVE_SECP256R1,
25 } ecc_curve_t;
26 
27 typedef enum {
28     ECC_MOD_N,                  // Order of the curve
29     ECC_MOD_P,                  // Prime modulus
30 } ecc_mod_base_t;
31