From 194dd04699f03af4cf7f7f88ecf31f243a19552b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Mon, 12 Mar 2001 07:26:23 +0000 Subject: [PATCH] Rename function EC_GROUP_precompute to EC_GROUP_precompute_mult, which indicate its purpose more clearly. --- crypto/ec/ec.h | 4 ++-- crypto/ec/ec_err.c | 2 +- crypto/ec/ec_mult.c | 6 +++--- crypto/ec/ectest.c | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crypto/ec/ec.h b/crypto/ec/ec.h index 499c9331dc..7f7f7078ef 100644 --- a/crypto/ec/ec.h +++ b/crypto/ec/ec.h @@ -162,7 +162,7 @@ int EC_POINTs_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *); int EC_POINTs_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, size_t num, const EC_POINT *[], const BIGNUM *[], BN_CTX *); int EC_POINT_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, const EC_POINT *, const BIGNUM *, BN_CTX *); -int EC_GROUP_precompute(EC_GROUP *, BN_CTX *); +int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *); @@ -195,7 +195,7 @@ void ERR_load_EC_strings(void); #define EC_F_EC_GROUP_GET_EXTRA_DATA 107 #define EC_F_EC_GROUP_GET_ORDER 141 #define EC_F_EC_GROUP_NEW 108 -#define EC_F_EC_GROUP_PRECOMPUTE 142 +#define EC_F_EC_GROUP_PRECOMPUTE_MULT 142 #define EC_F_EC_GROUP_SET_CURVE_GFP 109 #define EC_F_EC_GROUP_SET_EXTRA_DATA 110 #define EC_F_EC_GROUP_SET_GENERATOR 111 diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index c0573e8330..49aff3139d 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -86,7 +86,7 @@ static ERR_STRING_DATA EC_str_functs[]= {ERR_PACK(0,EC_F_EC_GROUP_GET_EXTRA_DATA,0), "EC_GROUP_get_extra_data"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_ORDER,0), "EC_GROUP_get_order"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW,0), "EC_GROUP_new"}, -{ERR_PACK(0,EC_F_EC_GROUP_PRECOMPUTE,0), "EC_GROUP_precompute"}, +{ERR_PACK(0,EC_F_EC_GROUP_PRECOMPUTE_MULT,0), "EC_GROUP_precompute_mult"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_CURVE_GFP,0), "EC_GROUP_set_curve_GFp"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_EXTRA_DATA,0), "EC_GROUP_set_extra_data"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_GENERATOR,0), "EC_GROUP_set_generator"}, diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index 0a749e83d3..19d2336784 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -309,7 +309,7 @@ int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, con } -int EC_GROUP_precompute(EC_GROUP *group, BN_CTX *ctx) +int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) { const EC_POINT *generator; BN_CTX *new_ctx = NULL; @@ -319,7 +319,7 @@ int EC_GROUP_precompute(EC_GROUP *group, BN_CTX *ctx) generator = EC_GROUP_get0_generator(group); if (generator == NULL) { - ECerr(EC_F_EC_GROUP_PRECOMPUTE, EC_R_UNDEFINED_GENERATOR); + ECerr(EC_F_EC_GROUP_PRECOMPUTE_MULT, EC_R_UNDEFINED_GENERATOR); return 0; } @@ -337,7 +337,7 @@ int EC_GROUP_precompute(EC_GROUP *group, BN_CTX *ctx) if (!EC_GROUP_get_order(group, order, ctx)) return 0; if (BN_is_zero(order)) { - ECerr(EC_F_EC_GROUP_PRECOMPUTE, EC_R_UNKNOWN_ORDER); + ECerr(EC_F_EC_GROUP_PRECOMPUTE_MULT, EC_R_UNKNOWN_ORDER); goto err; } diff --git a/crypto/ec/ectest.c b/crypto/ec/ectest.c index ac0f055faf..fd294bb2a8 100644 --- a/crypto/ec/ectest.c +++ b/crypto/ec/ectest.c @@ -330,7 +330,7 @@ int main(int argc, char *argv[]) if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, "."); fflush(stdout); - if (!EC_GROUP_precompute(group, ctx)) ABORT; + if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, " ok\n"); @@ -370,7 +370,7 @@ int main(int argc, char *argv[]) if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, "."); fflush(stdout); - if (!EC_GROUP_precompute(group, ctx)) ABORT; + if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, " ok\n"); @@ -411,7 +411,7 @@ int main(int argc, char *argv[]) if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, "."); fflush(stdout); - if (!EC_GROUP_precompute(group, ctx)) ABORT; + if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, " ok\n"); @@ -457,7 +457,7 @@ int main(int argc, char *argv[]) if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, "."); fflush(stdout); - if (!EC_GROUP_precompute(group, ctx)) ABORT; + if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, " ok\n"); @@ -509,7 +509,7 @@ int main(int argc, char *argv[]) if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, "."); fflush(stdout); - if (!EC_GROUP_precompute(group, ctx)) ABORT; + if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; if (!EC_POINT_is_at_infinity(group, Q)) ABORT; fprintf(stdout, " ok\n");