Lines Matching refs:group
87 const ECGroup *group)
116 MP_CHECKOK(group->meth->field_sub(py, qy, &tempy, group->meth));
117 MP_CHECKOK(group->meth->field_sub(px, qx, &tempx, group->meth));
118 MP_CHECKOK(group->meth->
119 field_div(&tempy, &tempx, &lambda, group->meth));
129 MP_CHECKOK(group->meth->field_sqr(qx, &tempx, group->meth));
131 if (group->meth->field_enc) {
132 MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth));
134 MP_CHECKOK(group->meth->
135 field_mul(&tempx, &temp, &tempx, group->meth));
136 MP_CHECKOK(group->meth->
137 field_add(&tempx, &group->curvea, &tempx, group->meth));
139 if (group->meth->field_enc) {
140 MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth));
142 MP_CHECKOK(group->meth->field_mul(qy, &temp, &tempy, group->meth));
143 MP_CHECKOK(group->meth->
144 field_div(&tempx, &tempy, &lambda, group->meth));
147 MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth));
148 MP_CHECKOK(group->meth->field_sub(&tempx, px, &tempx, group->meth));
149 MP_CHECKOK(group->meth->field_sub(&tempx, qx, &tempx, group->meth));
151 MP_CHECKOK(group->meth->field_sub(qx, &tempx, &tempy, group->meth));
152 MP_CHECKOK(group->meth->
153 field_mul(&tempy, &lambda, &tempy, group->meth));
154 MP_CHECKOK(group->meth->field_sub(&tempy, qy, &tempy, group->meth));
173 const ECGroup *group)
181 MP_CHECKOK(group->meth->field_neg(qy, &nqy, group->meth));
182 res = group->point_add(px, py, qx, &nqy, rx, ry, group);
193 mp_int *ry, const ECGroup *group)
195 return ec_GFp_pt_add_aff(px, py, px, py, rx, ry, group);
206 mp_int *rx, mp_int *ry, const ECGroup *group)
238 MP_CHECKOK(group->meth->field_neg(&qy, &qy, group->meth));
247 MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
250 MP_CHECKOK(group->
251 point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
267 MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
272 MP_CHECKOK(group->
273 point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
276 MP_CHECKOK(group->
277 point_sub(&sx, &sy, &qx, &qy, &sx, &sy, group));
298 ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
322 if ((MP_SIGN(px) == MP_NEG) || (mp_cmp(px, &group->meth->irr) >= 0) ||
323 (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) {
328 if (group->meth->field_enc) {
329 group->meth->field_enc(px, &pxt, group->meth);
330 group->meth->field_enc(py, &pyt, group->meth);
336 MP_CHECKOK( group->meth->field_sqr(&pyt, &accl, group->meth) );
338 MP_CHECKOK( group->meth->field_sqr(&pxt, &tmp, group->meth) );
339 MP_CHECKOK( group->meth->field_mul(&pxt, &tmp, &accr, group->meth) );
340 MP_CHECKOK( group->meth->field_mul(&group->curvea, &pxt, &tmp, group->meth) );
341 MP_CHECKOK( group->meth->field_add(&tmp, &accr, &accr, group->meth) );
342 MP_CHECKOK( group->meth->field_add(&accr, &group->curveb, &accr, group->meth) );
344 MP_CHECKOK( group->meth->field_sub(&accl, &accr, &accr, group->meth) );
352 MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );