Skip to content

Commit 9e2733b

Browse files
committed
Remove a couple more dead things
1 parent 8d0cc8c commit 9e2733b

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

blindsign/blindrsa/pbrsa.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func augmentPrivateKey(h crypto.Hash, sk *BigPrivateKey, metadata []byte) *BigPr
157157
}
158158
}
159159

160-
func fixedPartiallyBlind(message, rand, salt []byte, r, rInv *big.Int, pk *BigPublicKey, hash hash.Hash) ([]byte, PBRSAVerifierState, error) {
160+
func fixedPartiallyBlind(message, salt []byte, r, rInv *big.Int, pk *BigPublicKey, hash hash.Hash) ([]byte, PBRSAVerifierState, error) {
161161
encodedMsg, err := encodeMessageEMSAPSS(message, pk.N, hash, salt)
162162
if err != nil {
163163
return nil, PBRSAVerifierState{}, err
@@ -181,7 +181,6 @@ func fixedPartiallyBlind(message, rand, salt []byte, r, rInv *big.Int, pk *BigPu
181181
hash: hash,
182182
salt: salt,
183183
rInv: rInv,
184-
// rand: rand,
185184
}, nil
186185
}
187186

@@ -213,16 +212,13 @@ func (v RandomizedPBRSAVerifier) Blind(random io.Reader, message, metadata []byt
213212
return nil, PBRSAVerifierState{}, err
214213
}
215214

216-
// Compute e_MD = e * H_MD(D)
217215
metadataKey := augmentPublicKey(v.cryptoHash, v.pk, metadata)
218-
219-
// Do the rest with (M', D) as the message being signed
220216
inputMsg := encodeMessageMetadata(message, metadata)
221-
222-
return fixedPartiallyBlind(inputMsg, nil, salt, r, rInv, metadataKey, v.hash)
217+
return fixedPartiallyBlind(inputMsg, salt, r, rInv, metadataKey, v.hash)
223218
}
224219

225-
// Verify verifies the input (message, signature) pair and produces an error upon failure.
220+
// Verify verifies the input (message, signature) pair using the augmented public key
221+
// and produces an error upon failure.
226222
//
227223
// See the specification for more details:
228224
// https://datatracker.ietf.org/doc/html/draft-amjad-cfrg-partially-blind-rsa-00#name-verification-2
@@ -252,9 +248,6 @@ type PBRSAVerifierState struct {
252248
// The salt used when encoding the message
253249
salt []byte
254250

255-
// The random component attached to each message
256-
// rand []byte
257-
258251
// Inverse of the blinding factor produced by the Verifier
259252
rInv *big.Int
260253
}

0 commit comments

Comments
 (0)