Lines Matching refs:group

38     const EC_GROUP *group;      /* parent EC_GROUP object */  member
50 static EC_PRE_COMP *ec_pre_comp_new(const EC_GROUP *group) in ec_pre_comp_new() argument
54 if (!group) in ec_pre_comp_new()
61 ret->group = group; in ec_pre_comp_new()
139 int ossl_ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r, in ossl_ec_scalar_mul_ladder() argument
152 if (point != NULL && EC_POINT_is_at_infinity(group, point)) in ossl_ec_scalar_mul_ladder()
153 return EC_POINT_set_to_infinity(group, r); in ossl_ec_scalar_mul_ladder()
155 if (BN_is_zero(group->order)) { in ossl_ec_scalar_mul_ladder()
159 if (BN_is_zero(group->cofactor)) { in ossl_ec_scalar_mul_ladder()
166 if (((p = EC_POINT_new(group)) == NULL) in ossl_ec_scalar_mul_ladder()
167 || ((s = EC_POINT_new(group)) == NULL)) { in ossl_ec_scalar_mul_ladder()
173 if (!EC_POINT_copy(p, group->generator)) { in ossl_ec_scalar_mul_ladder()
196 if (!BN_mul(cardinality, group->order, group->cofactor, ctx)) { in ossl_ec_scalar_mul_ladder()
249 group_top = bn_get_top(group->field); in ossl_ec_scalar_mul_ladder()
264 if (!p->Z_is_one && (group->meth->make_affine == NULL in ossl_ec_scalar_mul_ladder()
265 || !group->meth->make_affine(group, p, ctx))) { in ossl_ec_scalar_mul_ladder()
271 if (!ec_point_ladder_pre(group, r, s, p, ctx)) { in ossl_ec_scalar_mul_ladder()
351 if (!ec_point_ladder_step(group, r, s, p, ctx)) { in ossl_ec_scalar_mul_ladder()
366 if (!ec_point_ladder_post(group, r, s, p, ctx)) { in ossl_ec_scalar_mul_ladder()
404 int ossl_ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, in ossl_ec_wNAF_mul() argument
432 if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) { in ossl_ec_wNAF_mul()
438 if ((scalar != group->order) && (scalar != NULL) && (num == 0)) { in ossl_ec_wNAF_mul()
447 return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx); in ossl_ec_wNAF_mul()
449 if ((scalar == NULL) && (num == 1) && (scalars[0] != group->order)) { in ossl_ec_wNAF_mul()
457 return ossl_ec_scalar_mul_ladder(group, r, scalars[0], points[0], in ossl_ec_wNAF_mul()
463 generator = EC_GROUP_get0_generator(group); in ossl_ec_wNAF_mul()
471 pre_comp = group->pre_comp.ec; in ossl_ec_wNAF_mul()
473 && (EC_POINT_cmp(group, generator, pre_comp->points[0], ctx) == in ossl_ec_wNAF_mul()
664 *v = EC_POINT_new(group); in ossl_ec_wNAF_mul()
675 if ((tmp = EC_POINT_new(group)) == NULL) in ossl_ec_wNAF_mul()
695 if (!EC_POINT_dbl(group, tmp, val_sub[i][0], ctx)) in ossl_ec_wNAF_mul()
699 (group, val_sub[i][j], val_sub[i][j - 1], tmp, ctx)) in ossl_ec_wNAF_mul()
705 if (group->meth->points_make_affine == NULL in ossl_ec_wNAF_mul()
706 || !group->meth->points_make_affine(group, num_val, val, ctx)) in ossl_ec_wNAF_mul()
713 if (!EC_POINT_dbl(group, r, r, ctx)) in ossl_ec_wNAF_mul()
730 if (!EC_POINT_invert(group, r, ctx)) in ossl_ec_wNAF_mul()
750 if (!ossl_ec_point_blind_coordinates(group, r, ctx)) { in ossl_ec_wNAF_mul()
758 (group, r, r, val_sub[i][digit >> 1], ctx)) in ossl_ec_wNAF_mul()
767 if (!EC_POINT_set_to_infinity(group, r)) in ossl_ec_wNAF_mul()
771 if (!EC_POINT_invert(group, r, ctx)) in ossl_ec_wNAF_mul()
819 int ossl_ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *ctx) in ossl_ec_wNAF_precompute_mult() argument
834 EC_pre_comp_free(group); in ossl_ec_wNAF_precompute_mult()
835 if ((pre_comp = ec_pre_comp_new(group)) == NULL) in ossl_ec_wNAF_precompute_mult()
838 generator = EC_GROUP_get0_generator(group); in ossl_ec_wNAF_precompute_mult()
854 order = EC_GROUP_get0_order(group); in ossl_ec_wNAF_precompute_mult()
891 if ((var[i] = EC_POINT_new(group)) == NULL) { in ossl_ec_wNAF_precompute_mult()
897 if ((tmp_point = EC_POINT_new(group)) == NULL in ossl_ec_wNAF_precompute_mult()
898 || (base = EC_POINT_new(group)) == NULL) { in ossl_ec_wNAF_precompute_mult()
910 if (!EC_POINT_dbl(group, tmp_point, base, ctx)) in ossl_ec_wNAF_precompute_mult()
920 if (!EC_POINT_add(group, *var, tmp_point, *(var - 1), ctx)) in ossl_ec_wNAF_precompute_mult()
935 if (!EC_POINT_dbl(group, base, tmp_point, ctx)) in ossl_ec_wNAF_precompute_mult()
938 if (!EC_POINT_dbl(group, base, base, ctx)) in ossl_ec_wNAF_precompute_mult()
944 if (group->meth->points_make_affine == NULL in ossl_ec_wNAF_precompute_mult()
945 || !group->meth->points_make_affine(group, num, points, ctx)) in ossl_ec_wNAF_precompute_mult()
948 pre_comp->group = group; in ossl_ec_wNAF_precompute_mult()
955 SETPRECOMP(group, ec, pre_comp); in ossl_ec_wNAF_precompute_mult()
978 int ossl_ec_wNAF_have_precompute_mult(const EC_GROUP *group) in ossl_ec_wNAF_have_precompute_mult() argument
980 return HAVEPRECOMP(group, ec); in ossl_ec_wNAF_have_precompute_mult()