Repository navigation
Conversation
Add a vendored copy of the secp256k1lab library (master branch, commit a265da139aea27386085a2a8760f8698e1bda64e) that the full-aggregation reference implementation and test vector scripts depend on.
This was referenced Oct 25, 2026
The NonceGen vectors so far use an extra_in of 0 or 32 bytes. Add one whose extra_in is 38 bytes long. The SigAgg vectors cover two signers, and a partial signature that is n or 2^256 - 1, which is not less than n.
run_sign_error_tests decoded the secret key, secnonce, public keys and public nonces before its try, so a vector whose failure is a decoding failure stopped the runner instead of passing. Add a vector in which another signer's R2 is not on the curve, which makes GetSessionValues fail.
Sign fails if r1, r2 or d is not less than n. The vectors so far covered only zero values.
Sign: a signer whose untweaked key has odd y. So far only a tweaked key exercised d' = n - d. PartialSigVerify: invalid encodings of the signer's R1 and R2 and of another signer's R1, and a public key that is not on the curve. Tweak: a tweak of zero, plain and X-only, and an X-only tweak equal to n.
fametrano
force-pushed
the
bip459-vectors
branch
from
November 2, 2026 05:24
732f293 to
74d2c8f
Compare
Author
|
Rebased on the new fullagg (70d35f8) and cut to what your rewrite does not cover; the description now says what remains. |
Author
|
Closing: bitcoin#2210 merged BIP459 with the NonceGen and NonceAgg vectors you took from here, and you left the rest out in bitcoin#2210 (comment). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds BIP459 test vectors for cases the current files miss, without changing the specification. Your rewrite of fullagg already covers NonceAgg, the 31- and 33-byte Verify rows and every NonceGen row but one, so only the rest remains here.
A new file covers SigAgg, and new rows cover NonceGen with a 38-byte extra_in, Sign, PartialSigVerify, tweaking and Sign errors, whose inputs the runner now decodes inside its try. Every new row passes run_test_vectors.py and matches an implementation I maintain, and the bitcoin-core/secp256k1#1754 module wherever its API accepts the input; for bitcoin#1754 I adapted its vector tests to expect a failure at parsing and added a SigAgg test (harnesses and output). The rows for a secnonce value or secret key equal to n are in their own commit, so you can drop it: against a parser that reduces modulo n they add nothing over the zero rows, since n becomes 0 and the zero checks reject it.