Skip to content

Commit

Permalink
wire: Zero out secrets signature for commitment hash
Browse files Browse the repository at this point in the history
The signature changes depending on the published previous RS message hashes,
and therefore cannot be used to create the commitment hash covering the actual
secrets being published by the message.
  • Loading branch information
jrick authored and davecgh committed May 9, 2024
1 parent c88ab89 commit d4ab4f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wire/msgmixsecrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ func (msg *MsgMixSecrets) Hash() chainhash.Hash {
// messages.
func (msg *MsgMixSecrets) Commitment(h hash.Hash) chainhash.Hash {
msgCopy := *msg
msgCopy.Signature = [64]byte{}
msgCopy.SeenSecrets = nil
msgCopy.WriteHash(h)
return msgCopy.hash
Expand Down

0 comments on commit d4ab4f5

Please sign in to comment.