diff --git a/bip-0322.mediawiki b/bip-0322.mediawiki index 71959f14..6d0fb780 100644 --- a/bip-0322.mediawiki +++ b/bip-0322.mediawiki @@ -178,3 +178,47 @@ Thanks to David Harding, Jim Posen, Kalle Rosenbaum, Pieter Wuille, and many oth == Copyright == This document is licensed under the Creative Commons CC0 1.0 Universal license. + +== Test vectors == + +* STANDARD_SCRIPT_VERIFY_FLAGS = 01ffdf (131039) +* address = 2MsnqGxX7Abtn4b379MEpkDaD3VbNKQosd8 +* message = "hello world" +* sighash = 7b66a1861b4e179e1dbab4702e26bcefeabf1cada7cccc97b6ebaec89a035d84 (sha256d("Bitcoin Message:hello world")) + +A possible proof is: + +* HEX: dfff01000117160014689bbb5d76774321c652832ea209958fa1770b330247304402204368b119399d33b9bc9beef06d713becefd3ac508dc95ff62d1859d4912960c7022063d88ddc648faed710b3f870b7a839fdc1b3bfc3c3bd065df51bbbd8c386c81c012102b4e4c6d5021576a5c0bc4535890c3f17e1ff23a94eac87beb0a5e8747c42d920 +* Base64: 3/8BAAEXFgAUaJu7XXZ3QyHGUoMuogmVj6F3CzMCRzBEAiBDaLEZOZ0zubyb7vBtcTvs79OsUI3JX/YtGFnUkSlgxwIgY9iN3GSPrtcQs/hwt6g5/cGzv8PDvQZd9Ru72MOGyBwBIQK05MbVAhV2pcC8RTWJDD8X4f8jqU6sh76wpeh0fELZIA== + +Split into components: + +{|class="wikitable" style="text-align: center;" +|- +!Type +!Length +!Name +!Value +!Comment +|- +|Uint32||4||flags||dfff0100||standard flags used in signing +|- +|Uint8||1||entries||01||1 entry +|- +|VarInt||1-8||scriptsiglen||17||23 byte scriptsig +|- +|Uint8[32]||32||scriptsig||160014689bbb5d76774321c652832ea209958fa1770b33||ScriptSig data +|- +|VarInt||1-8||witlen||02||2 entries in witness stack +|- +|VarInt||1-8||entry1len||47||71 byte entry +|- +|Uint8[71]||71||entry1||304402204368b119399d33b9bc9beef06d713becefd3ac50 +8dc95ff62d1859d4912960c7022063d88ddc648faed710b3 +f870b7a839fdc1b3bfc3c3bd065df51bbbd8c386c81c01||Witness stack item 1 +|- +|VarInt||1-8||entry2len||21||33 byte entry +|- +|Uint8[33]||33||entry2||02b4e4c6d5021576a5c0bc4535890c3f17e1ff23a94eac87 +beb0a5e8747c42d920||Witness stack item 2 +|}