Lines Matching refs:group
118 ECGroup_free(group); \
119 group = ECGroup_fromHex(params, KM_SLEEP); \
120 if (group == NULL) { \
121 printf(" Error: could not construct group.\n"); \
125 MP_CHECKOK( ectest_curve_GF2m(group, ectestPrint, ectestTime, 1, KM_SLEEP) ); \
131 ECGroup_free(group); \
132 group = ECGroup_fromName(name, KM_SLEEP); \
133 if (group == NULL) { \
134 printf(" Warning: could not construct group.\n"); \
137 MP_CHECKOK( ectest_curve_GF2m(group, ectestPrint, ectestTime, 0, KM_SLEEP) ); \
145 ectest_curve_GF2m(ECGroup *group, int ectestPrint, int ectestTime,
164 MP_CHECKOK(mp_sub(&group->order, &one, &order_1));
167 if (group->meth->field_dec) {
168 MP_CHECKOK(group->meth->field_dec(&group->genx, &gx, group->meth));
169 MP_CHECKOK(group->meth->field_dec(&group->geny, &gy, group->meth));
171 MP_CHECKOK(mp_copy(&group->genx, &gx));
172 MP_CHECKOK(mp_copy(&group->geny, &gy));
182 if (group->meth->field_enc) {
184 MP_CHECKOK(mp_toradix(&group->genx, s, 16));
186 MP_CHECKOK(mp_toradix(&group->geny, s, 16));
195 (&order_1, &group->genx, &group->geny, &rx, &ry, group));
203 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth));
204 if ((mp_cmp(&rx, &group->genx) != 0)
205 || (mp_cmp(&ry, &group->geny) != 0)) {
215 (&order_1, &group->genx, &group->geny, &rx, &ry, group));
223 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth));
224 if ((mp_cmp(&rx, &group->genx) != 0)
225 || (mp_cmp(&ry, &group->geny) != 0)) {
235 (&order_1, &group->genx, &group->geny, &rx, &ry, group));
243 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth));
244 if ((mp_cmp(&rx, &group->genx) != 0)
245 || (mp_cmp(&ry, &group->geny) != 0)) {
254 MP_CHECKOK(ECPoint_mul(group, &order_1, NULL, NULL, &rx, &ry));
262 MP_CHECKOK(ec_GF2m_add(&ry, &rx, &ry, group->meth));
271 MP_CHECKOK(ECPoint_mul(group, &order_1, &gx, &gy, &rx, &ry));
279 MP_CHECKOK(ec_GF2m_add(&ry, &rx, &ry, group->meth));
289 (&group->order, &group->genx, &group->geny, &rx, &ry,
290 group));
307 (&group->order, &group->genx, &group->geny, &rx, &ry,
308 group));
325 (&group->order, &group->genx, &group->geny, &rx, &ry,
326 group));
342 MP_CHECKOK(ECPoint_mul(group, &group->order, NULL, NULL, &rx, &ry));
357 MP_CHECKOK(ECPoint_mul(group, &group->order, &gx, &gy, &rx, &ry));
373 (group, &order_1, &order_1, &gx, &gy, &rx, &ry));
374 MP_CHECKOK(ECPoints_mul(group, &one, &one, &rx, &ry, &rx, &ry));
383 MP_CHECKOK(ec_GF2m_add(&ry, &rx, &ry, group->meth));
391 if (ECPoint_validate(group, &gx, &gy) != MP_YES) {
397 if (ECPoint_validate(group, &gx, &ry) != MP_NO) {
405 size = mpl_significant_bits(&group->meth->irr);
410 MP_CHECKOK(group->meth->field_mod(&n, &n, group->meth));
416 (&n, &group->genx, &group->geny, &rx, &ry,
417 group)), 100);
420 (ECPoint_mul(group, &n, NULL, NULL, &rx, &ry)),
424 (group, &n, &n, &gx, &gy, &rx, &ry)), 100);
427 (ECPoint_mul(group, &n, NULL, NULL, &rx, &ry)),
430 (ECPoint_mul(group, &n, &gx, &gy, &rx, &ry)),
434 (group, &n, &n, &gx, &gy, &rx, &ry)), 100);
465 ECGroup *group = NULL;
526 ECGroup_free(group);