Skip to content

Commit

Permalink
tests: restore scalar_mul test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonasnick committed Jan 4, 2024
1 parent efe85c7 commit 3dbfb48
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 3dbfb48

Please sign in to comment.