Slightly better test generation for RSA signatures.
This commit is contained in:
@@ -91,6 +91,12 @@ runSignatureGenerator inputs outputs =
|
|||||||
Left _ ->
|
Left _ ->
|
||||||
go (Just keySize) g3
|
go (Just keySize) g3
|
||||||
Right sig ->
|
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) ""),
|
do writeChan outputs [("d", showHex (private_d private) ""),
|
||||||
("n", showHex (public_n public) ""),
|
("n", showHex (public_n public) ""),
|
||||||
("h", hashname),
|
("h", hashname),
|
||||||
|
|||||||
Reference in New Issue
Block a user