recoded RSA keypair generator