Skip to content

PASS1-527: Add BIP375 Silent Payment sending support - #647

Open
220nightmore-spec wants to merge 8 commits into
Foundation-Devices:dev-v2.4.0from
220nightmore-spec:feat/bip352-silent-payment-sender
Open

PASS1-527: Add BIP375 Silent Payment sending support#647
220nightmore-spec wants to merge 8 commits into
Foundation-Devices:dev-v2.4.0from
220nightmore-spec:feat/bip352-silent-payment-sender

Conversation

@220nightmore-spec

@220nightmore-spec 220nightmore-spec commented Jul 11, 2026

Copy link
Copy Markdown

Summary

Implements sender-side Silent Payments support for Passport firmware using BIP352, BIP374, and the standardized BIP375 PSBTv2 protocol.

  • decodes and encodes mainnet/testnet Silent Payment addresses;
  • parses, reconstructs, and serializes BIP370 PSBTv2 transactions;
  • parses and serializes BIP375 global, per-input, and per-output fields;
  • derives and verifies Silent Payment output scripts before transaction review;
  • supports all-Passport inputs with compact global ECDH shares;
  • supports collaborative transactions by validating external per-input DLEQ proofs and adding Passport-owned per-input shares;
  • exports an unsigned share-only intermediate PSBT when another signer has not contributed its required share yet;
  • displays the original sp... / tsp... destination during confirmation; and
  • preserves the existing PSBTv0 signing path.

Closes #527.

Protocol and safety

The implementation follows BIP375 rather than defining a proprietary host/device field:

  • every eligible input is bound to its P2PKH/P2WPKH/P2SH-P2WPKH or Taproot prevout public key;
  • the BIP341 NUMS Taproot internal-key exception is excluded from shared-secret derivation;
  • supplied global and per-input shares are accepted only after BIP374 DLEQ verification;
  • output scripts are recomputed and compared before signing;
  • inputs and outputs are locked after missing scripts are computed;
  • ECDSA, Taproot key-path, and Taproot script-path signatures are restricted to SIGHASH_ALL;
  • incomplete collaborative PSBTs cannot reach the signing task; and
  • derived private keys are blanked on success and failure paths.

Validation

  • 31 focused firmware-module tests;
  • all 14 finalizable vectors from macgyver13/bip375-test-generator v1.1.1, covering labeled outputs, global/per-input shares, collaborative inputs, and excluded P2SH/NUMS inputs;
  • exact output-script and PSBT round-trip match against the official BIP375 single-signer vector;
  • all 11 official BIP374 proof-generation vectors;
  • all 15 official BIP374 proof-verification vectors;
  • all 28 BIP352 v1.1.1 sending cases for the sender core;
  • py_compile, repository pycodestyle, and git diff --check.

All tests use deterministic public vectors. No funded transaction, real seed, wallet credential, or user-private material is involved.

Known limitation

PSBT_OUT_SP_V0_LABEL is preserved and labeled outputs are derived and verified correctly, but Passport does not yet prove that a labeled Silent Payment output belongs to its own scan/spend derivation. Such outputs are therefore shown conservatively as payments instead of being hidden as trusted change.

@220nightmore-spec

220nightmore-spec commented Jul 11, 2026

Copy link
Copy Markdown
Author

Progress update: commit b2c8672b completes the collaborative BIP375 round-trip and the PR is now ready for review.

The branch now covers PSBTv2 parsing/serialization, BIP375 global and per-input proof handling, labeled output derivation, output-script verification, SIGHASH_ALL enforcement, original Silent Payment address confirmation, collaborative input verification, and share-only intermediate PSBT export when another signer has not supplied its share yet. Incomplete collaborative PSBTs are explicitly prevented from reaching the signing task.

Validation completed:

  • 31 focused firmware-module tests;
  • all 14 finalizable vectors from the current BIP375 generator v1.1.1;
  • exact output-script and PSBT round-trip match against the official BIP375 single-signer vector;
  • all 11 official BIP374 proof-generation vectors;
  • all 15 official BIP374 proof-verification vectors;
  • all 28 BIP352 v1.1.1 sender cases; and
  • py_compile, repository pycodestyle, and git diff --check.

The remaining known limitation is conservative UI classification of labeled Silent Payment change: scripts are derived and verified, but ownership is not proven from Passport scan/spend derivations, so these outputs are shown as payments instead of hidden as trusted change.

@220nightmore-spec 220nightmore-spec changed the title PASS1-527: Add BIP352 Silent Payment sender core PASS1-527: Add BIP375 Silent Payment sending support Jul 11, 2026
@220nightmore-spec
220nightmore-spec marked this pull request as ready for review July 11, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bounty] Implement sending to Silent Payment addresses - 0.01 BTC

1 participant