aboutsummaryrefslogtreecommitdiff
path: root/src/test/data/script_valid.json
diff options
context:
space:
mode:
authorPeter Todd <pete@petertodd.org>2015-01-09 05:52:57 -0500
committerWladimir J. van der Laan <laanwj@gmail.com>2015-01-26 12:10:29 +0100
commitb24ff47c6487d6cb81c9691c4e68c33f367fce74 (patch)
treee8ab642eb8cac2adc4bdcdf246c6cb4eed1dec51 /src/test/data/script_valid.json
parented4206acb1bdc9d23abe30fefd13f9d49a1979b3 (diff)
downloadbitcoin-b24ff47c6487d6cb81c9691c4e68c33f367fce74.tar.xz
Make empty byte arrays pass CheckSignatureEncoding()
Makes it possible to compactly provide a delibrately invalid signature for use with CHECK(MULTI)SIG. For instance with BIP19 if m != n invalid signatures need to be provided in the scriptSig; prior to this change those invalid signatures would need to be large DER-encoded signatures. Note that we may want to further expand on this change in the future by saying that only OP_0 is a "valid" invalid signature; BIP19 even with this change is inherently malleable as the invalid signatures can be any validly encoded DER signature. Rebased-From: 2fa9a8ec86033b809a1c48f0396c3482c0d5d33c Github-Pull: #5627
Diffstat (limited to 'src/test/data/script_valid.json')
-rw-r--r--src/test/data/script_valid.json5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index d3075de646..17398ca1bd 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -662,6 +662,11 @@
["0 0 0x02 0x0000", "CHECKMULTISIGVERIFY 1", ""],
["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", ""],
+["While not really correctly DER encoded, the empty signature is allowed by"],
+["STRICTENC to provide a compact way to provide a delibrately invalid signature."],
+["0", "0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 CHECKSIG NOT", "STRICTENC"],
+["0 0", "1 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 1 CHECKMULTISIG NOT", "STRICTENC"],
+
["CHECKMULTISIG evaluation order tests. CHECKMULTISIG evaluates signatures and"],
["pubkeys in a specific order, and will exit early if the number of signatures"],
["left to check is greater than the number of keys left. As STRICTENC fails the"],