Lines Matching refs:group
119 ECGroup_free(group); \
120 group = ECGroup_fromHex(params, KM_SLEEP); \
121 if (group == NULL) { \
126 MP_CHECKOK( ectest_curve_GFp(group, ectestPrint, ectestTime, 1, KM_SLEEP) ); \
132 ECGroup_free(group); \
133 group = ECGroup_fromName(name, KM_SLEEP); \
134 if (group == NULL) { \
138 MP_CHECKOK( ectest_curve_GFp(group, ectestPrint, ectestTime, 0, KM_SLEEP) ); \
146 ectest_curve_GFp(ECGroup *group, int ectestPrint, int ectestTime, in ectest_curve_GFp() argument
165 MP_CHECKOK(mp_sub(&group->order, &one, &order_1)); in ectest_curve_GFp()
168 if (group->meth->field_dec) { in ectest_curve_GFp()
169 MP_CHECKOK(group->meth->field_dec(&group->genx, &gx, group->meth)); in ectest_curve_GFp()
170 MP_CHECKOK(group->meth->field_dec(&group->geny, &gy, group->meth)); in ectest_curve_GFp()
172 MP_CHECKOK(mp_copy(&group->genx, &gx)); in ectest_curve_GFp()
173 MP_CHECKOK(mp_copy(&group->geny, &gy)); in ectest_curve_GFp()
182 if (group->meth->field_enc) { in ectest_curve_GFp()
184 MP_CHECKOK(mp_toradix(&group->genx, s, 16)); in ectest_curve_GFp()
186 MP_CHECKOK(mp_toradix(&group->geny, s, 16)); in ectest_curve_GFp()
195 (&order_1, &group->genx, &group->geny, &rx, &ry, group)); in ectest_curve_GFp()
203 MP_CHECKOK(group->meth->field_neg(&ry, &ry, group->meth)); in ectest_curve_GFp()
204 if ((mp_cmp(&rx, &group->genx) != 0) in ectest_curve_GFp()
205 || (mp_cmp(&ry, &group->geny) != 0)) { in ectest_curve_GFp()
216 (&order_1, &group->genx, &group->geny, &rx, &ry, group)); in ectest_curve_GFp()
224 MP_CHECKOK(group->meth->field_neg(&ry, &ry, group->meth)); in ectest_curve_GFp()
225 if ((mp_cmp(&rx, &group->genx) != 0) in ectest_curve_GFp()
226 || (mp_cmp(&ry, &group->geny) != 0)) { in ectest_curve_GFp()
235 MP_CHECKOK(ECPoint_mul(group, &order_1, NULL, NULL, &rx, &ry)); in ectest_curve_GFp()
243 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp()
252 MP_CHECKOK(ECPoint_mul(group, &order_1, &gx, &gy, &rx, &ry)); in ectest_curve_GFp()
260 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp()
270 (&group->order, &group->genx, &group->geny, &rx, &ry, in ectest_curve_GFp()
271 group)); in ectest_curve_GFp()
289 (&group->order, &group->genx, &group->geny, &rx, &ry, in ectest_curve_GFp()
290 group)); in ectest_curve_GFp()
306 MP_CHECKOK(ECPoint_mul(group, &group->order, NULL, NULL, &rx, &ry)); in ectest_curve_GFp()
321 MP_CHECKOK(ECPoint_mul(group, &group->order, &gx, &gy, &rx, &ry)); in ectest_curve_GFp()
337 (group, &order_1, &order_1, &gx, &gy, &rx, &ry)); in ectest_curve_GFp()
338 MP_CHECKOK(ECPoints_mul(group, &one, &one, &rx, &ry, &rx, &ry)); in ectest_curve_GFp()
347 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp()
355 if (ECPoint_validate(group, &gx, &gy) != MP_YES) { in ectest_curve_GFp()
361 if (ECPoint_validate(group, &gx, &ry) != MP_NO) { in ectest_curve_GFp()
369 size = mpl_significant_bits(&group->meth->irr); in ectest_curve_GFp()
374 MP_CHECKOK(group->meth->field_mod(&n, &n, group->meth)); in ectest_curve_GFp()
380 (&n, &group->genx, &group->geny, &rx, &ry, in ectest_curve_GFp()
381 group)), 100); in ectest_curve_GFp()
384 (ECPoint_mul(group, &n, NULL, NULL, &rx, &ry)), in ectest_curve_GFp()
388 (group, &n, &n, &gx, &gy, &rx, &ry)), 100); in ectest_curve_GFp()
391 (ECPoint_mul(group, &n, NULL, NULL, &rx, &ry)), in ectest_curve_GFp()
394 (ECPoint_mul(group, &n, &gx, &gy, &rx, &ry)), in ectest_curve_GFp()
398 (group, &n, &n, &gx, &gy, &rx, &ry)), 100); in ectest_curve_GFp()
430 ECGroup *group = NULL; in ecp_test() local
473 ECGroup_free(group); in ecp_test()