39#define CX_ECDSA_SHA256_SIG_MIN_ASN1_LENGTH (70U)
42#define CX_ECDSA_SHA256_SIG_MAX_ASN1_LENGTH (72U)
45#define cx_ecdsa_init_public_key cx_ecfp_init_public_key_no_throw
47#define cx_ecdsa_init_private_key cx_ecfp_init_private_key_no_throw
91WARN_UNUSED_RESULT cx_err_t cx_ecdsa_sign_no_throw(
const cx_ecfp_private_key_t *pvkey,
104DEPRECATED
static inline size_t cx_ecdsa_sign(
const cx_ecfp_private_key_t *pvkey,
107 const unsigned char *hash,
108 unsigned int hash_len,
110 unsigned int sig_len,
113 size_t sig_len_ = sig_len;
115 CX_THROW(cx_ecdsa_sign_no_throw(pvkey, mode, hashID, hash, hash_len, sig, &sig_len_, &info_));
117 *info = (uint32_t) info_;
163WARN_UNUSED_RESULT cx_err_t cx_ecdsa_sign_rs_no_throw(
const cx_ecfp_private_key_t *key,
191WARN_UNUSED_RESULT
bool cx_ecdsa_verify_no_throw(
const cx_ecfp_public_key_t *pukey,
201DEPRECATED
static inline bool cx_ecdsa_verify(
const cx_ecfp_public_key_t *pukey,
204 const unsigned char *hash,
205 unsigned int hash_len,
206 const unsigned char *sig,
207 unsigned int sig_len)
211 return cx_ecdsa_verify_no_throw(pukey, hash, hash_len, sig, sig_len);
Key pair generation based on elliptic curves.