HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
paragonie
paseto
PHP2018–2021
paragonie / paseto

paseto

Platform-Agnostic Security Tokens

12Distinct people
25Mentions
0Explicit recommenders
3.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Platform-Agnostic Security Tokens

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year25 dated mentions

Observed mentions: 2018-01-02 17:21:54 UTC to 2021-07-30 12:02:27 UTC.

02468102018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 10 mentions; 3 submissions, 7 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC1037
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC909
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC413

What Hacker News says

25 sources
> * JWT can be secure if you are careful https://www.howmanydayssinceajwtalgnonevuln.com/ https://www.zofrex.com/blog/2020/10/20/alg-none-jwt-nhs-cont... https://twitter.com/SchmiegSophie/status/1413248896227155968 https://twitter.com/tqbf/status/1414087907938377735 etc. > * there is wide support for JWT. (See for example this IETF draft https://datatracker.ietf.org/doc/html/draft-ietf-oauth-acces... as well as the numerous libraries) Yes, and my intention is to make sure there is wide support for PASETO in the near future too. > Maybe paseto can eventually displace JWT, but I have a hard time seeing how that happens. It won't ever 100% displace JWT in the same way that we won't ever 100% displace PHP 4 from the Internet, or the legions of badly written tutorials full of SQL Injection vulnerabilities that new programmers learn from. Th
Read the rest
e goal isn't to displace JWT, though. The goal is to provide a secure-by-default, easy-to-use, hard-to-misuse alternative. After all, just because it's possible to implement a set of building blocks "securely" doesn't mean the kit is secure. I wrote more about this here: https://paragonie.com/blog/2019/10/against-agility-in-crypto... But even if you don't care about all of that, the upcoming PASETO versions (v3/v4) offer cryptographic properties that JWT does not, such as exclusive ownership. https://github.com/paragonie/paseto/blob/master/docs/Rationa... ------ Also, in case it wasn't obvious: PASERK is still a work-in-progress; things might change. Wait until you see a `1.0` tag before trying to implement it. There is a reference implementation in PHP, but that's also experimental and no stable release has occurred there yet.
In Paserk: Platform Agnostic SERialized Keys
> [...] asked for suggestions on r/node for alternatives to JWT Heard good things about paseto[1]. It claims to be convenient as JWT minus the security issues entailed. Check it out, has some decent libraries for most main-stream languages. Didn't try it myself yet. [1] hxxps://github.com/paragonie/paseto
In JWT should not be your default for sessions
> Someone flubbed up and made the "none" algorithm mandatory for spec-compliant implementations. Which spec are you referring to? 7519? Per section 6 ( https://tools.ietf.org/html/rfc7519#section-6 ) "none" is an optional feature of JWT. I am not aware of any spec related to OAuth which requires a server to issue or accept a JWT with an algo of "none". Can you point one out to me? From the AS side, our product won't even allow you to "sign" a JWT with a value of none. I'm not sure about other authorization servers. And I always recommend that if a resource server ever sees an algorithm of "none" it should throw out the JWT full stop. > It's a chicken-and-egg problem that the designers missed: you can't trust the token until you've validated it, but you'd have to believe the value of the algo field before you've validated it in order to ch
Read the rest
eck the signature. What is the way around this? Looks like Paseto tokens (an alternative I've heard mentioned) works by not allowing unsigned tokens: https://github.com/paragonie/paseto Is there another way to fix this? > There are libraries that will see "none" in the algo field and treat that as "this token doesn't have a signature that needs to be validated, so it's good". Spooky! Can you share these so I can stay far away from them? :)
In OAuth 2.0 Authentication Vulnerabilities
From my understanding, the use case for JWTs is where: 1) One system produces a JWT which makes a bunch of "claims" about the bearer; e.g. 'their email address is alice@example.org'. 2) Another system which trusts the first system can consume these tokens and use the "claims" to authenticate the bearer, e.g. 'the email address alice@example.org is associated with user ID 12345, so the bearer must be user 12345'. 3) Now that the user is authenticated, the second system can initiate a session for them (e.g. storing a cookie in their browser, or whatever). 4) From now on that JWT should be rejected; we can approximate this by making it short-lived, but we can do better by the second system update some state. For example, updating the "last seen" time of a user, and rejecting any tokens issued before the this time. The idea of 'using stateles
Read the rest
s JWTs for authentication' is presumably the common practice of avoiding steps 3 and 4: rather than having the second system initiate a session for the user, the JWT is treated as if it were a session token; rather than invalidating the JWT after its first use, it is accepted over and over again as part of the user's subsequent requests. This also requires the JWTs to have a longer expiry time than necessary, since they have to survive until the user's last interaction, rather than their first (in fact 'refresh tokens' can be used as well, but the principle is the same). As for why it's a bad idea, I recently came across PASETO (a simplified alternative to JWT) which specifically calls this out as an insecure practice due to the possibility of replay attacks ( e.g. https://github.com/paragonie/paseto/tree/master/docs#was-sta... )
In Hardcoded secrets, unverified tokens, and other common JWT mistakes
> I can't find the specification/rfc of Paseto. https://github.com/paragonie/paseto/tree/master/docs https://paseto.io/rfc/ > It looks more of a php lib. https://paseto.io/ -- Several languages implement PASETO. > To me it seems the author is not familiar with JWT[0] How does one demonstrate familiarity with JWT beyond analyzing/critiquing the RFCs for JWT and correlating the specific language of the standard with real-world vulnerabilities of JWT implementations? > and tries to solve the wrong problems(e.g assumes the idp or library being used are compromised.) Assuming something that has happened several times already isn't a "wrong problem". https://auth0.com/blog/critical-vulnerabilities-in-json-web-...
In Javascript Object Signing and Encryption is a Bad Standard (2017)
> Paseto is dead in the water and will never gain any traction. We'll see about that. :) > Every single company has no choice but to support JWT in some capacity. This will change soon. > Whenever one has to use social auth (Google/Facebook/twitter), or Microsoft products (ADFS/Office365), or third party authentication solutions (Okta/auth0), they're de facto dealing with OpenID Connect + JWT (or SAML but that's a different topic). The plan for PASETO has always been to make it a JWT alternative for OIDC. First comes the XChaCha RFC. Second comes the PASETO RFC. Finally, the OIDC-PASETO RFC. 1. https://tools.ietf.org/html/draft-irtf-cfrg-xchacha-03 2. https://github.com/paragonie/paseto/blob/master/docs/RFC/pas... 3. https://github.com/paragonie/paseto/issues/5
In JWT is Awesome
Fernet [0] was just as close to being a suitable and secure JWT replacement. But the specification wasn't really updated in a while so a simpler and another secure alternative to JWT and Fernet would be Branca [1] tokens that uses the same cryptography as PASETO v2.local [2]. Here's some trivia, the name comes from an italian drink from the 19th century named Fernet-Branca [3]. [0] - https://github.com/fernet/spec/blob/master/Spec.md [1] - https://branca.io [2] - https://github.com/paragonie/paseto/tree/master/docs/01-Prot... [3] - https://en.wikipedia.org/wiki/Fernet-Branca
In JWT is Awesome
You might be happy to see the PASETO spec, which (for v2) uses XChaCha20-Poly1305 for encryption, Ed25519 for signatures, separates the two logically, and doesn't allow for runtime ciphersuite negotiation. (v1 achieves a similar result with AES-CTR+HMAC-SHA384-EtM and RSASSA-PSS.) https://github.com/paragonie/paseto/tree/master/docs/01-Prot... It's similar to the advice given above, but also caters to that itch that some project managers have to only implement industry standards (which PASETO is slowly becoming).
In How to Use JSON Web Tokens
> Comes from a PHP consulting firm, promoting their own alternative proposal (which hardly anyone else seems to discuss or use). So I think #1 above is really about drawing eyeballs and selling services, more so than providing clear information for a newcomer to follow. There was a recent (November 2018) talk at London Gophers about JWT Alternatives (slides here: https://speakerdeck.com/hako/exploring-alternatives-to-json-...). Keep in mind that PASETO didn't exist until the middle of 2018, so the main reason "hardly anyone else" seems to use it is precisely because it takes time for standards to be adopted. If you take a look at https://paseto.io, you'll see that there are implementations of PASETO (our proposed alternative) in multiple programming languages by other companies and individuals. All of these implementations are open source
Read the rest
and under very permissive licenses (MIT or ISC). Additionally, a great deal of time and effort went into the PASETO documentation, so that developers can understand not only how to implement it themselves, but also why it was designed the way it is. https://github.com/paragonie/paseto/tree/master/docs Given all of the above, is it really fair to write PASETO off as an attempt to sell services? Claiming that the original article is meant to sell services doesn't make sense either: If developers keep using unsafe tools, they will continue to be less secure and I'll have an easier time selling "make your products/services more secure" services to developers. The best thing to do, to meet such an incentive, is to say nothing publicly and let the easy money keep rolling in. So one of two things is happening: 1. You don't correctly understand our intentions. 2. We're really bad at understanding our own incentives, and it's a miracle we've been in business for 4 years.
In How to Use JSON Web Tokens

Showing the 15 most recent of 25 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.