Base58 encoding/decoding for Bitcoin