WIP: Add Silent Payments + BIP 375 Support#587
Draft
macgyver13 wants to merge 13 commits intoColdcard:new_edgefrom
Draft
WIP: Add Silent Payments + BIP 375 Support#587macgyver13 wants to merge 13 commits intoColdcard:new_edgefrom
macgyver13 wants to merge 13 commits intoColdcard:new_edgefrom
Conversation
e065256 to
4923edd
Compare
scgbckbone
reviewed
Dec 5, 2025
4923edd to
c5b5977
Compare
nymius
reviewed
Jan 30, 2026
2554014 to
b39d529
Compare
external/ckcc-protocol external/libngu
update libngu - add interface for s_ec_pubkey_tweak_mul - add interface for s_ec_pubkey_combine add bip352 crypto primitives / helpers add bip352 tagged hashes
add bip374 tagged hashes add dleq bip374 reference generate_dleq_proof, verify_dleq_proof functions
extend psbt handling with silent payment specific functions incorporate BIP375 test validation functions - psbt_structure, input_eligibility, ecdh_coverage
only store key_data for short_values - remove key_type only serialize PSBT_OUT_SCRIPT if self.script has a value adjust v2 script assert to not required if sp_v0_info is present
…nified provides silent payments testing framework with access to MockPSBT
migrate test_silentpayments to use simulator and bip375_test_vectors.json - add devtest/unit_silentpayments.py - add devtest/verify_sp_outputs.py mirror psbt fields in testing/psbt correct input eligibility ecdh share assumptions
integrate preview silent payment address as output in auth workflow integrate silent payments in signing workflow add sp_hrp property to chains add silent payments fields to psbt
refactor _derive_input_privkey use sp_tweak when spending silent payment output
create end-to-end tests for silent payments handle sp_tweak tweak parity when matching private key introduce mine vs theirs seed construct to fake_txn
add test to validate 'Contribute Shares?' UX
add silent payments label change tests - detect presence or absence of 'Change back:' in UI story add multi-signer incomplete coverage scenario tests fix sp_spend test failure when B_spend has odd Y parity
b39d529 to
ecbd31f
Compare
Author
|
Still have plenty of tasks to do on this PR but wanted to provide a checkpoint given the number of changes. I can break this into multiple PRs if preferred. I expect commits 7887701 through c516610 to remain stable. Core Changes:
Silent Payments Changes:
TODOs:
|
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.
Tested with Sparrow Air Gapped Wallet commit a6081970 and simulator on mainnet
After putting together some python BIP 375 examples I took a look at the coldcard firmware and discovered it would be a easy lift to create a Proof of Concept to evaluate silent payments since PSBTv2 was already supported. This PR focuses on core behavior and minimal UI/UX changes.
The commits were organized to make review as easy as possible. There are some # TODO: in code where I don't have enough knowledge to make a decision at this time. Appreciate your feedback and advice on this PR.
TODOs:
verify silent payments labeled address handlingScreenshots
Updated UX with - silent payment address - appended to - to address -
Contribute Shares Prompt