3 ms·
Algorithm agility is bad. You see it happening at the beginning of every TLS session; what you don't see are the long trail of vulnerabilities that have resulte
by tptacek 6y ago
Algorithm agility is bad. You see it happening at the beginning of every TLS session; what you don't see are the long trail of vulnerabilities that have resulted from TLS's overly complicated handshake, and, worse, the essentially nonexistent vulnerabilities algorithm agility has mitigated over TLS's lifetime; in general, when TLS constructions have failed, they've failed in the joinery (block cipher modes, MAC arrangements, etc), and, most importantly, have required updates to the entire protocol anyways.
It's a bad idea and people shouldn't build it into new systems. Version the protocol instead, and plan on making it straightforward to upgrade the protocol and lock out old versions.
- MaxBarraclough 6y agoRelevant Wikipedia article: https://en.wikipedia.org/wiki/Downgrade_attack https://en.wikipedia.org/wiki/Downgrade_attack
- QuinnWilton 6y agoAnd all of this is to say nothing of the frankly embarrassing problems that have plagued JWT as a result of algorithm agility (alg=none). Removing agility from JWT wouldn't make it a good specification, but it would certainly make it a better specification.
- emteycz 6y agoWhat is a good alternative?
- QuinnWilton 6y agoThis is a really tough question to answer, because the answer depends on what you're using JWT for. JWT crams as much functionality into the format as possible, and most of that functionality isn't needed for most use cases. This means that offering an alternative requires knowing some context about what you need out of JWT in the first place. That being said, for most purposes, you can do worse than using either mutual TLS or Macaroons [0]. As always with cryptography though, the devil is in the details, so for a more thorough discussion, check out @tptacek's "A Child's Garden of Inter-Service Authentication Schemes" [1]. It's one of my favourite treatments of the topic, and discusses the tradeoffs of a few different techniques for different use-cases. [0] https://en.wikipedia.org/wiki/Macaroons_(computer_science) https://en.wikipedia.org/wiki/Macaroons_(computer_science) [1] https://latacora.micro.blog/a-childs-garden/ https://latacora.micro.blog/a-childs-garden/
- forgotmypw17 6y agoI disagree with locking out old versions. It's a huge problem with older devices trying to access the web via SSL. I think it is important to consider device longevity and also the possibility of the user not being able to upgrade their software. Security is important, but it is not everything. There is also accessibility and compatibility to consider. It's why I still test my websites with Netscape 3.x and keep http running.
- slaymaker1907 6y agoCan Netscape even work on modern Windows?
- forgotmypw17 6y agoNot sure, but it works great on modern Wine.
- sneak 6y agoPostel's law has been deprecated.
- MaxBarraclough 6y agoPostel's Law never sat quite right with me. > Be conservative in what you send, be liberal in what you accept. The first half makes good sense. You should make efforts to ensure your program is producing well-formed output. That's just a statement of software quality. The second half is dependent on the problem domain. A web browser should do its best to cope with malformed input, sure. An Ada compiler should not, as an important part of its job is to reject erroneous inputs. Similarly, part of the value of XML schemas is to (at least partially) automate the process of detecting invalid data, perhaps so that bad requests can be rejected. edit Turns out others have spent more time thinking about this than I have: https://en.wikipedia.org/wiki/Robustness_principle#Criticism https://en.wikipedia.org/wiki/Robustness_principle#Criticism
- baby 6y agoIt’d be nice to have someone summarize the discussion on crypto agility, which I think started with agl’s post on the subject. And recently filippo started a similar convo on twitter: https://twitter.com/filosottile/status/1386751406758105089?s=21 https://twitter.com/filosottile/status/1386751406758105089?s... I don’t think it’s just a crypto thing, agility is an issue in protocols that need to remain compatible in general.
- slaymaker1907 6y agoKerberos/AD is another example of this kind of mess. It has both LDAP and LDAPS not to mention the zoo of encryption types available for keytabs and credential caches. You can still use unsalted encryption types and DES! While on one hand insecure LDAP is convenient for testing, I do think it should really just be removed and require LDAPS.