Lines Matching refs:ctx

317     BN_CTX *ctx = NULL;
331 if ((ctx = BN_CTX_new_ex(group->libctx)) == NULL)
334 BN_CTX_start(ctx);
335 if ((q = BN_CTX_get(ctx)) == NULL)
354 || !BN_div(group->cofactor, NULL, group->cofactor, group->order, ctx))
358 BN_CTX_end(ctx);
359 BN_CTX_free(ctx);
443 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx)
464 BN_CTX *ctx)
556 const BIGNUM *b, BN_CTX *ctx)
562 return group->meth->group_set_curve(group, p, a, b, ctx);
566 BN_CTX *ctx)
572 return group->meth->group_get_curve(group, p, a, b, ctx);
577 const BIGNUM *b, BN_CTX *ctx)
579 return EC_GROUP_set_curve(group, p, a, b, ctx);
583 BIGNUM *b, BN_CTX *ctx)
585 return EC_GROUP_get_curve(group, p, a, b, ctx);
590 const BIGNUM *b, BN_CTX *ctx)
592 return EC_GROUP_set_curve(group, p, a, b, ctx);
596 BIGNUM *b, BN_CTX *ctx)
598 return EC_GROUP_get_curve(group, p, a, b, ctx);
612 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx)
618 return group->meth->group_check_discriminant(group, ctx);
621 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)
640 if (ctx == NULL)
641 ctx_new = ctx = BN_CTX_new();
643 if (ctx == NULL)
646 BN_CTX_start(ctx);
647 a1 = BN_CTX_get(ctx);
648 a2 = BN_CTX_get(ctx);
649 a3 = BN_CTX_get(ctx);
650 b1 = BN_CTX_get(ctx);
651 b2 = BN_CTX_get(ctx);
652 b3 = BN_CTX_get(ctx);
654 BN_CTX_end(ctx);
665 if (!a->meth->group_get_curve(a, a1, a2, a3, ctx) ||
666 !b->meth->group_get_curve(b, b1, b2, b3, ctx))
676 EC_GROUP_get0_generator(b), ctx) != 0)
706 BN_CTX_end(ctx);
828 BN_CTX *ctx)
839 x, y, z, ctx);
845 BN_CTX *ctx)
856 x, y, z, ctx);
862 BN_CTX *ctx)
872 if (!group->meth->point_set_affine_coordinates(group, point, x, y, ctx))
875 if (EC_POINT_is_on_curve(group, point, ctx) <= 0) {
885 const BIGNUM *y, BN_CTX *ctx)
887 return EC_POINT_set_affine_coordinates(group, point, x, y, ctx);
893 const BIGNUM *y, BN_CTX *ctx)
895 return EC_POINT_set_affine_coordinates(group, point, x, y, ctx);
902 BN_CTX *ctx)
916 return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);
922 BIGNUM *y, BN_CTX *ctx)
924 return EC_POINT_get_affine_coordinates(group, point, x, y, ctx);
930 BIGNUM *y, BN_CTX *ctx)
932 return EC_POINT_get_affine_coordinates(group, point, x, y, ctx);
938 const EC_POINT *b, BN_CTX *ctx)
949 return group->meth->add(group, r, a, b, ctx);
953 BN_CTX *ctx)
963 return group->meth->dbl(group, r, a, ctx);
966 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
976 return group->meth->invert(group, a, ctx);
1000 BN_CTX *ctx)
1010 return group->meth->is_on_curve(group, point, ctx);
1014 BN_CTX *ctx)
1024 return group->meth->point_cmp(group, a, b, ctx);
1028 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
1038 return group->meth->make_affine(group, point, ctx);
1042 EC_POINT *points[], BN_CTX *ctx)
1056 return group->meth->points_make_affine(group, num, points, ctx);
1069 const BIGNUM *scalars[], BN_CTX *ctx)
1093 if (ctx == NULL)
1094 ctx = new_ctx = BN_CTX_secure_new();
1096 if (ctx == NULL) {
1102 ret = group->meth->mul(group, r, scalar, num, points, scalars, ctx);
1105 ret = ossl_ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);
1115 const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx)
1133 if (ctx == NULL)
1134 ctx = new_ctx = BN_CTX_secure_new();
1136 if (ctx == NULL) {
1143 ret = group->meth->mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
1146 ret = ossl_ec_wNAF_mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
1155 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx)
1159 return ossl_ec_wNAF_precompute_mult(group, ctx);
1162 return group->meth->precompute_mult(group, ctx);
1187 BN_CTX *ctx = BN_CTX_new_ex(group->libctx);
1193 if (ctx == NULL)
1200 if (!BN_MONT_CTX_set(group->mont_data, group->order, ctx)) {
1210 BN_CTX_free(ctx);
1234 const BIGNUM *x, BN_CTX *ctx)
1246 if (ctx == NULL)
1247 ctx = new_ctx = BN_CTX_secure_new();
1249 if (ctx == NULL)
1252 BN_CTX_start(ctx);
1253 if ((e = BN_CTX_get(ctx)) == NULL)
1268 if (!BN_mod_exp_mont(r, x, e, group->order, ctx, group->mont_data))
1274 BN_CTX_end(ctx);
1295 const BIGNUM *x, BN_CTX *ctx)
1298 return group->meth->field_inverse_mod_ord(group, res, x, ctx);
1300 return ec_field_inverse_mod_ord(group, res, x, ctx);
1314 BN_CTX *ctx)
1319 return group->meth->blind_coordinates(group, p, ctx);
1404 BN_CTX *ctx)
1417 if ((curve_name_nid = ossl_ec_curve_nid_from_params(dup, ctx)) != NID_undef) {