• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/openssl/crypto/ec/

Lines Matching refs:group

107 void EC_GROUP_free(EC_GROUP *group)
109 if (!group) return;
111 if (group->meth->group_finish != 0)
112 group->meth->group_finish(group);
114 EC_GROUP_free_extra_data(group);
116 OPENSSL_free(group);
120 void EC_GROUP_clear_free(EC_GROUP *group)
122 if (!group) return;
124 if (group->meth->group_clear_finish != 0)
125 group->meth->group_clear_finish(group);
126 else if (group->meth != NULL && group->meth->group_finish != 0)
127 group->meth->group_finish(group);
129 EC_GROUP_clear_free_extra_data(group);
131 OPENSSL_cleanse(group, sizeof *group);
132 OPENSSL_free(group);
170 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group)
172 return group->meth;
176 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
178 if (group->meth->group_set_curve_GFp == 0)
183 return group->meth->group_set_curve_GFp(group, p, a, b, ctx);
187 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
189 if (group->meth->group_get_curve_GFp == 0)
194 return group->meth->group_get_curve_GFp(group, p, a, b, ctx);
198 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor)
200 if (group->meth->group_set_generator == 0)
205 return group->meth->group_set_generator(group, generator, order, cofactor);
209 EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group)
211 if (group->meth->group_get0_generator == 0)
216 return group->meth->group_get0_generator(group);
220 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx)
222 if (group->meth->group_get_order == 0)
227 return group->meth->group_get_order(group, order, ctx);
231 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx)
233 if (group->meth->group_get_cofactor == 0)
238 return group->meth->group_get_cofactor(group, cofactor, ctx);
243 int EC_GROUP_set_extra_data(EC_GROUP *group, void *extra_data, void *(*extra_data_dup_func)(void *),
246 if ((group->extra_data != NULL)
247 || (group->extra_data_dup_func != 0)
248 || (group->extra_data_free_func != 0)
249 || (group->extra_data_clear_free_func != 0))
255 group->extra_data = extra_data;
256 group->extra_data_dup_func = extra_data_dup_func;
257 group->extra_data_free_func = extra_data_free_func;
258 group->extra_data_clear_free_func = extra_data_clear_free_func;
264 void *EC_GROUP_get_extra_data(const EC_GROUP *group, void *(*extra_data_dup_func)(void *),
267 if ((group->extra_data_dup_func != extra_data_dup_func)
268 || (group->extra_data_free_func != extra_data_free_func)
269 || (group->extra_data_clear_free_func != extra_data_clear_free_func))
277 return group->extra_data;
282 void EC_GROUP_free_extra_data(EC_GROUP *group)
284 if (group->extra_data_free_func)
285 group->extra_data_free_func(group->extra_data);
286 group->extra_data = NULL;
287 group->extra_data_dup_func = 0;
288 group->extra_data_free_func = 0;
289 group->extra_data_clear_free_func = 0;
294 void EC_GROUP_clear_free_extra_data(EC_GROUP *group)
296 if (group->extra_data_clear_free_func)
297 group->extra_data_clear_free_func(group->extra_data);
298 else if (group->extra_data_free_func)
299 group->extra_data_free_func(group->extra_data);
300 group->extra_data = NULL;
301 group->extra_data_dup_func = 0;
302 group->extra_data_free_func = 0;
303 group->extra_data_clear_free_func = 0;
310 EC_POINT *EC_POINT_new(const EC_GROUP *group)
314 if (group == NULL)
319 if (group->meth->point_init == 0)
332 ret->meth = group->meth;
391 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point)
393 if (group->meth->point_set_to_infinity == 0)
398 if (group->meth != point->meth)
403 return group->meth->point_set_to_infinity(group, point);
407 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point,
410 if (group->meth->point_set_Jprojective_coordinates_GFp == 0)
415 if (group->meth != point->meth)
420 return group->meth->point_set_Jprojective_coordinates_GFp(group, point, x, y, z, ctx);
424 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point,
427 if (group->meth->point_get_Jprojective_coordinates_GFp == 0)
432 if (group->meth != point->meth)
437 return group->meth->point_get_Jprojective_coordinates_GFp(group, point, x, y, z, ctx);
441 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point,
444 if (group->meth->point_set_affine_coordinates_GFp == 0)
449 if (group->meth != point->meth)
454 return group->meth->point_set_affine_coordinates_GFp(group, point, x, y, ctx);
458 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point,
461 if (group->meth->point_get_affine_coordinates_GFp == 0)
466 if (group->meth != point->meth)
471 return group->meth->point_get_affine_coordinates_GFp(group, point, x, y, ctx);
475 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point,
478 if (group->meth->point_set_compressed_coordinates_GFp == 0)
483 if (group->meth != point->meth)
488 return group->meth->point_set_compressed_coordinates_GFp(group, point, x, y_bit, ctx);
492 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, point_conversion_form_t form,
495 if (group->meth->point2oct == 0)
500 if (group->meth != point->meth)
505 return group->meth->point2oct(group, point, form, buf, len, ctx);
509 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point,
512 if (group->meth->oct2point == 0)
517 if (group->meth != point->meth)
522 return group->meth->oct2point(group, point, buf, len, ctx);
526 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
528 if (group->meth->add == 0)
533 if ((group->meth != r->meth) || (r->meth != a->meth) || (a->meth != b->meth))
538 return group->meth->add(group, r, a, b, ctx);
542 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
544 if (group->meth->dbl == 0)
549 if ((group->meth != r->meth) || (r->meth != a->meth))
554 return group->meth->dbl(group, r, a, ctx);
558 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
560 if (group->meth->dbl == 0)
565 if (group->meth != a->meth)
570 return group->meth->invert(group, a, ctx);
574 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *point)
576 if (group->meth->is_at_infinity == 0)
581 if (group->meth != point->meth)
586 return group->meth->is_at_infinity(group, point);
590 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx)
592 if (group->meth->is_on_curve == 0)
597 if (group->meth != point->meth)
602 return group->meth->is_on_curve(group, point, ctx);
606 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
608 if (group->meth->point_cmp == 0)
613 if ((group->meth != a->meth) || (a->meth != b->meth))
618 return group->meth->point_cmp(group, a, b, ctx);
622 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
624 if (group->meth->make_affine == 0)
629 if (group->meth != point->meth)
634 return group->meth->make_affine(group, point, ctx);
638 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx)
642 if (group->meth->points_make_affine == 0)
649 if (group->meth != points[i]->meth)
655 return group->meth->points_make_affine(group, num, points, ctx);