Decentralized Identity: DIDs & Verifiable Credentials
- Compare the issuer–holder–verifier model with OIDC federation and X.509 PKI: who is online, who learns what.
- Read a DID document, check the right verification relationship, and choose a DID method.
- Choose between W3C VC 2.0, SD-JWT VC and ISO mdoc, and a status mechanism, knowing their privacy properties.
- Design issuer trust, holder-key binding and lost-phone recovery for a bank or an online shop.
Spec statuses and regulations on this page are as of October 2026; check them before quoting them in a design. The Vietnam items are summaries, not legal advice.
TL;DR
- The issuer signs claims, the holder keeps them in a wallet and chooses what to present, the verifier checks them without calling the issuer. You gain privacy and availability and lose real-time revocation.
- DIDs (
did:method:id) resolve to a document listing keys, what each key may do, and services. DID Core 1.0 is a W3C Recommendation (2022); DID 1.1 is a Candidate Recommendation (2026). - Production trust mostly sits on the web and X.509 (as of 2026):
did:web, HTTPS issuer metadata, or certificate chains plus trusted lists. The EU wallet uses X.509 and trusted lists, not DIDs. - Formats: W3C VC Data Model 2.0 (Recommendation, May 2025), SD-JWT (RFC 9901) and SD-JWT VC (IETF draft), ISO mdoc (ISO/IEC 18013-5). EU wallets must support SD-JWT VC and mdoc.
- Selective disclosure is not unlinkability: the issuer signature and holder key repeat in every presentation. Use batch issuance, or BBS (still a Candidate Recommendation).
- Revocation: large, cached, signed status lists for herd privacy, or short-lived credentials.
- The hard part is governance: who may issue what, liability, key protection, recovery. A credential carries a KYC result; the verifier keeps its own KYC and AML duties.
Why it matters
Every Vietnamese bank, securities firm and e-wallet repeats the same onboarding: NFC chip read, face match, Ministry of Public Security check, sanctions screening, and another stored copy of ID images and biometrics. A holder-presented "KYC verified by Bank A" credential is the obvious idea, and interviewers go straight to the hard questions: who decides Bank A is trustworthy, what if its signing key leaks, how does the fintech know the presenter is the customer, what happens when the phone is lost? E-commerce needs "over 18" without storing birth dates and ID photos, and marketplaces need verified business registrations instead of editable PDFs.
The EU's eIDAS 2.0 regulation, (EU) 2024/1183, requires each member state to offer a European Digital Identity Wallet, with the deadline commonly cited as 24 December 2026 (verify), and regulated private relying parties such as banks must accept it later. Vietnam chose a state identity provider (VNeID) plus chip ID cards. You should be able to explain how the two models differ.
Core concepts
The trust triangle versus federation and PKI
The issuer is never contacted during a presentation; everything else comes from cacheable, public infrastructure.
| X.509 PKI | OIDC federation | Issuer–holder–verifier | |
|---|---|---|---|
| What is signed | A key bound to a name | A short-lived ID token for one login | Claims about a subject, valid for months |
| Issuer online at use time? | No, apart from revocation checks | Yes, in every login | No |
| Who learns about each use | Nobody, unless OCSP is queried | The IdP sees every client the user visits | Only the verifier |
| Typical use | TLS, mTLS, code signing | Login, SSO, API access | KYC, age, licences, diplomas |
See OAuth 2.0, OAuth 2.1 & OpenID Connect and TLS & HTTPS for the other two models.
It solves the phone-home problem (the issuer does not learn where a credential is used), issuer availability (Bank A's outage does not stop a fintech's onboarding), data minimisation (release ageOver18, not the birth date) and composition (bank KYC plus a registry's business registration in one presentation).
It does not solve whether the issuer deserves trust (a signature proves who signed, not that they may vouch for KYC), whether the claims are true (weak eKYC yields a strongly signed weak credential), or whether the presenter is the subject (key binding proves a device; local unlock and live biometrics bridge to the person). Revocation, recovery and liability remain design and contract problems.
DIDs and DID documents
A DID is did: plus a method plus a method-specific identifier, such as did:web:kyc.bank-a.example. A DID URL adds a path, query or fragment: did:web:kyc.bank-a.example#sign-2026-10 names one key. Resolving a DID with its method's rules returns a DID document plus metadata (created, updated, deactivated).
{
"@context": "https://www.w3.org/ns/did/v1.1",
"id": "did:web:kyc.bank-a.example",
"verificationMethod": [
{
"id": "did:web:kyc.bank-a.example#sign-2026-10",
"type": "JsonWebKey",
"controller": "did:web:kyc.bank-a.example",
"publicKeyJwk": { "kty": "OKP", "crv": "Ed25519", "x": "<base64url public key>" }
},
{
"id": "did:web:kyc.bank-a.example#login-1",
"type": "JsonWebKey",
"controller": "did:web:kyc.bank-a.example",
"publicKeyJwk": { "kty": "EC", "crv": "P-256", "x": "<x>", "y": "<y>" }
}
],
"authentication": ["did:web:kyc.bank-a.example#login-1"],
"assertionMethod": ["did:web:kyc.bank-a.example#sign-2026-10"]
}
JsonWebKey and Multikey come from the W3C Controlled Identifiers 1.0 Recommendation (May 2025), which DID 1.1 builds on. Verification relationships say what each key may do:
| Relationship | Meaning | Typical use |
|---|---|---|
authentication | Prove control of the DID | Holder signs a login challenge |
assertionMethod | Sign statements on the DID's behalf | Issuer signs credentials |
keyAgreement | Establish encryption keys | Encrypted responses |
capabilityInvocation, capabilityDelegation | Update the document, delegate rights | Ledger-based DIDs |
Accept only assertionMethod keys for credentials, or a leaked login key can mint them. A service array can list endpoints, such as LinkedDomains.
Resolution is a trust dependency. W3C DID Resolution (Candidate Recommendation Draft, October 2026) separates verifiable resolution, where the method guarantees integrity, from unverifiable resolution. A hosted universal resolver learns which issuers you check and must be trusted for integrity, so a bank should resolve the few methods it accepts in-house.
DID methods and why the web won
| Method | How it resolves | Rotation and history | Trust rests on | Good for |
|---|---|---|---|---|
did:web | HTTPS GET of /.well-known/did.json or /path/did.json | Edit the file; no history | DNS, TLS, the web host | Issuers and verifiers that own a domain |
did:webvh | did:web plus a signed, hash-chained log of versions | Each update signed by an authorised key | Web security plus verifiable history | Issuers that must prove which key was valid when |
did:key, did:jwk | The public key is the identifier (did:key:z6Mk…) | None; a leaked key kills the identifier | The key alone | Holder keys, ephemeral keys, tests |
did:peer | Exchanged between the parties, never published | Per relationship | The relationship | Private pairwise channels (DIDComm) |
Ledger-based (did:ethr, did:ion, did:indy) | State read from a blockchain or anchored log | Full history, censorship resistance | The network's operation and governance | Consortia that want no single operator |
did:webis a W3C Credentials Community Group spec, not a W3C Recommendation. A hijacked DNS record or web server publishes the attacker's key, and without history you cannot prove which key was valid on 1 March.did:webvh("verifiable history", formerlydid:tdw) reached v1.0 as a ratified DIF spec in 2025: a self-certifying identifier, a log where each update is signed by a previously authorised key, optional witnesses, portability across domains.- Ledger methods carry operator risk. Microsoft Entra Verified ID supported
did:iononly in preview until December 2023 and now usesdid:web, which meant re-issuing every credential. The Sovrin Foundation announced in February 2025 that its MainNet (did:sov) would likely shut down. Personal data on an immutable ledger also conflicts with deletion rights. See Blockchain & Distributed Ledgers for Architects.
Why did:web or X.509 (as of 2026): issuers are known, regulated organisations that already own domains and PKI, regulators want accountable anchors they can supervise, and the dominant formats do not need DIDs. SD-JWT VC finds issuer keys through HTTPS metadata (/.well-known/jwt-vc-issuer) or an x5c certificate chain, and the holder is often just a public key in the cnf claim.
Verifiable Credentials: data model and formats
The VC Data Model 2.0 (W3C Recommendation, 15 May 2025) is JSON-LD. It requires @context (first entry https://www.w3.org/ns/credentials/v2), type including VerifiableCredential, issuer and credentialSubject; validFrom, validUntil, credentialStatus and credentialSchema are optional. A verifiable presentation wraps credentials and is signed by the holder for one verifier and challenge. Leave out credentialSubject.id unless you need it: a stable subject identifier is a correlation handle, and holder binding can come from proof of key possession instead.
Securing mechanisms (at least one is required):
- VC-JOSE-COSE (Recommendation, May 2025, republished October 2026) envelopes the document as a JWS (
application/vc+jwt), SD-JWT (application/vc+sd-jwt) or COSE (application/vc+cose), so existing JOSE libraries and HSMs work. - Data Integrity 1.0 (Recommendation, May 2025) embeds a
prooffrom a cryptosuite:eddsa-rdfc-2022,eddsa-jcs-2022,ecdsa-rdfc-2019,ecdsa-jcs-2019,ecdsa-sd-2023(selective disclosure) andbbs-2023(Candidate Recommendation Draft, September 2026). Therdfcsuites process JSON-LD contexts: pin them locally, never fetch them at verification time.
SD-JWT (RFC 9901, November 2025) turns each hideable claim into a disclosure, base64url of [salt, name, value]. The issuer signs only its digest, listed in _sd with optional decoys; the holder sends the JWT plus chosen disclosures, and the verifier matches their hashes against _sd. A Key Binding JWT signed by the cnf key carries nonce, aud, iat and sd_hash, which stops replay. SD-JWT VC (draft-ietf-oauth-sd-jwt-vc-19, submitted to the IESG, not an RFC as of October 2026) adds typ: dc+sd-jwt and a vct type, forbids selectively disclosing iss, exp, cnf or status, and uses plain JSON, not JSON-LD.
Issuer JWT typ=dc+sd-jwt iss=https://kyc.bank-a.example cnf.jwk=<holder key>
status.status_list = idx 94567, uri https://status.bank-a.example/kyc/7
_sd = [digest(fullName), digest(ageOver18), digest(kycLevel), decoys...]
Presentation <issuer JWT>~<disclosure kycLevel>~<disclosure ageOver18>~<KB-JWT: nonce, aud, iat, sd_hash>
ISO mdoc (ISO/IEC 18013-5:2021, built for mobile driving licences; a revision is at DIS stage, verify) uses CBOR and COSE: the issuer signs salted digests of each data element, the device signs each response, and presentation is in person over NFC, BLE or QR. ISO/IEC TS 18013-7:2025 adds online presentation. age_over_NN elements answer "over 18?" directly.
| Format | Encoding | Selective disclosure | Unlinkable across verifiers | Where used (2026) |
|---|---|---|---|---|
| VC 2.0 + VC-JOSE-COSE | JSON-LD in a JWS | No | No | Enterprise, W3C-aligned ecosystems |
| VC 2.0 + Data Integrity (EdDSA, ECDSA) | JSON-LD, embedded proof | Only ecdsa-sd-2023 | No | W3C-aligned ecosystems, education |
| VC 2.0 + BBS | JSON-LD, embedded proof | Yes | Yes, via derived proofs | Pilots; no secure-hardware keys |
| SD-JWT VC | JSON in a JWS | Yes | No; batch issuance helps | EU wallet (mandatory), OpenID4VC |
| ISO mdoc | CBOR, COSE | Yes | No; batch issuance helps | Driving licences, EU wallet (mandatory) |
The EU Architecture and Reference Framework (ARF v3.0.0, July 2026) requires wallets to support mdoc and SD-JWT VC; W3C VC 2.0 is optional, for non-qualified attestations only. Transport is a separate layer: OpenID4VCI and OpenID4VP (OpenID Final since 2025) plus ISO/IEC 18013-5 proximity, covered in OpenID for Verifiable Credentials: OID4VCI & OID4VP. A remote presentation:
Revocation and status
Calling the issuer per presentation would bring back phone-home, so both standards publish a signed, compressed list in which each credential owns one position:
- Bitstring Status List v1.0 (W3C Recommendation, May 2025):
credentialStatusnames a list URL and index; the list is a signed credential holding a GZIP-compressed bitstring, with purposesrevocation,suspension,refreshandmessage, and at least 131,072 entries (16 KB uncompressed). - IETF Token Status List (draft-ietf-oauth-status-list-21, in the RFC Editor queue, not an RFC as of October 2026): 1, 2, 4 or 8 bits per token (VALID, INVALID, SUSPENDED) in a JWT or CWT, for SD-JWT VC and mdoc.
Design trade-offs:
- Herd privacy needs large lists and random indices. Sequential indices leak issuance order; one list per credential is a tracking mechanism. A million credentials at 1 bit is 125 KB raw and compresses far smaller.
- Freshness versus availability: cache with a TTL per risk tier (minutes for account opening, hours for age checks) and serve lists from a CDN, not the issuer's core. See Caching.
- Monitoring: a verifier that keeps the index can watch status change later, so re-issue with new indices periodically.
- Short-lived credentials (days, refreshed automatically) remove status lookups at the cost of issuance load and a wallet that must come online. The EU ARF calls a PID's technical validity "usually rather short".
Trust frameworks: is this issuer legitimate?
A valid signature says who signed. Before any cryptography, the verifier decides whether that signer may issue this credential type at this assurance level:
- Bilateral allowlist: a configured map from issuer to keys to permitted credential types, as in most B2B pilots and the Go code below. It stops scaling at a few dozen issuers.
- X.509 plus trusted lists (EU): lists carry the trust anchors of PID providers, qualified attestation providers and wallet providers. Relying parties get access certificates, so the wallet can authenticate them and show who is asking, and registration certificates listing the attributes they may request, so over-asking is flagged.
- OpenID Federation 1.0 (Final, February 2026): entity configurations at
/.well-known/openid-federation, subordinate statements, trust chains to a known anchor, trust marks such as "licensed bank", and metadata policy. A fit for a banking association or central bank.
Linked domains prove a DID belongs to bank-a.example, not that it is a licensed bank. Authenticate the verifier too: a wallet that answers any request lets a fake "bank" page harvest full KYC credentials.
Privacy, keys and recovery
- Correlation handles: subject identifiers, holder DIDs, unique claims (ID or phone number), the issuer signature, the
cnfkey, salts, the status index, exact timestamps. - Ask for less:
ageOver18, notbirthDate;kycLevel, not the ID number, unless the law requires it (account opening does). - Batch issuance (recommended by RFC 9901): copies with fresh keys, salts and rounded timestamps, one per verifier. It defeats verifier–verifier correlation, not issuer–verifier collusion, which needs BBS or zero-knowledge proofs (the EU ARF has a ZKP specification).
- Issuer keys live in an HSM or KMS (see Security for Architects). Publish the next key before switching; keep old keys resolvable while their credentials are valid.
- Holder keys are non-exportable, in the Secure Enclave or Android StrongBox/TEE, unlocked by biometric or PIN. Secure Enclave keys are P-256, so mobile ecosystems use ES256; Ed25519 and BLS12-381 (BBS) keys usually cannot live there. High-assurance issuers should require key or wallet attestation, or malware gets a KYC credential on a software key.
- Device binding is not person binding: for large transfers, Vietnamese rules still require a live face match.
- Lost phone: the key is gone by design, so design re-issuance, not key backup: re-prove identity (chip read, face match), revoke the old credentials, issue new ones to the new key. It is the most common wallet support event and an account-takeover path: rate-limit and monitor it.
Trade-offs
| Option | Strengths | Weaknesses | Choose when |
|---|---|---|---|
did:web issuer | Trivial on an existing domain, TLS and CDN | No history; web-host or DNS compromise is key compromise | Default for organisation-issued credentials |
did:webvh issuer | Verifiable key history, portable | Newer, fewer libraries | Long-lived credentials, disputes about past keys |
| X.509 chain + trusted list | Legal recognition, existing CA and HSM operations | A CA hierarchy and lists to run | Regulated ecosystems (EU wallet, sector schemes) |
| Ledger-based DID | No single operator, full history | Network and governance risk, personal data on-chain | Consortia that explicitly want shared infrastructure |
| SD-JWT VC | Plain JSON and JOSE, mandated in the EU | Linkable without batch issuance; still a draft | Online flows, most new deployments |
| ISO mdoc | Proximity, age_over_NN, mandated in the EU | CBOR tooling, linkable without batching | In-person checks, driving licences |
| VC 2.0 + BBS | Unlinkable selective disclosure | Candidate Recommendation, no hardware keys | Privacy-critical cases that accept software keys |
| Plain API call to the issuer (no VC) | Real-time, simple, existing OAuth | Issuer sees every use and must be up | Two contracted parties with an API already |
In practice
Bank and e-commerce use cases
- Reusable KYC. Bank A issues an SD-JWT VC (name, date of birth and ID number, each disclosable;
kycLevel; methods; date) and Fintech B requests only what it needs. It needs a reliance agreement covering liability, a regulator that accepts third-party KYC (Vietnamese eKYC rules prescribe how identity is verified, so check), and B still runs its own sanctions screening, risk rating and AML monitoring and stores the presentation as evidence. See Compliance: PCI DSS, KYC/AML, Data Protection. - Proof of account ownership. An "account holder" credential (name, account number or its hash, bank code) replaces penny-drop transfers for merchant payouts and e-wallet linking. Treat it as one signal in Fraud & Risk Systems, not a guarantee.
- Age checks. Request
age_over_18and store only "over 18, issuer X, time T, presentation hash H": no birth date or ID image in the order database. - B2B suppliers and sellers. Business-registration and tax-code credentials from registries and certifications from auditors, issued by
did:weborganisations and re-checked periodically.
Vietnam context
Based on official summaries, law-firm briefings and press reports as of October 2026. Confirm against the official texts with your compliance team.
- Chip-based citizen ID (CCCD). The Law on Identification 2023 (effective 1 July 2024) renamed the card to identity card (thẻ căn cước); earlier chip cards stay valid until their printed expiry. Banking apps read the chip over NFC, check its integrity, authenticity and digital signature, and verify with the Ministry of Public Security. That is already an issuer-signed credential with a state trust anchor, closer to an ICAO e-passport than to a W3C VC.
- VNeID and Decree 69/2024/ND-CP (issued 25 June 2024, effective 1 July 2024, replacing Decree 59/2022/ND-CP): level 1 and level 2 eID accounts from the Ministry of Public Security, plus e-authentication services organisations may use with the user's consent. Decree 320/2026/ND-CP (issued 13 August 2026, effective 28 September 2026) amends it, widening foreigners' accounts and, as reported, requiring national digital platforms to integrate VNeID by 31 December 2026. VNeID is a centralised identity provider: a federation, not a decentralised wallet.
- SBV Decision 2345/QĐ-NHNN (signed 18 December 2023, effective 1 July 2024): biometric authentication for online transfers to another person or e-wallet top-ups above VND 10 million per transaction, or once the day's total exceeds VND 20 million (as commonly reported), matched against chip data, VNeID or bank-held biometrics, and on a new device. Under Circular 17/2024/TT-NHNN, since 1 January 2025 banks block electronic transactions on payment accounts until ID documents and biometrics are verified (per bank notices).
- So: VCs do not replace these live checks. Near-term fits are B2B documents, cross-border flows, and KYC reuse between institutions if the regulator accepts it.
Go: resolve a did:web issuer key
Standard library only. Fetching only allowlisted issuers also blocks SSRF through a DID like did:web:10.0.0.5%3A8080; the client should refuse redirects; the key must be listed under assertionMethod.
package didweb
import (
"context"
"crypto/ed25519"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"slices"
"strings"
)
// URL maps did:web:bank.example to https://bank.example/.well-known/did.json
// and did:web:bank.example:issuers:kyc to https://bank.example/issuers/kyc/did.json.
func URL(did string) (string, error) {
rest, ok := strings.CutPrefix(did, "did:web:")
if !ok || rest == "" {
return "", fmt.Errorf("not a did:web DID: %q", did)
}
parts := strings.Split(rest, ":")
host, err := url.PathUnescape(parts[0]) // %3A encodes a port
if err != nil || strings.ContainsAny(host, "/?#@") {
return "", fmt.Errorf("bad host in %q", did)
}
path := "/.well-known"
if len(parts) > 1 {
path = "/" + strings.Join(parts[1:], "/")
}
return "https://" + host + path + "/did.json", nil
}
type document struct {
ID string `json:"id"`
AssertionMethod []string `json:"assertionMethod"` // embedded methods fail to decode: rejected
VerificationMethod []struct {
ID string `json:"id"`
Controller string `json:"controller"`
PublicKeyJwk struct{ Kty, Crv, X string } `json:"publicKeyJwk"`
} `json:"verificationMethod"`
}
// Resolver fetches DID documents of allowlisted issuers only, which also
// stops did:web from being abused for SSRF against internal hosts.
type Resolver struct {
Client *http.Client // with a timeout; CheckRedirect returns http.ErrUseLastResponse
Trusted map[string][]string // issuer DID -> key IDs allowed to sign credentials
}
// AssertionKey returns issuer key kid if it is allowlisted AND listed under
// assertionMethod. Keys for authentication or keyAgreement are refused.
func (r *Resolver) AssertionKey(ctx context.Context, did, kid string) (ed25519.PublicKey, error) {
if !slices.Contains(r.Trusted[did], kid) {
return nil, fmt.Errorf("key %s of %s is not trusted", kid, did)
}
u, err := URL(did)
if err != nil {
return nil, err
}
req, err := http.NewRequestWithContext(ctx, http.MethodGet, u, nil)
if err != nil {
return nil, err
}
resp, err := r.Client.Do(req)
if err != nil {
return nil, fmt.Errorf("resolve %s: %w", did, err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("resolve %s: HTTP %d", did, resp.StatusCode)
}
var doc document
if err := json.NewDecoder(io.LimitReader(resp.Body, 64<<10)).Decode(&doc); err != nil {
return nil, fmt.Errorf("decode DID document: %w", err)
}
if doc.ID != did {
return nil, fmt.Errorf("document id %q does not match %q", doc.ID, did)
}
abs := func(id string) string { // "#key-1" is relative to the DID
if strings.HasPrefix(id, "#") {
return did + id
}
return id
}
if !slices.ContainsFunc(doc.AssertionMethod, func(id string) bool { return abs(id) == kid }) {
return nil, fmt.Errorf("%s is not an assertionMethod of %s", kid, did)
}
for _, vm := range doc.VerificationMethod {
k := vm.PublicKeyJwk
if abs(vm.ID) != kid || vm.Controller != did || k.Kty != "OKP" || k.Crv != "Ed25519" {
continue
}
pub, err := base64.RawURLEncoding.DecodeString(k.X)
if err != nil || len(pub) != ed25519.PublicKeySize {
return nil, fmt.Errorf("%s: bad Ed25519 key", kid)
}
return ed25519.PublicKey(pub), nil
}
return nil, fmt.Errorf("%s: no usable Ed25519 key", kid)
}
Then check the JWS header (alg exactly EdDSA, kid the allowlisted key; never let the token choose) and call ed25519.Verify over header.payload. In production add a TTL cache with stale-while-revalidate and ES256 (P-256) keys, which HSMs and phones favour.
Common pitfalls
- Accepting any key in the DID document. Symptom: a leaked
authenticationkey signs credentials that verifiers accept. - Treating a valid signature as a trusted issuer. Symptom: anyone with a domain issues "KYC verified" credentials your onboarding accepts.
- Skipping nonce and audience checks. Symptom: a presentation captured at one verifier is replayed at another, or tomorrow.
- Small or sequential status lists. Symptom: verifiers correlate customers by index or estimate onboarding dates.
- No cache, or caching forever. Symptom: the issuer's CDN incident becomes your outage, or revoked credentials keep passing.
- Unrestricted
did:webresolution. Symptom: your verifier fetches from the internal network for an attacker-chosen DID. - Personal data in DIDs or on a ledger. Symptom: a deletion request you cannot honour.
- No re-issuance path. Symptom: every lost phone becomes a branch visit, and adoption stalls.
Interview angle
- How it shows up: "design reusable KYC across banks and fintechs", "verify age without storing birth dates", or, after you propose OIDC, "what if the IdP must not see every login?"
- A strong answer draws the triangle and says who is online; separates format (SD-JWT VC, mdoc), protocol (OpenID4VCI/VP) and trust framework; checks issuer trust before the signature; binds the holder with nonce and audience; designs status for privacy and caching; covers recovery; and keeps the verifier's regulatory duties.
- Follow-ups: "The issuer key leaked: now what?" (pull it from the trust list and DID document, revoke and re-issue). "Why not a blockchain?" (operator risk, personal data). "How do you stop over-asking?" (registration certificates, consent screens).
- Red flags: "DIDs make it trustless", "selective disclosure makes it anonymous", storing ID images anyway, no lost-phone story, or VCs where one API call would do.
Self-check
1. Compare the issuer–holder–verifier model with OIDC: who is online and who learns what?
In OIDC the identity provider takes part in every login, so it must be up and it sees every client the user visits. With VCs the issuer signs once and verifiers check the signature with cached public metadata, so the issuer is offline and learns nothing about use. The price is non-real-time revocation and less issuer control.
2. Why doesn't SD-JWT give unlinkability, and how do you mitigate it?
The issuer signature, cnf key, salts and digests repeat in every presentation, so colluding verifiers can tell they saw the same credential. Batch issuance (fresh keys, salts and rounded timestamps, one copy per verifier) fixes verifier–verifier linking; issuer–verifier collusion needs BBS or zero-knowledge proofs.
3. The signature on a presented KYC credential is valid. What else must the verifier check?
Issuer on the trust list for this type and assurance level; key under assertionMethod or chaining to a trusted anchor; KB-JWT signed by the cnf key with the expected nonce and audience; validity period; status; business policy on the disclosed claims. Then its own sanctions screening and risk rating, and evidence storage.
4. Why must status lists be large with random indices, and how do you pick the cache TTL?
The verifier fetches the whole list, so the issuer only learns that some entry was checked, which hides the holder only if the list is large (at least 131,072 entries) and indices don't reveal issuance order. The TTL trades freshness against depending on the issuer's hosting: short for account opening, longer for age checks, lists on a CDN.
5. Scenario: a customer loses the phone holding your bank's KYC credential. Walk through the flow.
The non-exportable key is gone and should stay gone. The customer re-proves identity on the new phone (chip read and face match, or a branch visit); the bank revokes the old credentials and issues new ones bound to a new attested hardware key; verifiers see the revocation within their TTL. Rate-limit and monitor re-issuance, since it is also an account-takeover route.
6. Scenario: a partner proposes did:ethr for every issuer in a banking consortium. How do you assess it?
Who operates and governs the network, under which jurisdiction, and what if it forks or stops (Sovrin's shutdown notice and Microsoft dropping did:ion are precedents)? What do key updates cost, could personal data reach the chain, and does the regulator accept it as a trust anchor? Compare with did:web or X.509 plus a consortium trust list, and record the decision in an ADR.
Exercise
Design a reusable-KYC credential between Bank A (issuer) and Fintech B (verifier):
- Schema: list the SD-JWT VC claims, mark which are disclosable and which always visible (
iss,vct,exp,cnf,status), and justify each against data minimisation. - Trust and status: B's allowlist (issuer, keys, permitted
vct, assurance level), how it moves to a trust list or OpenID Federation when ten more banks join, list size, index allocation, TTL per risk tier, and behaviour when the status endpoint is down. - Failure modes: issuer key leak, DNS hijack, lost phone, replay, issuer outage, each with detection, impact and response.
- Code: extend the Go resolver with a TTL cache, ES256 keys, and
httptest.NewTLSServertests that reject anauthentication-only key, an untrusted DID, a redirect and an oversized document.
Done when: for any claim, you can say why it is needed, who vouches for it, how B knows that issuer may, and what happens on revocation; and go test -race passes for every rejection case.
Further reading
- W3C DID v1.0, DID v1.1 and DID Resolution — data model and resolution.
- W3C VC Data Model v2.0, VC-JOSE-COSE, VC Data Integrity 1.0, BBS Cryptosuites and Bitstring Status List.
- RFC 9901: Selective Disclosure for JSON Web Tokens — read the unlinkability section.
- SD-JWT VC draft and Token Status List draft (IETF OAuth WG).
- did:web method spec and DIF: did:webvh v1.0.
- OpenID Federation 1.0 and the EUDI Wallet ARF trust model.
- ISO/IEC 18013-5:2021 and ISO/IEC TS 18013-7:2025 (ISO) — mdoc and online presentation.
- Microsoft Entra Verified ID FAQ and the Sovrin MainNet shutdown notice — DID-method operator risk.
- Viet Nam Law Magazine on Decree 69/2024/ND-CP and KPMG Vietnam on Decree 320/2026/ND-CP.
Related
- OAuth 2.0, OAuth 2.1 & OpenID Connect — the federated model compared here.
- OpenID for Verifiable Credentials: OID4VCI & OID4VP — issuance and presentation protocols.
- Blockchain & Distributed Ledgers for Architects — when a ledger trust anchor makes sense.
- Security for Architects — JWT pitfalls, HSM/KMS, key management.
- TLS & HTTPS — X.509 chains behind did:web and EU trusted lists.
- DNS — did:web is only as safe as the issuer's DNS.
- Compliance: PCI DSS, KYC/AML, Data Protection — eKYC, evidence, Vietnamese regulations.
- Fraud & Risk Systems — step-up authentication and risk signals.
- Caching — TTLs for DID documents and status lists.
Do the self-check first. Marking it complete schedules spaced reviews (1, 3, 7, 14, 30… days).