Skip to content

Commit

Permalink
Merge #1484: tests: Drop redundant _scalar_check_overflow calls
Browse files Browse the repository at this point in the history
51df2d9 tests: Drop redundant _scalar_check_overflow calls (Tim Ruffing)

Pull request description:

ACKs for top commit:
  stratospher:
    ACK 51df2d9.
  jonasnick:
    ACK 51df2d9

Tree-SHA512: 52caff34b0cbb8570b6aa962c86c249e216d3a78661715c6adf6804379c60be049e36fcb714cd562d350787949dfccf95d0b9a885480e08513664864abd36928
  • Loading branch information
jonasnick committed Jan 23, 2024
2 parents e4af41c + 51df2d9 commit 5ad3aa3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -2927,18 +2927,14 @@ static void run_scalar_tests(void) {
secp256k1_scalar_set_b32(&r2, res[i][1], &overflow);
CHECK(!overflow);
secp256k1_scalar_mul(&z, &x, &y);
CHECK(!secp256k1_scalar_check_overflow(&z));
CHECK(secp256k1_scalar_eq(&r1, &z));
if (!secp256k1_scalar_is_zero(&y)) {
secp256k1_scalar_inverse(&zz, &y);
CHECK(!secp256k1_scalar_check_overflow(&zz));
secp256k1_scalar_inverse_var(&zzv, &y);
CHECK(secp256k1_scalar_eq(&zzv, &zz));
secp256k1_scalar_mul(&z, &z, &zz);
CHECK(!secp256k1_scalar_check_overflow(&z));
CHECK(secp256k1_scalar_eq(&x, &z));
secp256k1_scalar_mul(&zz, &zz, &y);
CHECK(!secp256k1_scalar_check_overflow(&zz));
CHECK(secp256k1_scalar_eq(&secp256k1_scalar_one, &zz));
}
secp256k1_scalar_mul(&z, &x, &x);
Expand Down

0 comments on commit 5ad3aa3

Please sign in to comment.