Lines Matching refs:curve
39 int aff_pt_init(aff_pt_t in, ec_shortw_crv_src_t curve) in aff_pt_init() argument
44 MUST_HAVE((curve != NULL), ret, err); in aff_pt_init()
46 ret = ec_shortw_crv_check_initialized(curve); EG(ret, err); in aff_pt_init()
47 ret = fp_init(&(in->x), curve->a.ctx); EG(ret, err); in aff_pt_init()
48 ret = fp_init(&(in->y), curve->a.ctx); EG(ret, err); in aff_pt_init()
50 in->crv = curve; in aff_pt_init()
62 ec_shortw_crv_src_t curve, in aff_pt_init_from_coords() argument
67 ret = aff_pt_init(in, curve); EG(ret, err); in aff_pt_init_from_coords()
102 int aff_pt_y_from_x(fp_t y1, fp_t y2, fp_src_t x, ec_shortw_crv_src_t curve) in aff_pt_y_from_x() argument
107 ret = ec_shortw_crv_check_initialized(curve); EG(ret, err); in aff_pt_y_from_x()
120 ret = fp_mul(y2, y2, &(curve->a)); EG(ret, err); in aff_pt_y_from_x()
122 ret = fp_add(y1, y1, &(curve->b)); EG(ret, err); in aff_pt_y_from_x()
139 int is_on_shortw_curve(fp_src_t x, fp_src_t y, ec_shortw_crv_src_t curve, int *on_curve) in is_on_shortw_curve() argument
145 ret = ec_shortw_crv_check_initialized(curve); EG(ret, err); in is_on_shortw_curve()
151 MUST_HAVE((x->ctx == curve->a.ctx), ret, err); in is_on_shortw_curve()
160 ret = fp_sub(&tmp1, &tmp1, &(curve->b)); EG(ret, err); in is_on_shortw_curve()
165 ret = fp_add(&tmp2, &tmp2, &(curve->a)); EG(ret, err); in is_on_shortw_curve()