Files
bips/bip-0327/vectors
Jonas Nick 7cdaa7a183 bip-0327: isolate the range check in a PartialSigVerify test vector
The PartialSigVerify test vector with the partial signature n fails the
verification equation even without the range check. So it does not
detect implementations that omit the range check or that check s > n
instead of s >= n. Change the pubnonces of the test vector such that the
partial signature 0 is valid, keeping the aggregate nonce. Since
n*G = 0*G, the partial signature n then satisfies the verification
equation, and only the range check rejects it. The previous version of
the test vector detects no mistake that the new version does not detect,
so it is replaced rather than kept.

gen_vectors_helper.py computes the new pubnonces.
2026-11-16 09:29:52 +00:00
..

BIP327 test vectors

BIP327 specifies the length and number of the inputs of each algorithm, for example that each tweak is a 32-byte array and that there is one tweak mode for each tweak. The test vectors only contain inputs that meet these specifications. Since BIP327 does not specify how algorithms handle other inputs, such as a 31-byte tweak or a missing tweak mode, the test vectors do not test them.

A test vector should only be added if it detects a plausible implementation mistake that the other test vectors do not detect. The comment of the test vector names the mistake, for example "Detects implementations that set gacc to g instead of multiplying it by g".