summaryrefslogtreecommitdiff
path: root/bip-0322.mediawiki
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2022-01-26 19:17:52 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2022-01-31 19:06:52 +0900
commitaa92d9cd6e6dd334f4a21c1faf41cb7fe88eed74 (patch)
tree9d13a08669a2b826be44c23348c39bf1a4b9b048 /bip-0322.mediawiki
parent1b6c85b0b4823ce77ca4123ca52ee7f64925e271 (diff)
downloadbips-aa92d9cd6e6dd334f4a21c1faf41cb7fe88eed74.tar.xz
add test vectors to BIP-322
Diffstat (limited to 'bip-0322.mediawiki')
-rw-r--r--bip-0322.mediawiki21
1 files changed, 19 insertions, 2 deletions
diff --git a/bip-0322.mediawiki b/bip-0322.mediawiki
index ed38440..c0978fc 100644
--- a/bip-0322.mediawiki
+++ b/bip-0322.mediawiki
@@ -144,7 +144,7 @@ This specification is backwards compatible with the legacy signmessage/verifymes
== Reference implementation ==
-TODO
+* Bitcoin Core pull request (basic support) at: https://github.com/bitcoin/bitcoin/pull/24058
== Acknowledgements ==
@@ -160,4 +160,21 @@ This document is licensed under the Creative Commons CC0 1.0 Universal license.
== Test vectors ==
-TODO
+=== Message hashing ===
+
+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:
+
+* Message = "" (empty string): <code>c90c269c4f8fcbe6880f72a721ddfbf1914268a794cbb21cfafee13770ae19f1</code>
+* Message = "Hello World": <code>f0eb03b1a75ac6d9847f55c624a99169b5dccba2a31f5b23bea77ba270de0a7a</code>
+
+=== Message signing ===
+
+Given below parameters:
+
+* private key <code>L3VFeEujGtevx9w18HD1fhRbCH67Az2dpCymeRE1SoPK6XQtaN2k</code>
+* corresponding address <code>bc1q9vza2e8x573nczrlzms0wvx3gsqjx7vavgkx0l</code>
+
+Produce signatures:
+
+* Message = "" (empty string): <code>AkcwRAIgFuS8y5m0ym9Gj2odoVB5NIL+cPYkeEj8LL1N/6P58X8CIA6jJ9QH2iYKRXVfmhsDzHq1bMS4Adj0nb8DDSdN/SpBASECx/EgAxlkQpQ9hYjgGu6EBCPMVPwVIVJqO4XCsMvViHI=</code>
+* Message = "Hello World": <code>AkcwRAIgG3PASL/vRTgAqogWT6S8rUOQXNnfRzX6JncmbFlHc1ACIGQdsW+rnVmsQzyAYRQisHKFMigDmKiL7LUw4x17Fw5tASECx/EgAxlkQpQ9hYjgGu6EBCPMVPwVIVJqO4XCsMvViHI=</code>