-
Notifications
You must be signed in to change notification settings - Fork 74
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
Adding Base45 (aka ISO/IEC 18004:2006 Alphanumeric Mode QR code) #64
Comments
This seems like a well motivated addition. In terms of prefix, |
SP? space? |
Yes, I assume that's what the RFC means by SP. |
I'd prefer a non-whitespace character. How about '4' given that so far the registry contains no base 4x formats? |
There is also a standards track internet draft called "The Base45 Data Encoding", which is similar but supports encoding of arbitrary binary data. I would favour using that for base45 over ISO/IEC 18004:2015. (Also, the ISO/IEC standard is paywalled, afaik.) |
Note that "The Base45 Data Encoding" was published as RFC 9285 in Aug 2022: |
There's now a PR to add a mapping to the RFC 9285 encoding: |
There is a special compression mode in the ISO QR code ( ISO/IEC 18004:2006 ) standard called "Alphanumeric Mode". When you stay within this limited character set, it will do its own compression and error correction (~44% or more).
From QR code standard ISO/IEC 18004:2000 §8.3.3
The advantage of encoding binary data in Base45 in QR code related scenarios is that the encoding does not require additional compression or checksums. But you do have to not use lower-case letters or other non-allowed characters, which can force you into the much less efficient QR binary mode.
I would like to see this mode added to multihash. I'm not sure if it is allowed for multiphase but ASCII 45
-
is both allowed in a URL and is in the base45 character set. Second choice would be4
or5
, Otherwise some other available unreserved multihash character prefix is fine.As this base45 is already an international standard, used not only by QR codes but also some fairly obscure things like satellite radio, I think it would be a good addition.
My particular usecase is for encoding cryptographic keys and signatures to be used in air-gapped offline QR code based scenarios, such as #LetheKit
Let me know if this would be considered something I should create an initial PR for of if the maintainers of this repo want to add it.
-- Christopher Allen
The text was updated successfully, but these errors were encountered: