Lines Matching refs:point

222 int ossl_ec_GF2m_simple_point_init(EC_POINT *point)  in ossl_ec_GF2m_simple_point_init()  argument
224 point->X = BN_new(); in ossl_ec_GF2m_simple_point_init()
225 point->Y = BN_new(); in ossl_ec_GF2m_simple_point_init()
226 point->Z = BN_new(); in ossl_ec_GF2m_simple_point_init()
228 if (point->X == NULL || point->Y == NULL || point->Z == NULL) { in ossl_ec_GF2m_simple_point_init()
229 BN_free(point->X); in ossl_ec_GF2m_simple_point_init()
230 BN_free(point->Y); in ossl_ec_GF2m_simple_point_init()
231 BN_free(point->Z); in ossl_ec_GF2m_simple_point_init()
238 void ossl_ec_GF2m_simple_point_finish(EC_POINT *point) in ossl_ec_GF2m_simple_point_finish() argument
240 BN_free(point->X); in ossl_ec_GF2m_simple_point_finish()
241 BN_free(point->Y); in ossl_ec_GF2m_simple_point_finish()
242 BN_free(point->Z); in ossl_ec_GF2m_simple_point_finish()
246 void ossl_ec_GF2m_simple_point_clear_finish(EC_POINT *point) in ossl_ec_GF2m_simple_point_clear_finish() argument
248 BN_clear_free(point->X); in ossl_ec_GF2m_simple_point_clear_finish()
249 BN_clear_free(point->Y); in ossl_ec_GF2m_simple_point_clear_finish()
250 BN_clear_free(point->Z); in ossl_ec_GF2m_simple_point_clear_finish()
251 point->Z_is_one = 0; in ossl_ec_GF2m_simple_point_clear_finish()
277 EC_POINT *point) in ossl_ec_GF2m_simple_point_set_to_infinity() argument
279 point->Z_is_one = 0; in ossl_ec_GF2m_simple_point_set_to_infinity()
280 BN_zero(point->Z); in ossl_ec_GF2m_simple_point_set_to_infinity()
289 EC_POINT *point, in ossl_ec_GF2m_simple_point_set_affine_coordinates() argument
300 if (!BN_copy(point->X, x)) in ossl_ec_GF2m_simple_point_set_affine_coordinates()
302 BN_set_negative(point->X, 0); in ossl_ec_GF2m_simple_point_set_affine_coordinates()
303 if (!BN_copy(point->Y, y)) in ossl_ec_GF2m_simple_point_set_affine_coordinates()
305 BN_set_negative(point->Y, 0); in ossl_ec_GF2m_simple_point_set_affine_coordinates()
306 if (!BN_copy(point->Z, BN_value_one())) in ossl_ec_GF2m_simple_point_set_affine_coordinates()
308 BN_set_negative(point->Z, 0); in ossl_ec_GF2m_simple_point_set_affine_coordinates()
309 point->Z_is_one = 1; in ossl_ec_GF2m_simple_point_set_affine_coordinates()
321 const EC_POINT *point, in ossl_ec_GF2m_simple_point_get_affine_coordinates() argument
327 if (EC_POINT_is_at_infinity(group, point)) { in ossl_ec_GF2m_simple_point_get_affine_coordinates()
332 if (BN_cmp(point->Z, BN_value_one())) { in ossl_ec_GF2m_simple_point_get_affine_coordinates()
337 if (!BN_copy(x, point->X)) in ossl_ec_GF2m_simple_point_get_affine_coordinates()
342 if (!BN_copy(y, point->Y)) in ossl_ec_GF2m_simple_point_get_affine_coordinates()
483 int ossl_ec_GF2m_simple_invert(const EC_GROUP *group, EC_POINT *point, in ossl_ec_GF2m_simple_invert() argument
486 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(point->Y)) in ossl_ec_GF2m_simple_invert()
491 || !group->meth->make_affine(group, point, ctx)) in ossl_ec_GF2m_simple_invert()
493 return BN_GF2m_add(point->Y, point->X, point->Y); in ossl_ec_GF2m_simple_invert()
498 const EC_POINT *point) in ossl_ec_GF2m_simple_is_at_infinity() argument
500 return BN_is_zero(point->Z); in ossl_ec_GF2m_simple_is_at_infinity()
508 int ossl_ec_GF2m_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point, in ossl_ec_GF2m_simple_is_on_curve() argument
520 if (EC_POINT_is_at_infinity(group, point)) in ossl_ec_GF2m_simple_is_on_curve()
527 if (!point->Z_is_one) in ossl_ec_GF2m_simple_is_on_curve()
550 if (!BN_GF2m_add(lh, point->X, group->a)) in ossl_ec_GF2m_simple_is_on_curve()
552 if (!field_mul(group, lh, lh, point->X, ctx)) in ossl_ec_GF2m_simple_is_on_curve()
554 if (!BN_GF2m_add(lh, lh, point->Y)) in ossl_ec_GF2m_simple_is_on_curve()
556 if (!field_mul(group, lh, lh, point->X, ctx)) in ossl_ec_GF2m_simple_is_on_curve()
560 if (!field_sqr(group, y2, point->Y, ctx)) in ossl_ec_GF2m_simple_is_on_curve()
632 int ossl_ec_GF2m_simple_make_affine(const EC_GROUP *group, EC_POINT *point, in ossl_ec_GF2m_simple_make_affine() argument
641 if (point->Z_is_one || EC_POINT_is_at_infinity(group, point)) in ossl_ec_GF2m_simple_make_affine()
658 if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx)) in ossl_ec_GF2m_simple_make_affine()
660 if (!BN_copy(point->X, x)) in ossl_ec_GF2m_simple_make_affine()
662 if (!BN_copy(point->Y, y)) in ossl_ec_GF2m_simple_make_affine()
664 if (!BN_one(point->Z)) in ossl_ec_GF2m_simple_make_affine()
666 point->Z_is_one = 1; in ossl_ec_GF2m_simple_make_affine()