33 #if defined(HAVE_ECDH) || defined(HAVE_X25519) || defined(HAVE_X448)
39 #if defined(HAVE_ECDH)
75 WARN_UNUSED_RESULT cx_err_t cx_ecdh_no_throw(
const cx_ecfp_private_key_t *pvkey,
86 DEPRECATED
static inline size_t cx_ecdh(
const cx_ecfp_private_key_t *pvkey,
88 const unsigned char *P,
90 unsigned char *secret,
91 unsigned int secret_len)
93 CX_THROW(cx_ecdh_no_throw(pvkey, mode, P, P_len, secret, secret_len));
97 CX_THROW(cx_ecdomain_parameters_length(pvkey->curve, &size));
108 #if defined(HAVE_X25519)
135 WARN_UNUSED_RESULT cx_err_t cx_x25519(
uint8_t *u,
const uint8_t *k,
size_t k_len);
138 #if defined(HAVE_X448)
165 WARN_UNUSED_RESULT cx_err_t cx_x448(
uint8_t *u,
const uint8_t *k,
size_t k_len);
Key pair generation based on elliptic curves.