bip374: add new test vectors checking for boundaries #2335

pull ViniciusCestarii wants to merge 1 commits into bitcoin:master from ViniciusCestarii:bip-374-new-test-vectors changing 2 files +23 −4
  1. ViniciusCestarii commented at 9:16 PM on October 20, 2026: contributor

    Add 3 new generate proof test vectors for testing boundaries:

    Success: a = 1, a = N-1 Failure: a = N+1 (catches implementation that does mod n on secret instead of first rejecting)

  2. bip374: add new test vectors checking for boundaries 60b4c758d4
  3. jonatack added the label Proposed BIP modification on Oct 20, 2026
  4. jonatack added the label Pending acceptance on Oct 20, 2026
  5. jonatack commented at 9:44 PM on October 20, 2026: member

    cc BIP authors @andrewtoth, @RubenSomsen, and @theStack

  6. fametrano commented at 12:35 PM on October 21, 2026: contributor

    ACK 60b4c758, tested: the new vectors agree with an independent implementation.

    The PR adds success cases for a=1 and a=N-1 and a failure case for a=N+1 to the proof-generation vectors. With the existing a=0 and a=N failures, both ends of the valid range are now pinned from both sides.

    I ran all 14 rows of the CSV through btclib-ecc's BIP374 code, with and without libsecp256k1. Every success proof matched byte for byte and verified. The four failure rows (a=0, a=N, a=N+1, B at infinity) were refused. Re-running gen_test_vectors.py reproduced both CSV files exactly. The verification file is unchanged and already covers e=N and s=N, so I see no boundary missing from this change. Script and logs on request.


github-metadata-mirror

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

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