please prefer base 32 over base 64 (was: Re: [p2p-hackers] Bitzi (was Various identifier choices))

Zooko zooko at zooko.com
Wed Oct 3 13:15:01 UTC 2001


I, Zooko, wrote the part prefixed with "> > ".

 Gojomo wrote:
>
> > I guess we just differ in our value judgements here.  I value shorter ids for
> > cut-and-paste purposes more than I value absence of "break" characters.
> > Indeed, I can't really think of a motivating example for caring about "break"
> > characters.  Could you please suggest one?
> 
> Again, Googling for identifiers. Other full-text searches for
> fragments. Searching for the Base32 fragment 'B6THNJ' is always
> a single word; searching for the Base64 fragment 'aS+w/e' might
> be interpreted as 'as w e' and perhaps ignored completely.
> 
> > Hm.  I can't find a base-32 encoder in Python.  Could someone who favors
> > base-32, and thus presumably has an encoder handy, show the base-32 version of
> > 40-byte, 30-byte, and 20-byte strings?  Thanks!
> 
> 20b -> 32 chars: 3KIZIJB64XP3NCXAE4ISQZT3QNCTF7VD
> 30b -> 48 chars: 3KIZIJB64XP3NCXAE4ISQZT3QNCTF7VD8EJ2KEDCV3WQMMPF
> 40b -> 64 chars: 3KIZIJB64XP3NCXAE4ISQZT3QNCTF7VD8EJ2KEDCV3WQMMPFWFJW6DCVPKXMZQIZ

Hey, that' doesn't look too bad!  I guess the four characters omitted are `0',
`O', `1', and `l'?

Hm.  The only thing is that mojo ids look like this:

http://localhost:4004/save_id/3KIZIJB64XP3NCXAE4ISQZT3QNCTF7VD8EJ2KEDCV3WQMMPFWFJW6DCVPKXMZQIZ

so it is greater than 80 chars.  Hmph.

Of course, base-64 would also be greater than 80 chars:

http://localhost:4004/save_id/Ftp3ZuSNvzDw6KmYkmTA81ZGVb-gLJ53qBoY945FO0qvR8pyzBWYBQ

Hrm...

I am just about convinced to switch to base-32.

Regards,

Zooko




More information about the P2p-hackers mailing list