Skip to content

What was r2 supposed to be in scalar static test vectors? #1463

Discussion options

You must be logged in to vote

r2 was used to test the correctness of scalar_sqr. The tests and scalar_sqr were removed in commit 5437e7bdfbffddf69fdf7b4af7e997c78f5dafbf. You are right that it is unused right now.

I don't know the exact intentions of the tests, but there's also the possibility that the r2 static test vectors also increased test coverage of mul because the removed lines also essentially tested this:

            secp256k1_scalar_mul(&z, &x, &x);
            CHECK(secp256k1_scalar_eq(&r2, &z));

We could either remove r2 and res[i][1] or use them to test mul.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@real-or-random
Comment options

Answer selected by Coding-Enthusiast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants