Lines Matching refs:group
24 int ec_bignum_to_scalar(const EC_GROUP *group, EC_SCALAR *out, in ec_bignum_to_scalar() argument
26 if (!bn_copy_words(out->words, group->order.width, in) || in ec_bignum_to_scalar()
27 !bn_less_than_words(out->words, group->order.d, group->order.width)) { in ec_bignum_to_scalar()
34 int ec_scalar_equal_vartime(const EC_GROUP *group, const EC_SCALAR *a, in ec_scalar_equal_vartime() argument
37 group->order.width * sizeof(BN_ULONG)) == 0; in ec_scalar_equal_vartime()
40 int ec_scalar_is_zero(const EC_GROUP *group, const EC_SCALAR *a) { in ec_scalar_is_zero() argument
42 for (int i = 0; i < group->order.width; i++) { in ec_scalar_is_zero()
48 int ec_random_nonzero_scalar(const EC_GROUP *group, EC_SCALAR *out, in ec_random_nonzero_scalar() argument
50 return bn_rand_range_words(out->words, 1, group->order.d, group->order.width, in ec_random_nonzero_scalar()
54 void ec_scalar_add(const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a, in ec_scalar_add() argument
56 const BIGNUM *order = &group->order; in ec_scalar_add()
62 void ec_scalar_to_montgomery(const EC_GROUP *group, EC_SCALAR *r, in ec_scalar_to_montgomery() argument
64 const BIGNUM *order = &group->order; in ec_scalar_to_montgomery()
65 bn_to_montgomery_small(r->words, a->words, order->width, group->order_mont); in ec_scalar_to_montgomery()
68 void ec_scalar_from_montgomery(const EC_GROUP *group, EC_SCALAR *r, in ec_scalar_from_montgomery() argument
70 const BIGNUM *order = &group->order; in ec_scalar_from_montgomery()
71 bn_from_montgomery_small(r->words, a->words, order->width, group->order_mont); in ec_scalar_from_montgomery()
74 void ec_scalar_mul_montgomery(const EC_GROUP *group, EC_SCALAR *r, in ec_scalar_mul_montgomery() argument
76 const BIGNUM *order = &group->order; in ec_scalar_mul_montgomery()
78 group->order_mont); in ec_scalar_mul_montgomery()
81 void ec_simple_scalar_inv_montgomery(const EC_GROUP *group, EC_SCALAR *r, in ec_simple_scalar_inv_montgomery() argument
83 const BIGNUM *order = &group->order; in ec_simple_scalar_inv_montgomery()
85 group->order_mont); in ec_simple_scalar_inv_montgomery()
88 void ec_scalar_inv_montgomery(const EC_GROUP *group, EC_SCALAR *r, in ec_scalar_inv_montgomery() argument
90 group->meth->scalar_inv_montgomery(group, r, a); in ec_scalar_inv_montgomery()
93 int ec_scalar_inv_montgomery_vartime(const EC_GROUP *group, EC_SCALAR *r, in ec_scalar_inv_montgomery_vartime() argument
95 return group->meth->scalar_inv_montgomery_vartime(group, r, a); in ec_scalar_inv_montgomery_vartime()