Lines Matching refs:point
678 int mpi_ec_get_affine(MPI x, MPI y, MPI_POINT point, struct mpi_ec_ctx *ctx) in mpi_ec_get_affine() argument
680 if (!mpi_cmp_ui(point->z, 0)) in mpi_ec_get_affine()
690 ec_invm(z1, point->z, ctx); /* z1 = z^(-1) mod p */ in mpi_ec_get_affine()
694 ec_mulm(x, point->x, z2, ctx); in mpi_ec_get_affine()
699 ec_mulm(y, point->y, z3, ctx); in mpi_ec_get_affine()
711 mpi_set(x, point->x); in mpi_ec_get_affine()
726 ec_invm(z, point->z, ctx); in mpi_ec_get_affine()
734 ctx->mulm(x, point->x, z, ctx); in mpi_ec_get_affine()
739 ctx->mulm(y, point->y, z, ctx); in mpi_ec_get_affine()
754 MPI_POINT point, struct mpi_ec_ctx *ctx) in dup_point_weierstrass() argument
766 if (!mpi_cmp_ui(point->y, 0) || !mpi_cmp_ui(point->z, 0)) { in dup_point_weierstrass()
777 ec_pow2(t1, point->z, ctx); in dup_point_weierstrass()
778 ec_subm(l1, point->x, t1, ctx); in dup_point_weierstrass()
780 ec_addm(t2, point->x, t1, ctx); in dup_point_weierstrass()
786 ec_pow2(l1, point->x, ctx); in dup_point_weierstrass()
788 ec_powm(t1, point->z, mpi_const(MPI_C_FOUR), ctx); in dup_point_weierstrass()
793 ec_mulm(z3, point->y, point->z, ctx); in dup_point_weierstrass()
798 ec_pow2(t2, point->y, ctx); in dup_point_weierstrass()
799 ec_mulm(l2, t2, point->x, ctx); in dup_point_weierstrass()
832 MPI_POINT point, struct mpi_ec_ctx *ctx) in dup_point_montgomery() argument
835 (void)point; in dup_point_montgomery()
843 MPI_POINT point, struct mpi_ec_ctx *ctx) in dup_point_edwards() argument
845 #define X1 (point->x) in dup_point_edwards()
846 #define Y1 (point->y) in dup_point_edwards()
847 #define Z1 (point->z) in dup_point_edwards()
915 mpi_ec_dup_point(MPI_POINT result, MPI_POINT point, struct mpi_ec_ctx *ctx) in mpi_ec_dup_point() argument
919 dup_point_weierstrass(result, point, ctx); in mpi_ec_dup_point()
922 dup_point_montgomery(result, point, ctx); in mpi_ec_dup_point()
925 dup_point_edwards(result, point, ctx); in mpi_ec_dup_point()
1211 MPI scalar, MPI_POINT point, in mpi_ec_mul_point() argument
1237 point_resize(point, ctx); in mpi_ec_mul_point()
1240 point_resize(point, ctx); in mpi_ec_mul_point()
1245 mpi_ec_add_points(result, result, point, ctx); in mpi_ec_mul_point()
1269 p2.x = mpi_copy(point->x); in mpi_ec_mul_point()
1277 mpi_resize(point->x, ctx->p->nlimbs); in mpi_ec_mul_point()
1278 point->x->nlimbs = ctx->p->nlimbs; in mpi_ec_mul_point()
1290 montgomery_ladder(prd, sum, q1, q2, point->x, ctx); in mpi_ec_mul_point()
1326 yy = mpi_copy(point->y); in mpi_ec_mul_point()
1333 if (!mpi_cmp_ui(point->z, 1)) { in mpi_ec_mul_point()
1334 mpi_set(x1, point->x); in mpi_ec_mul_point()
1341 ec_mulm(z2, point->z, point->z, ctx); in mpi_ec_mul_point()
1342 ec_mulm(z3, point->z, z2, ctx); in mpi_ec_mul_point()
1344 ec_mulm(x1, point->x, z2, ctx); in mpi_ec_mul_point()
1364 mpi_set(result->x, point->x); in mpi_ec_mul_point()
1366 mpi_set(result->z, point->z); in mpi_ec_mul_point()
1401 int mpi_ec_curve_point(MPI_POINT point, struct mpi_ec_ctx *ctx) in mpi_ec_curve_point() argument
1413 if (mpi_cmpabs(point->x, ctx->p) >= 0) in mpi_ec_curve_point()
1415 if (mpi_cmpabs(point->y, ctx->p) >= 0) in mpi_ec_curve_point()
1417 if (mpi_cmpabs(point->z, ctx->p) >= 0) in mpi_ec_curve_point()
1425 if (mpi_ec_get_affine(x, y, point, ctx)) in mpi_ec_curve_point()
1449 if (mpi_ec_get_affine(x, NULL, point, ctx)) in mpi_ec_curve_point()
1479 if (mpi_ec_get_affine(x, y, point, ctx)) in mpi_ec_curve_point()