mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 09:50:08 +01:00
btcec/schnorr/musig2: pass in aux info during nonce generation
This commit is contained in:
parent
953e2dd94a
commit
ba20c75aaf
@ -481,7 +481,13 @@ func (c *Context) NewSession(options ...SessionOption) (*Session, error) {
|
|||||||
// specified nonce, or generate a fresh set.
|
// specified nonce, or generate a fresh set.
|
||||||
var err error
|
var err error
|
||||||
if localNonces == nil {
|
if localNonces == nil {
|
||||||
localNonces, err = GenNonces()
|
// At this point we need to generate a fresh nonce. We'll pass
|
||||||
|
// in some auxiliary information to strengthen the nonce
|
||||||
|
// generated.
|
||||||
|
localNonces, err = GenNonces(
|
||||||
|
WithNonceSecretKeyAux(c.signingKey),
|
||||||
|
WithNonceCombinedKeyAux(c.combinedKey.FinalKey),
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user