Lines Matching refs:point

361 int ec_GFp_simple_point_init(EC_POINT *point)
363 BN_init(&point->X);
364 BN_init(&point->Y);
365 BN_init(&point->Z);
366 point->Z_is_one = 0;
371 void ec_GFp_simple_point_finish(EC_POINT *point)
373 BN_free(&point->X);
374 BN_free(&point->Y);
375 BN_free(&point->Z);
378 void ec_GFp_simple_point_clear_finish(EC_POINT *point)
380 BN_clear_free(&point->X);
381 BN_clear_free(&point->Y);
382 BN_clear_free(&point->Z);
383 point->Z_is_one = 0;
400 EC_POINT *point)
402 point->Z_is_one = 0;
403 BN_zero(&point->Z);
408 EC_POINT *point,
424 if (!BN_nnmod(&point->X, x, &group->field, ctx))
427 if (!group->meth->field_encode(group, &point->X, &point->X, ctx))
433 if (!BN_nnmod(&point->Y, y, &group->field, ctx))
436 if (!group->meth->field_encode(group, &point->Y, &point->Y, ctx))
444 if (!BN_nnmod(&point->Z, z, &group->field, ctx))
446 Z_is_one = BN_is_one(&point->Z);
449 if (!group->meth->field_set_to_one(group, &point->Z, ctx))
453 meth->field_encode(group, &point->Z, &point->Z, ctx))
457 point->Z_is_one = Z_is_one;
469 const EC_POINT *point,
484 if (!group->meth->field_decode(group, x, &point->X, ctx))
488 if (!group->meth->field_decode(group, y, &point->Y, ctx))
492 if (!group->meth->field_decode(group, z, &point->Z, ctx))
497 if (!BN_copy(x, &point->X))
501 if (!BN_copy(y, &point->Y))
505 if (!BN_copy(z, &point->Z))
519 EC_POINT *point,
532 return EC_POINT_set_Jprojective_coordinates_GFp(group, point, x, y,
537 const EC_POINT *point,
546 if (EC_POINT_is_at_infinity(group, point)) {
569 if (!group->meth->field_decode(group, Z, &point->Z, ctx))
573 Z_ = &point->Z;
579 if (!group->meth->field_decode(group, x, &point->X, ctx))
583 if (!group->meth->field_decode(group, y, &point->Y, ctx))
588 if (!BN_copy(x, &point->X))
592 if (!BN_copy(y, &point->Y))
617 if (!group->meth->field_mul(group, x, &point->X, Z_2, ctx))
637 if (!group->meth->field_mul(group, y, &point->Y, Z_3, ctx))
750 /* a is the same point as b */
981 int ec_GFp_simple_invert(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
983 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(&point->Y))
984 /* point is its own inverse */
987 return BN_usub(&point->Y, &group->field, &point->Y);
990 int ec_GFp_simple_is_at_infinity(const EC_GROUP *group, const EC_POINT *point)
992 return BN_is_zero(&point->Z);
995 int ec_GFp_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
1006 if (EC_POINT_is_at_infinity(group, point))
1030 * The point to consider is given in Jacobian projective coordinates
1038 if (!field_sqr(group, rh, &point->X, ctx))
1041 if (!point->Z_is_one) {
1042 if (!field_sqr(group, tmp, &point->Z, ctx))
1057 if (!field_mul(group, rh, rh, &point->X, ctx))
1064 if (!field_mul(group, rh, rh, &point->X, ctx))
1074 /* point->Z_is_one */
1079 if (!field_mul(group, rh, rh, &point->X, ctx))
1087 if (!field_sqr(group, tmp, &point->Y, ctx))
1209 int ec_GFp_simple_make_affine(const EC_GROUP *group, EC_POINT *point,
1216 if (point->Z_is_one || EC_POINT_is_at_infinity(group, point))
1231 if (!EC_POINT_get_affine_coordinates_GFp(group, point, x, y, ctx))
1233 if (!EC_POINT_set_affine_coordinates_GFp(group, point, x, y, ctx))
1235 if (!point->Z_is_one) {