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.
This commit is contained in:
Jonas Nick committed 2026-11-16 09:29:52 +00:00
1 parent b7557f897a
commit 7cdaa7a183
2 files changed
+38 -3

No files matched your search

+5 -3
View File
@@ -20,7 +20,9 @@
"0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F817980279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
"032DE2662628C90B03F5E720284EB52FF7D71F4284F627B68A853D78C78E1FFE9303E4C5524E83FFE1493B9077CF1CA6BEB2090C93D930321071AD40B2F44E599046",
"0237C87821AFD50A8644D820A8F3E02E499C931865C2360FB43D0A0D20DAFE07EA0387BF891D2A6DEAEBADC909352AA9405D1428C15F4B75F04DAE642A95C2548480",
"0200000000000000000000000000000000000000000000000000000000000000090287BF891D2A6DEAEBADC909352AA9405D1428C15F4B75F04DAE642A95C2548480"
"0200000000000000000000000000000000000000000000000000000000000000090287BF891D2A6DEAEBADC909352AA9405D1428C15F4B75F04DAE642A95C2548480",
"0394D770EB9681D29BDCF7B4CD6A7B25CF5E1688BBA5E8601C9A84B40BF7BFBBB90287BF891D2A6DEAEBADC909352AA9405D1428C15F4B75F04DAE642A95C2548480",
"034EB831A6C253C123F87AF3B9C56757306A0FAD45816D0A58406BB16CA16A56CC03E4C5524E83FFE1493B9077CF1CA6BEB2090C93D930321071AD40B2F44E599046"
],
"aggnonces": [
"028465FCF0BBDBCF443AABCCE533D42B4B5A10966AC09A49655E8C42DAAB8FCD61037496A3CC86926D452CAFCFD55D25972CA1675D549310DE296BFF42F72EEEA8C9",
@@ -245,10 +247,10 @@
{
"sig": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",
"key_indices": [0, 1, 2],
"nonce_indices": [0, 1, 2],
"nonce_indices": [5, 1, 6],
"msg_index": 0,
"signer_index": 0,
"comment": "Signature exceeds group size"
"comment": "Signature exceeds group size but is valid modulo n. Detects implementations that omit the range check of the partial signature or check s <= n instead of s < n."
}
],
"verify_error_test_cases": [