Bitcoin Base58 encoding and decoding