How PASETO works: local vs public modes
masterPASETO (Platform-Agnostic SEcurity TOkens) uses versioned protocols instead of algorithm agility to prevent insecure configurations. There are two primary purposes for tokens:
local: Uses shared-key authenticated encryption (symmetric-key, AEAD). Use this when both the issuer and the consumer share the same secret.public: Uses public-key digital signatures (asymmetric-key). Use this when the issuer signs with a private key and the consumer verifies with a public key.
Regardless of the purpose, the header and an optional footer (which is cleartext but base64url-encoded) are included in the signature or authentication tag.