4 ms·
The EU's Digital Green Certificate [1] uses Base45, which I think they basically invented. They do this because "even in Byte mode a typical QR-code reader trie
by zirror 5y ago
The EU's Digital Green Certificate [1] uses Base45, which I think they basically invented. They do this because "even in Byte mode a typical QR-code reader tries to interpret a byte sequence as a UTF-8 or ISO/IEC 8859-1 encoded text."[2]
They use the 45 chars allowed by the alphanumeric-mode IIRC.
[1]: https://github.com/eu-digital-green-certificates/dgc-overview https://github.com/eu-digital-green-certificates/dgc-overvie...
[2]: https://datatracker.ietf.org/doc/draft-faltstrom-base45/ https://datatracker.ietf.org/doc/draft-faltstrom-base45/
- Dylan16807 5y agoWait, why are they using 45 characters to encode 16 bits when you only need 41? Especially when they could have avoided % and space.
- zirror 5y agoWell, tbh, I don't know the reason, I can only speculate. It is meant to encode pure binary data (cbor) and not to be human readable or URI or anything like that. It is specifically designed for QR Codes. I read through some Github issue [1] just now and as far as I can tell, it is more or less a design oversight, which might be remedied by a later version. [1]: https://github.com/ehn-dcc-development/hcert-spec/issues/64 https://github.com/ehn-dcc-development/hcert-spec/issues/64
- Dylan16807 5y ago> It is meant to encode pure binary data (cbor) and not to be human readable or URI or anything like that. Well the reason to care is to avoid QR decoder quirkiness, otherwise you should probably just use the binary encoding. > I read through some Github issue [1] According to a comment near they end they were originally going to try to pack everything as a single base 45 bignum, so that half explains it. But not why they'd stick with 45 characters when changing that.