{"id":13510475,"url":"https://github.com/paseto-standard/paseto-spec","last_synced_at":"2026-01-12T11:39:53.916Z","repository":{"id":38040014,"uuid":"391048213","full_name":"paseto-standard/paseto-spec","owner":"paseto-standard","description":"Specification for Platform Agnostic SEcurity TOkens (PASETO)","archived":false,"fork":false,"pushed_at":"2024-09-12T07:58:37.000Z","size":93,"stargazers_count":238,"open_issues_count":9,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-19T10:19:41.614Z","etag":null,"topics":["paseto","paseto-tokens","specification"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paseto-standard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-30T11:58:33.000Z","updated_at":"2025-05-06T15:44:17.000Z","dependencies_parsed_at":"2024-11-01T11:30:28.019Z","dependency_job_id":"f2b0cff8-5701-49b8-94e3-351959dfdf7a","html_url":"https://github.com/paseto-standard/paseto-spec","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/paseto-standard/paseto-spec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paseto-standard%2Fpaseto-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paseto-standard%2Fpaseto-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paseto-standard%2Fpaseto-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paseto-standard%2Fpaseto-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paseto-standard","download_url":"https://codeload.github.com/paseto-standard/paseto-spec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paseto-standard%2Fpaseto-spec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["paseto","paseto-tokens","specification"],"created_at":"2024-08-01T02:01:40.516Z","updated_at":"2026-01-12T11:39:53.901Z","avatar_url":"https://github.com/paseto-standard.png","language":null,"funding_links":[],"categories":["Others","others"],"sub_categories":[],"readme":"# PASETO: Platform-Agnostic Security Tokens\n\nPaseto is everything you love about JOSE (JWT, JWE, JWS) without any of the\n[many design deficits that plague the JOSE standards](https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-bad-standard-that-everyone-should-avoid).\n\n# What is Paseto?\n\nPaseto (Platform-Agnostic SEcurity TOkens) is a specification and reference implementation\nfor secure stateless tokens.\n\nPaseto is pronounced paw-set-oh (pɔːsɛtəʊ).\n\n## Key Differences between Paseto and JWT\n\nUnlike JSON Web Tokens (JWT), which gives developers more than enough rope with which to\nhang themselves, Paseto only allows secure operations. JWT gives you \"algorithm agility\",\nPaseto gives you \"versioned protocols\". It's incredibly unlikely that you'll be able to\nuse Paseto in [an insecure way](https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries).\n\n\u003e **Caution:** Neither JWT nor Paseto were designed for\n\u003e [stateless session management](http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/).\n\u003e Paseto is suitable for tamper-proof cookies, but cannot prevent replay attacks\n\u003e by itself.\n\n### Paseto\n\n#### Paseto Example 1\n\n```\nv2.local.QAxIpVe-ECVNI1z4xQbm_qQYomyT3h8FtV8bxkz8pBJWkT8f7HtlOpbroPDEZUKop_vaglyp76CzYy375cHmKCW8e1CCkV0Lflu4GTDyXMqQdpZMM1E6OaoQW27gaRSvWBrR3IgbFIa0AkuUFw.UGFyYWdvbiBJbml0aWF0aXZlIEVudGVycHJpc2Vz\n```\n\nThis decodes to:\n\n* Version: `v2`\n* Purpose: `local` (shared-key authenticated encryption)\n* Payload (hex-encoded):\n  ```\n  400c48a557be10254d235cf8c506e6fea418a26c93de1f05b55f1bc64cfca412\n  56913f1fec7b653a96eba0f0c46542a8a7fbda825ca9efa0b3632dfbe5c1e628\n  25bc7b5082915d0b7e5bb81930f25cca9076964c33513a39aa105b6ee06914af\n  581ad1dc881b1486b4024b9417\n  ```\n    * Nonce: `400c48a557be10254d235cf8c506e6fea418a26c93de1f05`\n    * Authentication tag: `6914af581ad1dc881b1486b4024b9417`\n* Decrypted Payload:\n  ```json\n  {\n    \"data\": \"this is a signed message\",\n    \"exp\": \"2039-01-01T00:00:00+00:00\"\n  }\n  ```\n    * Key used in this example (hex-encoded):\n      ```\n      707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f  \n      ``` \n* Footer:\n  ```\n  Paragon Initiative Enterprises\n  ```\n\n#### Paseto Example 2\n\n```\nv2.public.eyJleHAiOiIyMDM5LTAxLTAxVDAwOjAwOjAwKzAwOjAwIiwiZGF0YSI6InRoaXMgaXMgYSBzaWduZWQgbWVzc2FnZSJ91gC7-jCWsN3mv4uJaZxZp0btLJgcyVwL-svJD7f4IHyGteKe3HTLjHYTGHI1MtCqJ-ESDLNoE7otkIzamFskCA\n```\n\nThis decodes to:\n\n* Version: `v2`\n* Purpose: `public` (public-key digital signature)\n* Payload:\n  ```json\n  {\n    \"data\": \"this is a signed message\",\n    \"exp\": \"2039-01-01T00:00:00+00:00\"\n  }\n  ```\n* Signature (hex-encoded):\n  ```\n  d600bbfa3096b0dde6bf8b89699c59a746ed2c981cc95c0bfacbc90fb7f8207c\n  86b5e29edc74cb8c761318723532d0aa27e1120cb36813ba2d908cda985b2408\n  ```\n* Public key (hex-encoded):\n  ```\n  11324397f535562178d53ff538e49d5a162242970556b4edd950c87c7d86648a\n  ```\n\nTo learn what each version means, please see [this page in the documentation](https://github.com/paseto-standard/paseto-spec/tree/master/docs/01-Protocol-Versions).\n\n### JWT\n\nAn example JWT ([taken from JWT.io](https://jwt.io)) might look like this:\n\n```\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ \n```\n\nThis decodes to:\n\n**Header**:\n```json\n{\n  \"alg\": \"HS256\",\n  \"typ\": \"JWT\"\n}\n```\n\n**Body**:\n```json\n{\n  \"sub\": \"1234567890\",\n  \"name\": \"John Doe\",\n  \"admin\": true\n}\n```\n\n**Signature**:\n```\nTJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ\n```\n\n## Motivation\n\nAs you can see, with JWT, you get to specify an `alg` header. There are a lot of options to\nchoose from (including `none`).\n\nThere have been ways to exploit JWT libraries by replacing RS256 with HS256 and using\nthe known public key as the HMAC-SHA256 key, thereby allowing arbitrary token forgery.\n\nWith Paseto, your options are `version` and a `purpose`. There are two possible\nvalues for `purpose`:\n\n* `local` -- shared-key encryption (symmetric-key, [AEAD](https://tonyarcieri.com/all-the-crypto-code-youve-ever-written-is-probably-broken))\n* `public` -- public-key digital signatures (asymmetric-key)\n\nPaseto only allows you to use [authenticated modes](https://tonyarcieri.com/all-the-crypto-code-youve-ever-written-is-probably-broken).\n\nRegardless of the purpose selected, the header (and an optional footer, which is always\ncleartext but base64url-encoded) is included in the signature or authentication tag.\n\n## PASETO Implementations\n\nThe curation of implementations has been moved to [paseto.io](https://paseto.io).\nSee https://github.com/paragonie/paseto-io for the website source code.\n\n### Test Vectors\n\nSee [this repository](https://github.com/paseto-standard/test-vectors)\nfor the PASETO test vectors.\n\n## PASETO Extensions\n\n### PASERK\n\n[PASERK (Platform-Agnostic SERialized Keys)](https://github.com/paseto-standard/paserk)\nis an extension to PASETO that provides key-wrapping and serialization.\n\nPASERK is where envelope encryption, public-key encryption, and\npassword-based key encryption are specified.\n\n*PASERK is to PASETO what JWK is to JWT.*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaseto-standard%2Fpaseto-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaseto-standard%2Fpaseto-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaseto-standard%2Fpaseto-spec/lists"}