SD-JWT (Selective Disclosure for JWTs)
RFC 9901, published by the IETF, defines SD-JWT: a JWS whose payload carries salted digests of claims, with the cleartext in separate Disclosures the Holder can choose to reveal, and an optional Key Binding JWT that proves possession of the Holder's key. The skill also covers two IETF OAuth WG drafts built on it: SD-JWT-based Verifiable Digital Credentials (SD-JWT VC) and Token Status List. With this skill the agent builds Issuers, Holders (wallets) and Verifiers that interoperate and keep undisclosed data private.
Follow the workflow below step by step. Every rule here comes from a source in Sources, with the section it cites. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: Issuer, Holder (wallet), Verifier, Status Issuer or Status Provider. Most work touches two of them.
- Target version: three version families.
- SD-JWT: RFC 9901 (default, the only valid target). Legacy, upgrade from and never author: SD-JWT drafts -09 to -22, SD-JWT drafts -07 and -08, SD-JWT drafts -05 and -06, SD-JWT drafts -04 and earlier.
- SD-JWT VC: SD-JWT VC draft-19 (current, posture build). Legacy: SD-JWT VC drafts -12 to -18, SD-JWT VC drafts -06 to -11, SD-JWT VC drafts -05 and earlier (
vc+sd-jwt). - Status: Token Status List draft-21 (current, posture build, in the RFC Editor queue). Legacy: Token Status List drafts -06 to -20, Token Status List drafts -01 to -05, Token Status List draft-00.
- See
references/versions.md.
- Revision: the pinned revisions in Sources, unless the user or an ecosystem profile names another.
- Credential profile: plain SD-JWT with an application
typ, or SD-JWT VC (dc+sd-jwt). Note any ecosystem that pins a draft revision. - Key Binding: required by the Verifier's use case or not, and how the Holder key reaches the Issuer.
- Status: none, or Token Status List (JWT or CWT Status List Token).
- Sources: when refreshing this skill or when a rule looks out of date, re-read every URL in Sources, check the Datatracker records for new revisions and the
became_rfcrelation, check the RFC Editor queue and the RFC 9901 record for errata, and update the pins.
Invariants
- The Issuer-signed JWT is signed, never
none(RFC 9901 § 4.1, § 9.1). Verifiers always check the signature and reject on failure. - Digests are over the encoded Disclosure. Hash the US-ASCII bytes of the base64url string with
_sd_alg(defaultsha-256, top level only), and base64url-encode the digest (§ 4.1.1, § 4.2.3). - Salts are random, unique per claim and secret. At least 128 random bits are RECOMMENDED; never reveal a salt except to the Holder (§ 4.2.1, § 9.3).
- Disclosure shapes are fixed. Object property
[salt, name, value]with a name that is not_sd,...or an existing clear claim; array element[salt, value], embedded as{"...": digest}(§ 4.2.1, § 4.2.2, § 4.2.4.2). - Validity claims stay in the clear. Do not make
iss,exp,nbf,cnf(oraud, except single entries) disclosable, and Verifiers require the claims they need (§ 9.7, § 7.1 step 6). - Serialization keeps the trailing tilde.
<JWT>~<D.1>~...~<D.N>~[<KB-JWT>], no duplicate or foreign Disclosures, parents included for nested ones (§ 4, § 4.2.6). - The KB-JWT is typed and bound.
typ: kb+jwt,iat, a single-stringaud, a stringnonce, andsd_hashover the presented SD-JWT, signed with thecnfkey (§ 4.3, § 4.3.1, § 4.3.2). - Key Binding policy is set before verifying. Never decide it from whether a KB-JWT was sent (§ 7.3 step 1, § 9.5).
- Verification is strict. Reject wrong-length Disclosures, forbidden or duplicate claim names, repeated digests and unreferenced Disclosures; drop unmatched array digests and all
_sd,_sd_alg(§ 7.1). - SD-JWT VC is explicitly typed.
typ: dc+sd-jwt, avctCollision-Resistant Name, andvct,vct#integrity,aka_vcts,iss,nbf,exp,cnfandstatusnever disclosable (SD-JWT VC § 2.2.1, § 2.2.2.1, § 2.2.2.3). - SD-JWT VC Issuer keys are validated by a permitted mechanism. JWT VC Issuer Metadata with
issuerequal toiss, orx5cin the protected header; otherwise reject (SD-JWT VC § 2.5, § 4.3). - Status is checked after the token. Validate the Referenced Token first;
subof the Status List Token equalsstatus_list.uri; an out-of-boundsidxis rejected (Token Status List § 8.3).
Workflow
- Pick the version per family. RFC 9901 for SD-JWT, SD-JWT VC draft-19, Token Status List draft-21, unless an ecosystem pins an older revision for interop.
->
references/versions.md✓ The target revision of each family in use is recorded, and no legacy line is authored. - Design the claim structure. Decide per claim and per level what is clear, disclosable, flat, structured or recursive; keep validity claims clear; plan decoys and
typ. ->references/issuance-and-disclosures.md✓ A table lists every claim with its disclosability, and no § 9.7 or SD-JWT VC § 2.2.2.3 claim is disclosable. - Build the Issuer. Create salts and Disclosures, embed and shuffle digests, add decoys, put the Holder key in
cnf, sign, serialize with the trailing~. ->references/issuance-and-disclosures.md✓ The § 4.2.3 test vector reproduces, and the SD-JWT passes your own § 7.1 verifier. - Build the Holder. Verify on receipt, select Disclosures with their parents, create the KB-JWT when required, store credentials encrypted.
->
references/presentation-and-key-binding.md✓sd_hashmatches the § 5.2 example, and presentations never include undisclosed salts. - Build the Verifier. Fix the Key Binding policy, run § 7.1 and § 7.3, check
typ, and hand only the processed payload to the application. ->references/verification.md✓ Tampered, duplicated, unreferenced and stripped-KB-JWT presentations are rejected in tests. - Apply the SD-JWT VC profile (if used).
dc+sd-jwt,vct, Issuer key discovery, safe HTTP retrieval, optional Type Metadata with integrity checks. ->references/sd-jwt-vc.md✓ Metadata fetches are HTTPS-only with SSRF checks, and a mismatchedissueror integrity value causes rejection. - Add status (if used). Allocate indices, publish signed Status List Tokens with
expandttl, addstatus.status_listto tokens, check status in Verifiers. ->references/status-list.md✓ The Appendix C test vectors decode correctly, and indices are never reused. - Review privacy. Batch issuance with fresh keys and salts, randomized timestamps, decoys, minimal storage and logging, and herd privacy for status lists.
->
references/issuance-and-disclosures.md,references/status-list.md✓ Each RFC 9901 § 10 and Token Status List § 12 item has a decision recorded. - Upgrade (only when asked). Follow the checklist for each family from the source revision to the target.
->
references/versions.md✓ Upgraded tokens validate under the target revision and disclose the same claims.
Verify before done
- Digests and
sd_hashare computed over base64url strings as US-ASCII bytes and encoded as base64url (RFC 9901 § 4.2.3, § 4.3.1). - Every Disclosure has a fresh random salt of at least 128 bits (§ 9.3).
-
_sd_algis absent or at the top level only;sha-256is supported (§ 4.1.1). - No security-critical claim is selectively disclosable (§ 9.7; SD-JWT VC § 2.2.2.3).
- Every serialized SD-JWT without a KB-JWT ends in
~(§ 4). - KB-JWTs have
typ: kb+jwt,iat, a single-stringaud,nonceandsd_hash, and are verified with thecnfkey (§ 4.3, § 7.3). - The Verifier's Key Binding decision does not depend on the presentation (§ 9.5).
- The § 7.1 rejections are covered by tests: bad Disclosure length,
_sdor...names, duplicate names, repeated digests, unreferenced Disclosures. - SD-JWT VCs use
typ: dc+sd-jwt, and retrieval follows SD-JWT VC § 3 and § 7.1. - Status List Tokens use
typ: statuslist+jwt(or the CWT form),subequalsuri, and the Status List is ZLIB-compressed (Token Status List § 4.1, § 5). - Nothing is authored against a legacy draft line.
Reference index
references/versions.md: every version line in the three families, what changed between drafts and the RFC, and upgrade checklists. Load for steps 1 and 9.references/issuance-and-disclosures.md: the payload data model, Disclosures, hashing with test vectors, nesting, decoys, Key Binding setup, serialization and issuance privacy. Load for steps 2, 3 and 8.references/presentation-and-key-binding.md: Holder processing, Disclosure selection, the KB-JWT andsd_hash, JSON serialization, forwarding and storage. Load for step 4.references/verification.md: the § 7.1 and § 7.3 algorithms, the security considerations and common mistakes. Load for step 5.references/sd-jwt-vc.md: SD-JWT VC draft-19 claims, Issuer key discovery, safe retrieval, Type Metadata, integrity, SVG rendering, trust and privacy. Load for step 6.references/status-list.md: Token Status List draft-21 encoding, tokens, thestatusclaim, Status Types, fetching, validation, aggregation and privacy. Load for steps 7 and 8.
Related skills
jwtfor JWS, JWT claims and RFC 8725 best practices underneath SD-JWT:npx skills add ScaleDockHQ/scaledock-skills --skill jwt.openid4vcfor issuing and presenting SD-JWT VCs with OpenID4VCI and OpenID4VP:npx skills add ScaleDockHQ/scaledock-skills --skill openid4vc.vc-data-modelfor W3C Verifiable Credentials, the other credential data model:npx skills add ScaleDockHQ/scaledock-skills --skill vc-data-model.eudi-walletfor the EU Digital Identity Wallet rules that profile SD-JWT VC:npx skills add ScaleDockHQ/scaledock-skills --skill eudi-wallet.oauthfor the OAuth framework and authorization server metadata:npx skills add ScaleDockHQ/scaledock-skills --skill oauth.
Sources
Status uses the publishing body's own maturity term. Checked is the date the source was last read.
- RFC 9901: Selective Disclosure for JSON Web Tokens: RFC (Proposed Standard), RFC 9901 (November 2025), checked 2026-10-05.
- RFC Editor metadata for RFC 9901: RFC Editor record, no errata, not updated or obsoleted, checked 2026-10-05.
- draft-ietf-oauth-selective-disclosure-jwt-22: WG draft, became RFC 9901, revision 22 (29 May 2025) with the Document History, checked 2026-10-05.
- draft-ietf-oauth-selective-disclosure-jwt-20: WG draft, superseded, revision 20 (27 May 2025), checked 2026-10-05.
- draft-ietf-oauth-selective-disclosure-jwt-09: WG draft, superseded, revision 09 (13 June 2024), checked 2026-10-05.
- draft-ietf-oauth-selective-disclosure-jwt-08: WG draft, superseded, revision 08 (4 March 2024), checked 2026-10-05.
- draft-ietf-oauth-selective-disclosure-jwt-07: WG draft, superseded, revision 07 (11 December 2023), checked 2026-10-05.
- draft-ietf-oauth-selective-disclosure-jwt-06: WG draft, superseded, revision 06 (23 October 2023), checked 2026-10-05.
- draft-ietf-oauth-selective-disclosure-jwt-05: WG draft, superseded, revision 05 (30 June 2023), checked 2026-10-05.
- draft-ietf-oauth-selective-disclosure-jwt-04: WG draft, superseded, revision 04 (11 April 2023), checked 2026-10-05.
- draft-ietf-oauth-sd-jwt-vc-19: WG draft, submitted to the IESG for publication, revision 19 (31 August 2026), checked 2026-10-05.
- Datatracker API: draft-ietf-oauth-sd-jwt-vc: active WG draft, IESG state Waiting for AD Go-Ahead, rev 19, no RFC, checked 2026-10-05.
- draft-ietf-oauth-sd-jwt-vc-12: WG draft, superseded, revision 12 (20 October 2025), checked 2026-10-05.
- draft-ietf-oauth-sd-jwt-vc-11: WG draft, superseded, revision 11 (15 September 2025), checked 2026-10-05.
- draft-ietf-oauth-sd-jwt-vc-06: WG draft, superseded, revision 06 (13 November 2024), checked 2026-10-05.
- draft-ietf-oauth-sd-jwt-vc-05: WG draft, superseded, revision 05 (18 September 2024), checked 2026-10-05.
- draft-ietf-oauth-sd-jwt-vc-00: WG draft, superseded, revision 00 (16 August 2023), checked 2026-10-05.
- draft-ietf-oauth-status-list-21: WG draft, approved, in the RFC Editor queue, revision 21 (21 June 2026), checked 2026-10-05.
- Datatracker API: draft-ietf-oauth-status-list: active WG draft, IESG state RFC Ed Queue, RFC Editor state In Progress, rev 21, checked 2026-10-05.
- Datatracker API: became_rfc for draft-ietf-oauth-status-list: relation query, 0 results (no RFC), checked 2026-10-05.
- RFC Editor queue (XML): RFC Editor queue, lists draft-ietf-oauth-status-list-20 received 2026-06-04, no SD-JWT VC entry, checked 2026-10-05.
- draft-ietf-oauth-status-list-20: WG draft, superseded, revision 20 (20 April 2026) with the Document History, checked 2026-10-05.
- draft-ietf-oauth-status-list-06: WG draft, superseded, revision 06 (3 December 2024), checked 2026-10-05.
- draft-ietf-oauth-status-list-05: WG draft, superseded, revision 05 (21 October 2024), checked 2026-10-05.
- draft-ietf-oauth-status-list-03: WG draft, superseded, revision 03 (8 July 2024), checked 2026-10-05.
- draft-ietf-oauth-status-list-01: WG draft, superseded, revision 01 (6 February 2024), checked 2026-10-05.
- draft-ietf-oauth-status-list-00: WG draft, superseded, revision 00 (23 October 2023), checked 2026-10-05.