tests: recovery: use the group order as the overflowing scalar #2011

pull nniiovoo wants to merge 1 commits into bitcoin-core:master from nniiovoo:tests-recovery-overflow-boundary changing 1 files +1 −4
  1. nniiovoo commented at 8:51 AM on November 27, 2026: contributor

    Follow-up to [this review comment on #1997](https://github.com/bitcoin-core/secp256k1/pull/1997#discussion_r4580998503).

    Use the group order in the recovery tests to check that signing rejects a secret key equal to n and compact parsing rejects R or S equal to n.

  2. tests: recovery: use the group order as the overflowing scalar
    over_privkey was all 0xFF bytes. Point it to secp256k1_group_order_bytes
    instead, so the overflow checks in test_ecdsa_recovery_api_internal use
    the smallest value that has to be rejected.
    e9fd3854fa
  3. real-or-random approved
  4. real-or-random commented at 9:17 AM on November 27, 2026: contributor

    ACK e9fd3854fac13d29a33d1319eef65225bcec9239

  5. real-or-random merged this on Nov 27, 2026
  6. real-or-random closed this on Nov 27, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-12-02 10:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me