You shouldn't have your crypto designed by a CEO
mailarchive.ietf.org
mailarchive.ietf.org
There are a bunch of vague accusations that I'm trying to profit or rent seek off of one of the specs I did write about. I didn't create and I don't maintain any of those. I also wouldn't trust any crypto designed by myself.
The original context for writing this post was discussions around using JOSE in the context of signing container images [1]. I was against it and preferred something simpler.
Disclaimer: I wrote and maintain a MessagePack implementation.
If anything this comes across poorly for the IETF, while I understand the main point (they identify marketing/updates as a weakness) it feels like a personal rant against you.
It's true, mostly, but it's worth knowing that different IETF working groups are, in fact, organized groups, with a set process and all the path dependency you get from any planned human enterprise. There are stakeholders in those groups that have greater and lesser influence.
That's not entirely true. Working Group Chairs and Area Directors have significant say in what is adopted.
Case in point, the mentioned COSE format makes signatures by defining protected and unprotected attributes of the payload and then computing signatures over the Canonical CBOR encoding of the protected attributes. All this is done so that you can have parts inside your payload that can be changed without invaliding the signature, and it of course requires two-phase canonicalization. Yes, PASETO is absolutely, unequivocally a better choice than J/COSE.
Sign. The. Goddarn. Bytes.
[1] Actually not just any IETF but the dude who made an incompatible fork of msgpack named after himself.
The original medium blog post seems fine to me.
Sounds like a salty standards author, who worked on something nobody actually wants…
Here's an example from three years ago: https://news.ycombinator.com/item?id=21783303
I think lately I've been seeing people use more correct terminology with JOSE.
From the CBOR wikipedia page:
> CBOR was inspired by MessagePack, which was developed and promoted by Sadayuki Furuhashi. CBOR extended MessagePack, particularly by allowing to distinguish text strings from byte strings, which was implemented in 2013 in MessagePack.
> Integers (types 0 and 1): For integers, the count field is the value; there is no payload. Type 0 encodes positive or unsigned integers, with values up to 264−1. Type 1 encodes negative integers, with a value of −1−count, for values from −264 to −1.
WTF? JavaScript got it wrong not being able to represent 64-bit integers. CBOR wants to make 65-bit signed integers(!) by combining 64-bit positive (type 0) and 64-bit negative (type 1). A rational person would make 64-bit unsigned, and 64-bit signed types like most languages and hardware. Only an academic would propose something as disconnected. To fully support a CBOR negative (type 1) integer you'd have to use a 128-bit signed or something like that.
Obviously this is less efficient than signing the transport payload, but that doesn't help if you just don't have access to the transport payload, or when there are N different kinds of encoding used in different places in the system.
A user signs a message with a key and uses a thumbprint to refer to the public key. The server system needs a public key, not just the thumbprint, to verify the message. The server does not accept full public keys in the signed message since public keys are large and thumbprints are sufficient.
One design is to transport the public key along with the signed message. This allows the server to verify and store the whole signed message even if the server doesn't store the public key.
Here's a concrete example of something I find lacking in JOSE:
Here's a protected header encoded: eyJhbGciOiJIUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19
And here it is decoded: {"alg":"HS256","b64":false,"crit":["b64"]}
The encoded string is 58 characters and the decoded is 42 characters. It uses UTF8 -> base64 -> ASCII to sign. Why not just use the UTF8 encoding?
Not only would unencoded messages be more human readable, but they would be smaller.
JOSE is JSON by technicality only. It breaks the JSON core tenant of human readability for no reason other than extra normalization.
It's not the best we have. The best we have in that category is any reasonable standardized signature format. Seriously, there is no need for a high-level message serialization format and a signature scheme to be related in any way.
Want an ancient but still okay standard (as long as the implementation used is decent)? Use PKCS #1 signatures. Want something spiffy and modern? Use Ed25519 or similar, standardized as RFC 8032. Want a scheme based on old and very well-tested technology? Use one of many hash-based signature schemes. (Be careful -- many are stateful and you can easily shoot yourself in the foot when signing a message.)
Okay, so you need an actual written standard for how to shove the signed data and the signature into a single blob. Fine, use PKCS #7, which has been published as an RFC since before a respectable fraction of HN readers were born. Or you could just encode a tuple of (data, signature) however you like, keeping in mind that the data needs to be just plain bytes at least until the signature is verified.
Need the header to encode which key to use to verify it? Fine, add a description of the key to the tuple and make absolutely certain when verifying that you have some reason to trust the key in question. Need algorithm agility? Fine, treat the algorithm as part of the public key.
Need all the other crap in JOSE? No, actually you don't need it because it's actively harmful.
(If you don't need an interoperable standard per se and just want code, use libsodium's crypto_sign_open. It works quite well and is pretty much foolproof, which is the whole point.)
Defining the "however you like" parts is the chief role of something like JOSE. Cryptographic standards like Ed25519 or ECDSA are not messaging formats. There needs to be an agreed way to send messages. That's the point of JOSE.
> so you need an actual written standard for how to shove the signed data and the signature into a single [...] you could just encode a tuple of (data, signature) [...] Need the header to encode which key to use to verify it? Fine, add a description of the key to the tuple [...] Need algorithm agility? Fine, treat the algorithm as part of the public key.
That's what JOSE defines.
There is no need for a special standard explaining with great verbosity how to glue existing standards that already fit together just fine. Especially when the standard tells you how to do it wrong as JOSE does.
For some reason people want a formal specification for everything, even when "N/A" is an applicable option here.
Edit: and as another commenter here points out, it is really an incompatible derivative of msgpack named after himself (CBOR; Carsten Bormann). LOL
I think COSE (which is what the post was actually about) is though: https://datatracker.ietf.org/doc/html/rfc8152
> But I can’t help seeing a whole little industry creep up that is interested in creating alternative building blocks that appear to be of interest to the creators so they can attain control over them and perform rent seeking from that control.
So someone wrote an article that was negative on JOSE/JWT, and is now starting a company, which seems to have little to do with PASETO or JWT. So what? Where is the rent seeking?
Maybe I’m missing the bigger picture, as is sometimes the case when a post intended for an audience who are members of a mailing list shows up here without more context. But as it is it just reads like a jealous rant.
I have no more context than you do either, and was surprised to find that thread on the IETF tracker to begin with.
I implemented the server side of WebAuthn from scratch, and CBOR felt unnecessary, the added value of encoding binary data slightly more efficient seems a small win, given the small data size transmitted/received in a WebAuthn authentication.
If you want to check attestation you still need to parse CBOR (and whatever attestation format is inside.)
I used this for a minimal webauthn implementation which is under 300 LoC https://github.com/arianvp/webauthn-minimal (WIP)
However only Chrome seems to implement the L2 spec so far. It feels like Webauthn is basically abandoned on Mozilla side of things as they still haven't finished implementing L1 (It's missing all the CTAP2 stuff) whilst it has been out for more than a year. And there have barely been any Webauthn-related commits in the past years.
But yeh; in general webauthn is a design-by-committee dumpster fire; unfortunately. U2F was conceptually way simpler.
https://github.com/truthly/pg-cbor https://github.com/truthly/pg-webauthn
I really don't understand the rent seeking argument. It is made completely without basis.
However, I'd love to see the IETF author contribute a COSE type to rekor and show how it is better than DSSE for attestations.
- Cryptography
- JWT is a standard for giving someone a token for them to later do something on your service (and signing them so you can be sure the token's all right when it comes back to you) -- you get a demo at https://jwt.io/
- JWS is the part of JWT that deals with encryption
- COSE is further complications on top of JOSE to fix some of its footguns
- JOSE is the framework for how to use JWT, JWS and related standards, which has some obvious footguns
- shrug
- Yes
I've been drawn into discussions about alternative security techs like white box cryptography, physically unique functions (PUFs), a variety of novel payments and data privacy technologies, and perhaps ironically, some very-uniquely sensible applications of blockchain based protocols compared to those other things.
I think we could put a lot of the hustles to bed if from a product and investment perspective we used the razor that betting you can outsmart your customers or market and seize some rent collecting thread in it by becoming "the standard" is a poor product strategy. Having your technology mandated isn't a product, since a standard isn't anything someone wants, it's what they must use. This makes it an anti-product.
I have seen it with certain archetype (not referencing parties here) who think they have companies and products because they have a proof of some assertion, pedigree, and credentials, and therefore you must invest with or buy from them, because they are right, and the alternative is to not be aligned to their beliefs, which raises the question of where specifically your PhD in the field is from and whether you are even qualified to decline their offer, which is to imply - you're stupid, and you should give them your money thank them for not exposing your ignorance. "Fund this or risk humiliation," must work in institutions, but it's not a product, which means it's not going to get traction, and without that user traction, it's not going to register as a candidate for a standards track.
In some very ancient words, "nothing forced is beautiful." Not referencing the parties to the original discussion specifically, but I wanted to say there is a sympathetic case to be made for the tension between standards bodies and other chancers using all kinds of institutional shenanigans to have a go at them, and perhaps this underlying dynamic is the source of the frustration that bubbles up and was expressed in the post.
I had to read the article to verify that this is not the case here.
Take a look for yourself, sorted by date: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
It's time for an inequality index for Ponzicurrencies distribution
Bitcoin’s Dominance of Ponzi Payments Is Starting to Erode
YouTube Ponzi giveaway scams
Ask HN: A good and thoughtful place to discuss Ponzicurrencies?
“You Don't Own Web3”: A Coinbase Curse and How VCs Sell Ponzi to Retail
Kim Kardashian, Floyd Mayweather and a Ponzi token’s wild ride
Ponzi Enthusiasts Meet Their Match: Angry Gamers
The metaverse is money and Ponzi is king
Ponzi-Gram Mailing List
From Electronic Warfare Inside the US Navy to Ponzi Startup
NFTs, an overblown speculative bubble inflated by pop culture and Ponzi mania
North Korean Hackers Impersonate Major Ponzi Investment Firm to Scam Startups
* VC=predator
* startup=side project with delusions of grandeur
* San Francisco=small city that isn't the center of the universe
* ad industry=the reason most software exists
etc
Let’s try to maintain some hype inertia.