提交 5956b110 编写于 作者: E Emilia Kasper

NISTZ256: owur'ize.

__owur'ize static methods to catch calling errors within the module.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 6038354c
......@@ -546,14 +546,14 @@ static void ecp_nistz256_mod_inverse(BN_ULONG r[P256_LIMBS],
* ecp_nistz256_bignum_to_field_elem copies the contents of |in| to |out| and
* returns one if it fits. Otherwise it returns zero.
*/
static int ecp_nistz256_bignum_to_field_elem(BN_ULONG out[P256_LIMBS],
__owur static int ecp_nistz256_bignum_to_field_elem(BN_ULONG out[P256_LIMBS],
const BIGNUM *in)
{
return bn_copy_words(out, in, P256_LIMBS);
}
/* r = sum(scalar[i]*point[i]) */
static int ecp_nistz256_windowed_mul(const EC_GROUP *group,
__owur static int ecp_nistz256_windowed_mul(const EC_GROUP *group,
P256_POINT *r,
const BIGNUM **scalar,
const EC_POINT **point,
......@@ -755,7 +755,7 @@ static int ecp_nistz256_is_affine_G(const EC_POINT *generator)
is_one(bn_get_words(generator->Z));
}
static int ecp_nistz256_mult_precompute(EC_GROUP *group, BN_CTX *ctx)
__owur static int ecp_nistz256_mult_precompute(EC_GROUP *group, BN_CTX *ctx)
{
/*
* We precompute a table for a Booth encoded exponent (wNAF) based
......@@ -1097,7 +1097,7 @@ static void ecp_nistz256_avx2_mul_g(P256_POINT *r,
# endif
#endif
static int ecp_nistz256_set_from_affine(EC_POINT *out, const EC_GROUP *group,
__owur static int ecp_nistz256_set_from_affine(EC_POINT *out, const EC_GROUP *group,
const P256_POINT_AFFINE *in,
BN_CTX *ctx)
{
......@@ -1130,7 +1130,7 @@ static int ecp_nistz256_set_from_affine(EC_POINT *out, const EC_GROUP *group,
}
/* r = scalar*G + sum(scalars[i]*points[i]) */
static int ecp_nistz256_points_mul(const EC_GROUP *group,
__owur static int ecp_nistz256_points_mul(const EC_GROUP *group,
EC_POINT *r,
const BIGNUM *scalar,
size_t num,
......@@ -1365,7 +1365,7 @@ err:
return ret;
}
static int ecp_nistz256_get_affine(const EC_GROUP *group,
__owur static int ecp_nistz256_get_affine(const EC_GROUP *group,
const EC_POINT *point,
BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册