Lines Matching refs:group

117 	ECGroup_free(group); \
118 group = ECGroup_fromHex(params, KM_SLEEP); \
119 if (group == NULL) { \
124 MP_CHECKOK( ectest_curve_GFp(group, ectestPrint, ectestTime, 1, KM_SLEEP) ); \
130 ECGroup_free(group); \
131 group = ECGroup_fromName(name, KM_SLEEP); \
132 if (group == NULL) { \
136 MP_CHECKOK( ectest_curve_GFp(group, ectestPrint, ectestTime, 0, KM_SLEEP) ); \
144 ectest_curve_GFp(ECGroup *group, int ectestPrint, int ectestTime, in ectest_curve_GFp() argument
163 MP_CHECKOK(mp_sub(&group->order, &one, &order_1)); in ectest_curve_GFp()
166 if (group->meth->field_dec) { in ectest_curve_GFp()
167 MP_CHECKOK(group->meth->field_dec(&group->genx, &gx, group->meth)); in ectest_curve_GFp()
168 MP_CHECKOK(group->meth->field_dec(&group->geny, &gy, group->meth)); in ectest_curve_GFp()
170 MP_CHECKOK(mp_copy(&group->genx, &gx)); in ectest_curve_GFp()
171 MP_CHECKOK(mp_copy(&group->geny, &gy)); in ectest_curve_GFp()
180 if (group->meth->field_enc) { in ectest_curve_GFp()
182 MP_CHECKOK(mp_toradix(&group->genx, s, 16)); in ectest_curve_GFp()
184 MP_CHECKOK(mp_toradix(&group->geny, s, 16)); in ectest_curve_GFp()
193 (&order_1, &group->genx, &group->geny, &rx, &ry, group)); in ectest_curve_GFp()
201 MP_CHECKOK(group->meth->field_neg(&ry, &ry, group->meth)); in ectest_curve_GFp()
202 if ((mp_cmp(&rx, &group->genx) != 0) in ectest_curve_GFp()
203 || (mp_cmp(&ry, &group->geny) != 0)) { in ectest_curve_GFp()
214 (&order_1, &group->genx, &group->geny, &rx, &ry, group)); in ectest_curve_GFp()
222 MP_CHECKOK(group->meth->field_neg(&ry, &ry, group->meth)); in ectest_curve_GFp()
223 if ((mp_cmp(&rx, &group->genx) != 0) in ectest_curve_GFp()
224 || (mp_cmp(&ry, &group->geny) != 0)) { in ectest_curve_GFp()
233 MP_CHECKOK(ECPoint_mul(group, &order_1, NULL, NULL, &rx, &ry)); in ectest_curve_GFp()
241 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp()
250 MP_CHECKOK(ECPoint_mul(group, &order_1, &gx, &gy, &rx, &ry)); in ectest_curve_GFp()
258 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp()
268 (&group->order, &group->genx, &group->geny, &rx, &ry, in ectest_curve_GFp()
269 group)); in ectest_curve_GFp()
287 (&group->order, &group->genx, &group->geny, &rx, &ry, in ectest_curve_GFp()
288 group)); in ectest_curve_GFp()
304 MP_CHECKOK(ECPoint_mul(group, &group->order, NULL, NULL, &rx, &ry)); in ectest_curve_GFp()
319 MP_CHECKOK(ECPoint_mul(group, &group->order, &gx, &gy, &rx, &ry)); in ectest_curve_GFp()
335 (group, &order_1, &order_1, &gx, &gy, &rx, &ry)); in ectest_curve_GFp()
336 MP_CHECKOK(ECPoints_mul(group, &one, &one, &rx, &ry, &rx, &ry)); in ectest_curve_GFp()
345 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp()
353 if (ECPoint_validate(group, &gx, &gy) != MP_YES) { in ectest_curve_GFp()
359 if (ECPoint_validate(group, &gx, &ry) != MP_NO) { in ectest_curve_GFp()
367 size = mpl_significant_bits(&group->meth->irr); in ectest_curve_GFp()
372 MP_CHECKOK(group->meth->field_mod(&n, &n, group->meth)); in ectest_curve_GFp()
378 (&n, &group->genx, &group->geny, &rx, &ry, in ectest_curve_GFp()
379 group)), 100); in ectest_curve_GFp()
382 (ECPoint_mul(group, &n, NULL, NULL, &rx, &ry)), in ectest_curve_GFp()
386 (group, &n, &n, &gx, &gy, &rx, &ry)), 100); in ectest_curve_GFp()
389 (ECPoint_mul(group, &n, NULL, NULL, &rx, &ry)), in ectest_curve_GFp()
392 (ECPoint_mul(group, &n, &gx, &gy, &rx, &ry)), in ectest_curve_GFp()
396 (group, &n, &n, &gx, &gy, &rx, &ry)), 100); in ectest_curve_GFp()
428 ECGroup *group = NULL; in ecp_test() local
471 ECGroup_free(group); in ecp_test()