Page MenuHomePhabricator

[SECP256K1] Improve field/scalar inverse tests
ClosedPublic

Authored by Fabien on Apr 13 2021, 18:28.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABCa49b5685e0ef: [SECP256K1] Improve field/scalar inverse tests
Summary
Add a new run_inverse_tests that replaces all existing field/scalar
inverse tests, and tests a few identities for fixed inputs, small
numbers (-999...999), random inputs (structured and unstructured), as
well as comparing with the output of secp256k1_fe_inv_all_var.

Partial backport of secp256k1#831:
https://github.com/bitcoin-core/secp256k1/pull/831/commits/aa9cc5218001f14f4312bde1058417d4b755fd11

Depends on D9405.

Test Plan
ninja check-secp256k1