{"number":322,"title":"Generic Signed Message Format","authors":["Karl-Johan Alm","Oliver Gugger"],"status":"Complete","type":"Specification","layer":"Applications","created":"2018-09-10","license":"CC0-1.0","version":"2.0.0","requires":[174,340,341],"replaces":[],"replacedBy":[],"discussion":["https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-March/015818.html","https://github.com/bitcoin/bitcoin/pull/16440","https://github.com/bitcoin/bitcoin/pull/24058","https://bitcointalk.org/index.php?topic=5408898.0","https://groups.google.com/g/bitcoindev/c/RCi1Exs0ZvQ/m/vp6Xo36aBwAJ","https://bitcoin.stackexchange.com/questions/126277/where-can-i-use-bip322-to-sign-a-message-to-verify-a-multisig-address","https://groups.google.com/g/bitcoindev/c/qd6BNz9gxCk/m/k1fHq4RKAQAJ"],"abstract":"A standard for interoperable signed messages based on the Bitcoin Script format, either for proving availability of funds, or for committing to a message as the intended recipient of funds sent to the invoice address.","eli5":"Defines a standard way to sign messages with any type of Bitcoin address, including SegWit and Taproot, not just older legacy addresses. This lets people prove they control an address or its funds in a format that different wallets can verify.","categories":["payments"],"filename":"bip-0322.mediawiki","githubUrl":"https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki","format":"mediawiki","readingMinutes":12,"inbound":1,"revisions":52,"impact":83,"core":false,"references":[],"lastModified":"2026-06-04","html":"<h2 id=\"abstract\">Abstract</h2>\n<p>A standard for interoperable signed messages based on the Bitcoin Script format, either for proving availability of funds, or for committing to a message as the intended recipient of funds sent to the invoice address.</p>\n<h2 id=\"motivation\">Motivation</h2>\n<p>The current message signing standard only works for P2PKH (1...) invoice addresses. We propose to extend and generalize the standard by using an approach based on Bitcoin Script. This ensures that any coins, no matter what script they are controlled by, can in principle be signed for. For easy interoperability with existing signing hardware, we also define a signature message format that resembles a Bitcoin transaction (except that it contains an invalid input, so it cannot be spent on any real network).</p>\n<p>Additionally, the current message signature format uses ECDSA signatures that do not commit to the public key, meaning that they do not actually prove knowledge of any secret keys. (Indeed, valid signatures can be tweaked by third parties to become valid signatures on certain related keys.)</p>\n<p>Ultimately, no message signing protocol can actually prove control of funds, both because a signature is obsolete as soon as it is created, and because the possessor of a secret key may be willing to sign messages on others' behalf even if it would not sign actual transactions. No message signing protocol can fix these limitations.</p>\n<p>Finally, this BIP only addresses the use case where a signer shows they will be able to control funds sent to the invoice address. Proving that a signer sent a prior transaction is not possible using this BIP.</p>\n<h2 id=\"terminology\">Terminology</h2>\n<p>In the context of this BIP, whenever the word \"signature\" or similar is used, it refers to the output of the signing process described below, and, depending on the script type of the <code>message_challenge</code>, is either a full transaction input witness stack, a full transaction, or a PSBT packet that can be validated against a Bitcoin Script Interpreter. Such a \"signature\" may or may not contain an actual cryptographic (ECDSA or Schnorr) signature, depending on what is required to satisfy the script corresponding to the <code>message_challenge</code>.</p>\n<h2 id=\"types-of-signatures\">Types of Signatures</h2>\n<p>This BIP specifies three formats for signing messages: <em>legacy</em>, <em>simple</em> and <em>full</em>. Additionally, a variant of the <em>full</em> format can be used to demonstrate control over a set of UTXOs.</p>\n<div class=\"table-wrap\"><table><tbody><tr><th></th><th>Compatible script types</th><th>Signature prefix</th><th>Signature format</th></tr><tr><td>Legacy</td><td><code>P2PKH</code>, <code>P2SH-P2WPKH</code><sup>1</sup>, <code>P2WPKH</code><sup>1</sup></td><td>n/a</td><td>compact, public key recoverable ECDSA signature, base64-encoded</td></tr><tr><td>Simple</td><td><code>P2WPKH</code>, <code>P2WSH</code><sup>2</sup>, <code>P2TR</code><sup>2</sup> <br/></td><td><code>smp</code></td><td>witness stack, consensus-encoded and base64-encoded</td></tr><tr><td>Full</td><td><code>all</code></td><td><code>ful</code></td><td>full <code>to_sign</code> transaction, consensus-encoded and base64-encoded</td></tr><tr><td>Full (Proof of Funds)</td><td><code>all</code></td><td><code>pof</code></td><td>full finalized PSBT of the <code>to_sign</code> transaction, consensus-encoded and base64-encoded</td></tr></tbody></table></div>\n<p><sup>1</sup>: Possible on a technical level but SHOULD NOT be used anymore in the context of this BIP, see section <a href=\"#legacy\">Legacy</a> below.<br/> <sup>2</sup>: Excluding time lock scripts.</p>\n<p>Signers MUST prefix the signature with the variant that was used to create the signature. To support backward compatibility with implementations of this BIP before it was finalized, a verifier might assume the <em>simple</em> variant in the absence of a prefix.</p>\n<h3 id=\"legacy\">Legacy</h3>\n<p>New proofs SHOULD use the new format for all invoice address formats, including P2PKH.</p>\n<p>The legacy format MAY be used, but MUST be restricted to the legacy P2PKH invoice address format.</p>\n<h3 id=\"simple\">Simple</h3>\n<p>A <em>simple</em> signature consists of a witness stack, consensus encoded as a vector of vectors of bytes, and base64-encoded, prefixed by the variant (<code>smp</code>). Validators should construct <code>to_spend</code> and <code>to_sign</code> as defined below, with default values for all fields except that</p>\n<ul> <li>   <code>message_hash</code> is a BIP340-tagged hash of the message, as specified below </li> <li>   <code>message_challenge</code> in <code>to_spend</code> is set to the scriptPubKey being signed   with </li> <li>   <code>message_signature</code> in <code>to_sign</code> is set to the provided simple signature. </li> </ul>\n<p>and then proceed as they would for a full signature.</p>\n<h3 id=\"full\">Full</h3>\n<p>Full signatures follow an analogous specification to the BIP325 challenges and solutions used by Signet.</p>\n<p>Let there be two virtual transactions <code>to_spend</code> and <code>to_sign</code>.</p>\n<p>The <code>to_spend</code> transaction is:</p>\n<p>nVersion = 0     nLockTime = 0     vin[0].prevout.hash = 0000...000     vin[0].prevout.n = 0xFFFFFFFF     vin[0].nSequence = 0     vin[0].scriptSig = OP_0 PUSH32[ message_hash ]     vin[0].scriptWitness = []     vout[0].nValue = 0     vout[0].scriptPubKey = message_challenge</p>\n<p>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 (public) key script to be proven.</p>\n<p>The <code>to_sign</code> transaction is:</p>\n<p>nVersion = 0 or (FULL format only) as appropriate (e.g., 2 for time locks)     nLockTime = 0 or (FULL format only) as appropriate (for time locks)     vin[0].prevout.hash = to_spend.txid     vin[0].prevout.n = 0     vin[0].nSequence = 0 or (FULL format only) as appropriate (for time locks)     vin[0].scriptSig = [] or (FULL format only) as appropriate (for non segwit-native transactions)     vin[0].scriptWitness = message_signature     vout[0].nValue = 0     vout[0].scriptPubKey = OP_RETURN</p>\n<p>A <em>full</em> signature consists of the variant-prefixed (<code>ful</code>) base64-encoding of the <code>to_sign</code> transaction in standard network serialisation once it has been signed.</p>\n<h3 id=\"full-proof-of-funds\">Full (Proof of Funds)</h3>\n<p>The Proof of Funds variant extends the basic scheme: in addition to signing a message under a single address's key, the signer proves control over an arbitrary set of UTXOs. This UTXO set is chosen freely by the signer and MAY be associated with the signing address (the <code>message_challenge</code>). For example, it may consist of outputs paid to that address, but any UTXOs the signer wants to show control over are permitted. In any case, however, the UTXO list does not aim to prove completeness (e.g., it does NOT mean: \"these are all UTXOs that exist for an address\"), nor that they are unspent (e.g., a validator must consult the blockchain to verify that).</p>\n<p>A signer may construct a proof of funds, demonstrating control of a set of UTXOs, by constructing a full signature as above, with the following modifications.</p>\n<ul> <li>   The <code>to_spend</code> transaction is represented as a finalized PSBT instead of a raw   transaction (see <a href=\"/bip/174#input-finalizer\">BIP174</a> for details on the finalization   process). </li> <li>   All outputs that the signer wishes to demonstrate control of are included as additional inputs of   <code>to_sign</code>, and their witness and scriptSig data should be set as though these outputs   were actually being spent. </li> <li>   The Non-Witness or Witness UTXO fields (as appropriate for the type) of each additional input must   be set to the corresponding UTXO. </li> <li>   As an optimization for large sets of Non-Witness UTXOs that spend outputs from the same   transaction, the Non-Witness UTXO field may be omitted for any input that spends an output from   the same transaction as an input earlier in the list. </li> </ul>\n<p>A <em>full Proof of Funds</em> signature consists of the variant-prefixed (<code>pof</code>) base64-encoding of the finalized PSBT once it has been signed.</p>\n<p>Unlike an ordinary signature, validators of a proof of funds need access to the current UTXO set, to learn that the claimed inputs exist on the blockchain and remain unspent. An offline validator therefore can only attest to the cryptographic validity of the additional inputs' witness stack, but not its blockchain state. An attested list of UTXOs can also never prove that there do not exist more UTXOs for a certain address.</p>\n<h2 id=\"detailed-specification\">Detailed Specification</h2>\n<p>For all signature types, except legacy, the <code>to_spend</code> and <code>to_sign</code> transactions must be valid transactions which pass all consensus checks, except of course that the output with prevout <code>000...000:FFFFFFFF</code> does not exist.</p>\n<h3 id=\"verification\">Verification</h3>\n<p>A validator is given as input an address <em>A</em>, signature <em>s</em> and message <em>m</em>, and outputs one of three states:</p>\n<ul> <li>   <em>valid at time T and age S</em> indicates that the signature has set timelocks but is otherwise   valid </li> <li>   <em>inconclusive</em> means the validator was unable to check the scripts </li> <li>   <em>invalid</em> means that some check failed </li> </ul>\n<h4 id=\"verification-process\">Verification Process</h4>\n<p>Validation consists of the following steps:</p>\n<ol><li>\nBasic validation\n<ol><li>\nCompute the transaction <code>to_spend</code> from <em>m</em> and <em>A</em>\n</li></ol>\n<ol><li>\nDecode <em>s</em> as the transaction <code>to_sign</code>\n</li></ol>\n<ol><li>\nIf <em>s</em> was a full transaction or PSBT, confirm all fields are set as specified above; in particular that\n<ul><li>\n<code>to_sign</code> has at least one input and its first input spends the output of <code>to_spend</code>\n</li></ul>\n<ul><li>\n<code>to_sign</code> with more than one input has an appropriate Witness UTXO or Non-Witness UTXO for each input\n<ul><li>\nIf (based on the input type) a Non-Witness UTXO is required but not provided, check if the first input with the same transaction ID has a Non-Witness UTXO set and use that; fail validation if no such Non-Witness UTXO can be found\n</li></ul>\n</li><li>\n<code>to_sign</code> has exactly one output, as specified above\n</li></ul>\n</li><li>\nConfirm that the two transactions together satisfy all consensus rules, except for <code>to_spend</code>'s missing input, and except that <em>nSequence</em> of <code>to_sign</code>'s first input and <em>nLockTime</em> of <code>to_sign</code> are not checked.\n</li></ol>\n</li><li>\n(Optional) If the validator does not have a full script interpreter, it should check that it understands all scripts being satisfied. If not, it should stop here and output <em>inconclusive</em>.\n</li></ol>\n<ol><li>\nCheck the <strong>required rules</strong>:\n<ol><li>\nAll signatures MUST use the <code>SIGHASH_ALL</code> flag, unless the output type supports <code>SIGHASH_DEFAULT</code>, which then MAY be used alternatively (e.g., <a href=\"/bip/341\">BIP341 P2TR</a>).\n</li></ol>\n<ol><li>\nThe use of <code>CODESEPARATOR</code> or <code>FindAndDelete</code> is forbidden.\n</li></ol>\n<ol><li>\n<code>LOW_S</code>, <code>STRICTENC</code> and <code>NULLFAIL</code>: valid ECDSA signatures must be strictly DER-encoded and have a low-S value; invalid ECDSA signature must be the empty push\n</li></ol>\n<ol><li>\n<code>MINIMALDATA</code>: all pushes must be minimally encoded\n</li></ol>\n<ol><li>\n<code>CLEANSTACK</code>: require that only a single stack element remains after evaluation\n</li></ol>\n<ol><li>\n<code>MINIMALIF</code>: the argument of <code>IF</code>/<code>NOTIF</code> must be exactly 0x01 or empty push\n</li></ol>\n<ol><li>\nIf any of the above steps failed, the validator should stop and output the <em>invalid</em> state.\n</li></ol>\n</li><li>\nCheck the <strong>upgradeable rules</strong>\n<ol><li>\nThe version of <code>to_sign</code> must be 0 or 2.\n</li></ol>\n<ol><li>\nThe use of NOPs reserved for upgrades is forbidden.\n</li></ol>\n<ol><li>\nThe use of Segwit versions greater than 1 is forbidden.\n</li></ol>\n<ol><li>\nIf any of the above steps failed, the validator should stop and output the <em>inconclusive</em> state.\n</li></ol>\n</li><li>\nLet <em>T</em> be the nLockTime of <code>to_sign</code> and <em>S</em> be the nSequence of the first input of <code>to_sign</code>. Output the state <em>valid at time T and age S</em>.\n<ol><li>\nFor <em>full Proof of Funds</em> signatures, a validator MAY additionally report any non-zero nSequence values on the Proof of Funds inputs (i.e., <code>vin[1..n]</code>), and MAY verify them against the current chain state when the UTXO set is available; such checks are advisory and do not affect the output state.\n</li></ol>\n</li></ol>\n<h3 id=\"signing\">Signing</h3>\n<p>Signers who control an address <em>A</em> who wish to sign a message <em>m</em> act as follows:</p>\n<ol> <li>   They construct <code>to_spend</code> and <code>to_sign</code> as specified above, using the   scriptPubKey of <em>A</em> for <code>message_challenge</code> and tagged hash of <em>m</em> as   <code>message_hash</code>. </li> <li>   Optionally, they may set nVersion/nLockTime of <code>to_sign</code> or nSequence of its first   input. </li> <li>   Optionally, they may add any additional inputs to <code>to_sign</code> that they wish to prove   control of. </li> <li>   They satisfy <code>to_sign</code> as they would any other transaction. </li> </ol>\n<p>They then encode their signature, choosing either <em>simple</em>, <em>full</em> or <em>full-pof</em> as follows:</p>\n<ul> <li>   If they added no inputs to <code>to_sign</code>, left nVersion, nSequence and nLockTime at 0, and   <em>A</em> is a \"native\" Segwit address (P2WPKH, P2WSH, P2TR), then they may base64-encode   <code>message_signature</code> with <code>smp</code> as prefix. </li> <li>   If they added no inputs to <code>to_sign</code>, they may base64-encode <code>to_sign</code> with   <code>ful</code> as prefix. </li> <li>   Otherwise, they must base64-encode the finalized PSBT of <code>to_sign</code> with   <code>pof</code> as prefix. </li> </ul>\n<h3 id=\"psbt-based-signing\">PSBT-based signing</h3>\n<p>A valid witness stack for a multisig address must be constructed by coordinating different signers to produce a partial signature each. The coordination procedure is not specified by this BIP, but due to the use of PSBTs it should closely resemble the coordination of signing a multisig transaction for publishing to the network.</p>\n<p>The main difference is a new global PSBT field and the way a signer presents the transaction signing request to the user. The new global type is defined as follows:</p>\n<div class=\"table-wrap\"><table><tbody><tr><th>Name</th><th><code>&lt;keytype&gt;</code></th><th><code>&lt;keydata&gt;</code></th><th><code>&lt;keydata&gt;</code> Description</th><th><code>&lt;valuedata&gt;</code></th><th><code>&lt;valuedata&gt;</code> Description</th><th>Versions Requiring Inclusion</th><th>Versions Requiring Exclusion</th><th>Versions Allowing Inclusion</th></tr><tr><td>Generic Signed Message</td><td><code>PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE = 0x09</code></td><td>None</td><td>No key data</td><td><code>&lt;bytes message&gt;</code></td><td>The UTF-8 encoded message to be signed.</td><td></td><td></td><td>0, 2</td></tr></tbody></table></div>\n<h3 id=\"psbt-creator\">PSBT creator</h3>\n<p>The <strong>transaction creator</strong> of a BIP322 PSBT must follow these steps:</p>\n<ol> <li>   They construct <code>to_spend</code> and <code>to_sign</code> as specified above, using the   scriptPubKey of <em>A</em> for <code>message_challenge</code> and tagged hash of <em>m</em> as   <code>message_hash</code>. </li> <li>   Optionally, they may set nVersion/nLockTime of <code>to_sign</code> or nSequence of its first   input. </li> <li>   Optionally, they may add any additional inputs to <code>to_sign</code> that they wish to prove   control of. </li> <li>   They set the appropriate <code>witness_utxo</code> and <code>non_witness_utxo</code> fields of the   first input, using the <code>to_spend</code> transaction as a <code>non_witness_utxo</code> or   the first output of the <code>to_spend</code> transaction as <code>witness_utxo</code>. </li> <li>   They set the appropriate <code>witness_utxo</code> and <code>non_witness_utxo</code> fields of   each additional input. </li> <li>   They set the appropriate PSBT input and global fields as required by the signers(s) to produce a   partial signature. </li> <li>   They set the <code>PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE</code> field, using the full UTF-8-encoded   message as the <code>valuedata</code>.   <ol>   <li>   There is no specified maximum length of an input's <code>valuedata</code> or a PSBT as a whole in   <a href=\"/bip/174\">BIP174</a>, but different signers might impose safety limits. It is   recommended to use a maximum length of a few kilobytes to maximize compatibility. Very large   messages should be committed to by hash instead.   </li>   </ol> </li> </ol>\n<h3 id=\"psbt-signer\">PSBT signer</h3>\n<p>A <strong>transaction signer</strong> of a BIP322 PSBT must follow these steps:</p>\n<ol> <li>   They decode the base64-encoded PSBT as specified in <a href=\"/bip/174\">BIP174</a>. </li> <li>   If they detect the following properties (all must be true, otherwise this is NOT a BIP322 PSBT   and they should treat it as an ordinary PSBT):   <ol>   <li>   The PSBT has the <code>PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE</code> field set. Extract and use as   <code>message</code> in the next steps.   </li>   <li>   The first PSBT input has either a <code>witness_utxo</code> or a <code>non_witness_utxo</code>   field set and the <code>scriptPubKey</code> can be extracted. Use that as   <code>message_challenge</code> in the next steps.   </li>   <li>   The first PSBT input has <code>prevout.n = 0</code>.   </li>   <li>   The first PSBT input has <code>prevout.hash = to_spend.txid</code> where   <code>to_spend.txid</code> is constructed using the rules described above using the   <code>message</code> and <code>message_challenge</code> from the previous steps.   </li>   <li>   The PSBT's unsigned transaction has a single output with a value of <code>0</code> and the   <code>scriptPubKey</code> set to <code>OP_RETURN</code> (<code>0x6a</code>).   </li>   </ol> </li> <li>   If all of the above steps are true, the signer must inform the user about the message they are   signing and the address they are signing for.   <ol>   <li>   Even though the message being signed is a transaction, the user interaction (e.g., the steps and   messages shown on a hardware signing device's screen) should resemble the steps to sign a legacy   message, not the steps for signing a transaction.   </li>   <li>   Example: Instead of showing \"spending 0 satoshi from address &lt;challenge_address&gt;\" the   device should show \"signing message &lt;message&gt; for address &lt;challenge_address&gt;\".   </li>   </ol> </li> <li>   Upon user approval, the signer adds a partial signature for each input it is capable of signing. </li> </ol>\n<h3 id=\"psbt-finalizer\">PSBT finalizer</h3>\n<p>A <strong>transaction finalizer</strong> of a BIP322 PSBT must follow these steps:</p>\n<ol> <li>   They decode the base64-encoded PSBT as specified in <a href=\"/bip/174\">BIP174</a>. </li> <li>   They finalize the PSBT as specified in <a href=\"/bip/174#input-finalizer\">BIP174</a>. </li> <li>   They then encode the signature following the same steps as described in <a href=\"#signing\">Signing</a>   above. </li> </ol>\n<h2 id=\"compatibility\">Compatibility</h2>\n<p>This specification is backwards-compatible with the legacy signmessage/verifymessage specification through the special case <a href=\"#legacy\">as described above</a>. To support backward compatibility with implementations of this BIP before it was finalized, a verifier might assume the <em>simple</em> variant in the absence of a prefix.</p>\n<h2 id=\"reference-implementation\">Reference implementation</h2>\n<ul> <li>   Bitcoin Core pull request (basic support) at: <a href=\"https://github.com/bitcoin/bitcoin/pull/24058\">https://github.com/bitcoin/bitcoin/pull/24058</a> </li> <li>   btcd pull request (complete support, source of test vectors) at:   <a href=\"https://github.com/btcsuite/btcd/pull/2521\">https://github.com/btcsuite/btcd/pull/2521</a> </li> </ul>\n<h2 id=\"acknowledgements\">Acknowledgements</h2>\n<p>Thanks to David Harding, Jim Posen, Kalle Rosenbaum, Pieter Wuille, Andrew Poelstra, Luke Dashjr, and many others for their feedback on the specification.</p>\n<h2 id=\"references\">References</h2>\n<ol> <li>   Original mailing list thread:   <a href=\"https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-March/015818.html\">https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-March/015818.html</a> </li> </ol>\n<h2 id=\"changelog\">Changelog</h2>\n<ul><li>\n<strong>2.0.0</strong> (2026-06-04):\n<ul><li>\nClarify that the message_challenge is <em>not</em> optional for \"Proof of Funds\".\n</li></ul>\n</li><li>\n<strong>1.0.0</strong> (2026-04-15):\n<ul><li>\nMark Complete\n</li></ul>\n<ul><li>\nBreaking change: Add human-readable prefix to encoded signature\n</li></ul>\n<ul><li>\nBreaking change: Format of \"Proof of Funds\" signatures to be base64-encoded finalized PSBT\n</li></ul>\n<ul><li>\nAdd new PSBT global field for PSBT-based signing\n</li></ul>\n</li><li>\n<strong>0.0.1</strong> (2018-09-10):\n<ul><li>\nProposed as draft\n</li></ul>\n</li></ul>\n<h2 id=\"copyright\">Copyright</h2>\n<p>This document is licensed under the Creative Commons CC0 1.0 Universal license.</p>\n<h2 id=\"test-vectors\">Test vectors</h2>\n<p>Basic test vectors for message hashing, transaction hashes and \"simple\" variant test cases can be found in <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0322/basic-test-vectors.json\"><code>basic-test-vectors.json</code></a>.</p>\n<p>Generated test vectors for more \"simple\" and \"full\" variant test cases can be found in <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0322/generated-test-vectors.json\"><code>generated-test-vectors.json</code></a>.</p>\n<p>They were generated using <a href=\"https://github.com/btcsuite/btcd/pull/2521\">this code</a>.</p>","toc":[{"id":"abstract","title":"Abstract","level":2},{"id":"motivation","title":"Motivation","level":2},{"id":"terminology","title":"Terminology","level":2},{"id":"types-of-signatures","title":"Types of Signatures","level":2},{"id":"legacy","title":"Legacy","level":3},{"id":"simple","title":"Simple","level":3},{"id":"full","title":"Full","level":3},{"id":"full-proof-of-funds","title":"Full (Proof of Funds)","level":3},{"id":"detailed-specification","title":"Detailed Specification","level":2},{"id":"verification","title":"Verification","level":3},{"id":"verification-process","title":"Verification Process","level":4},{"id":"signing","title":"Signing","level":3},{"id":"psbt-based-signing","title":"PSBT-based signing","level":3},{"id":"psbt-creator","title":"PSBT creator","level":3},{"id":"psbt-signer","title":"PSBT signer","level":3},{"id":"psbt-finalizer","title":"PSBT finalizer","level":3},{"id":"compatibility","title":"Compatibility","level":2},{"id":"reference-implementation","title":"Reference implementation","level":2},{"id":"acknowledgements","title":"Acknowledgements","level":2},{"id":"references","title":"References","level":2},{"id":"changelog","title":"Changelog","level":2},{"id":"copyright","title":"Copyright","level":2},{"id":"test-vectors","title":"Test vectors","level":2}],"history":{"totalCommits":52,"firstCommit":"2018-09-10T12:26:13+09:00","lastUpdated":"2026-06-04T20:26:08+02:00","events":[{"sha":"4061a54418f62a5a1ae44f4604e56373329bfad3","date":"2026-06-04T20:26:08+02:00","author":"Oli","message":"BIP-0322: use MAJOR version for address optionality","url":"https://github.com/bitcoin/bips/commit/4061a54418f62a5a1ae44f4604e56373329bfad3","kind":"edit"},{"sha":"e94e3c56989f56b4326c29142c49b9f5627f112a","date":"2026-06-02T13:54:16+02:00","author":"Oli","message":"BIP-0322: clarify sequence semantics for Proof of Funds","url":"https://github.com/bitcoin/bips/commit/e94e3c56989f56b4326c29142c49b9f5627f112a","kind":"edit"},{"sha":"2923854e7a2ffc789ab76a78540d89532530c352","date":"2026-06-01T09:39:44+02:00","author":"Oli","message":"BIP-0322: remove address optionality for PoF","url":"https://github.com/bitcoin/bips/commit/2923854e7a2ffc789ab76a78540d89532530c352","kind":"edit"},{"sha":"6a36f955652b20c191106678eae57f5ececb9c76","date":"2026-05-19T12:35:02+02:00","author":"scgbckbone","message":"nit fixes","url":"https://github.com/bitcoin/bips/commit/6a36f955652b20c191106678eae57f5ececb9c76","kind":"edit"},{"sha":"46bfccd318e26f12d8f2053f8dd00cfa38dec8fa","date":"2026-05-09T17:51:12+02:00","author":"Oli","message":"BIP-0322: grammar and readability touchup","url":"https://github.com/bitcoin/bips/commit/46bfccd318e26f12d8f2053f8dd00cfa38dec8fa","kind":"edit"},{"sha":"352c66b783f15203ccffda3e25cf3d934163bc8d","date":"2026-05-09T17:32:18+02:00","author":"Oli","message":"BIP-0322: clarify sighash flag for P2TR","url":"https://github.com/bitcoin/bips/commit/352c66b783f15203ccffda3e25cf3d934163bc8d","kind":"edit"},{"sha":"52b2e6d81b211831259f2690d76ed8a40b114301","date":"2026-05-08T09:22:37+02:00","author":"Oli","message":"BIP-0322: link to later sections for clarity","url":"https://github.com/bitcoin/bips/commit/52b2e6d81b211831259f2690d76ed8a40b114301","kind":"edit"},{"sha":"ad0e02f746d326e2c800d088c9da02c42322d64f","date":"2026-05-08T09:22:08+02:00","author":"Oli","message":"BIP-0322: change role to author, add required BIPs","url":"https://github.com/bitcoin/bips/commit/ad0e02f746d326e2c800d088c9da02c42322d64f","kind":"edit"},{"sha":"40dc3e1a1909ad2a71aaadf9e1e09d328d0f13e6","date":"2026-04-14T15:46:06+02:00","author":"Oli","message":"README+BIP-0322: add changelog, mark Complete","url":"https://github.com/bitcoin/bips/commit/40dc3e1a1909ad2a71aaadf9e1e09d328d0f13e6","kind":"status"},{"sha":"414e16f5a2768a2bff2205be3a5ccd678dff96bf","date":"2026-04-20T09:37:49+02:00","author":"Oli","message":"BIP-0322: remove comments, add discussion links","url":"https://github.com/bitcoin/bips/commit/414e16f5a2768a2bff2205be3a5ccd678dff96bf","kind":"edit"},{"sha":"e69e2f97175eef03e3a1997e8a989b2a3feac80a","date":"2026-04-15T05:15:56+02:00","author":"Oli","message":"BIP-0322: add guggero as deputy","url":"https://github.com/bitcoin/bips/commit/e69e2f97175eef03e3a1997e8a989b2a3feac80a","kind":"edit"},{"sha":"d77863fb9e9be7829ad8bb51694b9ba80a786766","date":"2026-04-15T14:42:26+02:00","author":"Oli","message":"BIP-0322: update test vectors","url":"https://github.com/bitcoin/bips/commit/d77863fb9e9be7829ad8bb51694b9ba80a786766","kind":"edit"},{"sha":"0dd436e7d48b53459fdfec7261257829cc4f74d6","date":"2026-04-14T15:29:48+02:00","author":"Oli","message":"BIP-0174+BIP-0322: describe PSBT based signing","url":"https://github.com/bitcoin/bips/commit/0dd436e7d48b53459fdfec7261257829cc4f74d6","kind":"edit"},{"sha":"c2850a0010cd8e6c4374bb928567b99570385e4b","date":"2026-04-14T15:39:33+02:00","author":"Oli","message":"BIP-0322: add prefix to message signature","url":"https://github.com/bitcoin/bips/commit/c2850a0010cd8e6c4374bb928567b99570385e4b","kind":"edit"},{"sha":"833a1a8a89ef2aeb53486437f4ee10a29ad0d338","date":"2026-04-14T15:54:44+02:00","author":"Oli","message":"BIP-0322: encode finalized PSBT for Proof of Funds","url":"https://github.com/bitcoin/bips/commit/833a1a8a89ef2aeb53486437f4ee10a29ad0d338","kind":"edit"},{"sha":"8a46a5bfa57094bc475917af0f3d86bf33af71d5","date":"2026-04-15T14:38:14+02:00","author":"Oli","message":"BIP-0322: clarify terminology used","url":"https://github.com/bitcoin/bips/commit/8a46a5bfa57094bc475917af0f3d86bf33af71d5","kind":"edit"},{"sha":"0a20483c65c56d51f992f4cc94a0807a7c8e16ae","date":"2026-04-14T15:31:58+02:00","author":"Oli","message":"BIP-0322: update motivation, clarify Proof of Funds purpose","url":"https://github.com/bitcoin/bips/commit/0a20483c65c56d51f992f4cc94a0807a7c8e16ae","kind":"edit"},{"sha":"665d96065fe3200ad1f25ab42ee03f006074f3a2","date":"2026-04-14T15:45:27+02:00","author":"Oli","message":"BIP-0322: reference btcd implementation","url":"https://github.com/bitcoin/bips/commit/665d96065fe3200ad1f25ab42ee03f006074f3a2","kind":"edit"},{"sha":"bbaf40ce1d54404e5c7e81b7e1a962b84da3189d","date":"2026-04-14T15:44:37+02:00","author":"Oli","message":"BIP-0322: small semantic and formatting fixes","url":"https://github.com/bitcoin/bips/commit/bbaf40ce1d54404e5c7e81b7e1a962b84da3189d","kind":"edit"},{"sha":"6f3fce21e6a78be6eee68bca83de6b2d912b94f7","date":"2026-04-15T05:33:55+02:00","author":"Oli","message":"BIP-0322: wrap long lines at 100 characters","url":"https://github.com/bitcoin/bips/commit/6f3fce21e6a78be6eee68bca83de6b2d912b94f7","kind":"edit"},{"sha":"3ab70c98a7f15b02d891f5b6dab73d513b061349","date":"2026-04-09T17:35:37+02:00","author":"Oli","message":"BIP-0322: turn test vectors into JSON, add more","url":"https://github.com/bitcoin/bips/commit/3ab70c98a7f15b02d891f5b6dab73d513b061349","kind":"edit"},{"sha":"805bb0b6fc093cbb7ca5f0d40fb48955e0f12fa9","date":"2026-04-09T12:49:16+02:00","author":"Oli","message":"BIP-0322: clarify scriptSig on to_sign for legacy transactions","url":"https://github.com/bitcoin/bips/commit/805bb0b6fc093cbb7ca5f0d40fb48955e0f12fa9","kind":"edit"},{"sha":"4d36f73e7bbcfe2c1afabc863cea660cdf94b518","date":"2026-04-09T12:46:57+02:00","author":"Oli","message":"BIP-0322: add format clarification table","url":"https://github.com/bitcoin/bips/commit/4d36f73e7bbcfe2c1afabc863cea660cdf94b518","kind":"edit"},{"sha":"24e96e870fffaa257b465ce1f0370c14aac588e8","date":"2025-10-08T14:59:36-07:00","author":"Murch","message":"process: Created ↦ Assigned","url":"https://github.com/bitcoin/bips/commit/24e96e870fffaa257b465ce1f0370c14aac588e8","kind":"edit"},{"sha":"5207ef92a52d0b8902895b0dbb40823a4d698ec9","date":"2025-04-11T20:08:17-07:00","author":"Murch","message":"process: Author ↦ Authors","url":"https://github.com/bitcoin/bips/commit/5207ef92a52d0b8902895b0dbb40823a4d698ec9","kind":"edit"},{"sha":"a233bde4af52c6a11269e2e6dd9707abce441ffe","date":"2025-04-11T18:19:21-07:00","author":"Murch","message":"process: Standards Track ↦ Specification","url":"https://github.com/bitcoin/bips/commit/a233bde4af52c6a11269e2e6dd9707abce441ffe","kind":"edit"},{"sha":"80b4b2a6bd9da4c26ce5ab86159308bcb3d52811","date":"2025-12-14T22:32:04+02:00","author":"kurahin","message":"BIP-322: fix proof-of-funds inputs wording","url":"https://github.com/bitcoin/bips/commit/80b4b2a6bd9da4c26ce5ab86159308bcb3d52811","kind":"edit"},{"sha":"2f311cc629c872cca75279f8b3550eb60e2699d7","date":"2024-05-15T11:51:28+09:00","author":"Chris Hyunhum Cho","message":"bip-0322: add another valid sig vector not to confuse","url":"https://github.com/bitcoin/bips/commit/2f311cc629c872cca75279f8b3550eb60e2699d7","kind":"edit"},{"sha":"6fc75b1b2153df40f1ff8312d7086b69bfb091de","date":"2024-05-01T13:44:03+00:00","author":"Ali Sherief","message":"[BIP322] remove empty message requirement for full (proof-of-funds) proofs (#1352)","url":"https://github.com/bitcoin/bips/commit/6fc75b1b2153df40f1ff8312d7086b69bfb091de","kind":"edit"},{"sha":"8ed2af078454dad19a5da8f7443b1410166b4176","date":"2022-06-06T15:13:24+01:00","author":"Wip","message":"Fix incorrect signature test vectors in BIP322","url":"https://github.com/bitcoin/bips/commit/8ed2af078454dad19a5da8f7443b1410166b4176","kind":"edit"},{"sha":"f52e047d09d6ddc7c2dbf6549dfdc91c09e9a026","date":"2022-02-02T12:39:11+09:00","author":"Karl-Johan Alm","message":"clarify that SIMPLE format requires version/locktime/sequence=0 for to_sign transaction","url":"https://github.com/bitcoin/bips/commit/f52e047d09d6ddc7c2dbf6549dfdc91c09e9a026","kind":"edit"},{"sha":"aa92d9cd6e6dd334f4a21c1faf41cb7fe88eed74","date":"2022-01-26T19:17:52+09:00","author":"Karl-Johan Alm","message":"add test vectors to BIP-322","url":"https://github.com/bitcoin/bips/commit/aa92d9cd6e6dd334f4a21c1faf41cb7fe88eed74","kind":"edit"},{"sha":"1b6c85b0b4823ce77ca4123ca52ee7f64925e271","date":"2022-01-31T18:52:37+09:00","author":"Karl-Johan Alm","message":"bip-322: clarify how the message is serialized","url":"https://github.com/bitcoin/bips/commit/1b6c85b0b4823ce77ca4123ca52ee7f64925e271","kind":"edit"},{"sha":"6b9646e159e2cc1db828f41e9204b62ca6dcb585","date":"2021-11-23T14:45:38-06:00","author":"benthecarman","message":"Allow Taproot outputs in BIP 322","url":"https://github.com/bitcoin/bips/commit/6b9646e159e2cc1db828f41e9204b62ca6dcb585","kind":"edit"},{"sha":"aadfafa77000b987abe7de54597a05e174fda247","date":"2021-11-12T18:14:19-06:00","author":"benthecarman","message":"Clarify BIP 322 seralization requires a signed transaction","url":"https://github.com/bitcoin/bips/commit/aadfafa77000b987abe7de54597a05e174fda247","kind":"edit"},{"sha":"c624414119573e41466dcf407b3c53507624678f","date":"2020-12-23T15:35:47+00:00","author":"Andrew Poelstra","message":"bip-0322: remove the 'to_spend' transaction from serialization","url":"https://github.com/bitcoin/bips/commit/c624414119573e41466dcf407b3c53507624678f","kind":"edit"},{"sha":"9e1beef6acabffd4a53ff1396b4cb453615de19f","date":"2020-12-23T15:47:27+00:00","author":"Andrew Poelstra","message":"bip-0322: overhaul/rewrite verification rules","url":"https://github.com/bitcoin/bips/commit/9e1beef6acabffd4a53ff1396b4cb453615de19f","kind":"edit"},{"sha":"dbb81b36525aabf4ae5d0ad015b4865494aed33e","date":"2020-12-23T15:42:41+00:00","author":"Andrew Poelstra","message":"bip-0322: move \"legacy\" section up, separate \"proof of funds\", summarize the signature types","url":"https://github.com/bitcoin/bips/commit/dbb81b36525aabf4ae5d0ad015b4865494aed33e","kind":"rename"},{"sha":"f778098debfbc31a4c98dc569fc9cd407b65407a","date":"2020-12-23T15:39:45+00:00","author":"Andrew Poelstra","message":"bip-0322: replace motivation, add myself to the \"thanks to\" list","url":"https://github.com/bitcoin/bips/commit/f778098debfbc31a4c98dc569fc9cd407b65407a","kind":"edit"},{"sha":"1a7eaa9c7f3c38221e63b6b3b001054e4502fe79","date":"2020-10-30T16:00:54+09:00","author":"Karl-Johan Alm","message":"BIP-322: minor clarification","url":"https://github.com/bitcoin/bips/commit/1a7eaa9c7f3c38221e63b6b3b001054e4502fe79","kind":"edit"},{"sha":"75ec9631effc524364cded5c3eff02e4e27ebf9c","date":"2020-10-03T15:29:00+09:00","author":"Karl-Johan Alm","message":"BIP-322: switch to tx based approach","url":"https://github.com/bitcoin/bips/commit/75ec9631effc524364cded5c3eff02e4e27ebf9c","kind":"edit"},{"sha":"f9e95849f337358cd89c83b948fbede3875481c3","date":"2020-03-25T15:21:10+09:00","author":"Karl-Johan Alm","message":"bip-322: simplify proposal to single proof case","url":"https://github.com/bitcoin/bips/commit/f9e95849f337358cd89c83b948fbede3875481c3","kind":"edit"},{"sha":"c28773f34ee383dd9278e127ffd4236666a7284e","date":"2019-08-28T15:02:06+09:00","author":"Karl-Johan Alm","message":"bip322: fix test-vectors","url":"https://github.com/bitcoin/bips/commit/c28773f34ee383dd9278e127ffd4236666a7284e","kind":"edit"},{"sha":"b3cec02aa4170bd92f6ec61c1e6a440017c35b9c","date":"2019-08-08T01:08:12+09:00","author":"Karl-Johan Alm","message":"bip-322: clarify when to return ERROR in verify action","url":"https://github.com/bitcoin/bips/commit/b3cec02aa4170bd92f6ec61c1e6a440017c35b9c","kind":"edit"},{"sha":"f0784c6e922724c674550ee8aa4bfc72d6d32a8a","date":"2019-08-06T17:09:25+09:00","author":"Karl-Johan Alm","message":"BIP322: added background to explain why BIP322 exists, and what it changes","url":"https://github.com/bitcoin/bips/commit/f0784c6e922724c674550ee8aa4bfc72d6d32a8a","kind":"edit"},{"sha":"91ecdbeb2620f5d1352b99a54b32b6f774893b6b","date":"2019-07-24T13:27:48+09:00","author":"Karl-Johan Alm","message":"BIP-322 updates to fix verification and other fixes","url":"https://github.com/bitcoin/bips/commit/91ecdbeb2620f5d1352b99a54b32b6f774893b6b","kind":"edit"},{"sha":"e24e86b482e394e18803f14c7e2338aab9b7e1e2","date":"2019-07-29T20:40:36+09:00","author":"Karl-Johan Alm","message":"bip-322: add test vectors","url":"https://github.com/bitcoin/bips/commit/e24e86b482e394e18803f14c7e2338aab9b7e1e2","kind":"edit"},{"sha":"daa59903e23548d3017b926639b03dedc5b0b626","date":"2019-07-24T13:27:48+09:00","author":"Karl-Johan Alm","message":"BIP-322 update to remove ProveFunds purpose (with a note about extensibility) and to fix the serialization format","url":"https://github.com/bitcoin/bips/commit/daa59903e23548d3017b926639b03dedc5b0b626","kind":"edit"},{"sha":"b4853407a7c88cfe72974344f6a642691df53f49","date":"2019-02-20T09:19:04+00:00","author":"Luke Dashjr","message":"Revert \"Merge pull request #744 from kallewoof/bip322-fixes\"","url":"https://github.com/bitcoin/bips/commit/b4853407a7c88cfe72974344f6a642691df53f49","kind":"edit"},{"sha":"df9c2fc6de7a99556a9688a530993ece9b8acba5","date":"2018-12-03T15:07:44+09:00","author":"Karl-Johan Alm","message":"bip-322: strip out proof-of-funds related stuff and fix several issues","url":"https://github.com/bitcoin/bips/commit/df9c2fc6de7a99556a9688a530993ece9b8acba5","kind":"edit"},{"sha":"2f152773e651e53e21db56dfbf4fb6b90cce715d","date":"2018-09-12T16:21:59+09:00","author":"Karl-Johan Alm","message":"fix witness program -> witness","url":"https://github.com/bitcoin/bips/commit/2f152773e651e53e21db56dfbf4fb6b90cce715d","kind":"edit"},{"sha":"b925137d5f302863f4f1002c191858ef350ba1fc","date":"2018-09-10T12:26:13+09:00","author":"Karl-Johan Alm","message":"BIP: Generic Signed Message Format","url":"https://github.com/bitcoin/bips/commit/b925137d5f302863f4f1002c191858ef350ba1fc","kind":"edit"}]}}