-
Notifications
You must be signed in to change notification settings - Fork 65
NUT-11: Optional P2PKWitness.digest for multi-party SIG_ALL #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fb1b331 to
03c732e
Compare
|
It seems important for the signers to be able to verify what they are signing. In this proposal signers would just get the digest, so they can't be sure what outputs they are authorizing to be created. |
|
I thought that too initially, but when a group decides who the recipient/coordinator of the swap will be, it is really down to them to construct the outputs. Collating blinded messages from other parties and proving the message digest matches expectations is really an out of band operation in cases where parties are splitting outputs. But if we are willing to accept a longer string in the token, we could use the raw aggregated message to sign instead. That way, each party can supply their own blinded message outputs out of band and see they are all aggregated. If one "cheats" the inputs and outputs won't match and the swap will fail. |
Let me unpack that a bit more: Multi-party signature, single receiver transactionsThe receiver should construct the outputs. They can't really cheat themselves. The others are signing to release the funds only. If the other signers want extra oversight into exactly how the receiver is choosing to receive (keyset, denominations, spending conditions etc), that's an out of band issue. Multi-party signature, multi receiver transactionsEach receiver should send the blind message string for their own output(s) to the agreed (and hopefully trusted) co-ordinator. They can try and cheat, but if they do, the aggregate amount won't match the inputs and the transaction will fail. Collating the blind messages and proving the digest includes the expected inputs/outputs is the co-ordinator's out of band responsiblity. We are only facilitating the actual signing. HOWEVER, if we are willing to use the "message to sign" instead of its digest, then all parties can SEE the inputs and the fact their blind message is included in the outputs, which does reduce the burden of proof dramatically. Multi-party signature, third party receiver transactionsIn this case, the third party would have to trust / nominate a signatory to create blinded messages for them (or receive them on their behalf) and then sign they are in the transaction. In this circumstance, it would be better/easier if the witness contained the raw message to sign, not the digest. That way, they can see the third party's outputs are included directly. SummaryI've started with the most conservative case (digest only = smaller token), but we could use the message to sign instead to cover the "are we spending the right inputs and are my outputs actually in this transaction" question. In all cases, if the other signers need to see the RAW unblinded message and confirm actual secrets for the other parties, that is an out-of-band issue. I don't believe we want to be passing around blinding factors under any circumstance. |
|
We may not need both, but I've added a |
90bdf93 to
5c472f3
Compare
Closes #319
This PR proposes an optional
digestbe added to theP2PKWitnessobject. This allows the receiver/co-ordinator to pass around a token containing the Proof(s) to sign to other parties. TheP2PKWitness.digesttells the other party the message to sign for that Proof.