Hanks Blog:
So I have been working on a JS Web based Authenticator application. It seems there are not enough. During this project I must convert between all sorts of formats. Base32, Hex, Uint8Arrays, etc.
It struck me how stuck we get in doing things because of the past. I get it. There has to be backwards compatibility. But I can still complain about it.
So I get the historic need for the concept of Base64. At the time, there was no guarantee that other systems you were talking to would be using the same character set as you. So a reduced character set of 64 characters would greatly alleviate this issue.
So the question arises why do they insist on stating that Base64 characters are 6 bits wide. Well this makes sense when you are trying to use Base64 to encode a binary file (ie: image) or stream over a text based medium (email). Take the binary data, cut it up into 6 bit chunks and use the 6 bit Base64 characters to encode the data. On the receiving side, read the 6 bit Base64 characters and reverse the process. In this context it makes sense. But note at no point is the 6 bit Base64 character transmitted as 6 bits. In your email or on your PC it is likely represented as a byte, 8 bits. The only time that 6 bits comes into play is in the conversion to and from binary.
So in my mind, why exactly does Base32 and Base64 exist? Could the powers that be not have said in the 8 bit space we will only use the first 32 or 64 values in cases that warrant that?
For example, Base32 is used as seed characters for Authenticator applications. It is assumed that this was done as the character set is easily readable. Characters that can be misread (0, 1, 8) are not used. But let’s be honest, there is no reason for Base32 standard itself. Where are all the 5 bit bus/register computers? Maybe there are some. God help us. Maybe there is another use I can’t think of. In any case, the RFC for Authenticators could have simply stated to use extended ASCII code using the characters “ABCDEFGHIJKLMNOPQRSTUVWXYZ234567” as seed values with no reference to Base32. This would have avoid needless conversions from Base32 to binary and back to bytes. They would already be bytes!
I am sure there is some case, or universe where Base32 makes sense. But this is my ‘Hank’s Blog’, and my rant.
Hank out!
