You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bip-0322.mediawiki
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,15 +61,15 @@ The <code>to_spend</code> transaction is:
61
61
vout[0].nValue = 0
62
62
vout[0].scriptPubKey = message_challenge
63
63
64
-
where <code>message_hash</code> is a BIP340-tagged hash of the message, i.e. sha256_tag(m), where tag = <code>BIP0322-signed-message</code>, and <code>message_challenge</code> is the to be proven (public) key script.
64
+
where <code>message_hash</code> is a BIP340-tagged hash of the message, i.e. sha256_tag(m), where tag = <code>BIP0322-signed-message</code> and <code>m</code> is the message as is without length prefix or null terminator, and <code>message_challenge</code> is the to be proven (public) key script.
65
65
66
66
The <code>to_sign</code> transaction is:
67
67
68
-
nVersion = 0 or as appropriate (e.g. 2, for time locks)
69
-
nLockTime = 0 or as appropriate (for time locks)
68
+
nVersion = 0 or (FULL format only) as appropriate (e.g. 2, for time locks)
69
+
nLockTime = 0 or (FULL format only) as appropriate (for time locks)
70
70
vin[0].prevout.hash = to_spend.txid
71
71
vin[0].prevout.n = 0
72
-
vin[0].nSequence = 0 or as appropriate (for time locks)
72
+
vin[0].nSequence = 0 or (FULL format only) as appropriate (for time locks)
73
73
vin[0].scriptWitness = message_signature
74
74
vout[0].nValue = 0
75
75
vout[0].scriptPubKey = OP_RETURN
@@ -144,7 +144,7 @@ This specification is backwards compatible with the legacy signmessage/verifymes
@@ -160,4 +160,21 @@ This document is licensed under the Creative Commons CC0 1.0 Universal license.
160
160
161
161
== Test vectors ==
162
162
163
-
TODO
163
+
=== Message hashing ===
164
+
165
+
Message hashes are BIP340-tagged hashes of a message, i.e. sha256_tag(m), where tag = <code>BIP0322-signed-message</code>, and m is the message as is without length prefix or null terminator:
0 commit comments