Lines Matching defs:point

322 int ossl_ec_GFp_simple_point_init(EC_POINT *point)
324 point->X = BN_new();
325 point->Y = BN_new();
326 point->Z = BN_new();
327 point->Z_is_one = 0;
329 if (point->X == NULL || point->Y == NULL || point->Z == NULL) {
330 BN_free(point->X);
331 BN_free(point->Y);
332 BN_free(point->Z);
338 void ossl_ec_GFp_simple_point_finish(EC_POINT *point)
340 BN_free(point->X);
341 BN_free(point->Y);
342 BN_free(point->Z);
345 void ossl_ec_GFp_simple_point_clear_finish(EC_POINT *point)
347 BN_clear_free(point->X);
348 BN_clear_free(point->Y);
349 BN_clear_free(point->Z);
350 point->Z_is_one = 0;
368 EC_POINT *point)
370 point->Z_is_one = 0;
371 BN_zero(point->Z);
376 EC_POINT *point,
392 if (!BN_nnmod(point->X, x, group->field, ctx))
395 if (!group->meth->field_encode(group, point->X, point->X, ctx))
401 if (!BN_nnmod(point->Y, y, group->field, ctx))
404 if (!group->meth->field_encode(group, point->Y, point->Y, ctx))
412 if (!BN_nnmod(point->Z, z, group->field, ctx))
414 Z_is_one = BN_is_one(point->Z);
417 if (!group->meth->field_set_to_one(group, point->Z, ctx))
421 meth->field_encode(group, point->Z, point->Z, ctx))
425 point->Z_is_one = Z_is_one;
436 const EC_POINT *point,
451 if (!group->meth->field_decode(group, x, point->X, ctx))
455 if (!group->meth->field_decode(group, y, point->Y, ctx))
459 if (!group->meth->field_decode(group, z, point->Z, ctx))
464 if (!BN_copy(x, point->X))
468 if (!BN_copy(y, point->Y))
472 if (!BN_copy(z, point->Z))
485 EC_POINT *point,
497 return EC_POINT_set_Jprojective_coordinates_GFp(group, point, x, y,
502 const EC_POINT *point,
511 if (EC_POINT_is_at_infinity(group, point)) {
533 if (!group->meth->field_decode(group, Z, point->Z, ctx))
537 Z_ = point->Z;
543 if (!group->meth->field_decode(group, x, point->X, ctx))
547 if (!group->meth->field_decode(group, y, point->Y, ctx))
552 if (!BN_copy(x, point->X))
556 if (!BN_copy(y, point->Y))
580 if (!group->meth->field_mul(group, x, point->X, Z_2, ctx))
600 if (!group->meth->field_mul(group, y, point->Y, Z_3, ctx))
712 /* a is the same point as b */
940 int ossl_ec_GFp_simple_invert(const EC_GROUP *group, EC_POINT *point,
943 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(point->Y))
944 /* point is its own inverse */
947 return BN_usub(point->Y, group->field, point->Y);
951 const EC_POINT *point)
953 return BN_is_zero(point->Z);
956 int ossl_ec_GFp_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
967 if (EC_POINT_is_at_infinity(group, point))
991 * The point to consider is given in Jacobian projective coordinates
999 if (!field_sqr(group, rh, point->X, ctx))
1002 if (!point->Z_is_one) {
1003 if (!field_sqr(group, tmp, point->Z, ctx))
1018 if (!field_mul(group, rh, rh, point->X, ctx))
1025 if (!field_mul(group, rh, rh, point->X, ctx))
1035 /* point->Z_is_one */
1040 if (!field_mul(group, rh, rh, point->X, ctx))
1048 if (!field_sqr(group, tmp, point->Y, ctx))
1167 int ossl_ec_GFp_simple_make_affine(const EC_GROUP *group, EC_POINT *point,
1174 if (point->Z_is_one || EC_POINT_is_at_infinity(group, point))
1189 if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx))
1191 if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx))
1193 if (!point->Z_is_one) {
1424 * Apply randomization of EC point projective coordinates: