conditional decoding of key pair environment variables