Commit Graph
24 Commits
Author SHA1 Message Date
Oli 4061a54418 BIP-0322: use MAJOR version for address optionality
Addresses a review comment in #2188:
https://github.com/bitcoin/bips/pull/2188#issuecomment-4623250085
2026-06-05 08:32:18 +02:00
Oli e94e3c5698 BIP-0322: clarify sequence semantics for Proof of Funds
This commit clarifies that even for Proof of Funds signatures the
sequence of the first input is considered as "age S".
The reasoning behind this is that only the first input is a synthetic
one that doesn't reference a real transaction to which the height could
be compared against. Even though the Proof of Funds inputs could have
higher sequence values, those heights might have already been long
reached and would make the sequence values irrelevant compared to the potential
restrictions in the challenge script.
2026-06-04 10:54:11 +02:00
Oli 2923854e7a BIP-0322: remove address optionality for PoF
This is cleaning up an artifact that was left over from #1352.
The alternative to removing the optionality of the address
would be to assume OP_TRUE in case of an empty address.
But that sounds like it could open up any number of potential
vulnerabilities.
And a user still has the ability to use an OP_TRUE script
in a p2wsh or p2tr address.
2026-06-04 10:54:11 +02:00
OliandJon Atack 46bfccd318 BIP-0322: grammar and readability touchup
Co-authored-by: Jon Atack <jon@atack.com>
2026-05-14 11:30:45 +02:00
Oli 352c66b783 BIP-0322: clarify sighash flag for P2TR 2026-05-13 12:49:05 +02:00
Oli 52b2e6d81b BIP-0322: link to later sections for clarity 2026-05-13 12:49:05 +02:00
Oli ad0e02f746 BIP-0322: change role to author, add required BIPs 2026-05-13 12:49:04 +02:00
Oli 40dc3e1a19 README+BIP-0322: add changelog, mark Complete 2026-05-06 12:20:12 +02:00
Oli 414e16f5a2 BIP-0322: remove comments, add discussion links
As described in BIP-0003, the comments section is no longer required.
Instead we add all relevant discussions.
2026-05-06 12:20:12 +02:00
Oli e69e2f9717 BIP-0322: add guggero as deputy 2026-05-06 12:20:12 +02:00
Oli d77863fb9e BIP-0322: update test vectors
This commit updates the test vectors to reflect all the changes in the
previous commits and also introduces new test vectors for the Proof of
Funds variant.
2026-05-06 12:20:11 +02:00
Oli 0dd436e7d4 BIP-0174+BIP-0322: describe PSBT based signing
This commit proposes a new PSBT input field type for transporting the
message to be signed to different signers in a multisig signing use
case.
2026-05-06 12:20:11 +02:00
Oli c2850a0010 BIP-0322: add prefix to message signature 2026-04-20 09:43:30 +02:00
Oli 833a1a8a89 BIP-0322: encode finalized PSBT for Proof of Funds
This commit proposes a fix for the problem that an offline verifier
previously was not able to even verify the witness stack of additional
inputs. By providing the full finalized PSBT, a verifier has all the
input data necessary to run the script through the validation engine.

We require the PSBT to be finalized to make sure it contains the final
script witness or final script sig but no extra potentially
privacy-sensitive fields. The Non-Witness and Witness UTXO fields are
explicitly allowed for finalized PSBTs, which makes the format perfect
for the use case.
2026-04-20 09:43:30 +02:00
Oli 8a46a5bfa5 BIP-0322: clarify terminology used
Since the term "signature" can be pretty overloaded dependin on the
context, we clarify what it actually means in this BIP.
2026-04-20 09:43:30 +02:00
Oli 0a20483c65 BIP-0322: update motivation, clarify Proof of Funds purpose
This addresses two discussion items:
 - The list of UTXOs should not be interpreted as a "proof that no other
   UTXOs for an address exist".
 - The BIP only addresses "signer receives funds with the address" and
   not "signer sent a previous transaction" use case.
2026-04-20 09:43:30 +02:00
Oli 665d96065f BIP-0322: reference btcd implementation 2026-04-20 09:43:30 +02:00
Oli bbaf40ce1d BIP-0322: small semantic and formatting fixes
This fixes small inconsistencies or incomplete definitions based on
previous, already merged changes.
2026-04-20 09:43:29 +02:00
Oli 6f3fce21e6 BIP-0322: wrap long lines at 100 characters
This re-formats the document for easier editing and diff viewing.
Wiki syntax is weird for lists and line wraps break them. Simple lists
were changed to <ul> or <ol> tags but complex lists remain as they are
to not bloat the diff too much.
2026-04-20 09:43:29 +02:00
Oli 3ab70c98a7 BIP-0322: turn test vectors into JSON, add more
This commit turns the existing test vectors into a JSON and then adds
more test cases covering the most common script types.
2026-04-10 09:06:36 +02:00
Oli 805bb0b6fc BIP-0322: clarify scriptSig on to_sign for legacy transactions
Before this commit it was not clear that non-native SegWit outputs
(e.g. P2PKH or P2SH-P2WPKH) only work if the correct scriptSig is
provided.
This then also makes it more clear why P2SH-P2WPKH outputs are NOT
supported by the "simple" variant.
2026-04-10 09:06:36 +02:00
Oli 4d36f73e7b BIP-0322: add format clarification table
This commit adds a table that clarifies what script types are compatible
with what signing variant and also makes more clear what the exact
format for the signatures of the different variants are.
2026-04-10 09:06:36 +02:00
Oliver Gugger e141b9501d bip-0374: remove default value for G in dleq_challenge
To avoid the mistake fixed in the previous commit, we remove the default
value from the G parameter of dleq_challenge.
2024-12-28 21:42:07 +01:00
Oliver Gugger 8bc42a2673 bip-0374: fix challenge generation, use correct G
Both generating and verifying a proof allows for specifying a custom
generator point G. But that custom generator point was not passed into
the dleq_challenge function, resulting in the default (secp256k1)
generator point to be used. This lead to the test vectors being
incorrect.
2024-12-28 15:58:08 +01:00