# MuSig2
## Metadata
**Status**:: #x
**Zettel**:: #zettel/fleeting
**Created**:: [[2025-11-06]]
**Reference**:: [[Nick et al. - MuSig2 Simple Two-Round Schnorr Multi-Signatures]]
## Algorithm
![[MuSig2.png]]
## MuSig2*
$
\mathrm{KeyAggCoef}^*(L, X) = \begin{cases} 1 & \text{if } \mathrm{IsSecond}(L, X) \\ H_{\mathrm{agg}}(L, X) & \text{otherwise.} \end{cases}
$
The paper defines the predicate $\mathrm{IsSecond}(L, X)$ to be true if and only if X is the smallest element in L such that $X \ne min(L)$.
An alternative is to let the second key be $X_i$, where $i$ is the smallest index such that $X_i \ne X_1$.
Ensure that the coefficient is not 1 if there's only one key and its copies in the public keys set.