Re: Question on use of base64 vs base64url in modern specifications

On 4/24/20 3:24 PM, Christopher Allen wrote:
> But the question I have then is, why use the older base64 at all? Why
> not completely deprecate base64 entirely for brand new standards? Or is
> it solely that base64URL also "forbids line separators"? Is this the
> only reason why the older base64 is still used in new standards? Or am I
> missing something?

It's worse than that... there are 11 variants for base64 (and some even
crazier variants that Digital Bazaar has seen in the wild):

https://en.wikipedia.org/wiki/Base64#Variants_summary_table

Base64 is a mess specifically because of all of the optionality... we
shouldn't pull it forward into new standards unless only *one* encoding
of base64 is settled upon for very specific use cases.

Even base64url has two variants (a padded version and an unpadded
version). The Multibase spec recognizes the 4 most widely used base64
formats:

https://tools.ietf.org/id/draft-multiformats-multibase-00.html#rfc.appendix.D.1

In any case, boo base64 (for 99% of use cases where you're encoding
something less than a few hundred bytes in size). For stuff that's
larger, like PNG images... base64pad all the way.

*grabs popcorn, awaits encoding-format related Chair throwing*

-- manu

-- 
Manu Sporny - https://www.linkedin.com/in/manusporny/
Founder/CEO - Digital Bazaar, Inc.
blog: Veres One Decentralized Identifier Blockchain Launches
https://tinyurl.com/veres-one-launches

Received on Sunday, 26 April 2020 15:23:13 UTC