Lines Matching refs:z1
109 /* Compute the x-coordinate x1/z1 for the point (x1/z1)+(x2/x2) in Montgomery
115 static int gf2m_Madd(const EC_GROUP *group, const BIGNUM *x, BIGNUM *x1, BIGNUM *z1,
129 if (!group->meth->field_mul(group, z1, z1, x2, ctx)) goto err;
130 if (!group->meth->field_mul(group, t2, x1, z1, ctx)) goto err;
131 if (!BN_GF2m_add(z1, z1, x1)) goto err;
132 if (!group->meth->field_sqr(group, z1, z1, ctx)) goto err;
133 if (!group->meth->field_mul(group, x1, z1, t1, ctx)) goto err;
143 /* Compute the x, y affine coordinates from the point (x1, z1) (x2, z2)
153 BIGNUM *z1, BIGNUM *x2, BIGNUM *z2, BN_CTX *ctx)
158 if (BN_is_zero(z1))
181 if (!group->meth->field_mul(group, t3, z1, z2, ctx)) goto err;
183 if (!group->meth->field_mul(group, z1, z1, x, ctx)) goto err;
184 if (!BN_GF2m_add(z1, z1, x1)) goto err;
189 if (!group->meth->field_mul(group, z2, z2, z1, ctx)) goto err;
224 BIGNUM *x1, *x2, *z1, *z2;
247 z1 = BN_CTX_get(ctx);
248 if (z1 == NULL) goto err;
254 bn_wexpand(z1, group->field.top);
259 if (!BN_one(z1)) goto err; /* z1 = 1 */
283 BN_consttime_swap(word & mask, z1, z2, group->field.top);
284 if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err;
285 if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err;
287 BN_consttime_swap(word & mask, z1, z2, group->field.top);
294 i = gf2m_Mxy(group, &point->X, &point->Y, x1, z1, x2, z2, ctx);