Repository navigation
Feat/silentpayments dleq multisigner - #142
Open
Sosthene00 wants to merge 13 commits into
Open
Sosthene00 wants to merge 13 commits into
Sosthene00 wants to merge 13 commits into
Conversation
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
from
June 23, 2026 13:22
b1a2c81 to
269918b
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
from
July 22, 2026 11:13
269918b to
a0cc0da
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
3 times, most recently
from
August 12, 2026 10:36
d679ca4 to
6744fd8
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
3 times, most recently
from
August 26, 2026 11:35
822abfb to
e4cc145
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
3 times, most recently
from
September 7, 2026 11:31
ce841fe to
328c57e
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
2 times, most recently
from
September 11, 2026 13:45
eefb10e to
08e2451
Compare
sdmg15
reviewed
Sep 14, 2026
Contributor
There was a problem hiding this comment.
I just did a first review round and tests.
On first sights cargo clippy generates a lot of warnings might not all be related to this PR but worth mentioning.
Since you said you'll have to reword some of the commits and will do another round by then.
| ); | ||
| } | ||
|
|
||
| fn selection_by_strategy<'a>( |
Contributor
There was a problem hiding this comment.
I think this lifetime could be elided.
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
4 times, most recently
from
September 21, 2026 13:55
d6ce5f2 to
55cbae4
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
6 times, most recently
from
September 28, 2026 14:52
d8da635 to
df4a059
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
4 times, most recently
from
October 3, 2026 13:39
fa29e82 to
9aea6bc
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
from
October 9, 2026 11:39
9aea6bc to
a4fbd22
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
3 times, most recently
from
October 16, 2026 11:20
20f4502 to
5497775
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
2 times, most recently
from
October 21, 2026 12:13
5001b2f to
92564bc
Compare
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
from
November 4, 2026 21:07
92564bc to
e41a3be
Compare
Callers supply the minimum outpoint. Later shared-secret constructors pass `TransactionInputs::min_outpoint` instead of a `NonEmptyArray`.
Replace SharedSecret (PublicKey newtype) with TransactionSharedSecret, which carries both the ECDH shared secret and the recipient scan key. Introduce PublicTweakData in place of calculate_tweak_data / calculate_ecdh_shared_secret, add ecdh_multiply and NormalizedSecretKey, and migrate receiving/sending callers (scanners, wallet, examples, tests).
Add PartialSenderEcdhShare and GlobalSenderEcdhShare with rust-dleq proofs, plus TransactionSharedSecret constructors from a global share or aggregated partial shares. Gate sending on dleq-standalone or dleq-native (default: dleq-standalone). Retain PartialSecret alongside the new path. Also bump workspace bitcoin_hashes to 0.14 and silentpayments' bip39 dev-dependency to 2.2.
Replace `PartialSecret`-based generate_recipient_pubkeys with a DLEQ-aware API taking a `TransactionSharedSecret` per scan key. Remove legacy `calculate_partial_secret` helpers and update spdk-wallet spending to use `TransactionSharedSecret` and `GlobalSenderEcdhShare`. Update the `rand` feature of `bitcoin` to `rand-std`, needed for `OsRng`
Implements the BIP-375 signer roles as a new workspace crate built on top of rust-psbt (psbt-v2) and the silentpayments crate. Includes the BIP-375 test vector validation and signer e2e coverage, finalization delegated to rust-psbt's Finalizer, and correct handling of mixed global/per-input ECDH shares, labeled recipients sharing a scan key, and taproot tweaks in extract_eligible_input_pubkey. Ported from ba1e67b, adapted to SilentPaymentKeyMaterial instead of the obsolete SilentPaymentAddressRaw. Co-authored-by: macgyver13 <4712150+macgyver13@users.noreply.github.com>
Note in the workspace Cargo.toml why we default to rust-dleq's pure-Rust standalone backend, its BIP-374 vector verification status, why the native vendored-libsecp path is deferred, and the triggers to revisit it.
The hand-rolled unsigned transaction cannot carry DLEQ ECDH shares or hand signing off to the psbt crate. Freeze the selected inputs and outputs on a PSBT and derive scripts only at finalize time.
A co-sender can hand us a PSBT we would sign and a receiver would skip, or swap an output script after the shares are written. Either way the signature can be broadcast before we notice. Uncompressed P2PKH keys are left out of the ECDH sum, matching BIP-352. A P2SH input now needs a redeem script that hashes to its prevout before we decide whether it is P2SH-P2WPKH; a missing or mismatched script is an error rather than a skipped input. Signing goes through rust-psbt 2fb5abc, whose session takes a verifier and the exact input set. SpOutputVerifier re-derives the output scripts from the verified shares and rejects an empty or swapped script. A witness-only prevout is also rejected unless one of the inputs being signed is P2TR, because only that signature commits to every prevout. The wallet runs the same check when scripts are already set, and passes every input index because it signs them all.
input_count and spent_output_index are no longer plain integers, so the BIP-352 input set converts them.
Callers derive the scripts and commit them through the upstream Signer. The wrapper's lock-time and commit error variants go with it.
commit_sp_outputs now refuses a PSBT whose silent-payment scripts are already set. Checking those scripts is verify_committed_sp_outputs.
A missing outpoint fails inside assembly. The duplicate-outpoint preflight is dropped with the separate lookup.
Sosthene00
force-pushed
the
feat/silentpayments-dleq-multisigner
branch
from
November 12, 2026 11:24
e41a3be to
0d3f452
Compare
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.
PartialSenderEcdhShareandGlobalSenderEcdhSharefor multi-signer flows.TransactionSharedSecret::new_from_global_shareandnew_from_partial_shareswith vin coverage checks.dleq-native/dleq-standalonefeature flags viarust-dleq; legacyPartialSecretAPI retained.