Lines Matching full:curve
32 * function on given curve.
36 int aff_pt_montgomery_init(aff_pt_montgomery_t in, ec_montgomery_crv_src_t curve) in aff_pt_montgomery_init() argument
41 ret = ec_montgomery_crv_check_initialized(curve); EG(ret, err); in aff_pt_montgomery_init()
43 ret = fp_init(&(in->u), curve->A.ctx); EG(ret, err); in aff_pt_montgomery_init()
44 ret = fp_init(&(in->v), curve->A.ctx); EG(ret, err); in aff_pt_montgomery_init()
46 in->crv = curve; in aff_pt_montgomery_init()
55 * function on given curve with explicit coordinates.
60 ec_montgomery_crv_src_t curve, in aff_pt_montgomery_init_from_coords() argument
65 ret = aff_pt_montgomery_init(in, curve); EG(ret, err); in aff_pt_montgomery_init_from_coords()
76 * Note that the curve context pointed to by the point element (passed
94 * 'on_curve' set to 1 if the point of coordinates (u,v) is on the curve, i.e. if it
95 * verifies curve equation B*v^2 = u^3 + A*u^2 + u. It is set to 0 otherwise.
100 int is_on_montgomery_curve(fp_src_t u, fp_src_t v, ec_montgomery_crv_src_t curve, int *on_curve) in is_on_montgomery_curve() argument
107 ret = ec_montgomery_crv_check_initialized(curve); EG(ret, err); in is_on_montgomery_curve()
113 MUST_HAVE((u->ctx == curve->A.ctx), ret, err); in is_on_montgomery_curve()
117 ret = fp_mul(&Bv2, &(curve->B), &Bv2); EG(ret, err); in is_on_montgomery_curve()
122 ret = fp_mul(&Au2, &(curve->A), &Au2); EG(ret, err); in is_on_montgomery_curve()
143 /* Checks if affine coordinates point is on a Montgomery curve. 'on_curve' is set to 1 if yes,
179 * Compares two given affine points on a Montgomery curve, it returns 0 in input 'cmp' if
230 /* Set the curve */ in aff_pt_montgomery_import_from_buf()
236 /* Check that the point is indeed on the provided curve, uninitialize it in aff_pt_montgomery_import_from_buf()
267 /* The point to be exported must be on the curve */ in aff_pt_montgomery_export_to_buf()
343 /* Initialize our short Weiertstrass curve */ in curve_montgomery_to_shortw()
356 * Checks that a short Weiertstrass curve and Montgomery curve are compatible.
454 /* Check that our input point is on its curve */ in aff_pt_montgomery_to_shortw()
478 /* Final check that the point is on the curve */ in aff_pt_montgomery_to_shortw()
505 /* Check that our input point is on its curve */ in aff_pt_shortw_to_montgomery()
528 /* Final check that the point is on the curve */ in aff_pt_shortw_to_montgomery()
541 * curve.