The Case for PASETO: Tokens Without the JWT Footguns

PASETO explained in plain terms means understanding the token format that fixes the flaws of JSON Web Tokens by removing the choices that caused them, a specification from the Paragon Initiative introduced in March 2018. The central question is why tokens need a new format when JWT already works, and the answer is that JWT lets developers pick their own algorithm, so PASETO pins exactly one algorithm per version and takes the dangerous choice away.

PASETO stands for Platform-Agnostic Security Tokens, and it comes in two purposes: local tokens that encrypt with a shared key, and public tokens that sign with a private key. Each version pins one cryptographic suite, which means a verifier configured for one version rejects every other kind outright, and because the version is part of the token, an attacker cannot trick a verifier into using a weaker method.

This article makes the case for PASETO, what it is, how it works, and where it runs in the real world.

Key takeaways

  • PASETO pins one algorithm per version.
  • Paragon Initiative introduced it in March 2018.
  • Local tokens encrypt, public tokens sign.
  • Version 4 is the modern default.
  • It removes the algorithm confusion that haunts JWT.

What PASETO is

PASETO is a token format that turns a payload into a versioned, purpose-bound string, and that versioning is what makes it unusual among token formats. Each token starts with its version and purpose, which means the cryptography is fixed before the payload is even read, and because the header is not negotiable, there is nothing for an attacker to downgrade.

Its signature feature is the absence of an algorithm field. Most token formats carry an alg header that the verifier must honour, but PASETO has no such field, which means a token cannot ask to be verified with none or with a weaker method, and because the algorithm follows the version, the verifier needs only one configuration.

The format was a reaction to JWT failures. Algorithm confusion attacks kept breaking JWT deployments, so the Paragon Initiative asked whether versioned protocols could replace algorithm agility, because a token that lets the sender choose the algorithm lets the attacker choose it too, and that practicality is what made PASETO worth defining.

It became one of the best-known JWT alternatives in the world, and it is named in every discussion of the field. PASETO was introduced in March 2018 with versions 1 and 2, versions 3 and 4 arrived later with NIST and modern suites, version 1 is now deprecated, version 4 is recommended for new deployments, and it is still the first example engineers meet when they learn that a token can be secure by removing choices, which means the format survives as a standard even though it is a young one.

Our guide to Fernet explains the other sealed-token format PASETO is measured against, and our guide to digital signatures explains the signing its public tokens rely on.

How PASETO works

Everything starts with the version, which sets the cryptography. PASETO reads the token prefix, such as v4.public or v4.local, and selects exactly one suite from it, which means the algorithm is decided by the version alone, and because the suite is fixed, a verifier cannot be talked into anything else.

Each step begins with the purpose, which splits the two jobs. PASETO treats local and public tokens differently, which means a local token is encrypted and a public token is signed, and because the purpose is in the prefix, a verifier rejects a token of the wrong purpose without parsing it.

The local token is what makes the design work as a whole. A v4.local token encrypts its payload with XChaCha20 and authenticates it with a BLAKE2b message authentication code, which means the contents stay secret from anyone without the key, and because the encryption is authenticated, a tampered token is caught before it is read.

The public token spreads the effect further. A v4.public token carries its payload as base64url JSON and signs it with Ed25519, which means anyone with the public key can verify it, and because the signature covers the version, the purpose and the payload, nothing in the token can be swapped.

The footer is what turns the token into a flexible carrier. PASETO allows an optional footer with unencrypted but authenticated data, which means extra context can ride along without a second token, and because the footer is covered by the authentication, it cannot be altered either.

The result comes from the verification, read out as the payload or a rejection. PASETO checks the version, the purpose and the authentication in order, which means a bad token is rejected before any payload appears, and that order is exactly what a safe token format needs.

A dark developer desk with a laptop showing a signed token on screen, a brass padlock and a notebook beside it
A dark developer desk with a laptop showing a signed token on screen, a brass padlock and a notebook beside it, shows how PASETO works: version and purpose take turns being checked, step after step, until a token is verified.

Comparing PASETO with other token formats

PASETO is one of several ways to carry a signed or sealed payload, and each was built with a different emphasis. JWT is the flexible standard built for broad adoption, Fernet is the sealed token built for symmetric secrets, and PASETO is the one built to be secure by removing choices, while each approach trades something for something else.

The table below sets out the main contrasts between the leading approaches.

Aspect PASETO JWT Fernet
Algorithm choice Pinned by version Chosen by sender Fixed by spec
Signing Ed25519 in v4 Many algorithms HMAC only
Encryption XChaCha20 in v4 Optional JWE AES-128-CBC
Ecosystem Smaller Very large Python focused
Best for Secure new tokens OAuth and OIDC Sealed app secrets

The practical result is that PASETO is the right choice for secure new tokens, JWT suits OAuth and OIDC, and Fernet fits sealed app secrets instead.

Where PASETO is used

New APIs use it for session tokens. A backend that issues its own tokens can pick v4.local, because the tokens stay encrypted and the algorithm is fixed, and that safety is the reason PASETO earns its keep in application code.

Microservices use it for service-to-service tokens. One service signs a v4.public token that others verify, because the public key can be shared without sharing a secret, and that sharing is the reason the design was built for real systems.

Security teams use it as the JWT replacement. Teams that have suffered algorithm confusion move their internal tokens to PASETO, because a token that cannot be downgraded removes a whole class of bugs, and that removal is the reason PASETO appears in hardening guides far beyond its token origins.

Benchmarking uses it as the secure-default reference. Engineers still quote PASETO when they discuss how a token format should behave, because it is the clearest example of versioning beating agility, and that number shapes how new formats are measured.

Teaching uses it as the footgun example. Courses introduce PASETO when they explain that flexibility can be a vulnerability, because it is the clearest case of removing a feature to gain security, and a student who understands PASETO understands why a token should not negotiate its own algorithm.

Strengths and limits

The greatest strength of PASETO is that it cannot be misconfigured into weakness. A token with no algorithm field gives an attacker nothing to manipulate, and that strength is real, measured in the attacks it closes and confirmed by the teams that adopted it.

It is also a strength that the versions are clear about their suites. A developer who picks v4 knows exactly which cryptography runs, and that clarity is worth more than cleverness in a field where a token that hides its algorithm is a token nobody can audit.

The limits are real, though, and the biggest is the smaller ecosystem. PASETO is not used by OAuth 2.0 or OpenID Connect, which means a service that must speak those protocols still needs JWT, and a system that needs broad interop must support both formats.

PASETO checklist

  • Use PASETO for new tokens, never where OAuth requires JWT.
  • Remember Paragon Initiative introduced it in March 2018.
  • Note version 4 is the modern default, version 1 is deprecated.
  • Compare it with JWT to see why versioning matters.
  • Study the prefix, which is what pins the algorithm.
  • Check the purpose, since local and public tokens differ.
  • Keep JWT beside it where standards demand it.
  • Read the PASETO specification to see how the versions were set.
  • Choose PASETO when tokens must be secure by default.

Frequently asked questions

What is PASETO in simple terms?

It is a token format that encrypts or signs a payload, with the algorithm fixed by the token version so it cannot be downgraded.

Who created PASETO?

The Paragon Initiative, which introduced it in March 2018 as a safer alternative to the JOSE standards.

How is PASETO different from JWT?

Both carry payloads, but PASETO pins one algorithm per version and has no alg field, while JWT lets the sender choose the algorithm.

Is PASETO still secure?

It is actively specified and reviewed, but it does not prevent replay attacks by itself, so sessions need extra protections.

Where is PASETO used?

In new APIs, in microservices, in security hardening, and in teaching about secure token design.

When should I use PASETO?

When you issue tokens you control, when you want secure defaults, or when you study token format design.

The bottom line

PASETO explained in one line is this: a token that cannot be talked down, a 2018 format that pinned one algorithm per version and taught the field that removing a choice can be the strongest security feature.

It is proof that a smaller surface beats a flexible one, and the reason it still matters is that every token format designed since has been judged partly by the lesson PASETO taught.

This article is general information about how PASETO works, not advice about choosing encryption for a particular device or system.

Latest articles

Scroll to Top