File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11/*
2- * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
@@ -121,11 +121,11 @@ static inline void ecc_ll_set_mode(ecc_mode_t mode)
121121static inline void ecc_ll_set_curve (ecc_curve_t curve )
122122{
123123 switch (curve ) {
124- case ECC_CURVE_SECP256R1 :
125- REG_SET_BIT (ECC_MULT_CONF_REG , ECC_MULT_KEY_LENGTH );
126- break ;
127124 case ECC_CURVE_SECP192R1 :
128- REG_CLR_BIT (ECC_MULT_CONF_REG , ECC_MULT_KEY_LENGTH );
125+ case ECC_CURVE_SECP256R1 :
126+ case ECC_CURVE_SECP384R1 :
127+ case ECC_CURVE_SM2 :
128+ REG_SET_FIELD (ECC_MULT_CONF_REG , ECC_MULT_KEY_LENGTH , curve );
129129 break ;
130130 default :
131131 HAL_ASSERT (false && "Unsupported curve" );
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ typedef enum {
2626typedef enum {
2727 ECC_CURVE_SECP192R1 = 0x0 ,
2828 ECC_CURVE_SECP256R1 ,
29+ ECC_CURVE_SECP384R1 ,
30+ ECC_CURVE_SM2 ,
2931} ecc_curve_t ;
3032
3133typedef enum {
You can’t perform that action at this time.
0 commit comments