-
Notifications
You must be signed in to change notification settings - Fork 13
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
MuSig in Wasabi coinjoin protocol #41
Comments
This is awesome! I don't claim I understand all the math, but if we can make this work, then it can make Schnorr aggregation integration seamless. I just drop it here, that maybe we could do signature aggregation even today: https://eprint.iacr.org/2017/552.pdf |
We can this make work. I am sure about that. Here is the document that I am reading https://eprint.iacr.org/2018/068.pdf. Btw, I've read the paper you shared above and it is about how to create a ECDSA signature with more than one signer, that means we can have multisignature transactions that look like a simple P2[W]PKH, transaction, i mean, with this we wouldn't need OP_CHECKMULTISIG for example, or P2SH for multisignature transactions, etc. great! However it seems Bitcoin Core team is going to go for Schnorr and implement cross-inputs signature and one single signature for the complete transaction + taproot what will make this new ECDSA key aggregation obsolete to fast. |
Note 1: At confirmation time I read it was // Combining public keys... L=H(x1, x2,...,xn)
var pubkeys = alices.Select(a=>a.PubKey);
var ell = SHA256(Concat(pubkeys)); |
I saw this being mentioned on Twitter and I wanted to note that cross-input signature aggregation is not something I believe is being worked on by @sipa and others for an initial implementation of schnorr and taproot in Bitcoin. As Wuille said:
For details, here's one of the concerning interactions. |
@harding Can I get a quick fact-check on my knowledge on sigaggregation? To my understanding we will have to make 100 peers sign the same transaction, but each signature have to come on top of another one. Compared to now when we can just give out the unsigned transaction and let the signatures come in in parallel. Is that correct? If that's true, then I'm kind of pleased to hear that sig aggregation is being pushed back a bit so there may be more chance to fix this issue (or the Tor network develops to the point where this issue wouldn't be a problem anymore.) |
@nopara73 I'm not an expert (pinging @jonasnick, who is) but my understanding is that the MuSig protocol is parallelizable, although it's multi-round unlike currently single-round coinjoin signing. Signers generate commitments to nonces and send those to all other signers (in Wasabi, this would be through the coordinator). Signers then verify all of the other commitments are valid and produce their partial signature, which can be collected and combined (again, in Wasabi through the coordinator). Assuming Wasabi's timeouts stay the same, I think this would only take a small multiple longer than the current protocol (e.g. 2x longer for the two rounds described above; I've read that maybe one of those rounds could be eliminated using some ZK fanciness). For details, you can see an implementation here. The API is clearly documented. A question I don't know the answer to would be how resistant the protocol would be to sabotage. E.g. can Mallory generate a nonce or partial signature that will cause the combined signature to be invalid in a way that it can't be detected that Mallory is at fault? Finally, what MuSig does may not be the best guide to how cross-input signature aggregation (sigagg) would work because we don't know what restrictions there might be on sigagg to prevent unwanted interactions between it and other protocol features. |
Thanks for the ping.
correct. MuSig is usually "parallelized" that way. The nonce can be likely attached to an earlier protocol message like the transaction submission to save a round.
Both key and signature aggregation work in a way such that the individual partial signatures alone can be checked for correctness, so it's trivial to find out who is dishonest. |
This is huge! Thanks guys! |
Notes about MuSig in Wasabi coinjoin protocol
It seems that MuSig is the multi-signature scheme that will be used by the bitcoin protocol, this is a schnorr-based scheme that allows key aggregation, what means that a signature produced by multiple
signers looks as the same length that one produced by only one signer.
This new multi-signature scheme can be used for improving the bitcoin protocol mainly in two ways: providing a better multisig script and allowing to have just one signature for the entire transaction instead of having one signature per input. In case the highlighted part is really implemented, it could be very important for Wallet because it could make the coinjoin transactions smaller (cheaper), which in turn
would allow us to implement some "crazy" ideas as sending anonymously "by free" (see the quotation marks)
Wasabi coinjoin protocol changes
A common misunderstanding in the team had being that given the signatures aggregation is a 3-rounds interactive process it cannot be used Wasabi coinjoin transactions. However, Wasabi coinjoin protocol is also interactive and the new signing process can be built on Wasabi.
Lets see how the Wasabi protocol could be modified to take advantage for the one signature for the entire transaction part.
At inputs registration phase
Each participant has to send the input pubkey (
Xi
) to the server. Wasabi doesn't need to change because those pubkeys are already available at input registration and are being extracted from the compact signatures in the input proof message.Additionally each participant generates a new private key
ri
and derivates its public keyRi
. The commitmentti
isti = H(Ri)
. The participant has to submit this commitment in the input registration message.At confirmation phase
The coordinator shares all participants' public keys with the all the participants. With that, they can compute
L
as the hash of the multiplication of all the public keys:L = H(X1 * X2 +.....Xn)
.Each participant computes all the values
ai = H(L || Xi)
. And finally the aggregated public keyAK = a1*X1 * a2*X2 *.....* an*Xn
.The coordinator also shares the all participants commitments
ti
with the all the participants. Once the commitments set is received each participant reveals itsRi
to the coordinator. The coordinator verifies that eachRi
receivedti=H(Ri)
. In case it detects an error here the coordinator bans the participant and restart.Once all the
Ri
were recived, the coordinator shares all theRi
with all the participants and they verify all theti=H(Ri)
as the coordinator does. Participants should not sign if that verification fails. Both coordinator and participants computeR = R1*R2*....+Rn
.At signing phase
Each participant receive the unsigned transaction and computes the signature as follow:
Note 1 I am not sure what
m
represents here because participants have to sign their inputs so, the messagem
could be different for each one. I need to read more about this point.Note II this will be implemented by NBitcoin by sure.
Next they send their signatures
si
to the coordinator who computes the final signatures
ass=s1+s2+.......+sn
The text was updated successfully, but these errors were encountered: