6,663 karma · joined Feb 25, 2016 (10y ago) · 1,775 submissions
Previously AWS Cryptography (2019 - 2023).
Unless otherwise stated, my opinions are my own and do not reflect my employer.
https://scottarc.blog/about/
comment 8y ago · link · parent
You have to be very careful with how you implement the delay to prevent the timing signal from still propagating to the attacker.
https://blog.ircmaxell.com/2014/11/its-all-about-time.html#A...
604.
US GAO post-mortem report on Equifax hack [pdf](gao.gov ↗)
3 points · by CiPHPerCoder · 8y ago · 2 comments
comment 8y ago · link · parent
https://www.jitbit.com/alexblog/256-targetblank---the-most-u...
comment 8y ago · link · parent
The premise that went into JWTs was not invalidated. Their design was proven by multiple incidents to be error-prone, so I sought to replace JWTs.
The result? https://paseto.io
comment 8y ago · link · parent
The structure of the comment in question is also relevant:
"This is a real production issue for me, so could you [...]"
This reads like a demand if you parse it in spoken English.
If it helps, imagine working in retail and hearing a disgruntled customer ask you to hurry up and give them priority service. Their request might be structured like, "I need to pick my kids up from school at 3, so could you hurry it up?"
Your word choice is far less demanding than theirs. If they wrote their comment the way you just wrote yours, it wouldn't have struck me that way.
The entire reason I brought it up was because I was unsure of the intent. They clarified their intent. I believed them. Life moved on. You're still trying to litigate this.
But none of this matters. What matters is, they didn't intend it that way, and JWT sucks.
> In fact it happens all the time on HN, between regular developers, the occasional star scientist or programmer (from Alan Kay to Ryan Dahl and Dan Brown), and even far more important and busy pros than some security expert, and I've never heard anybody counting their lost pennies from what they'd have gained if they charged for talking to them...
To be fair: me neither. But knowing how humanity is, I wouldn't totally discount that it does happen somewhere on the Internet (maybe even HN).
comment 8y ago · link · parent
I respectfully disagree.
If it was truly irrelevant, it didn't need to be brought up in the first place.
But it was, and it's what made me believe that the other person was trying to solicit for a security expert to solve a production problem for them without an invoice being involved. It was relevant to my interpretation.
They insist they didn't mean it that way, and I believe them, but it was still relevant.
Whether or not it was relevant in the comment I replied to, it became relevant once it was entered into the discussion.
You can call that "uncharitable" if you want. I don't really have a horse in that race.
comment 8y ago · link · parent
No, these are vulnerabilities in the standard itself.
I outlined the arguments here: https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-ba...
It's an error-prone cryptographic design that needs to be replaced.
Blaming implementations for faithfully implementing a flawed standard is a stupid thing to do, since it doesn't solve their insecurity.
comment 8y ago · link · parent
You weren't kidding. :(
comment 8y ago · link · parent
Oh, that's easy to explain. You said:
> This is a real production issue for me, so could you please elaborate on why you think one of these (whichever you prefer) is better or link me to a source?
Specifically:
> This is a real production issue for me,
If you want a cryptographer (i.e. lvh) to solve a real production issue for you, that would in most cases be a business transaction.
comment 8y ago · link · parent
https://auth0.com/blog/critical-vulnerabilities-in-json-web-...
https://blogs.adobe.com/security/2017/03/critical-vulnerabil...
These were critical vulnerabilities enabled by an error-prone cryptographic design that broke real systems.
Don't pretend it's hand-wavy.
comment 8y ago · link · parent
In my CMS, I had support for granular permissions. So you could do this:
if ($user->can('update')) {
if ($postData) {
$this->processUpdate($postData);
}
// display edit form
} elseif ($user->can('read')) {
// read-only
} else {
return error_403_condition();
}
JWT wouldn't have helped much.comment 8y ago · link · parent
I wrote PASETO, with a lot of feedback from cryptographers and security engineers, to avoid a lot of the design flaws of JWT.
Learn more about it here: https://paragonie.com/blog/2018/03/paseto-platform-agnostic-...
You can find a lot of implementations available: https://paseto.io
(Also: You almost certainly want to use v2)
comment 8y ago · link · parent
JWTs were designed to be single-use (or very, very short lived) claims (with optional cryptography features).
It was never meant to be "offload everything to the client and obviate the need for server-side storage". It was never meant to be the new hotness among the NoSQL Scalability crowd.
comment 8y ago · link · parent
Imagine you're connecting to a service that uses JWT for sessions so they don't have to store anything server-side.
Let's say you have a token with an IAT of yesterday and and EXP of, say, a month from now.
Further, your browser gets infected with malware and the attacker steals your token. You rebuild your computer from a fresh install.
How does the service invalidate the token while still being stateless? It has 30 days left.
Your next move is:
> _
comment 8y ago · link · parent
The JOSE standards (of which JWT is a member) are error-prone and have had numerous critical security-affecting bugs due to how they were designed. [3]
To remedy that, I proposed PASETO. [4]
I still don't recommend PASETO for sessions, because of the arguments laid out in [1] and [2].
[1] http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-fo...
[2] http://cryto.net/%7Ejoepie91/blog/2016/06/19/stop-using-jwt-...
[3] https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-ba...
626.
Security Concerns Surrounding WebAuthn: Don't Implement ECDAA (Yet)(paragonie.com ↗)
2 points · by CiPHPerCoder · 8y ago · discuss
comment 8y ago · link · parent
Ask your cryptographer if the algorithm they're proposing you to use is IND-CCA2 secure (especially if it meets the criteria for IND-CCA3).
Litmus test: If they don't know what that means, you shouldn't be trusting them for cryptography advice.
If it isn't IND-CCA2 secure, you shouldn't be using it. Full stop.
For the curious: https://tonyarcieri.com/all-the-crypto-code-youve-ever-writt...
The IND in IND-CCA2 means "INDistinguishable"; i.e. from randomly generated line noise. For symmetric cryptography, your ciphertext shouldn't have any structure to it. (Lattices and such are a different story. If structure is permissible for your security goals, you're probably doing asymmetric cryptography anyway.)
To be clear: Format-preserving, order-preserving, order-revealing, and homomorphic encryption technology-- while an exciting research area-- fails to meet this requirement and should not be used for non-experimental purposes until their techniques have had time to mature. And even then, until they meet this requirement, only when the threat model doesn't realistically include the possibility of adaptive chosen-ciphertext attacks. (Spoiler: A real world threat model will almost certainly always include that.)
> We use FF1 and are actively engaging with the world's leading cryptographers
I've seen this "we engage with the world's leading cryptographers" genre of claim before, albeit from a much more arrogant source: https://news.ycombinator.com/item?id=6916860
comment 8y ago · link · parent
- If H is a simple cryptographic hash function, it's not resistant
to brute-force attacks to recover the SSN
- It's not revokable
What we need is something more akin to a Credit Card number. Something like an abstraction layer. It might even be implementable as a UUID.If you need to revoke it, you can do so since it's not cryptographically tied to anything.
Failing that, a base32-encoded random string (without = padding) with an optional checksum would do the trick.
629.
Security Concerns Surrounding WebAuthn: Don't Implement ECDAA (Yet)(paragonie.com ↗)
1 points · by CiPHPerCoder · 8y ago · discuss