Skip to content

Commit d373bf6

Browse files
Merge #1474: tests: restore scalar_mul test
3dbfb48 tests: restore scalar_mul test (Jonas Nick) Pull request description: 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 [5437e7b](5437e7b#diff-c2d5f1f7616875ab71cd41b053cfb428696988ff89642b931a0963d50f34f7e8L2195). Discovered in #1463 by Coding-Enthusiast (thanks!). ACKs for top commit: real-or-random: utACK 3dbfb48 Tree-SHA512: 914e08db3efaa1cef546a9730096e740478c422d41fedb2b71ec3a7ea962f81740a05dc7e7c1fb191088f6d38b5690479c7d0864ca8abf2b2e9c4334f03ca605
2 parents 79e0945 + 3dbfb48 commit d373bf6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tests.c

+2
Original file line numberDiff line numberDiff line change
@@ -2941,6 +2941,8 @@ static void run_scalar_tests(void) {
29412941
CHECK(!secp256k1_scalar_check_overflow(&zz));
29422942
CHECK(secp256k1_scalar_eq(&secp256k1_scalar_one, &zz));
29432943
}
2944+
secp256k1_scalar_mul(&z, &x, &x);
2945+
CHECK(secp256k1_scalar_eq(&r2, &z));
29442946
}
29452947
}
29462948
}

0 commit comments

Comments
 (0)