Skip to content

Commit f0784c6

Browse files
committed
BIP322: added background to explain why BIP322 exists, and what it changes
1 parent a2645cd commit f0784c6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bip-0322.mediawiki

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
A standard for interoperable generic signed messages based on the Bitcoin Script format.
1717

18+
== Background ==
19+
20+
* Assume two actors, a prover <code>P</code> and a verifier <code>V</code>.
21+
* <code>P</code> wants to prove that they own the private key <code>k</code> associated with a given address <code>A</code> (which in turn is derived from the pubkey <code>kG</code>).
22+
* Let <code>V</code> generate a message <code>M</code> and hand this to <code>P</code>.
23+
* <code>P</code> generates a signature <code>S</code> by signing the message <code>M</code> using <code>k</code>. Given <code>S</code>, <code>V</code> can prove that <code>P</code> has the private key associated with <code>A</code>.
24+
25+
The astute reader will notice that the above is missing a critical part, namely the pubkey <code>kG</code>, without which the verifier cannot actually verify the message. The current message signing standard solves this via a cryptographic trick, wherein the signature <code>S</code> above is a special "recoverable signature" type. Given the message <code>M</code> and the signature <code>S</code>, it is then possible to recover the pubkey <code>kG</code>. The system thus derives the address for the pubkey <code>kG</code>, and if it does not match <code>A</code>, the proof is deemed invalid.
26+
27+
While this is a neat trick, it unnecessarily restricts and complicates the message signing mechanism; for instance, it is currently not possible to sign a message for a P2SH address, because there is no pubkey to recover from the resulting signature.
28+
1829
== Motivation ==
1930

2031
The current message signing standard only works for P2PKH (1...) addresses. By extending it to use a Bitcoin Script based approach, it could be made more generic without causing a too big burden on implementers, who most likely have access to Bitcoin Script interpreters already.

0 commit comments

Comments
 (0)