Files
bips/bip-0375
Ferdinando Ametrano 8882768f52 bip-0375: replace bare OP_2 vector with an in-progress PSBT
The valid vector "input eligibility: bare OP_2 script is not a segwit
v2 witness program" passed only because its "checks" field limited it
to the input eligibility check. Its only input, the bare OP_2, is not
eligible, so its silent payment output script cannot be derived and the
output scripts check fails.

Replace it with a vector that adds an eligible P2WPKH input carrying
the ECDH share and DLEQ proof. The bare OP_2 input keeps only
PSBT_IN_NON_WITNESS_UTXO, which the segwit version check reads, so the
vector still tests that bare OP_2 is not taken for a segwit v2 witness
program, with no "checks" field. The bare OP_2 input is unsigned, so the
vector is In Progress; add its row to the Valid PSBTs table at its
position in the JSON file.

Vector by @macgyver13.
2026-11-10 21:03:51 +01:00
..
2026-04-04 09:17:46 -04:00

BIP-375 Validation Reference

A reference validation implementation for BIP-375: Sending Silent Payments with PSBTs.

Core Files

  • validator/bip352_crypto.py - Silent payment output script derivation
  • validator/inputs.py - PSBT input utility functions
  • validator/psbt_bip375.py - BIP-375 specific PSBT/PSBTMap extensions
  • validator/validate_psbt.py - Main BIP-375 validation functions
  • test_runner.py - Test infrastructure (executable)

Dependencies

  • deps/bitcoin_test/psbt.py - Bitcoin test framework PSBT module - PR #21283
  • deps/bitcoin_test/messages.py - Bitcoin test framework primitives and message structures
  • deps/dleq.py - Reference DLEQ implementation from BIP-374
  • deps/secp256k1lab/ - vendored copy of secp256k1lab library at version 1.0.0

Testing

Run Tests

python test_runner.py                    # Run all tests
python test_runner.py -v                 # Verbose mode with detailed validation status
python test_runner.py -vv                # More verbose with validation check failure reason

python test_runner.py -f vectors.json    # Use custom test vector file

Generating Test Vectors

Test vectors were generated using test_generator.py