Skip to content

Commit 3dbfb48

Browse files
committed
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 5437e7b.
1 parent efe85c7 commit 3dbfb48

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)