diff options
author | Brandon Black <brandonblack@bitgo.com> | 2021-10-29 14:48:52 -0700 |
---|---|---|
committer | Brandon Black <brandonblack@bitgo.com> | 2021-11-01 07:20:40 -0700 |
commit | 5b9b44cc79a8f9e6370f8f533920d68a50015390 (patch) | |
tree | e41c00695fc0cd0ea903828eeb97ed9527913488 | |
parent | 708ce10bbc3c3be6d4293b50f56a1cae23c8b358 (diff) | |
download | bips-5b9b44cc79a8f9e6370f8f533920d68a50015390.tar.xz |
BIP341: SigHash: Clarify SIGHASH_DEFAULT
-rw-r--r-- | bip-0341.mediawiki | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki index ba3310f..13767eb 100644 --- a/bip-0341.mediawiki +++ b/bip-0341.mediawiki @@ -90,7 +90,7 @@ We first define a reusable common signature message calculation function, follow The function ''SigMsg(hash_type, ext_flag)'' computes the message being signed as a byte array. It is implicitly also a function of the spending transaction and the outputs it spends, but these are not listed to keep notation simple. -The parameter ''hash_type'' is an 8-bit unsigned value. The <code>SIGHASH</code> encodings from the legacy script system are reused, including <code>SIGHASH_ALL</code>, <code>SIGHASH_NONE</code>, <code>SIGHASH_SINGLE</code>, and <code>SIGHASH_ANYONECANPAY</code>, plus the default ''hash_type'' value ''0x00'' which results in signing over the whole transaction just as for <code>SIGHASH_ALL</code>. The following restrictions apply, which cause validation failure if violated: +The parameter ''hash_type'' is an 8-bit unsigned value. The <code>SIGHASH</code> encodings from the legacy script system are reused, including <code>SIGHASH_ALL</code>, <code>SIGHASH_NONE</code>, <code>SIGHASH_SINGLE</code>, and <code>SIGHASH_ANYONECANPAY</code>. We define a new ''hashtype'' <code>SIGHASH_DEFAULT</code> (value ''0x00'') which results in signing over the whole transaction just as for <code>SIGHASH_ALL</code>. The following restrictions apply, which cause validation failure if violated: * Using any undefined ''hash_type'' (not ''0x00'', ''0x01'', ''0x02'', ''0x03'', ''0x81'', ''0x82'', or ''0x83''<ref>'''Why reject unknown ''hash_type'' values?''' By doing so, it is easier to reason about the worst case amount of signature hashing an implementation with adequate caching must perform.</ref>). * Using <code>SIGHASH_SINGLE</code> without a "corresponding output" (an output with the same index as the input being verified). |