74 WARN_UNUSED_RESULT cx_err_t cx_eddsa_sign_no_throw(
const cx_ecfp_private_key_t *pvkey,
85 DEPRECATED
static inline size_t cx_eddsa_sign(
const cx_ecfp_private_key_t *pvkey,
88 const unsigned char *hash,
89 unsigned int hash_len,
90 const unsigned char *ctx,
101 CX_THROW(cx_eddsa_sign_no_throw(pvkey, hashID, hash, hash_len, sig, sig_len));
104 CX_THROW(cx_ecdomain_parameters_length(pvkey->curve, &size));
134 WARN_UNUSED_RESULT
bool cx_eddsa_verify_no_throw(
const cx_ecfp_public_key_t *pukey,
174 static inline int cx_eddsa_verify(
const cx_ecfp_public_key_t *pukey,
177 const unsigned char *hash,
178 unsigned int hash_len,
179 const unsigned char *ctx,
180 unsigned int ctx_len,
181 const unsigned char *sig,
182 unsigned int sig_len)
188 return cx_eddsa_verify_no_throw(pukey, hashID, hash, hash_len, sig, sig_len);
201 void cx_encode_coord(
uint8_t *coord,
int len,
int sign);
212 int cx_decode_coord(
uint8_t *coord,
int len);
227 cx_err_t cx_eddsa_sign_init_first_hash(cx_hash_t *hash_context,
228 const cx_ecfp_private_key_t *private_key,
249 cx_err_t cx_eddsa_sign_init_second_hash(cx_hash_t *hash_context,
250 const cx_ecfp_private_key_t *private_key,
268 cx_err_t cx_eddsa_sign_hash(
const cx_ecfp_private_key_t *pv_key,
289 cx_err_t cx_eddsa_verify_init_hash(cx_hash_t *hash_context,
290 const cx_ecfp_public_key_t *public_key,
310 cx_err_t cx_eddsa_update_hash(cx_hash_t *hash_context,
const uint8_t *msg,
size_t msg_len);
323 cx_err_t cx_eddsa_final_hash(cx_hash_t *hash_context,
uint8_t *hash,
size_t hash_len);
337 bool cx_eddsa_verify_hash(
const cx_ecfp_public_key_t *public_key,
341 size_t signature_len);
Key pair generation based on elliptic curves.