37 struct cx_ecfp_public_key_s {
44 struct cx_ecfp_private_key_s {
51 struct cx_ecfp_256_public_key_s {
57 struct cx_ecfp_256_private_key_s {
63 struct cx_ecfp_256_extended_private_key_s {
69 typedef struct cx_ecfp_256_public_key_s cx_ecfp_256_public_key_t;
71 typedef struct cx_ecfp_256_private_key_s cx_ecfp_256_private_key_t;
73 typedef struct cx_ecfp_256_extended_private_key_s cx_ecfp_256_extended_private_key_t;
76 typedef struct cx_ecfp_256_public_key_s cx_ecfp_public_key_t;
77 typedef struct cx_ecfp_256_private_key_s cx_ecfp_private_key_t;
80 struct cx_ecfp_384_public_key_s {
86 struct cx_ecfp_384_private_key_s {
92 typedef struct cx_ecfp_384_private_key_s cx_ecfp_384_private_key_t;
94 typedef struct cx_ecfp_384_public_key_s cx_ecfp_384_public_key_t;
97 struct cx_ecfp_512_public_key_s {
103 struct cx_ecfp_512_private_key_s {
109 struct cx_ecfp_512_extented_private_key_s {
115 typedef struct cx_ecfp_512_public_key_s cx_ecfp_512_public_key_t;
117 typedef struct cx_ecfp_512_private_key_s cx_ecfp_512_private_key_t;
119 typedef struct cx_ecfp_512_extented_private_key_s cx_ecfp_512_extented_private_key_t;
122 struct cx_ecfp_640_public_key_s {
128 struct cx_ecfp_640_private_key_s {
134 typedef struct cx_ecfp_640_public_key_s cx_ecfp_640_public_key_t;
136 typedef struct cx_ecfp_640_private_key_s cx_ecfp_640_private_key_t;
163 WARN_UNUSED_RESULT cx_err_t cx_ecfp_add_point_no_throw(cx_curve_t curve,
172 DEPRECATED
static inline size_t cx_ecfp_add_point(cx_curve_t curve,
174 const unsigned char *P,
175 const unsigned char *Q,
180 CX_THROW(cx_ecfp_add_point_no_throw(curve, R, P, Q));
183 CX_THROW(cx_ecdomain_parameters_length(curve, &size));
213 WARN_UNUSED_RESULT cx_err_t cx_ecfp_scalar_mult_no_throw(cx_curve_t curve,
222 DEPRECATED
static inline size_t cx_ecfp_scalar_mult(cx_curve_t curve,
225 const unsigned char *k,
230 CX_THROW(cx_ecfp_scalar_mult_no_throw(curve, P, k, k_len));
233 CX_THROW(cx_ecdomain_parameters_length(curve, &size));
261 WARN_UNUSED_RESULT cx_err_t cx_ecfp_init_public_key_no_throw(cx_curve_t curve,
264 cx_ecfp_public_key_t *key);
270 DEPRECATED
static inline size_t cx_ecfp_init_public_key(cx_curve_t curve,
271 const unsigned char *rawkey,
272 unsigned int key_len,
273 cx_ecfp_public_key_t *key)
275 CX_THROW(cx_ecfp_init_public_key_no_throw(curve, rawkey, key_len, key));
299 WARN_UNUSED_RESULT cx_err_t cx_ecfp_init_private_key_no_throw(cx_curve_t curve,
302 cx_ecfp_private_key_t *pvkey);
308 DEPRECATED
static inline size_t cx_ecfp_init_private_key(cx_curve_t curve,
309 const unsigned char *rawkey,
311 cx_ecfp_private_key_t *pvkey)
313 CX_THROW(cx_ecfp_init_private_key_no_throw(curve, rawkey, key_len, pvkey));
342 WARN_UNUSED_RESULT cx_err_t cx_ecfp_generate_pair_no_throw(cx_curve_t curve,
343 cx_ecfp_public_key_t *pubkey,
344 cx_ecfp_private_key_t *privkey,
351 DEPRECATED
static inline int cx_ecfp_generate_pair(cx_curve_t curve,
352 cx_ecfp_public_key_t *pubkey,
353 cx_ecfp_private_key_t *privkey,
356 CX_THROW(cx_ecfp_generate_pair_no_throw(curve, pubkey, privkey, keepprivate));
387 WARN_UNUSED_RESULT cx_err_t cx_ecfp_generate_pair2_no_throw(cx_curve_t curve,
388 cx_ecfp_public_key_t *pubkey,
389 cx_ecfp_private_key_t *privkey,
397 DEPRECATED
static inline int cx_ecfp_generate_pair2(cx_curve_t curve,
398 cx_ecfp_public_key_t *pubkey,
399 cx_ecfp_private_key_t *privkey,
403 CX_THROW(cx_ecfp_generate_pair2_no_throw(curve, pubkey, privkey, keepprivate, hashID));
407 #ifdef HAVE_ECC_TWISTED_EDWARDS
443 WARN_UNUSED_RESULT cx_err_t cx_eddsa_get_public_key_no_throw(
const cx_ecfp_private_key_t *pvkey,
445 cx_ecfp_public_key_t *pukey,
455 DEPRECATED
static inline void cx_eddsa_get_public_key(
const cx_ecfp_private_key_t *pvkey,
457 cx_ecfp_public_key_t *pukey,
463 CX_THROW(cx_eddsa_get_public_key_no_throw(pvkey, hashID, pukey, a, a_len, h, h_len));
488 WARN_UNUSED_RESULT cx_err_t cx_edwards_compress_point_no_throw(cx_curve_t curve,
496 DEPRECATED
static inline void cx_edwards_compress_point(cx_curve_t curve,
uint8_t *p,
size_t p_len)
498 CX_THROW(cx_edwards_compress_point_no_throw(curve, p, p_len));
525 WARN_UNUSED_RESULT cx_err_t cx_edwards_decompress_point_no_throw(cx_curve_t curve,
533 DEPRECATED
static inline void cx_edwards_decompress_point(cx_curve_t curve,
537 CX_THROW(cx_edwards_decompress_point_no_throw(curve, p, p_len));
544 DEPRECATED
static inline void cx_edward_compress_point(cx_curve_t curve,
uint8_t *p,
size_t p_len)
546 CX_THROW(cx_edwards_compress_point_no_throw(curve, p, p_len));
553 DEPRECATED
static inline void cx_edward_decompress_point(cx_curve_t curve,
uint8_t *p,
size_t p_len)
555 CX_THROW(cx_edwards_decompress_point_no_throw(curve, p, p_len));