Home | History | Annotate | Download | only in ec

Lines Matching refs:group

84 	ret->group   = NULL;
99 ret->group = EC_GROUP_new_by_curve_name(nid);
100 if (ret->group == NULL)
127 if (r->group != NULL)
128 EC_GROUP_free(r->group);
151 if (src->group)
153 const EC_METHOD *meth = EC_GROUP_method_of(src->group);
154 /* clear the old group */
155 if (dest->group)
156 EC_GROUP_free(dest->group);
157 dest->group = EC_GROUP_new(meth);
158 if (dest->group == NULL)
160 if (!EC_GROUP_copy(dest->group, src->group))
164 if (src->pub_key && src->group)
168 dest->pub_key = EC_POINT_new(src->group);
249 if (!eckey || !eckey->group)
267 if (!EC_GROUP_get_order(eckey->group, order, ctx))
277 pub_key = EC_POINT_new(eckey->group);
284 if (!EC_POINT_mul(eckey->group, pub_key, priv_key, NULL, NULL, ctx))
311 if (!eckey || !eckey->group || !eckey->pub_key)
317 if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key))
325 if ((point = EC_POINT_new(eckey->group)) == NULL)
329 if (!EC_POINT_is_on_curve(eckey->group, eckey->pub_key, ctx))
335 order = &eckey->group->order;
341 if (!EC_POINT_mul(eckey->group, point, NULL, eckey->pub_key, order, ctx))
346 if (!EC_POINT_is_at_infinity(eckey->group, point))
361 if (!EC_POINT_mul(eckey->group, point, eckey->priv_key,
367 if (EC_POINT_cmp(eckey->group, point, eckey->pub_key,
390 if (!key || !key->group || !x || !y)
400 point = EC_POINT_new(key->group);
405 tmp_nid = EC_METHOD_get_field_type(EC_GROUP_method_of(key->group));
415 if (!EC_POINT_set_affine_coordinates_GF2m(key->group, point,
418 if (!EC_POINT_get_affine_coordinates_GF2m(key->group, point,
425 if (!EC_POINT_set_affine_coordinates_GFp(key->group, point,
428 if (!EC_POINT_get_affine_coordinates_GFp(key->group, point,
461 return key->group;
464 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group)
466 if (key->group != NULL)
467 EC_GROUP_free(key->group);
468 key->group = EC_GROUP_dup(group);
469 return (key->group == NULL) ? 0 : 1;
494 key->pub_key = EC_POINT_dup(pub_key, key->group);
516 if (key->group != NULL)
517 EC_GROUP_set_point_conversion_form(key->group, cform);
539 if (key->group != NULL)
540 EC_GROUP_set_asn1_flag(key->group, flag);
545 if (key->group == NULL)
547 return EC_GROUP_precompute_mult(key->group, ctx);