ecdsa.h 485 B

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