kartikeya sharma
AI Verification · Applied Cryptography · AI Safety

How Bob Steals A Multisig, And How MuSig2 Stops Him

Friday, October 23, 2026

CryptographyBitcoinDigital SignaturesMuSig2

Last week we talked about how, with ECDSA, it's not very obvious to do multi-signatures, but with Schnorr signatures it's very, very simple, as simple as adding. And we left off with a type of attack that was possible in a multi-signature setting if we construct multi-signatures in a naive way.

Multi-signatures are a type of setting where a group of people would get together, and only when all of them have signed the transaction will the transaction be approved. Even if one person does not sign, the transaction will not be approved. This has many use cases. Suppose you want more accountability. You don't want one person to hold all the power, so you distribute the keys and you sign in a sort of consortium manner.

The naive way

Let's say there are two people, Alice and Bob, and both of them need to take part in this multi-signature. Alice has a public key YA = xA·G, Bob has the public key YB = xB·G, and then the aggregate key Yagg is just YA + YB.

Yagg = YA + YB = (xA + xB)·G

This is the naive way of combining their individual public keys to create an aggregate public key, which now requires both Alice and Bob to sign in order to have successful verification.

The rogue-key attack

Alice outputs their public key like an honest participant. But Bob, now that they know Alice's public key, what they do to calculate their public key is not this regular equation. They just take their private key times G, minus the public key of Alice.

YB,rogue = xB·G − YA

So what happens now when we calculate Yagg? YA stays the same, but YB is xB·G − YA, so the sum YA + (xB·G − YA) is equal to xB·G, because the two YA terms cancel out. So Alice's involvement in the aggregate key has been completely cancelled out. And this is Bob's public key, which means that he knows the private key. So for any signature to happen, he doesn't need Alice's permission. He can just keep on signing things, and the multi-signature scheme is pretty much useless in that case.

Let's say xA is five, just for example purposes, so Alice's public key is 5G, and Bob's is 2G. Alice would just say, "Hey, my public key is 5G." But Bob, seeing Alice's public key, would be like, "Actually, my public key is not 2G. It's 2G − 5G = −3G." So now Yagg is 5G + (−3G), which is equal to 2G. And we know that Bob's real public key is actually 2G, whose private key he knows. Bob knows the private key of Yagg and can sign anything now.

Can Bob sign for the pair on his own?
Toy curve y2 = x3 + 7 over F79 (67 points, so n = 67). Bob tries to sign a transaction alone with his own private key, as a normal single-key Schnorr signature against Yagg. The hash is a toy hash reduced mod n.
key aggregation
what Bob publishes
Alice's public key YA (xA stays with Alice)
Bob's real key xB·G
key Bob publishes
coefficients aA, aB
Yagg
Bob's solo signature: s·G vs R + c·Yagg

How do we prevent this?

How can we still exploit this very nice property of addition that Schnorr signatures give us to do multi-signatures without falling prey to these types of rogue-key attacks? Are there any ideas?

Two ideas came from the room: a coordinator who collects everyone's keys before anyone sees anyone else's, and a commitment to the public key sent before the key itself.

A coordinator, that's a good thought. This is actually common in many protocols. Just one thing that comes to my head right now, without any research: it requires more rounds of communication. This coordinator has to be online when everyone is sharing their key. Basically, it requires more synchronous activity. We're also blocked in the sense that this person is not able to just calculate the aggregate themselves offline. They now have this guy as their gatekeeper, and they have to wait for them. Even with MuSig2, the upgrade from MuSig1: MuSig1 requires more rounds of communication, I think three rounds, and MuSig2 only requires two rounds of communication. And that's seen as a good thing. The less live interaction there is between all the participants, the better.

Commitment makes a lot of sense. You have to first ask yourself, what are we trying to discourage? We're trying to discourage Bob from changing their public key once they see Alice's public key. If we're able to get Bob and Alice and anyone else to commit to some public key beforehand, then there's no way someone like Bob could change the key later on, once more information has become available to him, which would be everyone else's public keys.

It's like a theme. You should try to take away this theme from this: what is a commitment solving? What is a hash function solving? It's helping preserve order, the order of steps. Because if we don't preserve the order, then malicious things like this can happen. Earlier we talked about what happens if order is not preserved: if c is calculated before R, then Alice, without even having a private key, can pass the verification. So the general theme is: the hash function will help with maintaining the order of operations.

MuSig2 key aggregation

There's this signature scheme called MuSig2, which I think stands for multi-signature two, which prevents this attack. Instead of just adding the public keys like we did, both of them combine their keys into a list and hash it. So now we have this new variable called L, which is just a hash of the entire list of keys.

L = H(YA ‖ YB)

For Alice, this value we'll call aA. It's the hash of the list and Alice's public key. Remember, the list already contains both of their public keys. And for Bob, it's the same thing: aB is a hash of this list concatenated with his public key.

aA = H(L ‖ YA)     aB = H(L ‖ YB)

And now, how do we calculate Yagg? It would be Alice's coefficient times Alice's public key plus Bob's coefficient times Bob's public key. So the only difference is we do the same addition, YA + YB, but we multiply each of their public keys by some coefficient. You could generalise to say Yagg is the sum over participants of ai·Yi.

Yagg = aA·YA + aB·YB = Σ ai·Yi

Why that stops Bob

We've added hashes in a bunch of places, but what is it actually doing? Take the same key examples: YA was 5G and YB was 2G. Here Bob is providing their actual public key, because they're just giving it to this list function. Suppose aA comes out to be three, and suppose aB comes out to be four. So now Yagg is going to be 3·5G + 4·2G = 15G + 8G = 23G.

Yagg = 3·5G + 4·2G = 23G

Bob can only sign transactions that have a public key of 2G, because that's the only one he can actually sign individually, which contains his own private key. He would need this coefficient times 5G, even knowing Alice's public key, plus this coefficient times some value. This is what Bob wants to find: what can I put here so that after doing everything, Yagg is 2G?

But the problem is he can't figure that out. Listen carefully: these two coefficients can only be calculated after Bob commits to a public key, and they reference that through this L. The intention is very similar to how the c value can only be calculated after k is calculated, because the hash function takes that as an input. We can't calculate the output of something if we don't even know the input, especially with hash functions, because they're one way. With hash functions, we know that they're very hard to reverse. So this is pretty much the trick that MuSig2 uses for key aggregation.

If Bob keeps trying rogue keys under MuSig2, how many tries until one works?
Bob's only move is trial and error: pick a candidate key YB′ = x·G − u·YA, hash, and hope the coefficients come out with aA = u·aB, which is the one case where Alice's key cancels. Each candidate changes L, so each try is a fresh roll of an n-sided die.
–tries this run
–average over runs
67n on the toy curve
winning rogue key, and Bob's solo signature against Yagg–
expected time on secp256k1 (n ≈ 2256)
On the toy curve he wins in about 67 tries. On the real curve the same plan needs about 2256.
The toy curve is breakable precisely because n is tiny. The protection is not that the hash is clever, but that its output is unpredictable until Bob has committed, and there are 2256 outputs to hit.

Signing

Now that Yagg is calculated, what do we need next? We need an R value, the random nonce, and this must be generated by both Alice and Bob. But here we need to generate two random nonces each. I'm not going to go over it, but you're welcome to look at why this is the case. It's to prevent something called Wagner's birthday attack.

So Alice will find kA1 and kA2, both coming from a random distribution, and Bob will do the same thing, kB1 and kB2. And then they both calculate the R values. Here we found just one k and one R, but now we have two k's, so we have two R's. RA1 = kA1·G, RA2 = kA2·G, and for Bob it's the same thing. And they both exchange these. This is all broadcast publicly. There's nothing secret about this.

But now they combine everything and calculate a value b, which is a hash of pretty much everything they've seen so far: Yagg, RA1, RA2, RB1, RB2 and the message.

b = H(Yagg ‖ RA1 ‖ RA2 ‖ RB1 ‖ RB2 ‖ m)

Similar to how we found Yagg, we have to find Ragg, because ultimately the signature scheme only needs one public key and one random nonce. We're adding the first of both and multiplying, or scaling, the second one by b, which is our hash of everything we've seen so far. It has the same intuition. We want to commit things early on so that even the Ragg value cannot be changed later. Although I'm not exactly sure what Wagner's birthday attack is doing.

Ragg = (RA1 + RB1) + b·(RA2 + RB2)

Now we have to find c, which is the challenge. c here is the same thing as before, except we're using the aggregate values: Ragg, Yagg and the message.

c = H(Ragg ‖ Yagg ‖ m)

The last step is calculating the signature equation. Both Alice and Bob will need to do this individually. The regular equation was s = k + c·x. Here, k is now kA1 + b·kA2. Again, we're using these previously committed values. And what is the private key? It's not simply just xA. It's going to be aA·xA, with the coefficient from before. So this still corresponds to k, this still corresponds to x. We just have a few extra variables. Then Bob does the exact same thing, and the aggregate signature is just s = sA + sB.

sA = (kA1 + b·kA2) + c·(aA·xA)     s = sA + sB
← Back to all articles