{"id":36900735,"url":"https://github.com/zntrio/paseto","last_synced_at":"2026-01-12T15:46:49.375Z","repository":{"id":45890521,"uuid":"431905171","full_name":"zntrio/paseto","owner":"zntrio","description":"v3/v4 Golang PASETO implementation","archived":false,"fork":false,"pushed_at":"2025-05-02T16:12:13.000Z","size":80,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-07T06:24:39.077Z","etag":null,"topics":["blake2b","chacha20","crypto","ed25519","golang","golang-library","jwt-alternative","paseto","paseto-tokens"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zntrio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-25T16:09:30.000Z","updated_at":"2025-05-02T16:12:11.000Z","dependencies_parsed_at":"2024-06-20T15:34:21.275Z","dependency_job_id":"d0286a81-d6a9-45d1-9975-889209db99b2","html_url":"https://github.com/zntrio/paseto","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/zntrio/paseto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zntrio%2Fpaseto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zntrio%2Fpaseto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zntrio%2Fpaseto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zntrio%2Fpaseto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zntrio","download_url":"https://codeload.github.com/zntrio/paseto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zntrio%2Fpaseto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["blake2b","chacha20","crypto","ed25519","golang","golang-library","jwt-alternative","paseto","paseto-tokens"],"created_at":"2026-01-12T15:46:48.785Z","updated_at":"2026-01-12T15:46:49.349Z","avatar_url":"https://github.com/zntrio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PASETO\n\nThis go library exposed as `zntr.io/paseto` provides :\n\n* `v3` - NIST compliant PASETO : `HKDF-HMAC-SH384` / `AES-CTR` / `HMAC-SHA384` / `ECDSA with RFC6979` (deterministic signatures) - [PASETO Version 3 specification](https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version3.md)\n* `v4` - `BLAKE2B` / `XCHACHA20` / `Ed25519` - [PASETO Version 4 specification](https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version4.md)\n\n\u003e This is used in my OIDC framework [SolID](https://github.com/zntrio/solid).\n\nI removed the JSON part encoding requirement to allow PASETO to be used as a \ngeneric data container. You can still use JSON, but also more bytes oriented \nserialization for `message`,  `footer` and `implicit-assertion`.\n\n## What is PASETO?\n\nFrom https://github.com/paragonie/paseto :\n\n\u003e PASETO: Platform-Agnostic Security Tokens\n\u003e Paseto is everything you love about JOSE (JWT, JWE, JWS) without any of the many design deficits that plague the JOSE standards.\n\n## How to use the library?\n\n```go\nimport (\n  pasetov4 \"zntr.io/paseto/v4\"\n)\n\nfunc main () {\n\t// Generate an encryption key.\n\tlocalKey, err := pasetov4.GenerateLocalKey(rand.Reader)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Prepare the message\n\tm := []byte(\"my super secret message\")\n\n\t// Encrypt the token\n\ttoken, err := pasetov4.Encrypt(rand.Reader, localKey, m, nil, nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\nMore examples - [here](example_test.go)\n\n## Benchmarks\n\n\u003e Go version 1.23.1 / Mac M1\n\n### V3\n\n```sh\n❯ go test -bench=. -test.benchtime=1s\ngoos: darwin\ngoarch: arm64\npkg: zntr.io/paseto/v3\ncpu: Apple M1 Pro\nBenchmark_Paseto_Encrypt-10    \t  213638\t      5511 ns/op\t    7378 B/op\t      52 allocs/op\nBenchmark_Paseto_Decrypt-10    \t  226226\t      5268 ns/op\t    7154 B/op\t      52 allocs/op\nBenchmark_Paseto_Sign-10       \t   10000\t    124865 ns/op\t    9060 B/op\t      86 allocs/op\nBenchmark_Paseto_Verify-10     \t    2292\t    536478 ns/op\t    2504 B/op\t      36 allocs/op\nPASS\nok  \tzntr.io/paseto/v3\t6.052s\n```\n\n### V4\n\n```sh\n❯ go test -bench=. -test.benchtime=1s\ngoos: darwin\ngoarch: arm64\npkg: zntr.io/paseto/v4\ncpu: Apple M1 Pro\nBenchmark_Paseto_Encrypt-10    \t  511538\t      2397 ns/op\t    2288 B/op\t      12 allocs/op\nBenchmark_Paseto_Decrypt-10    \t  528723\t      2260 ns/op\t    2064 B/op\t      12 allocs/op\nBenchmark_Paseto_Sign-10       \t   51476\t     24680 ns/op\t     928 B/op\t       4 allocs/op\nBenchmark_Paseto_Verify-10     \t   22828\t     52875 ns/op\t     704 B/op\t       4 allocs/op\nPASS\nok  \tzntr.io/paseto/v4\t7.119s\n```\n\n### V4X (XCHACHA20-BLAKE3) - Non standard\n\n\u003e This is a non-standard version of PASETO using XCHACHA20-BLAKE3 instead of XCHACHA20-POLY1305.\n\u003e https://kerkour.com/chacha20-blake3/\n\n```sh\n❯ go test -bench=. -test.benchtime=1s\ngoos: darwin\ngoarch: arm64\npkg: zntr.io/paseto/v4x\ncpu: Apple M1 Pro\nBenchmark_Paseto_Encrypt-10    \t  496018\t      2336 ns/op\t    1056 B/op\t       6 allocs/op\nBenchmark_Paseto_Decrypt-10    \t  531135\t      2314 ns/op\t     832 B/op\t       6 allocs/op\nPASS\nok  \tzntr.io/paseto/v4x\t2.832s\n```\n\n## License\n\nAll artifacts and source code are released under [Apache 2.0 Software License](LICENSE).\n\n## Reference(s)\n\n- \u003chttps://developer.okta.com/blog/2019/10/17/a-thorough-introduction-to-paseto\u003e\n- \u003chttps://dev.to/techschoolguru/why-paseto-is-better-than-jwt-for-token-based-authentication-1b0c\u003e\n- \u003chttps://paragonie.com/blog/2021/08/paseto-is-even-more-secure-alternative-jose-standards-jwt-etc\u003e\n- \u003chttps://kerkour.com/chacha20-blake3\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzntrio%2Fpaseto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzntrio%2Fpaseto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzntrio%2Fpaseto/lists"}