Some more details.
As noted, what we do is to use s shachains, where:
s = n choose (n - k + 1)
s = n! / ((n - k + 1)! * (k - 1)!)
Let us make this notation: revocation[i][N].
The first index in revocation[i] ranges from i = 0..s - 1 where s is the above number of shachains we need.
The second index in revocation[i][N] is the state commitment index number.
revocation[i] is the root secret for shachain at index i. This root secret allows generation of the entire revocation[i][0...UINT64_MAX], just as knowledge of revocation[i][N] lets you generate the sequence revocation[i][0..N].
As as simplified example, let us suppose a 2-of-3 is desired. Then the shachain knowledge would be:
0: A B
1: A C
2: B C
That is:
- A knows
revocation[0]andrevocation[1] - B knows
revocation[0]andrevocation[2] - C knows
revocation[1]andrevocation[2]
When preparing a commitment transaction, the remote side needs to know the equivalent of the per_commitment_point at state index N, which some quorum of signers needs to give to the remote node.
In order to reduce the number of signatures onchain in case of a revocation, we take full advantage of Taproot / Schnorr and make the per_commitment_point[N] be:
MuSig2(revocation[0][N] * G, revocation[1][N] * G, revocation[2][N] * G, remote_key * G)
The above point is calculable from public information.
Note that MuSig2 is NECESSARY.
Why is MuSig2 necessary? What does MuSig2 protect against? MuSig2 protects against “key cancellation”. We must make it an inviolable rule that signer A cannot be fooled into approving a transaction where the funds can be stolen, unless k OTHER signers have already been compromised.
Now, recall that A knows revocation[0] and revocation[1], but that means it DOES NOT know revocation[2]. IT has to get revocation[2][N] * G from some other signer, either B or C.
We have two constraints:
Acannot be givenrevocation[2]orrevocation[2][N]for anyN.- If
Awas compromised by the remote side, then once it learnsrevocation[2][N], it can hand overrevocation[0][N],revocation[1][[N]andrevocation[2][N]to the remote side, and the remote side can now revoke the LATEST commitment transaction, resulting in fund loss.
- If
Acannot validate thatrevocation[2][N] * Gis the correct point.- Suppose the other live signer is
B.Bhands over some opaque point, claiming it isrevocation[2][N] * G. However, in secret,Bactually givesecdh(b, R) * G, MINUS the sum of the pointsrevocation[0][N] * Gandrevocation[1][N] * G. - If we used a simple summation of
revocation[i][N] * Ginstead of a MuSig2, thenBhas arranged the total to cancel out the revocation keys known byA, meaning a compromnised single signerBhas allowed funds theft.
- Suppose the other live signer is
Thus, it is absolutely necessary to use MuSig2 here.
And since we are going to MuSig2 anyway, we might as well include the remote side MuSig2 as well, so that a revocation only requires a single signature.