Commit Graph
1 Commits
Author SHA1 Message Date
Jonas NickandFerdinando Ametrano 6e8dafd3c3 bip-0327: add test vectors and a README that describes them
Add Sign test vectors for a secnonce with k2' = 0 and for a secnonce
generated for a different public key. No previous test vector detected
an implementation that checks only k1', or one that omits the public
key check added in 1.0.0-rc.2.

Add test vectors for a single signer, a 4-byte extra_in, and plain and
x-only tweaks in DeterministicSign. They detect implementations that
reject a single signer, encode the length of extra_in as 32 whenever
extra_in is present, or treat every tweak in DeterministicSign as
x-only.

Add a README to the vectors directory. It states that the test vectors
only contain inputs whose length and number meet the specification of
BIP327, and that a test vector should only be added if it detects a
plausible implementation mistake that the other test vectors do not
detect. Name that mistake in the comment of each added test vector.

Co-authored-by: Ferdinando Ametrano <ferdinando@ametrano.net>
2026-11-16 09:29:52 +00:00