5/30/2026 at 10:30:53 PM
For those of us not in the loop, COSE[1] is CBOR Object Signing and Encryption, with CBOR being a binary JSON alternative. It is patterned off JOSE, the JSON standards which includes favorites like JWK.by magicalhippo
5/31/2026 at 6:46:17 AM
Moving to something else that JSON for this kind of thing is reasonable given the issues with parsing JSON which can cause 2 implementation to interpret it in 2 different ways.by forty
5/31/2026 at 11:24:13 AM
This is a great blog and an incredible piece of research. Re-reading again today, makes me think of Emil Stenström's recently effort to use an LLM to write an HTML5 parser in pure Python [1] using the official HTML5 spec and their test cases. [2] Later, Simon Willison used an LLM to convert the pure Python source to JavaScript. [3] It seems reasonable to ask an LLM to write a "perfect" JSON parser given the RFC spec and massive test pack from seriot.ch. Regarding the "minefield" of JSON parsing, I used to lean on Google's Gson (Java) a lot in my early days. I thought Jackson FasterXML was "too complex". Later, I realised the mind-boggling number of configuration options was weirdly more sustainable (but more complex!), because I could carefully control each JSON parser/generator edge case.[1] https://github.com/EmilStenstrom/justhtml
by throwaway2037
5/31/2026 at 7:44:07 AM
CBOR has other ways it's unsuitable; the spec has a whole section about it: https://datatracker.ietf.org/doc/html/rfc9052#name-cbor-enco...by camgunz
5/31/2026 at 10:10:47 AM
COSE was invented to solve that gap wasn’t it.by Asmod4n
5/30/2026 at 11:45:31 PM
so some sort of JWT alternative?by mgaunard
5/31/2026 at 2:28:45 AM
For the most part yes. JWT is a part of JOSE. For most things CBOR, think binary JSON.I love me some CBOR, but Carl isn’t very adventurous in deviating from JSON (rightfully!) so I don’t expect a lot new in COSE if you have worked with JOSE.
Other than the tagged data types, the main inconpatibiiiry in CBOR to JSON is that CBOR map keys can be integers and in JSON must be strings.
by SV_BubbleTime
5/31/2026 at 10:13:32 AM
CBOR and COSE are pretty bad formats. The original "rationale" for CBOR was that messagepack didn't distinguish bytes and strings, which was added around ~2013. Afterwards CBOR was changed up a bit from messagepack and became a decidedly worse format. And COSE just goes against every other principle of well-engineered crypto, but that's not particularly surprising giving it is a JOSE derivative.A good zero-order classifier for "is this signing format a dumpster fire" is whether the spec mentions canonical encodings.
by formerly_proven