uECC_verify_antifault.h 704 B

123456789101112131415161718
  1. /* Copyright 2014, Kenneth MacKay. Licensed under the BSD 2-clause license.
  2. Modifications Copyright 2020, Espressif Systems (Shanghai) PTE LTD. Licensed under the BSD
  3. 2-clause license.
  4. */
  5. #pragma once
  6. #include "uECC.h"
  7. /* Version uECC_verify() that also copies message_hash to verified_hash
  8. if the signature is valid, and does it in a way that is harder to attack
  9. with fault injection.
  10. */
  11. int uECC_verify_antifault(const uint8_t *public_key,
  12. const uint8_t *message_hash,
  13. unsigned hash_size,
  14. const uint8_t *signature,
  15. uECC_Curve curve,
  16. uint8_t *verified_hash);