HomePhabricator

[SECP256K1] Improve field/scalar inverse tests

Description

[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

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9406

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Oct 12 2020, 06:20
FabienCommitted on Apr 14 2021, 06:53
FabienPushed on Apr 14 2021, 06:53
Reviewer
Restricted Project
Differential Revision
D9406: [SECP256K1] Improve field/scalar inverse tests
Parents
rABC1080f989e5b7: [SECP256K1] Make field/scalar code use the new modinv modules for inverses
Branches
Unknown
Tags
Unknown