Added function to generate RSA key pair