2 Sender 1 Reciever Payjoin (2S1R) #411
Replies: 3 comments 1 reply
-
2S1R wouldn't even need the subdirectory ID to be shared between the senders, the receiver can do all of the PSBT combining out of band. All that's needed is for the senders to opt in to the additional round of communication required, and consent to receiving proposal PSBTs that they cannot fully complete. I suppose that's a simpler starting point? The receiver would need to have state & concurrency to detect when this is possible, and to multiplex senders accordingly, as well as merge the data from the two sessions. It seems like other than the additional round of signature aggregation, the senders' and the receiver's state machines would be largely unchanged. |
Beta Was this translation helpful? Give feedback.
-
The existing 7168 byte limit seems sufficient
Without adding redundant GET requests this leak will be inherent, so I wouldn't worry about that too much. Appended messages will just appear uniform size, by unknown writer. I don't see a way to mitigate leaking the # of readers without significant complexity increases, e.g. a PIR based directory, p2p transport, or clients generating significant (unreasonable) amounts of cover traffic (both read and write, including in the 2 party case which kind of sucks if that's all you're doing). Therefore, for this PoC i would just ignore this consideration and as a working assumption just let the directory know the number of parties to a session and not treat that as a problem, if it becomes a censorship risk then alternative transports to a centralized directory are probably the way to go. That said, in the fan-in setting the receiver has more leeway to add cover traffic, similarly to Loopix.
For multiparty sessions I think it's simpler to use the receiver's key not for DHKEM, but as entropy for a symmetric KDF. The authentication properties of a DHKEM offer little assurances in the multiparty setting anyway, and the short ID no longer leaks this to the directory so it's a private communication channel. All parties to the subdirectory can both read and write. Since AEAD is used in DHKEM and should be used in this symmetric variant, domain separation is ensured, and DHKEM failing early can signal multiparty data. Senders who are given the same short ID can opt out of multiparty by using DHKEM. Receivers who opt into that can avoid senders from spying on other non-multiparty sends by just posting noise to themselves, which also partly addresses the previously mentioned # of participants leak. |
Beta Was this translation helpful? Give feedback.
-
Progress UpdateCurrent StatusIn a WIP branch, I have a working example of 2s1R. The flow here is straightforward and adds only one extra round of communication for the senders. This protocol is implemented as an integration test:
Missing Components for a Complete POCTo achieve the above, I had to abuse the v2 data structures/typestate. For instance, since we are dealing with multiple parties and different session contexts, I had to make the session contexts public. It makes sense to recreate similar typestate data structures for the v3 multiparty protocol. I advocate for v3 typestates rather than modifying v2 because v3 may require validation for different criteria and entirely new states. Sender and reciever validation is also missing:
Backwards Compatibility and ImprovementsAt every round of communication, the protocol can downgrade to a previous version of PayJoin:
RoadmapPhase 0: Experiment (Current Phase)
Phase 1: Proof of Concept
Phase 2: Sub-Transaction Model Privacy Metrics
Phase 3: Coalition Formation
Miscellaneous Tasks
|
Beta Was this translation helpful? Give feedback.
-
Rough outline of how we can implement a 2S1R payjoin
General Flow
The receiver generates their HPKE key pair and creates two separate BIP21 URIs, each with a different Bitcoin address.
The senders create a sweep PSBT and post it to the shared subdirectory.
For this process to work, the PJ directory must append PSBT bodies rather than overriding them, which is its current behavior.
The receiver needs a method to identify where an encrypted payload begins and ends.
The receiver validates the proposal, merges the two PSBTs, signs the combined transaction, and posts the PJ back to the same subdirectory ID.
The senders use long polling on the subdirectory ID to detect updates.
Finally, the reciever will broadcast the fully signed PSBT
Beta Was this translation helpful? Give feedback.
All reactions