Home | History | Annotate | Download | only in ec

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;
220 BIGNUM *x1, *x2, *z1, *z2;
243 z1 = BN_CTX_get(ctx);
244 if (z1 == NULL) goto err;
250 if (!BN_one(z1)) goto err; /* z1 = 1 */
275 if (!gf2m_Madd(group, &point->X, x1, z1, x2, z2, ctx)) goto err;
280 if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err;
281 if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err;
289 i = gf2m_Mxy(group, &point->X, &point->Y, x1, z1, x2, z2, ctx);