Skip to content

Commit

Permalink
Copy the salt before returning it
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-wood authored and armfazh committed Mar 1, 2022
1 parent cbf32f3 commit 2428169
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion blindsign/blindrsa/blindrsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ func (state RSAVerifierState) CopyBlind() []byte {

// CopySalt returns an encoding of the per-message salt used in the protocol.
func (state RSAVerifierState) CopySalt() []byte {
return state.salt
salt := make([]byte, len(state.salt))
copy(salt, state.salt)
return salt
}

// An RSASigner represents the Signer in the blind RSA protocol.
Expand Down

0 comments on commit 2428169

Please sign in to comment.