From 3dbfb48946b9d2a98acef23674617510cf1b3386 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Thu, 4 Jan 2024 15:45:11 +0000 Subject: [PATCH] tests: restore scalar_mul test Without this commit, the res[i][1] test vectors are unused. They were introduced to test the correctness of scalar_sqr(x) and scalar_mul(x, x). These tests were deleted as part of removing scalar_sqr in commit 5437e7bdfbffddf69fdf7b4af7e997c78f5dafbf. --- src/tests.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests.c b/src/tests.c index bec1c45585..32946439ff 100644 --- a/src/tests.c +++ b/src/tests.c @@ -2941,6 +2941,8 @@ static void run_scalar_tests(void) { CHECK(!secp256k1_scalar_check_overflow(&zz)); CHECK(secp256k1_scalar_eq(&secp256k1_scalar_one, &zz)); } + secp256k1_scalar_mul(&z, &x, &x); + CHECK(secp256k1_scalar_eq(&r2, &z)); } } }