SD-JWT verification#610
Open
cykoder wants to merge 11 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds SD-JWT (Selective Disclosure JWT) verification support to @docknetwork/crypto-utils and propagates the resulting version bumps through dependent packages and examples.
Changes:
- Implement SD-JWT verification helpers in
packages/crypto-utils/src/vc/sd-jwt.js(incl. embedded JWK support and DID-document-based key extraction). - Refactor shared JWT verification logic into
verifyJwtSignature()and extend JWK conversion helpers (Ed25519 + secp256k1). - Add SD-JWT-focused test coverage and bump package versions / changelogs across the monorepo.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Adds @sd-jwt/* dependency resolutions (and pako@^2.1.0). |
| scripts/bench/package.json | Bumps benchmarks package + updates @docknetwork/credential-sdk dependency version. |
| scripts/bench/CHANGELOG.md | Records dependency update for benchmarks. |
| packages/crypto-utils/tests/sd-jwt.test.js | Adds new SD-JWT unit/integration tests (incl. AP2 flow). |
| packages/crypto-utils/tests/crypto-utils.test.js | Moves SD-JWT hash/presentation parsing test coverage into the dedicated SD-JWT test file. |
| packages/crypto-utils/src/vc/sd-jwt.js | Implements SD-JWT helpers + verifySDJWTCredential() and related key-resolution logic. |
| packages/crypto-utils/src/vc/jws.js | Exports algorithm helpers and factors JWT signature verification into verifyJwtSignature(). |
| packages/crypto-utils/src/vc/jwk.js | Switches P-256 JWK conversion off Node crypto, adds Ed25519 + secp256k1 JWK conversion, and introduces jwkToPublicKey(). |
| packages/crypto-utils/src/utils/types/bytes.js | Updates randomness source to globalThis.crypto.getRandomValues. |
| packages/crypto-utils/src/key-utils.js | Adds DID-document key selection and key-material extraction helpers used by SD-JWT verification. |
| packages/crypto-utils/src/index.js | Re-exports new key-utils module. |
| packages/crypto-utils/README.md | Updates subpath exports list and documents environment/browser resolution behavior for @sd-jwt/crypto-nodejs. |
| packages/crypto-utils/package.json | Bumps version, adds SD-JWT deps, adds browser/react-native mappings, and adds ./key-utils export. |
| packages/crypto-utils/jest.config.js | Adjusts Jest transform ignores to allow transpiling SD-JWT/AP2 deps. |
| packages/crypto-utils/CHANGELOG.md | Records the SD-JWT verification change for 0.2.2. |
| packages/credential-sdk/src/vc/status-list2021-credential.js | Removes unused KeyDoc import and clarifies docstrings for keyDoc parameter. |
| packages/credential-sdk/package.json | Bumps version and updates @docknetwork/crypto-utils dependency. |
| packages/credential-sdk/CHANGELOG.md | Records SD-JWT verification + dependency update. |
| packages/ap2/package.json | Bumps version and updates @docknetwork/crypto-utils dependency. |
| packages/ap2/CHANGELOG.md | Records dependency update. |
| examples/package.json | Bumps examples package and updates @docknetwork/credential-sdk dependency version. |
| examples/CHANGELOG.md | Records dependency update for examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…sdk.git into feat/sdjwt-verification
Keep KeyDoc JSDoc typedef without a runtime import. Co-authored-by: Cursor <cursoragent@cursor.com>
mike-parkhill
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relies on: #609