Lines Matching refs:point

322 int ossl_ec_GFp_simple_point_init(EC_POINT *point)  in ossl_ec_GFp_simple_point_init()  argument
324 point->X = BN_new(); in ossl_ec_GFp_simple_point_init()
325 point->Y = BN_new(); in ossl_ec_GFp_simple_point_init()
326 point->Z = BN_new(); in ossl_ec_GFp_simple_point_init()
327 point->Z_is_one = 0; in ossl_ec_GFp_simple_point_init()
329 if (point->X == NULL || point->Y == NULL || point->Z == NULL) { in ossl_ec_GFp_simple_point_init()
330 BN_free(point->X); in ossl_ec_GFp_simple_point_init()
331 BN_free(point->Y); in ossl_ec_GFp_simple_point_init()
332 BN_free(point->Z); in ossl_ec_GFp_simple_point_init()
338 void ossl_ec_GFp_simple_point_finish(EC_POINT *point) in ossl_ec_GFp_simple_point_finish() argument
340 BN_free(point->X); in ossl_ec_GFp_simple_point_finish()
341 BN_free(point->Y); in ossl_ec_GFp_simple_point_finish()
342 BN_free(point->Z); in ossl_ec_GFp_simple_point_finish()
345 void ossl_ec_GFp_simple_point_clear_finish(EC_POINT *point) in ossl_ec_GFp_simple_point_clear_finish() argument
347 BN_clear_free(point->X); in ossl_ec_GFp_simple_point_clear_finish()
348 BN_clear_free(point->Y); in ossl_ec_GFp_simple_point_clear_finish()
349 BN_clear_free(point->Z); in ossl_ec_GFp_simple_point_clear_finish()
350 point->Z_is_one = 0; in ossl_ec_GFp_simple_point_clear_finish()
368 EC_POINT *point) in ossl_ec_GFp_simple_point_set_to_infinity() argument
370 point->Z_is_one = 0; in ossl_ec_GFp_simple_point_set_to_infinity()
371 BN_zero(point->Z); in ossl_ec_GFp_simple_point_set_to_infinity()
376 EC_POINT *point, in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp() argument
392 if (!BN_nnmod(point->X, x, group->field, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
395 if (!group->meth->field_encode(group, point->X, point->X, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
401 if (!BN_nnmod(point->Y, y, group->field, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
404 if (!group->meth->field_encode(group, point->Y, point->Y, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
412 if (!BN_nnmod(point->Z, z, group->field, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
414 Z_is_one = BN_is_one(point->Z); in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
417 if (!group->meth->field_set_to_one(group, point->Z, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
421 meth->field_encode(group, point->Z, point->Z, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
425 point->Z_is_one = Z_is_one; in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
436 const EC_POINT *point, in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp() argument
451 if (!group->meth->field_decode(group, x, point->X, ctx)) in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp()
455 if (!group->meth->field_decode(group, y, point->Y, ctx)) in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp()
459 if (!group->meth->field_decode(group, z, point->Z, ctx)) in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp()
464 if (!BN_copy(x, point->X)) in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp()
468 if (!BN_copy(y, point->Y)) in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp()
472 if (!BN_copy(z, point->Z)) in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp()
485 EC_POINT *point, in ossl_ec_GFp_simple_point_set_affine_coordinates() argument
497 return EC_POINT_set_Jprojective_coordinates_GFp(group, point, x, y, in ossl_ec_GFp_simple_point_set_affine_coordinates()
502 const EC_POINT *point, in ossl_ec_GFp_simple_point_get_affine_coordinates() argument
511 if (EC_POINT_is_at_infinity(group, point)) { in ossl_ec_GFp_simple_point_get_affine_coordinates()
533 if (!group->meth->field_decode(group, Z, point->Z, ctx)) in ossl_ec_GFp_simple_point_get_affine_coordinates()
537 Z_ = point->Z; in ossl_ec_GFp_simple_point_get_affine_coordinates()
543 if (!group->meth->field_decode(group, x, point->X, ctx)) in ossl_ec_GFp_simple_point_get_affine_coordinates()
547 if (!group->meth->field_decode(group, y, point->Y, ctx)) in ossl_ec_GFp_simple_point_get_affine_coordinates()
552 if (!BN_copy(x, point->X)) in ossl_ec_GFp_simple_point_get_affine_coordinates()
556 if (!BN_copy(y, point->Y)) in ossl_ec_GFp_simple_point_get_affine_coordinates()
580 if (!group->meth->field_mul(group, x, point->X, Z_2, ctx)) in ossl_ec_GFp_simple_point_get_affine_coordinates()
600 if (!group->meth->field_mul(group, y, point->Y, Z_3, ctx)) in ossl_ec_GFp_simple_point_get_affine_coordinates()
940 int ossl_ec_GFp_simple_invert(const EC_GROUP *group, EC_POINT *point, in ossl_ec_GFp_simple_invert() argument
943 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(point->Y)) in ossl_ec_GFp_simple_invert()
947 return BN_usub(point->Y, group->field, point->Y); in ossl_ec_GFp_simple_invert()
951 const EC_POINT *point) in ossl_ec_GFp_simple_is_at_infinity() argument
953 return BN_is_zero(point->Z); in ossl_ec_GFp_simple_is_at_infinity()
956 int ossl_ec_GFp_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point, in ossl_ec_GFp_simple_is_on_curve() argument
967 if (EC_POINT_is_at_infinity(group, point)) in ossl_ec_GFp_simple_is_on_curve()
999 if (!field_sqr(group, rh, point->X, ctx)) in ossl_ec_GFp_simple_is_on_curve()
1002 if (!point->Z_is_one) { in ossl_ec_GFp_simple_is_on_curve()
1003 if (!field_sqr(group, tmp, point->Z, ctx)) in ossl_ec_GFp_simple_is_on_curve()
1018 if (!field_mul(group, rh, rh, point->X, ctx)) in ossl_ec_GFp_simple_is_on_curve()
1025 if (!field_mul(group, rh, rh, point->X, ctx)) in ossl_ec_GFp_simple_is_on_curve()
1040 if (!field_mul(group, rh, rh, point->X, ctx)) in ossl_ec_GFp_simple_is_on_curve()
1048 if (!field_sqr(group, tmp, point->Y, ctx)) in ossl_ec_GFp_simple_is_on_curve()
1167 int ossl_ec_GFp_simple_make_affine(const EC_GROUP *group, EC_POINT *point, in ossl_ec_GFp_simple_make_affine() argument
1174 if (point->Z_is_one || EC_POINT_is_at_infinity(group, point)) in ossl_ec_GFp_simple_make_affine()
1189 if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx)) in ossl_ec_GFp_simple_make_affine()
1191 if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx)) in ossl_ec_GFp_simple_make_affine()
1193 if (!point->Z_is_one) { in ossl_ec_GFp_simple_make_affine()