Skip to content

SD-JWT verification#610

Open
cykoder wants to merge 11 commits into
masterfrom
feat/sdjwt-verification
Open

SD-JWT verification#610
cykoder wants to merge 11 commits into
masterfrom
feat/sdjwt-verification

Conversation

@cykoder

@cykoder cykoder commented Jul 19, 2026

Copy link
Copy Markdown
Member

Relies on: #609

Comment thread packages/credential-sdk/src/vc/status-list2021-credential.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/crypto-utils/src/vc/sd-jwt.js Outdated
Comment thread packages/crypto-utils/src/vc/sd-jwt.js
Comment thread packages/crypto-utils/src/vc/sd-jwt.js Outdated
cykoder and others added 8 commits July 22, 2026 21:24
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>
Keep KeyDoc JSDoc typedef without a runtime import.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cykoder
cykoder requested a review from mike-parkhill July 22, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants