Added a check to see if using an RSA public key, and if so, skip trying to decrypt