Page MenuHomePhabricator

[SECP256K1] Improve bounds checks in modinv modules
ClosedPublic

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

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC76ecd0d3ed0e: [SECP256K1] Improve bounds checks in modinv modules
Summary
This commit adds functions to verify and compare numbers in
signed{30,62} notation, and uses that to do more extensive bounds
checking on various variables in the modinv code.

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

Depends on D9402.

Test Plan
ninja check-secp256k1

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable