Skip to content

Commit

Permalink
Merge #1474: tests: restore scalar_mul test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
real-or-random committed Jan 4, 2024
2 parents 79e0945 + 3dbfb48 commit d373bf6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
Expand Down

0 comments on commit d373bf6

Please sign in to comment.