@@ -157,7 +157,7 @@ func augmentPrivateKey(h crypto.Hash, sk *BigPrivateKey, metadata []byte) *BigPr
157
157
}
158
158
}
159
159
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 ) {
161
161
encodedMsg , err := encodeMessageEMSAPSS (message , pk .N , hash , salt )
162
162
if err != nil {
163
163
return nil , PBRSAVerifierState {}, err
@@ -181,7 +181,6 @@ func fixedPartiallyBlind(message, rand, salt []byte, r, rInv *big.Int, pk *BigPu
181
181
hash : hash ,
182
182
salt : salt ,
183
183
rInv : rInv ,
184
- // rand: rand,
185
184
}, nil
186
185
}
187
186
@@ -213,16 +212,13 @@ func (v RandomizedPBRSAVerifier) Blind(random io.Reader, message, metadata []byt
213
212
return nil , PBRSAVerifierState {}, err
214
213
}
215
214
216
- // Compute e_MD = e * H_MD(D)
217
215
metadataKey := augmentPublicKey (v .cryptoHash , v .pk , metadata )
218
-
219
- // Do the rest with (M', D) as the message being signed
220
216
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 )
223
218
}
224
219
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.
226
222
//
227
223
// See the specification for more details:
228
224
// https://datatracker.ietf.org/doc/html/draft-amjad-cfrg-partially-blind-rsa-00#name-verification-2
@@ -252,9 +248,6 @@ type PBRSAVerifierState struct {
252
248
// The salt used when encoding the message
253
249
salt []byte
254
250
255
- // The random component attached to each message
256
- // rand []byte
257
-
258
251
// Inverse of the blinding factor produced by the Verifier
259
252
rInv * big.Int
260
253
}
0 commit comments