Skip to content

Commit 2428169

Browse files
chris-woodarmfazh
authored andcommitted
Copy the salt before returning it
1 parent cbf32f3 commit 2428169

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

blindsign/blindrsa/blindrsa.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ func (state RSAVerifierState) CopyBlind() []byte {
192192

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

198200
// An RSASigner represents the Signer in the blind RSA protocol.

0 commit comments

Comments
 (0)