{"id":38003658,"url":"https://github.com/vk-rv/pvx","last_synced_at":"2026-01-16T19:15:07.663Z","repository":{"id":47134317,"uuid":"328634156","full_name":"vk-rv/pvx","owner":"vk-rv","description":"PASETO implementation for Go programming language ","archived":false,"fork":false,"pushed_at":"2021-09-12T19:59:30.000Z","size":76,"stargazers_count":40,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-13T13:09:49.915Z","etag":null,"topics":["authentication","jwt","paseto","paseto-tokens"],"latest_commit_sha":null,"homepage":"https://vk-rv.github.io/pvx/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vk-rv.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-11T10:56:32.000Z","updated_at":"2025-07-13T05:32:41.000Z","dependencies_parsed_at":"2022-09-16T13:45:02.617Z","dependency_job_id":null,"html_url":"https://github.com/vk-rv/pvx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vk-rv/pvx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vk-rv%2Fpvx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vk-rv%2Fpvx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vk-rv%2Fpvx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vk-rv%2Fpvx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vk-rv","download_url":"https://codeload.github.com/vk-rv/pvx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vk-rv%2Fpvx/sbom","scorecard":{"id":924825,"data":{"date":"2025-08-04","repo":{"name":"github.com/vk-rv/pvx","commit":"ac00bc32f6e7aa03a0e77aca85369b07861b449a"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":2.8,"checks":[{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linux.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/vk-rv/pvx/linux.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linux.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/vk-rv/pvx/linux.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/staticcheck.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/vk-rv/pvx/staticcheck.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/staticcheck.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/vk-rv/pvx/staticcheck.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/linux.yml:1","Warn: no topLevel permission defined: .github/workflows/staticcheck.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-25T10:19:21.781Z","repository_id":47134317,"created_at":"2025-08-25T10:19:21.781Z","updated_at":"2025-08-25T10:19:21.781Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["authentication","jwt","paseto","paseto-tokens"],"created_at":"2026-01-16T19:15:07.594Z","updated_at":"2026-01-16T19:15:07.654Z","avatar_url":"https://github.com/vk-rv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PVX\n\nPVX is a (work in progress) PASETO implementation for Go programming language.\nCurrently, library supports version 2 and version 4, and partially version 3 local purpose (if you need NIST-approved algorithms), but it is under active development, does not have unnecessary dependencies and has greater than 86% of test coverage.\n\nYou can use https://github.com/o1egl/paseto if you are looking for version 1. \n\nWhy this library exists:\n1. https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-bad-standard-that-everyone-should-avoid \n2. https://www.howmanydayssinceajwtalgnonevuln.com\n\nCheck \"Intended Use-Cases for PASETO\" before using this library. \nhttps://paseto.io/rfc/draft-00 \n\n[![Go Reference](https://pkg.go.dev/badge/github.com/vk-rv/pvx.svg)](https://pkg.go.dev/github.com/vk-rv/pvx)\n\n# Go version\nA minimal version is 1.14\n\n# Installation \n```\ngo get -u github.com/vk-rv/pvx\n```\n\n# General usage\n\n# Version 4 (local)\nRecommended\n\nEncrypt / Decrypt \n```go\nk, err := hex.DecodeString(\"707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f\")\nif err != nil {\n    return err \n}\nsymK := pvx.NewSymmetricKey(k, pvx.Version4)\npv4 := pvx.NewPV4Local()\ntoken, err := pv4.Encrypt(symK, claims, pvx.WithAssert([]byte(\"test\")))\nif err != nil {\n\treturn err\n}\ncc := MyClaims{}\nerr = pv4.\n    Decrypt(token, symK, pvx.WithAssert([]byte(\"test\"))).\n    ScanClaims(\u0026cc)\nif err != nil {\n    return err \n}\n// work with cc claims ...\n\n// or without assert\ntoken, err := pv4.Encrypt(symK, claims)\nif err != nil {\n\treturn err\n}\nerr = pv4.Decrypt(token, symK).ScanClaims(\u0026cc)\n\n// more info about implicit asserts is here\n// https://github.com/paseto-standard/paseto-spec/blob/master/docs/Rationale-V3-V4.md#implicit-assertions-feature\n\n```\n\n# Version 4 (public)\nRecommended\n\nSign / Verify \n\n```go\npublicKey, privateKey, _ := ed25519.GenerateKey(nil)\nsk := pvx.NewAsymmetricSecretKey(privateKey, pvx.Version4)\npk := pvx.NewAsymmetricPublicKey(publicKey, pvx.Version4)\n\npv4 := pvx.NewPV4Public()\n\ntoken, err := pv4.Sign(sk, claims, pvx.WithAssert([]byte(\"test\")))\nif err != nil {//...}\n\nvar claims MyClaims \nif err := pv4.Verify(token, pk, pvx.WithAssert([]byte(\"test\")).ScanClaims(\u0026claims); err != nil {//...}\n\n// more info about implicit asserts is here\n// https://github.com/paseto-standard/paseto-spec/blob/master/docs/Rationale-V3-V4.md#implicit-assertions-feature\n\n```\n\n\n\n\n# Version 3 (local)\nIf you need NIST-approved algorithms\n```go\nk, err := hex.DecodeString(\"707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f\")\nif err != nil {\n    return err \n}\nsymK := pvx.NewSymmetricKey(k, pvx.Version3)\npv3 := pvx.NewPV3Local()\ntoken, err := pv3.Encrypt(symK, claims, pvx.WithAssert([]byte(\"test\")))\nif err != nil {\n\treturn err\n}\ncc := MyClaims{}\nerr = pv3.\n    Decrypt(token, symK, pvx.WithAssert([]byte(\"test\"))).\n    ScanClaims(\u0026cc)\nif err != nil {\n    return err \n}\n// work with cc claims ...\n\n// or without assert\ntoken, err := pv3.Encrypt(symK, claims)\nif err != nil {\n\treturn err\n}\nerr = pv3.Decrypt(token, symK).ScanClaims(\u0026cc)\n\n// more info about implicit asserts is here\n// https://github.com/paseto-standard/paseto-spec/blob/master/docs/Rationale-V3-V4.md#implicit-assertions-feature\n\n```\n\n# Claims validation \nPVX adds extra layer of security by adding validation of time-based registered claims during a scan by default.\nDuring validation multiple errors can occur, and you can check every of them by calling sugar routines on special type.\n```go\n // For additional layer of safety, \n // ScanClaims verifies exp, iss and nbf claims automatically under the hood and you can check whether validation error occurred or not \n if err := decrypted.ScanClaims(\u0026myClaimsScanned); err != nil {\n    var validationErr *pvx.ValidationError\n    if errors.As(err, \u0026validationErr) {\n        if validationErr.HasExpiredErr() { \n                // handle \n\t\t}\n\t\tif validationErr.HasNotBeforeErr() { \n                // handle \n\t\t}\n\t}\n}\n```\n\nYou can also use extend validation rules implementing Claims interface on your custom type\n```go\ntype MyClaims struct {\n\tpvx.RegisteredClaims\n\tAdditionalData string\n\tOtherData string \n} \n\nfunc (c *MyClaims) Valid() error {\n\n\tvalidationErr := \u0026pvx.ValidationError{}\n\t\n\t// first, check the validity of registered claims\n\tif err := c.RegisteredClaims.Valid(); err != nil {\n\t\terrors.As(err, \u0026validationErr)\n\t}\n\t\n\t//  then, perform custom validation\n\t\n\t\n\treturn nil \n\t\n}\n\n```\n\nTo disable validation of registered claims you should implement Claims interface explicitly returning nil in your checks.\nThis is from design. \n\n# PASETO V3 and V4\nA library has a work in progress status because currently is the next iteration of the PASETO specification.\nhttps://paragonie.com/blog/2021/08/paseto-is-even-more-secure-alternative-jose-standards-jwt-etc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvk-rv%2Fpvx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvk-rv%2Fpvx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvk-rv%2Fpvx/lists"}