LWN.net Logo

Putting the signature in URL would force them to break links

Putting the signature in URL would force them to break links

Posted Jul 6, 2011 21:06 UTC (Wed) by Tov (guest, #61080)
In reply to: Putting the signature in URL would force them to break links by zooko
Parent article: Vsftpd backdoor discovered in source code (The H)

Wouldn't base62 encoding create problems in case-insensitive environments (e.g. when stored on a FAT filesystem)?

I would rather sacrifice a bit longer filenames for robustness and human readability (when comparing hashes).


(Log in to post comments)

Putting the signature in URL would force them to break links

Posted Jul 6, 2011 21:41 UTC (Wed) by zooko (subscriber, #2589) [Link]

Yeah, you're partially right about case-insensitive filesystems like VFAT or NTFS. Actually nothing would go terribly wrong on such a filesystem except that the chance of collisions would be less astronomically unlikely. However, it still smells a bit icky to have only astronomical collision-resistance instead of super-duper-astronomical collision-resistance, depending on your local filesystem.

Also you're right that base-62 is harder to read aloud than other encoding (because you have to say "uppercase" and/or "lowercase" a lot). An alternative that addresses these two issues is base-32, e.g.:

http://pypi.python.org/pypi/zbase32/

rationale for zbase32 versus RFC 4648:

http://tahoe-lafs.org/trac/zbase32/browser/trunk/zbase32/...

On the other hand the more compact result of base-62 makes it a little easier to cut and paste, which is probably more common than reading aloud nowadays.

Here are the examples again.

base-16 (hex):
README.0983e91e1f8a061385f41464e141c94892f0f3ccc8e0d5a5167f1841c0f123c4.sha256chk

base-32 (zbase32):
README.bgb618o9tedb8bxwnt1qnoqjjnjxbh6c3dopmjesxhcrdo8trxny.sha256chk

base-62 (zbase62):
README.2FtSwvET66qZj2xqQjlAi6VFYW4ZQfCRhFgc3fwMglg.sha256chk

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds