Lines Matching refs:group
67 mp_int *ry, mp_int *rz, const ECGroup *group)
77 if (group->meth->field_enc) {
78 MP_CHECKOK(group->meth->field_enc(rz, rz, group->meth));
91 mp_int *rx, mp_int *ry, const ECGroup *group)
114 MP_CHECKOK(group->meth->field_div(NULL, pz, &z1, group->meth));
115 MP_CHECKOK(group->meth->field_sqr(&z1, &z2, group->meth));
116 MP_CHECKOK(group->meth->field_mul(&z1, &z2, &z3, group->meth));
117 MP_CHECKOK(group->meth->field_mul(px, &z2, rx, group->meth));
118 MP_CHECKOK(group->meth->field_mul(py, &z3, ry, group->meth));
155 mp_int *ry, mp_int *rz, const ECGroup *group)
176 MP_CHECKOK(ec_GFp_pt_aff2jac(qx, qy, rx, ry, rz, group));
187 MP_CHECKOK(group->meth->field_sqr(pz, &A, group->meth));
188 MP_CHECKOK(group->meth->field_mul(&A, pz, &B, group->meth));
189 MP_CHECKOK(group->meth->field_mul(&A, qx, &A, group->meth));
190 MP_CHECKOK(group->meth->field_mul(&B, qy, &B, group->meth));
193 MP_CHECKOK(group->meth->field_sub(&A, px, &C, group->meth));
194 MP_CHECKOK(group->meth->field_sub(&B, py, &D, group->meth));
197 MP_CHECKOK(group->meth->field_sqr(&C, &C2, group->meth));
198 MP_CHECKOK(group->meth->field_mul(&C, &C2, &C3, group->meth));
201 MP_CHECKOK(group->meth->field_mul(pz, &C, rz, group->meth));
204 MP_CHECKOK(group->meth->field_mul(px, &C2, &C, group->meth));
206 MP_CHECKOK(group->meth->field_sqr(&D, &A, group->meth));
209 MP_CHECKOK(group->meth->field_add(&C, &C, rx, group->meth));
210 MP_CHECKOK(group->meth->field_add(&C3, rx, rx, group->meth));
211 MP_CHECKOK(group->meth->field_sub(&A, rx, rx, group->meth));
214 MP_CHECKOK(group->meth->field_mul(py, &C3, &C3, group->meth));
217 MP_CHECKOK(group->meth->field_sub(&C, rx, ry, group->meth));
218 MP_CHECKOK(group->meth->field_mul(&D, ry, ry, group->meth));
219 MP_CHECKOK(group->meth->field_sub(ry, &C3, ry, group->meth));
243 mp_int *rx, mp_int *ry, mp_int *rz, const ECGroup *group)
264 MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth));
265 MP_CHECKOK(group->meth->field_add(&t0, &t0, &M, group->meth));
266 MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth));
267 MP_CHECKOK(group->meth->
268 field_add(&t0, &group->curvea, &M, group->meth));
269 } else if (mp_cmp_int(&group->curvea, -3, FLAG(px)) == 0) {
271 MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth));
272 MP_CHECKOK(group->meth->field_add(px, &M, &t0, group->meth));
273 MP_CHECKOK(group->meth->field_sub(px, &M, &t1, group->meth));
274 MP_CHECKOK(group->meth->field_mul(&t0, &t1, &M, group->meth));
275 MP_CHECKOK(group->meth->field_add(&M, &M, &t0, group->meth));
276 MP_CHECKOK(group->meth->field_add(&t0, &M, &M, group->meth));
279 MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth));
280 MP_CHECKOK(group->meth->field_add(&t0, &t0, &M, group->meth));
281 MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth));
282 MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth));
283 MP_CHECKOK(group->meth->field_sqr(&M, &M, group->meth));
284 MP_CHECKOK(group->meth->
285 field_mul(&M, &group->curvea, &M, group->meth));
286 MP_CHECKOK(group->meth->field_add(&M, &t0, &M, group->meth));
292 MP_CHECKOK(group->meth->field_add(py, py, rz, group->meth));
293 MP_CHECKOK(group->meth->field_sqr(rz, &t0, group->meth));
295 MP_CHECKOK(group->meth->field_add(py, py, &t0, group->meth));
296 MP_CHECKOK(group->meth->field_mul(&t0, pz, rz, group->meth));
297 MP_CHECKOK(group->meth->field_sqr(&t0, &t0, group->meth));
301 MP_CHECKOK(group->meth->field_mul(px, &t0, &S, group->meth));
304 MP_CHECKOK(group->meth->field_add(&S, &S, &t1, group->meth));
305 MP_CHECKOK(group->meth->field_sqr(&M, rx, group->meth));
306 MP_CHECKOK(group->meth->field_sub(rx, &t1, rx, group->meth));
309 MP_CHECKOK(group->meth->field_sqr(&t0, &t1, group->meth));
311 MP_CHECKOK(mp_add(&t1, &group->meth->irr, &t1));
314 MP_CHECKOK(group->meth->field_sub(&S, rx, &S, group->meth));
315 MP_CHECKOK(group->meth->field_mul(&M, &S, &M, group->meth));
316 MP_CHECKOK(group->meth->field_sub(&M, &t1, ry, group->meth));
336 mp_int *rx, mp_int *ry, const ECGroup *group)
348 ARGCHK(group != NULL, MP_BADARG);
363 MP_CHECKOK(group->
366 &precomp[i][0], &precomp[i][1], group));
385 MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
386 MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
387 MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
388 MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
392 &rz, group));
396 MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group));
409 * k2 * P(x, y), where G is the generator (base point) of the group of
418 const ECGroup *group)
435 ARGCHK(group != NULL, MP_BADARG);
442 return ECPoint_mul(group, k2, px, py, rx, ry);
444 return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
460 if (group->meth->field_enc) {
461 MP_CHECKOK(group->meth->
462 field_enc(px, &precomp[1][0][0], group->meth));
463 MP_CHECKOK(group->meth->
464 field_enc(py, &precomp[1][0][1], group->meth));
469 MP_CHECKOK(mp_copy(&group->genx, &precomp[0][1][0]));
470 MP_CHECKOK(mp_copy(&group->geny, &precomp[0][1][1]));
474 MP_CHECKOK(mp_copy(&group->genx, &precomp[1][0][0]));
475 MP_CHECKOK(mp_copy(&group->geny, &precomp[1][0][1]));
476 if (group->meth->field_enc) {
477 MP_CHECKOK(group->meth->
478 field_enc(px, &precomp[0][1][0], group->meth));
479 MP_CHECKOK(group->meth->
480 field_enc(py, &precomp[0][1][1], group->meth));
489 MP_CHECKOK(group->
491 &precomp[2][0][0], &precomp[2][0][1], group));
492 MP_CHECKOK(group->
495 &precomp[3][0][0], &precomp[3][0][1], group));
498 MP_CHECKOK(group->
501 &precomp[i][1][0], &precomp[i][1][1], group));
504 MP_CHECKOK(group->
506 &precomp[0][2][0], &precomp[0][2][1], group));
508 MP_CHECKOK(group->
511 &precomp[i][2][0], &precomp[i][2][1], group));
514 MP_CHECKOK(group->
517 &precomp[0][3][0], &precomp[0][3][1], group));
519 MP_CHECKOK(group->
522 &precomp[i][3][0], &precomp[i][3][1], group));
539 MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
540 MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
544 rx, ry, &rz, group));
547 MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group));
549 if (group->meth->field_dec) {
550 MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
551 MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));