def testRSASig(self): length = Random().randrange(1, 1024) length = 128 M = WeakRandom().myrandom(length, True) rsa = RSA_Sig() (pk, sk) = rsa.keygen(1024) S = rsa.sign(sk, M) assert rsa.verify(pk, M, S)