Hacker News new | ask | show | jobs
by petrocrat 1351 days ago
PASETO tokens are superior to JWT in just about every important way, it's weird how they are so obscure and have not caught on. [1] https://paseto.io/
2 comments

Paseto tokens don't really address any problem that is actually that important/relevant. JWT is good enough and when used properly have no security issues. Basically, sign them using a sane algorithm, distribute them over https and of course manage your private keys in a sane way.

Companies not capable of doing this properly have bigger issues that Paseto won't fix either. Such companies would do well to use products/frameworks based on standards implemented by people that do know what they are doing. And mostly those would rely on JWTs.

> When used properly

That's the whole problem. The majority of the time I've seen of JWTs, they weren't "used properly".

Can you describe typical problems you observed? I'm using JWT but I never gave much thought about it. It seems to work by default.
One of the most common high-impact issues is failing to expire sessions. In one case, the expiration date was set to be a whole year - once a user had a valid JWT, the system would accept it for a whole year, even if the user's account was deactivated on day 2.
> Our specialty is cryptographically secure PHP development.

Hm

If your snarky comment is aimed at PHP, I'm afraid I have bad news for you.

> PHP becomes the first programming language with modern cryptography in its standard library thanks to the bundled libsodium

https://www.jetbrains.com/lp/php-25/#e_2017_11_30_2

If the snarky comment is aimed at the developer posting the claim, yet again, wrong target.

Don't be like that please.

What about all the languages that can simply use libsodium directly? I don't think having it in the std lib is really such a distinguished feat.
> What about all the languages that can simply use libsodium directly

Nothing. It's great they do that.

I made a comment that refuted a snarky remark that had no basis, I did not compare languages nor post claims about language's awesomeness or anything else, just that it uses libsodium and that silly remarks centered around trashing PHP are based on lack of knowledge.

I agree the snark on PHP doesn't have much sense. I just don't think your reply is much better. This changes nothing - if anything, it shows that PHP needs to have libsodium integrated before it's available, which seems to be worse than other languages that can simply use it directly.
So, there's a library called libsodium that deals with cryptography and your comment, based on literal nothing, is that PHP is somehow "worse" than other languages, yet PHP and other languages use libsodium for cryptographical purposes. What does "worse" mean? Somehow, the bytes get corrupted mid-transfer? We're arguing languages here for no reason at all, yet you are not even aware of how PHP uses it (spoiler: it uses is like the other undefined languages do, since there's only 1 way to do it).

If you got any arguments to support your "which seems to be worse", I'm readily waiting to read it.

Out of curiosity - why do you try to instantly compare A to B without knowing how A or B work internally? What's the gain in this discussion other than you making a claim you can't support and me being a jackass that wastes his time trying to talk to you?

my comment was snark about the author, not the language, this site is ridiculous, and so are the claims about JWT
Bundling libsodium in the standard library doesn't really seem to be a mark for or against PHP.
His first recommendation is "not to write secure software in PHP," so I'm "Hm"-ing at the fact that he sells his business this way? but ok
bundling libsodium is just a compliment about libsodium
leave it to PHP guys to assume they are under attack and downvote instead of merely checking their inputs