Lines Matching refs:x
65 p->x = mpi_new(0); in mpi_point_init()
74 mpi_free(p->x); p->x = NULL; in mpi_point_free_parts()
83 mpi_set(d->x, s->x); in point_set()
92 mpi_resize(p->x, nlimbs); in point_resize()
93 p->x->nlimbs = nlimbs; in point_resize()
106 mpi_swap_cond(d->x, s->x, swap); in point_swap_cond()
176 static void ec_invm(MPI x, MPI a, struct mpi_ec_ctx *ctx) in ec_invm() argument
178 if (!mpi_invm(x, a, ctx->p)) in ec_invm()
187 mpi_limb_t x; in mpih_set_cond() local
190 x = mask & (wp[i] ^ up[i]); in mpih_set_cond()
191 wp[i] = wp[i] ^ x; in mpih_set_cond()
681 int mpi_ec_get_affine(MPI x, MPI y, MPI_POINT point, struct mpi_ec_ctx *ctx) in mpi_ec_get_affine() argument
696 if (x) in mpi_ec_get_affine()
697 ec_mulm(x, point->x, z2, ctx); in mpi_ec_get_affine()
713 if (x) in mpi_ec_get_affine()
714 mpi_set(x, point->x); in mpi_ec_get_affine()
734 if (x) { in mpi_ec_get_affine()
735 mpi_resize(x, ctx->p->nlimbs); in mpi_ec_get_affine()
736 x->nlimbs = ctx->p->nlimbs; in mpi_ec_get_affine()
737 ctx->mulm(x, point->x, z, ctx); in mpi_ec_get_affine()
759 #define x3 (result->x) in dup_point_weierstrass()
781 ec_subm(l1, point->x, t1, ctx); in dup_point_weierstrass()
783 ec_addm(t2, point->x, t1, ctx); in dup_point_weierstrass()
789 ec_pow2(l1, point->x, ctx); in dup_point_weierstrass()
802 ec_mulm(l2, t2, point->x, ctx); in dup_point_weierstrass()
848 #define X1 (point->x) in dup_point_edwards()
851 #define X3 (result->x) in dup_point_edwards()
938 #define x1 (p1->x) in add_points_weierstrass()
941 #define x2 (p2->x) in add_points_weierstrass()
944 #define x3 (result->x) in add_points_weierstrass()
964 mpi_set(x3, p2->x); in add_points_weierstrass()
969 mpi_set(x3, p1->x); in add_points_weierstrass()
1076 #define X1 (p1->x) in add_points_edwards()
1079 #define X2 (p2->x) in add_points_edwards()
1082 #define X3 (result->x) in add_points_edwards()
1170 ctx->addm(sum->x, p2->x, p2->z, ctx); in montgomery_ladder()
1171 ctx->subm(p2->z, p2->x, p2->z, ctx); in montgomery_ladder()
1172 ctx->addm(prd->x, p1->x, p1->z, ctx); in montgomery_ladder()
1173 ctx->subm(p1->z, p1->x, p1->z, ctx); in montgomery_ladder()
1174 ctx->mulm(p2->x, p1->z, sum->x, ctx); in montgomery_ladder()
1175 ctx->mulm(p2->z, prd->x, p2->z, ctx); in montgomery_ladder()
1176 ctx->pow2(p1->x, prd->x, ctx); in montgomery_ladder()
1178 ctx->addm(sum->x, p2->x, p2->z, ctx); in montgomery_ladder()
1179 ctx->subm(p2->z, p2->x, p2->z, ctx); in montgomery_ladder()
1180 ctx->mulm(prd->x, p1->x, p1->z, ctx); in montgomery_ladder()
1181 ctx->subm(p1->z, p1->x, p1->z, ctx); in montgomery_ladder()
1182 ctx->pow2(sum->x, sum->x, ctx); in montgomery_ladder()
1186 ctx->addm(prd->z, p1->x, prd->z, ctx); in montgomery_ladder()
1237 mpi_set_ui(result->x, 0); in mpi_ec_mul_point()
1269 mpi_set_ui(p1.x, 1); in mpi_ec_mul_point()
1270 mpi_free(p2.x); in mpi_ec_mul_point()
1271 p2.x = mpi_copy(point->x); in mpi_ec_mul_point()
1279 mpi_resize(point->x, ctx->p->nlimbs); in mpi_ec_mul_point()
1280 point->x->nlimbs = ctx->p->nlimbs; in mpi_ec_mul_point()
1292 montgomery_ladder(prd, sum, q1, q2, point->x, ctx); in mpi_ec_mul_point()
1305 mpi_set_ui(result->x, 1); in mpi_ec_mul_point()
1310 ec_mulm(result->x, p1.x, z1, ctx); in mpi_ec_mul_point()
1334 mpi_set(x1, point->x); in mpi_ec_mul_point()
1344 ec_mulm(x1, point->x, z2, ctx); in mpi_ec_mul_point()
1360 mpi_clear(result->x); in mpi_ec_mul_point()
1364 mpi_set(result->x, point->x); in mpi_ec_mul_point()
1370 p1.x = x1; x1 = NULL; in mpi_ec_mul_point()
1404 MPI x, y, w; in mpi_ec_curve_point() local
1406 x = mpi_new(0); in mpi_ec_curve_point()
1413 if (mpi_cmpabs(point->x, ctx->p) >= 0) in mpi_ec_curve_point()
1425 if (mpi_ec_get_affine(x, y, point, ctx)) in mpi_ec_curve_point()
1433 ec_pow3(xxx, x, ctx); in mpi_ec_curve_point()
1434 ec_mulm(w, ctx->a, x, ctx); in mpi_ec_curve_point()
1449 if (mpi_ec_get_affine(x, NULL, point, ctx)) in mpi_ec_curve_point()
1459 ec_mulm(w, w, x, ctx); in mpi_ec_curve_point()
1460 ec_pow2(xx, x, ctx); in mpi_ec_curve_point()
1463 ec_mulm(w, w, x, ctx); in mpi_ec_curve_point()
1479 if (mpi_ec_get_affine(x, y, point, ctx)) in mpi_ec_curve_point()
1486 ctx->pow2(x, x, ctx); in mpi_ec_curve_point()
1489 ctx->subm(w, ctx->p, x, ctx); in mpi_ec_curve_point()
1491 ctx->mulm(w, ctx->a, x, ctx); in mpi_ec_curve_point()
1493 ctx->mulm(x, x, y, ctx); in mpi_ec_curve_point()
1494 ctx->mulm(x, x, ctx->b, ctx); in mpi_ec_curve_point()
1495 ctx->subm(w, w, x, ctx); in mpi_ec_curve_point()
1504 mpi_free(x); in mpi_ec_curve_point()