fp_src_t
fp_src_t ucoord, fp_src_t vcoord);
ATTRIBUTE_WARN_UNUSED_RET int is_on_montgomery_curve(fp_src_t u, fp_src_t v, ec_montgomery_crv_src_t curve, int *on_curve);
ATTRIBUTE_WARN_UNUSED_RET int curve_shortw_to_montgomery(ec_shortw_crv_src_t shortw_crv, ec_montgomery_crv_t montgomery_crv, fp_src_t alpha_montgomery, fp_src_t gamma_montgomery);
ATTRIBUTE_WARN_UNUSED_RET int aff_pt_edwards_to_montgomery(aff_pt_edwards_src_t in_edwards, ec_montgomery_crv_src_t montgomery_crv, aff_pt_montgomery_t out_montgomery, fp_src_t alpha);
ATTRIBUTE_WARN_UNUSED_RET int aff_pt_montgomery_to_edwards(aff_pt_montgomery_src_t in_montgomery, ec_edwards_crv_src_t edwards_crv, aff_pt_edwards_t out_edwards, fp_src_t alpha);
ATTRIBUTE_WARN_UNUSED_RET int aff_pt_montgomery_v_from_u(fp_t v1, fp_t v2, fp_src_t u, ec_montgomery_crv_src_t crv);
fp_src_t xcoord, fp_src_t ycoord);
ATTRIBUTE_WARN_UNUSED_RET int aff_pt_y_from_x(fp_t y1, fp_t y2, fp_src_t x, ec_shortw_crv_src_t curve);
ATTRIBUTE_WARN_UNUSED_RET int is_on_shortw_curve(fp_src_t x, fp_src_t y, ec_shortw_crv_src_t curve, int *on_curve);
fp_src_t ucoord, fp_src_t vcoord);
ATTRIBUTE_WARN_UNUSED_RET int is_on_edwards_curve(fp_src_t u, fp_src_t v, ec_edwards_crv_src_t curve, int *on_curve);
ATTRIBUTE_WARN_UNUSED_RET int curve_edwards_to_montgomery(ec_edwards_crv_src_t edwards_crv, ec_montgomery_crv_t montgomery_crv, fp_src_t alpha_edwards);
ATTRIBUTE_WARN_UNUSED_RET int curve_edwards_montgomery_check(ec_edwards_crv_src_t edwards_crv, ec_montgomery_crv_src_t montgomery_crv, fp_src_t alpha_edwards);
ATTRIBUTE_WARN_UNUSED_RET int curve_montgomery_to_edwards(ec_montgomery_crv_src_t montgomery_crv, ec_edwards_crv_t edwards_crv, fp_src_t alpha_edwards);
ATTRIBUTE_WARN_UNUSED_RET int curve_edwards_to_shortw(ec_edwards_crv_src_t edwards_crv, ec_shortw_crv_t shortw_crv, fp_src_t alpha_edwards);
ATTRIBUTE_WARN_UNUSED_RET int curve_edwards_shortw_check(ec_edwards_crv_src_t edwards_crv, ec_shortw_crv_src_t shortw_crv, fp_src_t alpha_edwards);
ATTRIBUTE_WARN_UNUSED_RET int curve_shortw_to_edwards(ec_shortw_crv_src_t shortw_crv, ec_edwards_crv_t edwards_crv, fp_src_t alpha_montgomery, fp_src_t gamma_montgomery, fp_src_t alpha_edwards);
ATTRIBUTE_WARN_UNUSED_RET int aff_pt_edwards_to_shortw(aff_pt_edwards_src_t in_edwards, ec_shortw_crv_src_t shortw_crv, aff_pt_t out_shortw, fp_src_t alpha_edwards);
ATTRIBUTE_WARN_UNUSED_RET int aff_pt_shortw_to_edwards(aff_pt_src_t in_shortw, ec_edwards_crv_src_t edwards_crv, aff_pt_edwards_t out_edwards, fp_src_t alpha_edwards);
ATTRIBUTE_WARN_UNUSED_RET int aff_pt_edwards_y_from_x(fp_t y1, fp_t y2, fp_src_t x, ec_edwards_crv_src_t crv);
ATTRIBUTE_WARN_UNUSED_RET int aff_pt_edwards_x_from_y(fp_t x1, fp_t x2, fp_src_t y, ec_edwards_crv_src_t crv);
ATTRIBUTE_WARN_UNUSED_RET int ec_edwards_crv_init(ec_edwards_crv_t crv, fp_src_t a, fp_src_t b, nn_src_t order);
ATTRIBUTE_WARN_UNUSED_RET int ec_montgomery_crv_init(ec_montgomery_crv_t crv, fp_src_t a, fp_src_t b, nn_src_t order);
ATTRIBUTE_WARN_UNUSED_RET int ec_shortw_crv_init(ec_shortw_crv_t crv, fp_src_t a, fp_src_t b, nn_src_t order);
fp_src_t xcoord,
fp_src_t ycoord, fp_src_t zcoord);
prj_pt_t out_shortw, fp_src_t alpha);
fp_src_t alpha);
ATTRIBUTE_WARN_UNUSED_RET int fp_check_initialized(fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_cmp(fp_src_t in1, fp_src_t in2, int *cmp);
ATTRIBUTE_WARN_UNUSED_RET int fp_iszero(fp_src_t in, int *iszero);
ATTRIBUTE_WARN_UNUSED_RET int fp_copy(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_tabselect(fp_t out, u8 idx, fp_src_t *tab, u8 tabsize);
ATTRIBUTE_WARN_UNUSED_RET int fp_eq_or_opp(fp_src_t in1, fp_src_t in2, int *eq_or_opp);
ATTRIBUTE_WARN_UNUSED_RET int fp_export_to_buf(u8 *buf, u16 buflen, fp_src_t in_fp);
ATTRIBUTE_WARN_UNUSED_RET int fp_add(fp_t out, fp_src_t in1, fp_src_t in2);
ATTRIBUTE_WARN_UNUSED_RET int fp_inc(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_sub(fp_t out, fp_src_t in1, fp_src_t in2);
ATTRIBUTE_WARN_UNUSED_RET int fp_dec(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_neg(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_add_monty(fp_t out, fp_src_t in1, fp_src_t in2);
ATTRIBUTE_WARN_UNUSED_RET int fp_sub_monty(fp_t out, fp_src_t in1, fp_src_t in2);
ATTRIBUTE_WARN_UNUSED_RET int fp_mul_monty(fp_t out, fp_src_t in1, fp_src_t in2);
ATTRIBUTE_WARN_UNUSED_RET int fp_sqr_monty(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_div_monty(fp_t out, fp_src_t in1, fp_src_t in2);
ATTRIBUTE_WARN_UNUSED_RET int fp_mul(fp_t out, fp_src_t in1, fp_src_t in2);
ATTRIBUTE_WARN_UNUSED_RET int fp_sqr(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_inv(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_div(fp_t out, fp_src_t num, fp_src_t den);
ATTRIBUTE_WARN_UNUSED_RET int fp_mul_redc1(fp_t out, fp_src_t in1, fp_src_t in2);
ATTRIBUTE_WARN_UNUSED_RET int fp_sqr_redc1(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_redcify(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_unredcify(fp_t out, fp_src_t in);
ATTRIBUTE_WARN_UNUSED_RET int fp_pow(fp_t out, fp_src_t base, nn_src_t exp);
ATTRIBUTE_WARN_UNUSED_RET int fp_sqrt(fp_t sqrt1, fp_t sqrt2, fp_src_t n);
void fp_print(const char *msg, fp_src_t a);
void fp_print_all(const char *msg, fp_src_t a);
int aff_pt_y_from_x(fp_t y1, fp_t y2, fp_src_t x, ec_shortw_crv_src_t curve)
int is_on_shortw_curve(fp_src_t x, fp_src_t y, ec_shortw_crv_src_t curve, int *on_curve)
fp_src_t xcoord, fp_src_t ycoord)
int is_on_edwards_curve(fp_src_t x, fp_src_t y,
fp_src_t alpha_edwards)
fp_src_t alpha_edwards)
fp_src_t alpha_edwards)
fp_src_t alpha_edwards)
fp_src_t alpha_edwards)
fp_src_t alpha_montgomery,
fp_src_t gamma_montgomery,
fp_src_t alpha_edwards)
fp_src_t alpha_edwards)
fp_src_t tab_x_t[2] = { &tab_x[0], &tab_x[1] };
fp_src_t tab_y_t[2] = { &tab_y[0], &tab_y[1] };
fp_src_t alpha)
fp_src_t tab_u_t[2] = { &tab_u[0], &tab_u[1] };
fp_src_t tab_v_t[2] = { &tab_v[0], &tab_v[1] };
fp_src_t xcoord, fp_src_t ycoord)
aff_pt_t out_shortw, fp_src_t alpha_edwards)
fp_src_t alpha_edwards)
int aff_pt_edwards_y_from_x(fp_t y1, fp_t y2, fp_src_t x, ec_edwards_crv_src_t crv)
int aff_pt_edwards_x_from_y(fp_t x1, fp_t x2, fp_src_t y, ec_edwards_crv_src_t crv)
int is_on_montgomery_curve(fp_src_t u, fp_src_t v, ec_montgomery_crv_src_t curve, int *on_curve)
fp_src_t alpha, fp_src_t gamma)
int aff_pt_montgomery_v_from_u(fp_t v1, fp_t v2, fp_src_t u, ec_montgomery_crv_src_t crv)
fp_src_t ucoord, fp_src_t vcoord)
int ec_edwards_crv_init(ec_edwards_crv_t crv, fp_src_t a, fp_src_t d, nn_src_t order)
int ec_montgomery_crv_init(ec_montgomery_crv_t crv, fp_src_t A, fp_src_t B, nn_src_t order)
int ec_shortw_crv_init(ec_shortw_crv_t crv, fp_src_t a, fp_src_t b, nn_src_t order)
fp_src_t alpha_edwards)
fp_src_t alpha_edwards)
fp_src_t xcoord, fp_src_t ycoord, fp_src_t zcoord)
ATTRIBUTE_WARN_UNUSED_RET static int compute_v_from_u(fp_src_t u, fp_t v, ec_montgomery_crv_src_t crv)
fp_src_t alpha_montgomery;
fp_src_t gamma_montgomery;
int fp_check_initialized(fp_src_t in)
int fp_cmp(fp_src_t in1, fp_src_t in2, int *cmp)
int fp_iszero(fp_src_t in, int *iszero)
int fp_copy(fp_t out, fp_src_t in)
int fp_tabselect(fp_t out, u8 idx, fp_src_t *tab, u8 tabsize)
int fp_eq_or_opp(fp_src_t in1, fp_src_t in2, int *eq_or_opp)
int fp_export_to_buf(u8 *buf, u16 buflen, fp_src_t in_fp)
int fp_dec(fp_t out, fp_src_t in)
int fp_neg(fp_t out, fp_src_t in)
int fp_add(fp_t out, fp_src_t in1, fp_src_t in2)
int fp_inc(fp_t out, fp_src_t in)
int fp_sub(fp_t out, fp_src_t in1, fp_src_t in2)
int fp_add_monty(fp_t out, fp_src_t in1, fp_src_t in2)
int fp_sub_monty(fp_t out, fp_src_t in1, fp_src_t in2)
int fp_mul_monty(fp_t out, fp_src_t in1, fp_src_t in2)
int fp_sqr_monty(fp_t out, fp_src_t in)
int fp_div_monty(fp_t out, fp_src_t in1, fp_src_t in2)
int fp_div(fp_t out, fp_src_t num, fp_src_t den)
int fp_mul(fp_t out, fp_src_t in1, fp_src_t in2)
int fp_sqr(fp_t out, fp_src_t in)
int fp_inv(fp_t out, fp_src_t in)
int fp_mul_redc1(fp_t out, fp_src_t in1, fp_src_t in2)
int fp_sqr_redc1(fp_t out, fp_src_t in)
int fp_redcify(fp_t out, fp_src_t in)
int fp_unredcify(fp_t out, fp_src_t in)
ATTRIBUTE_WARN_UNUSED_RET static int _fp_pow(fp_t out, fp_src_t base, nn_src_t exp)
int fp_pow(fp_t out, fp_src_t base, nn_src_t exp)
int fp_sqrt(fp_t sqrt1, fp_t sqrt2, fp_src_t n)
ATTRIBUTE_WARN_UNUSED_RET static int legendre(fp_src_t a)
fp_src_t r;
fp_src_t alpha_montgomery;
fp_src_t gamma_montgomery;
fp_src_t alpha_edwards;
fp_src_t alpha_montgomery;
fp_src_t gamma_montgomery;
fp_src_t alpha_edwards;
fp_src_t alpha_montgomery;
fp_src_t gamma_montgomery;
fp_src_t alpha_edwards;
fp_src_t alpha_montgomery;
fp_src_t gamma_montgomery;
fp_src_t alpha_edwards;
fp_src_t alpha_montgomery;
fp_src_t gamma_montgomery;
fp_src_t alpha_edwards;
fp_src_t alpha_edwards,
fp_src_t alpha_edwards, const u8 *buf, u16 buflen,
fp_src_t alpha_montgomery;
fp_src_t gamma_montgomery;
fp_src_t alpha_edwards;
fp_src_t alpha_montgomery;
fp_src_t gamma_montgomery;
fp_src_t alpha_edwards;
fp_src_t a, b;
void fp_print(const char *msg, fp_src_t a)
void fp_print_all(const char *msg, fp_src_t a)