Slightly better test generation for RSA signatures.
This commit is contained in:
@@ -91,6 +91,12 @@ runSignatureGenerator inputs outputs =
|
||||
Left _ ->
|
||||
go (Just keySize) g3
|
||||
Right sig ->
|
||||
case rsassa_pkcs1_v1_5_verify hash public (BSL.fromStrict message) sig of
|
||||
Left err ->
|
||||
fail ("RSA Verification error: " ++ show err)
|
||||
Right False ->
|
||||
fail ("RSA verification failed?!")
|
||||
Right True ->
|
||||
do writeChan outputs [("d", showHex (private_d private) ""),
|
||||
("n", showHex (public_n public) ""),
|
||||
("h", hashname),
|
||||
|
||||
Reference in New Issue
Block a user