Merge remote-tracking branch 'public/pr/2925' into baremetal

This commit is contained in:
Simon Butcher 2019-12-13 14:51:29 +00:00
commit e76c638d6f
16 changed files with 467 additions and 406 deletions

View file

@ -91,8 +91,7 @@ extern "C" {
/**
* @brief Generate an ECDSA signature for a given hash value.
* @return returns TC_CRYPTO_SUCCESS (1) if the signature generated successfully
* returns TC_CRYPTO_FAIL (0) if an error occurred.
* @return UECC_SUCCESS or UECC_FAILURE or UECC_FAULT_DETECTED
*
* @param p_private_key IN -- Your private key.
* @param p_message_hash IN -- The hash of the message to sign.
@ -108,7 +107,7 @@ extern "C" {
* attack.
*/
int uECC_sign(const uint8_t *p_private_key, const uint8_t *p_message_hash,
unsigned p_hash_size, uint8_t *p_signature, uECC_Curve curve);
unsigned p_hash_size, uint8_t *p_signature);
#ifdef ENABLE_TESTS
/*
@ -116,8 +115,7 @@ int uECC_sign(const uint8_t *p_private_key, const uint8_t *p_message_hash,
* Refer to uECC_sign() function for real applications.
*/
int uECC_sign_with_k(const uint8_t *private_key, const uint8_t *message_hash,
unsigned int hash_size, uECC_word_t *k, uint8_t *signature,
uECC_Curve curve);
unsigned int hash_size, uECC_word_t *k, uint8_t *signature)
#endif
/**
@ -135,7 +133,7 @@ int uECC_sign_with_k(const uint8_t *private_key, const uint8_t *message_hash,
* the signature values (hash_size and signature).
*/
int uECC_verify(const uint8_t *p_public_key, const uint8_t *p_message_hash,
unsigned int p_hash_size, const uint8_t *p_signature, uECC_Curve curve);
unsigned int p_hash_size, const uint8_t *p_signature);
#ifdef __cplusplus
}