mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-21 14:04:20 +01:00
btcec/schnorr/musig2: always pass in priv key for early nonce gen
This helps mitigate an issue discovered in musig2 under certain scenarios: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-October/021000.html.
This commit is contained in:
parent
323871ff16
commit
eef9fbc5c9
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue