Skip to content

Conversation

@macgyver13
Copy link
Contributor

This PR adds the test runner reference.py and test_vectors.json for demonstrating BIP 375 behavior.
Care was taken to minimize dependencies required to evaluate the test vectors.

Dependencies (copied from related BIPs):

  • bip352_utils.py - partial copy from bip-0352/bitcoin_utils.py
  • dleq_374.py - copied from bip-0374/reference.py
  • secp256k1_374.py - copied from bip-0374/secp256k1.py

Test generation files:

  • tests/ - test vector generation scripts

Feedback welcome @andrewtoth @achow101 @josibake

Test runner output

Invalid test cases: 13
=== Running Invalid Test Cases ===
Test 1: Missing DLEQ proof for ECDH share
Test 2: Invalid DLEQ proof
Test 3: Non-SIGHASH_ALL signature with silent payments
Test 4: Mixed segwit versions with silent payments
Test 5: Silent payment outputs but no ECDH shares
Test 6: Global ECDH share without DLEQ proof
Test 7: Wrong SP_V0_INFO field size
Test 8: Mixed eligible and ineligible input types
Test 9: Wrong ECDH share size
Test 10: Wrong DLEQ proof size
Test 11: Label without SP_V0_INFO
Test 12: Address mismatch
Test 13: Both global and per-input ECDH shares

Valid test cases: 4
=== Running Valid Test Cases ===
Test 14: Single signer with global ECDH share
Test 15: Multi-party with per-input ECDH shares
Test 16: Silent payment with change detection
Test 17: Multiple silent payment outputs to same scan key

Note: Additional Proof of Concept examples can be found in bip375-examples repo.

@jonatack jonatack added Proposed BIP modification Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified Proposed BIP modification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants