Lines Matching defs:group
120 ECGroup_free(group); \
121 group = ECGroup_fromHex(params, KM_SLEEP); \
122 if (group == NULL) { \
123 printf(" Error: could not construct group.\n"); \
127 MP_CHECKOK( ectest_curve_GF2m(group, ectestPrint, ectestTime, 1, KM_SLEEP) ); \
133 ECGroup_free(group); \
134 group = ECGroup_fromName(name, KM_SLEEP); \
135 if (group == NULL) { \
136 printf(" Warning: could not construct group.\n"); \
139 MP_CHECKOK( ectest_curve_GF2m(group, ectestPrint, ectestTime, 0, KM_SLEEP) ); \
147 ectest_curve_GF2m(ECGroup *group, int ectestPrint, int ectestTime,
166 MP_CHECKOK(mp_sub(&group->order, &one, &order_1));
169 if (group->meth->field_dec) {
170 MP_CHECKOK(group->meth->field_dec(&group->genx, &gx, group->meth));
171 MP_CHECKOK(group->meth->field_dec(&group->geny, &gy, group->meth));
173 MP_CHECKOK(mp_copy(&group->genx, &gx));
174 MP_CHECKOK(mp_copy(&group->geny, &gy));
184 if (group->meth->field_enc) {
186 MP_CHECKOK(mp_toradix(&group->genx, s, 16));
188 MP_CHECKOK(mp_toradix(&group->geny, s, 16));
197 (&order_1, &group->genx, &group->geny, &rx, &ry, group));
205 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth));
206 if ((mp_cmp(&rx, &group->genx) != 0)
207 || (mp_cmp(&ry, &group->geny) != 0)) {
217 (&order_1, &group->genx, &group->geny, &rx, &ry, group));
225 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth));
226 if ((mp_cmp(&rx, &group->genx) != 0)
227 || (mp_cmp(&ry, &group->geny) != 0)) {
237 (&order_1, &group->genx, &group->geny, &rx, &ry, group));
245 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth));
246 if ((mp_cmp(&rx, &group->genx) != 0)
247 || (mp_cmp(&ry, &group->geny) != 0)) {
256 MP_CHECKOK(ECPoint_mul(group, &order_1, NULL, NULL, &rx, &ry));
264 MP_CHECKOK(ec_GF2m_add(&ry, &rx, &ry, group->meth));
273 MP_CHECKOK(ECPoint_mul(group, &order_1, &gx, &gy, &rx, &ry));
281 MP_CHECKOK(ec_GF2m_add(&ry, &rx, &ry, group->meth));
291 (&group->order, &group->genx, &group->geny, &rx, &ry,
292 group));
309 (&group->order, &group->genx, &group->geny, &rx, &ry,
310 group));
327 (&group->order, &group->genx, &group->geny, &rx, &ry,
328 group));
344 MP_CHECKOK(ECPoint_mul(group, &group->order, NULL, NULL, &rx, &ry));
359 MP_CHECKOK(ECPoint_mul(group, &group->order, &gx, &gy, &rx, &ry));
375 (group, &order_1, &order_1, &gx, &gy, &rx, &ry));
376 MP_CHECKOK(ECPoints_mul(group, &one, &one, &rx, &ry, &rx, &ry));
385 MP_CHECKOK(ec_GF2m_add(&ry, &rx, &ry, group->meth));
393 if (ECPoint_validate(group, &gx, &gy) != MP_YES) {
399 if (ECPoint_validate(group, &gx, &ry) != MP_NO) {
407 size = mpl_significant_bits(&group->meth->irr);
412 MP_CHECKOK(group->meth->field_mod(&n, &n, group->meth));
418 (&n, &group->genx, &group->geny, &rx, &ry,
419 group)), 100);
422 (ECPoint_mul(group, &n, NULL, NULL, &rx, &ry)),
426 (group, &n, &n, &gx, &gy, &rx, &ry)), 100);
429 (ECPoint_mul(group, &n, NULL, NULL, &rx, &ry)),
432 (ECPoint_mul(group, &n, &gx, &gy, &rx, &ry)),
436 (group, &n, &n, &gx, &gy, &rx, &ry)), 100);
467 ECGroup *group = NULL;
528 ECGroup_free(group);