InvalidKeyPairException to be thrown in case of validation failure.