Lines Matching refs:err

70 #include <openssl/err.h>
92 if (t1 == NULL) goto err;
94 if (!group->meth->field_sqr(group, x, x, ctx)) goto err;
95 if (!group->meth->field_sqr(group, t1, z, ctx)) goto err;
96 if (!group->meth->field_mul(group, z, x, t1, ctx)) goto err;
97 if (!group->meth->field_sqr(group, x, x, ctx)) goto err;
98 if (!group->meth->field_sqr(group, t1, t1, ctx)) goto err;
99 if (!group->meth->field_mul(group, t1, &group->b, t1, ctx)) goto err;
100 if (!BN_GF2m_add(x, x, t1)) goto err;
104 err:
125 if (t2 == NULL) goto err;
127 if (!BN_copy(t1, x)) goto err;
128 if (!group->meth->field_mul(group, x1, x1, z2, ctx)) goto err;
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;
134 if (!BN_GF2m_add(x1, x1, t2)) goto err;
138 err:
177 if (t5 == NULL) goto err;
179 if (!BN_one(t5)) goto err;
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;
185 if (!group->meth->field_mul(group, z2, z2, x, ctx)) goto err;
186 if (!group->meth->field_mul(group, x1, z2, x1, ctx)) goto err;
187 if (!BN_GF2m_add(z2, z2, x2)) goto err;
189 if (!group->meth->field_mul(group, z2, z2, z1, ctx)) goto err;
190 if (!group->meth->field_sqr(group, t4, x, ctx)) goto err;
191 if (!BN_GF2m_add(t4, t4, y)) goto err;
192 if (!group->meth->field_mul(group, t4, t4, t3, ctx)) goto err;
193 if (!BN_GF2m_add(t4, t4, z2)) goto err;
195 if (!group->meth->field_mul(group, t3, t3, x, ctx)) goto err;
196 if (!group->meth->field_div(group, t3, t5, t3, ctx)) goto err;
197 if (!group->meth->field_mul(group, t4, t3, t4, ctx)) goto err;
198 if (!group->meth->field_mul(group, x2, x1, t3, ctx)) goto err;
199 if (!BN_GF2m_add(z2, x2, x)) goto err;
201 if (!group->meth->field_mul(group, z2, z2, t4, ctx)) goto err;
202 if (!BN_GF2m_add(z2, z2, y)) goto err;
206 err:
248 if (z1 == NULL) goto err;
258 if (!BN_GF2m_mod_arr(x1, &point->X, group->poly)) goto err; /* x1 = x */
259 if (!BN_one(z1)) goto err; /* z1 = 1 */
260 if (!group->meth->field_sqr(group, z2, x1, ctx)) goto err; /* z2 = x1^2 = x^2 */
261 if (!group->meth->field_sqr(group, x2, z2, ctx)) goto err;
262 if (!BN_GF2m_add(x2, x2, &group->b)) goto err; /* x2 = x^4 + b */
284 if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err;
285 if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err;
295 if (i == 0) goto err;
298 if (!EC_POINT_set_to_infinity(group, r)) goto err;
302 if (!BN_one(&r->Z)) goto err;
312 err:
345 goto err;
348 if ((p = EC_POINT_new(group)) == NULL) goto err;
349 if ((acc = EC_POINT_new(group)) == NULL) goto err;
351 if (!EC_POINT_set_to_infinity(group, acc)) goto err;
355 if (!ec_GF2m_montgomery_point_multiply(group, p, scalar, group->generator, ctx)) goto err;
357 if (!group->meth->invert(group, p, ctx)) goto err;
358 if (!group->meth->add(group, acc, acc, p, ctx)) goto err;
363 if (!ec_GF2m_montgomery_point_multiply(group, p, scalars[i], points[i], ctx)) goto err;
365 if (!group->meth->invert(group, p, ctx)) goto err;
366 if (!group->meth->add(group, acc, acc, p, ctx)) goto err;
369 if (!EC_POINT_copy(r, acc)) goto err;
373 err: