Skip to content

Commit

Permalink
btcec/schnorr/musig2: always pass in priv key for early nonce gen
Browse files Browse the repository at this point in the history
This helps mitigate an issue discovered in musig2 under certain
scenarios:
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-October/021000.html.
  • Loading branch information
Roasbeef committed Oct 25, 2022
1 parent 323871f commit eef9fbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion btcec/schnorr/musig2/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ func NewContext(signingKey *btcec.PrivateKey, shouldSort bool,
// are known.
if opts.earlyNonce {
var err error
ctx.sessionNonce, err = GenNonces()
ctx.sessionNonce, err = GenNonces(
WithNonceSecretKeyAux(signingKey),
)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit eef9fbc

Please sign in to comment.