Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: base32cx, a base32 encoding with built-in letter-case checksum #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mr-word
Copy link

@mr-word mr-word commented Nov 21, 2019

This PR includes a draft spec and test cases. The spec is in draft status until someone verifies the first set of test cases with a second implementation.

x is for chECKSum?

@Stebalien
Copy link
Member

Does this have any implementations, users, or prospective users? This looks like an interesting encoding but we don't even have a multibase for EIP55 which is actively used.

@Stebalien
Copy link
Member

(TL;DR: even if we keep this as a draft, we don't have all that many prefixes)

@mr-word
Copy link
Author

mr-word commented Nov 23, 2019

The tests were generated from this implementation: https://github.com/mr-word/base32cx
This implementation shows the bitwise logic and is inherently much less efficient than it should be. If anyone wants to make their own version I suggest looking at how base32hex is typically implemented.

Regarding EIP55, I think you're right that it should be prioritized over this. I'll go ahead and make a draft PR for it before I make progress here.

I was motivated to put this together because I was drawn to use EIP55 for some identifier strings and realized it only uses a hex alphabet for backwards compatibility (Ethereum addresses originally were hex with no checksum). Any new application that wants to harness all the properties of EIP55 but doesn't need to use hex should probably use base32cx instead. This checksum strategy works with many possible base16 and base32 alphabets, but it works best with this alphabet.

This PR is a genuine Request For Comment. Consider it a low-stakes exercise in multiformat table definition governance as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants