From b4c334cf7760113f167c0d700e27fb65de2f189a Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 16 Nov 2024 15:32:08 +0000 Subject: Simplify signature of ec_wNAF_mul() The only caller passes in num = 1 and is itself called in a path that ensures that the multiplier of the generator is != NULL. Consequently we don't need to deal with an array of points and an array of scalars so rename them accordingly. In addition, the change implies that numblocks and num_scalar are now always 1, so inline this information and take a first step towards disentangling this gordian knot. ok jsing --- src/lib/libcrypto/ec/ecp_methods.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/ec/ecp_methods.c') diff --git a/src/lib/libcrypto/ec/ecp_methods.c b/src/lib/libcrypto/ec/ecp_methods.c index 61f95b5bb9..1b763cf219 100644 --- a/src/lib/libcrypto/ec/ecp_methods.c +++ b/src/lib/libcrypto/ec/ecp_methods.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecp_methods.c,v 1.7 2024/11/12 13:09:54 tb Exp $ */ +/* $OpenBSD: ecp_methods.c,v 1.8 2024/11/16 15:32:08 tb Exp $ */ /* Includes code written by Lenka Fibikova * for the OpenSSL project. * Includes code written by Bodo Moeller for the OpenSSL project. @@ -1604,7 +1604,7 @@ static int ec_mul_double_nonct(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, const BIGNUM *p_scalar, const EC_POINT *point, BN_CTX *ctx) { - return ec_wNAF_mul(group, r, g_scalar, 1, &point, &p_scalar, ctx); + return ec_wNAF_mul(group, r, g_scalar, point, p_scalar, ctx); } static void -- cgit v1.2.3-55-g6feb