BIP352: Add intermediate vector material for silent payments#1953
Merged
jonatack merged 2 commits intobitcoin:masterfrom Sep 5, 2025
Merged
BIP352: Add intermediate vector material for silent payments#1953jonatack merged 2 commits intobitcoin:masterfrom
jonatack merged 2 commits intobitcoin:masterfrom
Conversation
jonatack
reviewed
Sep 4, 2025
Member
jonatack
left a comment
There was a problem hiding this comment.
Pinging BIP authors @josibake @RubenSomsen for feedback or approval.
The tests pass with this change.
/bip-0352 $ ./reference.py send_and_receive_test_vectors.json
Simple send: two inputs
Simple send: two inputs, order reversed
Simple send: two inputs from the same transaction
Simple send: two inputs from the same transaction, order reversed
Outpoint ordering byte-lexicographically vs. vout-integer
Single recipient: multiple UTXOs from the same public key
Single recipient: taproot only inputs with even y-values
Single recipient: taproot only with mixed even/odd y-values
Single recipient: taproot input with even y-value and non-taproot input
Single recipient: taproot input with odd y-value and non-taproot input
Multiple outputs: multiple outputs, same recipient
Multiple outputs: multiple outputs, multiple recipients
Receiving with labels: label with even parity
Receiving with labels: label with odd parity
Receiving with labels: large label integer
Multiple outputs with labels: un-labeled and labeled address; same recipient
Multiple outputs with labels: multiple outputs for labeled address; same recipient
Multiple outputs with labels: un-labeled, labeled, and multiple outputs for labeled address; same recipients
Single recipient: use silent payments for sender change
Single recipient: taproot input with NUMS point
Pubkey extraction from malleated p2pkh
P2PKH and P2WPKH Uncompressed Keys are skipped
Skip invalid P2SH inputs
Recipient ignores unrelated outputs
No valid inputs, sender generates no outputs
Input keys sum up to zero / point at infinity: sending fails, receiver skips tx
All tests passed
josibake
approved these changes
Sep 5, 2025
Member
josibake
left a comment
There was a problem hiding this comment.
ACK b7c79dc
This was raised in bitcoin-core/secp256k1#1698 (comment); I've verified that these changes do allow us to remove the ripemd160.py and bech32m.py utility files from the libsecp256k1 PR. I think this is also a generally useful change for other projects using these test vectors, in particular index building.
Member
|
ACK b7c79dc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds intermediate computation vectors to the BIP-352 reference implementation to improve development experience and code clarity.
Changes
Benefits
This change makes it easier for implementers to understand and debug silent payment computations by providing visibility into intermediate calculation steps.