1 /*
2  * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #pragma once
8 
9 #include <stdint.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #define ETS_DIGEST_LEN 32 /* SHA-256, bytes */
16 
17 typedef enum {
18     ECDSA_CURVE_P192 = 1,
19     ECDSA_CURVE_P256 = 2
20 } ECDSA_CURVE;
21 
22 int ets_ecdsa_verify(const uint8_t *key, const uint8_t *sig, ECDSA_CURVE curve_id, const uint8_t *digest, uint8_t *verified_digest);
23 
24 #ifdef __cplusplus
25 }
26 #endif
27