What was r2 supposed to be in scalar static test vectors? #1463
-
Scalar has a bunch of static test vectors and there is an Line 2927 in 77af1da |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't know the exact intentions of the tests, but there's also the possibility that the secp256k1_scalar_mul(&z, &x, &x);
CHECK(secp256k1_scalar_eq(&r2, &z)); We could either remove |
Beta Was this translation helpful? Give feedback.
r2
was used to test the correctness ofscalar_sqr
. The tests andscalar_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 ofmul
because the removed lines also essentially tested this:We could either remove
r2
andres[i][1]
or use them to testmul
.