Paragon Initiative Enterprises Blog

The latest information from the team that develops cryptographically secure PHP software.

Post-Quantum PASETO and PASERK are now available for PHP users

We designed PASETO in 2018 to give software developers a cryptographically secure alternative to JSON Web Tokens. This year, we've been shipping post-quantum cryptography for the PHP ecosystem.

Today, those two workstreams intersect.

What Was Released

  • The PASETO specification, v1.1.0 describes two new protocol versions (v5, v6) which each provide post-quantum guarantees.
    • v5 is compatible with CNSA 2.0 and NIST recommendations
      • v5.local gives you AES-CTR + HMAC-SHA2, as with v3.local
      • v6.public gives you ML-DSA-87
    • v6 continues the non-NIST lineage of v4/v6 where reasonably practical
      • v6.local gives you XChaCha20 + BLAKE2b-MAC, as with v4.local
      • v6.public gives you ML-DSA-44 (the smallest parameter set)
    • Our rationale for these decisions is public and part of the specification
  • paragonie/paseto v4.0.0 is now released
    • Supports v5 and v6
    • Introduces support for token opacity (more below)
  • The PASERK specification, v1.1.0 describes congruent protocols for key serialization.
  • paragonie/paserk v3.0.0 is now released
    • Supports k5 and k6

Questions and Answers

Why ML-DSA?

There is new urgency in the post-quantum cryptography migration. Recently, Google Chrome announced plans to distrust P-256 certificates March 2027.

The PASETO signing protocol used in v5.public tokens was set to ML-DSA-87 to conform to CNSA 2.0 requirements, for systems that have to care about FIPS 140-3 or CNSA's opinions on cryptography. (Mostly, this only applies to software that is being sold for use by the United States government, and nobody else has to care about it.)

Before the increased urgency towards post-quantum, we were waiting on more attractive options to materialize. FN-DSA could have offered smaller signatures and fast verification (at the cost of having a scary signing algorithm). SQISign was also a compelling algorithm still undergoing standardization.

Since we needed to cut a release now, we went with ML-DSA-44 (the smallest ML-DSA parameter set) for PASETO v6.public tokens. FN-DSA or SQISign may be considered in the future (e.g., for v8).

If you're storing a PASETO in a cookie, you might be able to get away with v6.public. But version 5 is simply too large.

PASERK: Explain the KEM Choices

PASERK's k5.seal serialization uses ML-KEM-1024. The same reason applies as PASETO v5.

PASERK's k6.seal serialization uses X-Wing (X25519 + ML-KEM-768). This is a hybrid post-quantum KEM and the one we recommend folks who don't know what FedRAMP means use. Whichever of X25519 or ML-DSA-768 is more secure, X-Wing will be as secure as that.

Token Opacity?

An opaque token is one that contains minimal metadata about its cryptographic operations.

For example: sending an encrypted token without a v6.local. header. This is desirable if you inherit a legacy system that has strict rules about opaqueness, and wanted to use PASETO for, e.g., API pagination tokens.

More importantly, it inverts the paradigm and binds the version metadata to the key, not the token. This provides the strongest possible notion of algorithm lucidity: it is no longer influenced by the attacker.

Token Opacity can only be used with keyrings, and require an explicit Key ID in the footer.

Additionally, this is an opt-in feature: if you do not use it, it is not silently enabled for you. The principle of least astonishment is important for security software.

About the Author

P.I.E. Staff

Paragon Initiative Enterprises

Paragon Initiative Enterprises is a Florida-based company that provides software consulting, application development, code auditing, and security engineering services. We specialize in PHP Security and applied cryptography.


Need Technology Consultants?

Will tomorrow bring costly and embarrassing data breaches? Or will it bring growth, success, and peace of mind?

Our team of technology consultants have extensive knowledge and experience with application security and web/application development.

We specialize in cryptography and secure PHP development.

Let's Work Together Towards Success

Our Security Newsletters

Want the latest from Paragon Initiative Enterprises delivered straight to your inbox? We have two newsletters to choose from.

The first mails quarterly and often showcases our behind-the-scenes projects.

The other is unscheduled and gives you a direct feed into the findings of our open source security research initiatives.

Quarterly Newsletter   Security Announcements