I am trying to do the first CryptoPals challenge where I have to implement the base64 algorithm. I am using Python.
It has the following advice:
Always operate on raw bytes, never on encoded strings. Only use hex and base64 for pretty-printing.
So say I have a string and I have to convert this into bits. The issue is that I have seen people using UTF-8 or ASCII before converting the string to bytes/bits. (See here)
Should I always proceed with UTF-8? Or there could be issues down the road if my script parses something encoded in ASCII?