Lines Matching refs:Z

326     point->Z = BN_new();  in ossl_ec_GFp_simple_point_init()
329 if (point->X == NULL || point->Y == NULL || point->Z == NULL) { in ossl_ec_GFp_simple_point_init()
332 BN_free(point->Z); in ossl_ec_GFp_simple_point_init()
342 BN_free(point->Z); in ossl_ec_GFp_simple_point_finish()
349 BN_clear_free(point->Z); in ossl_ec_GFp_simple_point_clear_finish()
359 if (!BN_copy(dest->Z, src->Z)) in ossl_ec_GFp_simple_point_copy()
371 BN_zero(point->Z); in ossl_ec_GFp_simple_point_set_to_infinity()
412 if (!BN_nnmod(point->Z, z, group->field, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
414 Z_is_one = BN_is_one(point->Z); in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
417 if (!group->meth->field_set_to_one(group, point->Z, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
421 meth->field_encode(group, point->Z, point->Z, ctx)) in ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp()
459 if (!group->meth->field_decode(group, z, point->Z, ctx)) in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp()
472 if (!BN_copy(z, point->Z)) in ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp()
507 BIGNUM *Z, *Z_1, *Z_2, *Z_3; in ossl_ec_GFp_simple_point_get_affine_coordinates() local
523 Z = BN_CTX_get(ctx); in ossl_ec_GFp_simple_point_get_affine_coordinates()
533 if (!group->meth->field_decode(group, Z, point->Z, ctx)) in ossl_ec_GFp_simple_point_get_affine_coordinates()
535 Z_ = Z; in ossl_ec_GFp_simple_point_get_affine_coordinates()
537 Z_ = point->Z; in ossl_ec_GFp_simple_point_get_affine_coordinates()
667 if (!field_sqr(group, n0, b->Z, ctx)) in ossl_ec_GFp_simple_add()
673 if (!field_mul(group, n0, n0, b->Z, ctx)) in ossl_ec_GFp_simple_add()
689 if (!field_sqr(group, n0, a->Z, ctx)) in ossl_ec_GFp_simple_add()
695 if (!field_mul(group, n0, n0, a->Z, ctx)) in ossl_ec_GFp_simple_add()
719 BN_zero(r->Z); in ossl_ec_GFp_simple_add()
736 if (!BN_copy(r->Z, n5)) in ossl_ec_GFp_simple_add()
740 if (!BN_copy(n0, b->Z)) in ossl_ec_GFp_simple_add()
743 if (!BN_copy(n0, a->Z)) in ossl_ec_GFp_simple_add()
746 if (!field_mul(group, n0, a->Z, b->Z, ctx)) in ossl_ec_GFp_simple_add()
749 if (!field_mul(group, r->Z, n0, n5, ctx)) in ossl_ec_GFp_simple_add()
810 BN_zero(r->Z); in ossl_ec_GFp_simple_dbl()
851 if (!field_sqr(group, n1, a->Z, ctx)) in ossl_ec_GFp_simple_dbl()
874 if (!field_sqr(group, n1, a->Z, ctx)) in ossl_ec_GFp_simple_dbl()
890 if (!field_mul(group, n0, a->Y, a->Z, ctx)) in ossl_ec_GFp_simple_dbl()
893 if (!BN_mod_lshift1_quick(r->Z, n0, p)) in ossl_ec_GFp_simple_dbl()
953 return BN_is_zero(point->Z); in ossl_ec_GFp_simple_is_at_infinity()
1003 if (!field_sqr(group, tmp, point->Z, ctx)) in ossl_ec_GFp_simple_is_on_curve()
1113 if (!field_sqr(group, Zb23, b->Z, ctx)) in ossl_ec_GFp_simple_cmp()
1121 if (!field_sqr(group, Za23, a->Z, ctx)) in ossl_ec_GFp_simple_cmp()
1136 if (!field_mul(group, Zb23, Zb23, b->Z, ctx)) in ossl_ec_GFp_simple_cmp()
1144 if (!field_mul(group, Za23, Za23, a->Z, ctx)) in ossl_ec_GFp_simple_cmp()
1244 if (!BN_is_zero(points[0]->Z)) { in ossl_ec_GFp_simple_points_make_affine()
1245 if (!BN_copy(prod_Z[0], points[0]->Z)) in ossl_ec_GFp_simple_points_make_affine()
1258 if (!BN_is_zero(points[i]->Z)) { in ossl_ec_GFp_simple_points_make_affine()
1260 meth->field_mul(group, prod_Z[i], prod_Z[i - 1], points[i]->Z, in ossl_ec_GFp_simple_points_make_affine()
1295 if (!BN_is_zero(points[i]->Z)) { in ossl_ec_GFp_simple_points_make_affine()
1306 if (!group->meth->field_mul(group, tmp, tmp, points[i]->Z, ctx)) in ossl_ec_GFp_simple_points_make_affine()
1309 if (!BN_copy(points[i]->Z, tmp_Z)) in ossl_ec_GFp_simple_points_make_affine()
1314 if (!BN_is_zero(points[0]->Z)) { in ossl_ec_GFp_simple_points_make_affine()
1316 if (!BN_copy(points[0]->Z, tmp)) in ossl_ec_GFp_simple_points_make_affine()
1325 if (!BN_is_zero(p->Z)) { in ossl_ec_GFp_simple_points_make_affine()
1328 if (!group->meth->field_sqr(group, tmp, p->Z, ctx)) in ossl_ec_GFp_simple_points_make_affine()
1333 if (!group->meth->field_mul(group, tmp, tmp, p->Z, ctx)) in ossl_ec_GFp_simple_points_make_affine()
1339 if (!group->meth->field_set_to_one(group, p->Z, ctx)) in ossl_ec_GFp_simple_points_make_affine()
1342 if (!BN_one(p->Z)) in ossl_ec_GFp_simple_points_make_affine()
1463 || !group->meth->field_mul(group, p->Z, p->Z, lambda, ctx) in ossl_ec_GFp_simple_blind_coordinates()
1499 t1 = s->Z; in ossl_ec_GFp_simple_ladder_pre()
1500 t2 = r->Z; in ossl_ec_GFp_simple_ladder_pre()
1517 || !BN_mod_lshift_quick(r->Z, t2, 2, group->field)) in ossl_ec_GFp_simple_ladder_pre()
1528 if (!BN_priv_rand_range_ex(s->Z, group->field, 0, ctx)) in ossl_ec_GFp_simple_ladder_pre()
1530 } while (BN_is_zero(s->Z)); in ossl_ec_GFp_simple_ladder_pre()
1535 || !group->meth->field_encode(group, s->Z, s->Z, ctx))) in ossl_ec_GFp_simple_ladder_pre()
1539 if (!group->meth->field_mul(group, r->Z, r->Z, r->Y, ctx) in ossl_ec_GFp_simple_ladder_pre()
1541 || !group->meth->field_mul(group, s->X, p->X, s->Z, ctx)) /* s := p */ in ossl_ec_GFp_simple_ladder_pre()
1581 || !group->meth->field_mul(group, t0, r->Z, s->Z, ctx) in ossl_ec_GFp_simple_ladder_step()
1582 || !group->meth->field_mul(group, t4, r->X, s->Z, ctx) in ossl_ec_GFp_simple_ladder_step()
1583 || !group->meth->field_mul(group, t3, r->Z, s->X, ctx) in ossl_ec_GFp_simple_ladder_step()
1594 || !group->meth->field_sqr(group, s->Z, t3, ctx) in ossl_ec_GFp_simple_ladder_step()
1595 || !group->meth->field_mul(group, t4, s->Z, p->X, ctx) in ossl_ec_GFp_simple_ladder_step()
1600 || !group->meth->field_sqr(group, t5, r->Z, ctx) in ossl_ec_GFp_simple_ladder_step()
1602 || !BN_mod_add_quick(t1, r->X, r->Z, group->field) in ossl_ec_GFp_simple_ladder_step()
1618 || !BN_mod_add_quick(r->Z, t4, t1, group->field)) in ossl_ec_GFp_simple_ladder_step()
1658 if (BN_is_zero(r->Z)) in ossl_ec_GFp_simple_ladder_post()
1661 if (BN_is_zero(s->Z)) { in ossl_ec_GFp_simple_ladder_post()
1680 || !group->meth->field_mul(group, t6, s->Z, t6, ctx) in ossl_ec_GFp_simple_ladder_post()
1681 || !group->meth->field_mul(group, t5, r->Z, t6, ctx) in ossl_ec_GFp_simple_ladder_post()
1683 || !group->meth->field_mul(group, t1, s->Z, t1, ctx) in ossl_ec_GFp_simple_ladder_post()
1684 || !group->meth->field_sqr(group, t3, r->Z, ctx) in ossl_ec_GFp_simple_ladder_post()
1686 || !group->meth->field_mul(group, t6, r->Z, group->a, ctx) in ossl_ec_GFp_simple_ladder_post()
1689 || !group->meth->field_mul(group, t1, s->Z, t1, ctx) in ossl_ec_GFp_simple_ladder_post()
1690 || !group->meth->field_mul(group, t0, p->X, r->Z, ctx) in ossl_ec_GFp_simple_ladder_post()
1698 || !group->meth->field_mul(group, t1, s->Z, t4, ctx) in ossl_ec_GFp_simple_ladder_post()
1710 if (!group->meth->field_set_to_one(group, r->Z, ctx)) in ossl_ec_GFp_simple_ladder_post()
1713 if (!BN_one(r->Z)) in ossl_ec_GFp_simple_ladder_post()