Digital Credentials: Three Approaches, Different Trade-offs
Table of contents

If you’ve looked at digital identity wallets recently - a mobile driving licence, the EU Digital Identity Wallet, a digital university diploma - you’ve probably stumbled over a confusing list of acronyms: mDoc, SD-JWT, JSON-LD, VC, OID4VCI, OID4VP and more.
This article walks through three major credential formats, how they differ, and how a credential gets from an issuer into a wallet and from there to a verifier.
Which of the three is the most widespread? I couldn’t find a comparable global market-share ranking, but all of them show up in real deployments: the EUDI reference issuer supports SD-JWT VC and mDoc, Google documents ISO-based mobile driving licence verification, and Open Badges applies W3C credentials to learning achievements. That’s enough to make all three worth knowing.
I’m deliberately keeping this high-level. Think of it as the map, not the terrain. Standards status is a snapshot from mid-November 2026 and may change, and the fit assessments are my own architectural interpretation rather than a conformance guide.
The common idea
All three formats serve the same model, often called the trust triangle (or sometimes the “trust circle” 🙂):
- The issuer (a government, a bank, a university, an employer) creates a credential and signs it.
- The holder keeps the credential in a wallet on their phone.
- The verifier (a bar, an airline, a web shop) asks the holder to prove something and checks the issuer’s signature.
%%{init: {"themeVariables": {"fontSize": "20px"}, "flowchart": {"nodeSpacing": 60, "rankSpacing": 80, "padding": 20}}}%%
flowchart TD
Issuer["Issuer"] -->|"1. Issues signed credential"| Wallet["Holder's wallet"]
Wallet -->|"2. Presents (parts of) the credential"| Verifier["Verifier"]
Verifier -.->|"3. Checks issuer signature and status"| Issuer
The verifier trusts the issuer’s signature, not the holder. That’s the whole point: the credential can be checked without the issuer being involved in every interaction.
Three properties show up in every format, so it helps to know them up front:
- Selective disclosure - the holder can share only the attributes that are needed. “Over 18: yes” instead of the full date of birth and address.
- Holder binding - the credential is tied to a key in the holder’s device, so a copied credential is useless to someone else.
- Status - issuers can revoke or suspend a credential, and verifiers can check that without calling the issuer for each presentation.
Where the formats differ is how they achieve this and which ecosystem they grew up in.
Formats are only one layer
Credential discussions get confusing when a data model, a signature mechanism and an exchange protocol are treated as competing products. They sit on different layers:
| Layer | What it answers | Examples |
|---|---|---|
| Business meaning | What is being asserted? | Identity, qualification, membership, age eligibility |
| Data model and encoding | How are the claims represented? | W3C VC model, SD-JWT VC claims, mdoc namespaces; JSON or CBOR |
| Cryptographic protection | How are origin, integrity and disclosure checked? | JWS, COSE, Data Integrity cryptosuites |
| Exchange | How is a credential issued or presented? | OID4VCI, OID4VP, ISO proximity protocols |
| Trust and lifecycle | Why accept the issuer, and is the credential still acceptable? | Trust frameworks, status information, expiry, reissuance |
OID4VCI and OID4VP are therefore not a fourth credential format. And two products that both speak OID4VP still might not agree on credential types, algorithms or trust rules. This matters in procurement: “supports verifiable credentials” is an opening statement, not an interoperability requirement.
The three formats aren’t perfectly symmetrical either. W3C VC is a data model that can be secured in several ways; in this article I focus on the JSON-LD with Data Integrity combination. SD-JWT VC is a separate specification, not the W3C data model in a different coat.
About the examples: The structures below are deliberately simplified. Keys, hashes, signatures and timestamps are omitted or replaced with placeholders.
Format 1: mDoc (ISO mdoc)
Background
mDoc is the format defined by ISO/IEC 18013-5 for the mobile driving licence (mDL). It was designed with one demanding scenario in mind: a police officer or a bar attendant checking your licence in person, possibly with no internet connection at all. Because of that, it’s compact, binary, and built for NFC, Bluetooth and QR code exchanges.
The same format is used by wallets from Apple and Google for their ID features, and it’s one of the two formats supported in the EU Digital Identity Wallet framework. Despite the name, mDoc isn’t limited to driving licences - the mDL is just its best-known application.
Structure
Rather than JSON, mDoc uses CBOR (a compact binary relative of JSON) and COSE for signatures. Conceptually, an mDoc looks like this:
Document (docType: "org.iso.18013.5.1.mDL")
├── Namespace "org.iso.18013.5.1"
│ ├── family_name: "Smith" (each item has its own random salt)
│ ├── birth_date: "1990-04-12"
│ ├── age_over_18: true
│ └── portrait: <image bytes>
└── Mobile Security Object (MSO) - signed by the issuer
├── a digest (fingerprint) for every item above
├── the holder's device public key
└── validity period
The key trick is the Mobile Security Object. The issuer doesn’t sign the attributes directly; it signs a list of fingerprints of the attributes. That lets the wallet hand over individual attributes later, and the verifier can still check each of them against the signed list.
It also means two separate checks happen at presentation time: is the data authentic (issuer signature over the MSO), and is the device in front of me really the one the credential was issued to (device authentication)? Keep those two apart in your head; they come up again later.
Issuance
The wallet creates (or reuses) a key pair on the device, the issuer authenticates the user, and the issuer returns the signed document. Today, this is typically done with the OpenID for Verifiable Credential Issuance (OID4VCI) protocol, which supports the mDoc format.
- The issuer offers a credential, usually via a QR code or link.
- The user signs in with the issuer and agrees to the issuance.
- The wallet proves it controls a device key.
- The issuer builds the document, signs the MSO and returns it to the wallet.
Presentation
mDoc supports two very different situations:
- In person (proximity): The verifier shows a QR code or taps the phone via NFC to start. Both devices set up an encrypted channel (usually over Bluetooth). The verifier asks for specific attributes, the user approves, and the wallet returns only those attributes plus the signed MSO and a proof from the device key that it’s really the holder’s phone.
- Online: The same request/response model is used, either through OpenID for Verifiable Presentations (OID4VP) or through browser/OS support such as the W3C Digital Credentials API, which lets a website ask the phone’s wallet for an mDoc. ISO/IEC TS 18013-7 covers this internet presentation case.
So mDoc is not an offline-only format. Choosing it doesn’t mean maintaining a separate identity concept for your web interactions.
Where it shines
- In-person checks, including offline verification
- Government-issued identity documents (driving licence, national ID)
- Strong integration with phone hardware (secure element, NFC, Bluetooth)
Things to watch
- Binary toolchain. CBOR and COSE parsing, byte-string wrappers and tags are a different world from a typical REST backend. I wouldn’t choose mDoc just because “CBOR is smaller” - payload size depends on the actual data, certificates and proofs. The real value is the complete interaction model and the reader ecosystem.
- Trust infrastructure. Verification typically relies on X.509 issuer certificates (IACA roots) that readers have to obtain and keep current, rather than simple HTTPS lookups.
- Freshness when offline. A reader can have enough cached material to authenticate a document while lacking the latest status information. Decide how old trust material may be, when a reader must refresh it, and which transactions should fail when freshness can’t be established.
- Signed values don’t change. An
age_over_18: falsestaysfalseafter the holder’s 18th birthday until the issuer issues a new credential, so plan for short validity periods or reissuance. The same applies to SD-JWT VC. - Proximity is its own operational surface. Readers, device engagement, permissions and flaky radio connections at a physical checkpoint all need to be part of your testing and support planning.
- “ISO-compliant” isn’t a statement about wallet security. ISO/IEC 18013-5 explicitly leaves the storage of document data and private keys out of scope.
Format 2: SD-JWT (and SD-JWT VC)
Background
If you’ve worked with web APIs or OAuth, you know JWTs (JSON Web Tokens): a signed JSON payload. The weakness of a plain JWT is that it’s all-or-nothing - the verifier sees everything that was signed.
SD-JWT (Selective Disclosure for JWTs) fixes exactly that. It’s standardised as RFC 9901. On top of it, SD-JWT VC defines how to use SD-JWT as a verifiable credential, e.g. how to name the credential type. At the time of writing SD-JWT VC is still an IETF draft (revision 26 when I last checked), but it’s already widely implemented. In a real project, pin an agreed profile and version rather than assuming everyone means the same thing by “SD-JWT support”.
Structure
An SD-JWT is the issuer-signed JWT plus a set of disclosures, glued together with ~. Each disclosure reveals one attribute and is only visible to whoever the holder gives it to.
Conceptually:
Issuer-signed JWT <-- signed JSON, contains:
issuer, credential type (vct), expiry,
holder public key,
hidden attributes shown only as fingerprints (hashes)
~ Disclosure: family_name = "Smith" <-- optional, holder decides
~ Disclosure: birth_date = "1990-04-12"
~ Disclosure: address = {...}
~ Key binding JWT <-- added at presentation time
Decoded, the signed payload looks like ordinary JWT claims plus a few extra fields:
{
"iss": "https://issuer.example",
"vct": "https://issuer.example/credentials/age",
"_sd_alg": "sha-256",
"_sd": ["<age-disclosure-digest>", "<name-disclosure-digest>"],
"cnf": { "jwk": { "kty": "EC", "crv": "P-256", "x": "...", "y": "..." } }
}
vct identifies the credential type, _sd holds the fingerprints of the hidden attributes, and cnf carries the holder’s public key for key binding. A single disclosure, before encoding, is just a small array:
["<random-salt>", "age_over_18", true]
The signed part only contains the fingerprints of the attributes. Without the matching disclosure, a verifier can’t read the value or guess it, because each disclosure includes a random salt.
If you know JSON and JWTs, this is the most approachable of the three formats - you can even decode the parts with standard tooling.
Issuance
Like mDoc, SD-JWT VC is usually issued with OID4VCI:
- The issuer sends a credential offer (QR code or link).
- The user authenticates and consents, typically using OAuth-style flows.
- The wallet requests the credential and proves possession of its key.
- The issuer returns the SD-JWT with all disclosures. The wallet stores everything.
Presentation
Presentation uses OID4VP, which works well for online scenarios (a website or app requests a credential from the wallet):
- The verifier sends a request describing the credential and attributes it needs.
- The wallet shows what is being requested and asks the user for consent.
- The wallet removes all disclosures that weren’t requested and adds a key binding JWT - a small signed proof, created with the holder’s device key, tied to this specific verifier and request.
- The verifier checks the issuer’s signature, the disclosures against the fingerprints, and the key binding.
Where it shines
- Online, web and app-based flows
- Teams that already know JWT, OAuth and OpenID Connect
- Employee, customer and membership credentials, as well as government credentials (SD-JWT VC is the second format in the EU wallet framework)
A useful design exercise here is to ask for the smallest claim that satisfies the business need. An age check should consume an eligibility assertion, not collect a birth date and keep it forever.
Things to watch
- An ordinary JWT validator is not an SD-JWT verifier. Familiar tooling helps, but you still need disclosure processing, digest checks and key binding. Nested disclosures (array elements, objects, multi-level redaction) need a proper recursive resolver.
- Selective disclosure isn’t unlinkability. Repeated presentations contain the same issuer-signed JWT, so verifiers can recognise the credential. Make your tolerance for correlation an explicit requirement. If it’s low, look at how the ecosystem handles batch issuance of single-use credentials - and at the replenishment, storage and expiry work that comes with it.
- No proofs over hidden values. SD-JWT can’t prove “age >= 21” from a hidden birth date. If you want to disclose a threshold, the issuer has to issue that claim.
- Key binding is a requirement, not a field in the example. Decide which presentations need proof of key possession, how the key is protected, and what recovery means. A copied credential plus its disclosures must not be enough where you expect strong holder binding.
- Digest overhead. A very high attribute count means linearly growing digest arrays and disclosure strings.
Format 3: JSON-LD
Background
The W3C Verifiable Credentials Data Model is the oldest of the three and has the broadest vision. Version 2.0 became a W3C Recommendation in May 2025. The data model itself is neutral about the format, but the best-known way to express it is JSON-LD, where “LD” stands for Linked Data.
JSON-LD adds a @context to ordinary JSON. The context links your field names to shared, published definitions, so that “name” or “degree” means the same thing to every party in the ecosystem. That makes JSON-LD credentials great at meaning and extensibility, and it’s why the format is popular for open ecosystems and for credentials that need rich, interoperable semantics.
Note the division of labour: the data model describes claims, issuers and subjects, JSON-LD gives the terms their meaning, and Data Integrity adds cryptographic protection through a chosen cryptosuite. These are separate responsibilities.
Structure
A JSON-LD credential reads like a human-friendly document:
{
"@context": ["https://www.w3.org/ns/credentials/v2"],
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "https://university.example",
"validFrom": "2026-06-01T00:00:00Z",
"credentialSubject": {
"id": "did:example:holder123",
"degree": { "type": "BachelorDegree", "name": "Computer Science" }
},
"credentialStatus": { "type": "BitstringStatusListEntry", "...": "..." },
"proof": { "type": "DataIntegrityProof", "...": "..." }
}
The signature can be applied in different ways (“securing mechanisms”):
- Data Integrity proofs are embedded in the credential, as in the
prooffield above. Which capabilities you get depends on the cryptosuite (see below). - JOSE/COSE envelopes wrap the same data model in a JWT or a COSE structure. This is also how SD-JWT-based credentials can carry the W3C data model.
One caveat: a @context gives a custom vocabulary a namespace, but it doesn’t turn that vocabulary into a recognised standard. And the issuer’s proof alone doesn’t tell you who is presenting the credential - for that you need an agreed presentation and holder-binding design.
The cryptosuite changes the product
“JSON-LD supports selective disclosure” is too broad a statement. It depends entirely on the proof you pick:
| Proof choice | What you get | What it means |
|---|---|---|
Conventional EdDSA/ECDSA Data Integrity proof (e.g. eddsa-rdfc-2022) |
Integrity and issuer authentication | Fine when disclosing the whole document is acceptable |
ecdsa-sd-2023 |
Selective disclosure of statements | Needs derivation and verification support; don’t assume unlinkability |
bbs-2023 |
Selective disclosure with unlinkable derived proofs | Specialised cryptography; needs careful privacy and implementation review |
The ECDSA suites (as well as the EdDSA suites) are a W3C Recommendation. BBS, at the time of writing, is still a Candidate Recommendation Draft - treat the maturity levels separately.
BBS is particularly interesting when correlation resistance is central. But unlinkable proofs can’t hide a unique identifier you disclose anyway, and linkage can still creep in through metadata and surrounding system behaviour. Privacy has to be assessed across the whole presentation, not inferred from the name of the signature scheme.
Issuance
JSON-LD credentials can be issued through OID4VCI (it has a format identifier for them) or through the W3C VC API, a simple HTTP API originating from the W3C community.
- The holder (or their wallet) connects to the issuer and identifies themselves.
- The issuer builds the credential, adding the contexts and credential status information.
- The issuer signs it, usually with an embedded Data Integrity proof.
- The wallet stores it.
Presentation
The W3C model includes a dedicated wrapper: the Verifiable Presentation. It bundles one or more credentials and is signed by the holder, using a challenge from the verifier to prevent replay.
- The verifier requests credentials (via OID4VP or the VC API) and sends a challenge.
- The wallet selects the matching credentials, optionally derives a selectively disclosed version.
- The holder signs the presentation with their key.
- The verifier validates the holder’s proof, each credential’s proof, and the status.
Where it shines
- Open, multi-party ecosystems that need rich vocabularies (education, supply chain, trade, Open Badges 3.0)
- Scenarios that benefit from linked data and decentralised identifiers (DIDs)
- Cases where unlinkable presentations (BBS) matter
JSON-LD pays off most when the participants already have - or are willing to govern - shared vocabularies. It can’t settle a disagreement about what “qualified” means; it can only make the agreed meaning explicit and reusable.
Things to watch
- Context handling is a security surface. Verification must not turn into unrestricted retrieval of arbitrary remote documents. The W3C data model requires the base context to be treated as already retrieved and recommends equivalent integrity protection for others. I’d constrain the supported contexts, package known context documents, and have a deliberate update policy.
- Canonicalisation costs. RDF-based suites transform the data into a graph and normalise it before signing. That adds compute and complexity, which hurts on constrained devices. (Some EdDSA suites use JSON canonicalisation instead, so it isn’t a universal requirement.)
- Fragmentation. Verifiers often support only a subset of cryptosuites. A generic JSON parser or JSON-LD library doesn’t implement the whole verification pipeline for you.
- Governance moves, it doesn’t vanish. You invest less in individual API mappings and more in vocabulary and profile governance. Whether that’s a good trade depends on how many organisations and kinds of claim have to interoperate.
A narrowly profiled deployment is much easier to reason about than an open-ended promise to accept every JSON-LD credential.
How they compare
| mDoc | SD-JWT (VC) | JSON-LD (W3C VC) | |
|---|---|---|---|
| Encoding | CBOR (binary) | JSON, base64url text | JSON-LD (JSON + context) |
| Signature | COSE | JWS | Data Integrity proof, or JOSE/COSE envelope |
| Standards body | ISO/IEC | IETF | W3C |
| Selective disclosure | Yes, per attribute via signed digests | Yes, via salted hashes and disclosures | Depends on the securing mechanism (e.g. ECDSA-SD, BBS) |
| Unlinkable presentations | Not by itself* | Not by itself* | Possible with BBS |
| Proximity (NFC/BLE) | Designed for it | Not the primary focus | Not the primary focus |
| Online presentation | OID4VP, Digital Credentials API | OID4VP | OID4VP, VC API |
| Issuance | OID4VCI | OID4VCI | OID4VCI, VC API |
| Typical home | mDL, national ID, phone wallets | EU wallet, web and enterprise | Open ecosystems, education, DIDs |
| Main integration burden | Binary processing, device authentication, trust chains, transports | Disclosure processing, key binding, profile alignment | Context governance, proof-suite support, suite-specific processing |
* Because the issuer’s signature is the same every time, two verifiers could in theory correlate presentations of the same credential. A common mitigation is to issue several single-use copies of the credential and use a fresh one for each presentation.
These are starting points, not exclusive territories. A qualification can be an SD-JWT VC, and an mDoc can be presented online. The ecosystem you’re joining and its acceptance requirements often decide more than the abstract merits of a format.
Two decisions that matter more than the file extension
Whatever format you land on, these are the questions I’d want answered in an architecture review.
1. Which privacy property do you actually need?
“Privacy” bundles three different requirements: revealing fewer attributes, preventing correlation across presentations, and proving a condition without revealing the underlying value. They’re not interchangeable, and each leads to different technology choices.
I like to write them down as concrete acceptance scenarios: “The venue learns that the customer meets the age requirement.” “Two venues cannot recognise the same credential.” “The verifier can request a threshold that wasn’t pre-issued.”
2. Specify the whole interoperability profile
Format support is only one entry in a compatibility matrix. Write down the data-model version, credential type, proof algorithms, exchange protocol version, holder-binding requirements, trust sources and status mechanism. OID4VCI itself distinguishes credential formats and format profiles, which is a useful model for architecture documents: state exactly which combinations your product supports.
If your wallet handles several formats, share orchestration and user experience where that makes sense, but keep the format-specific verification and presentation logic explicit. A common display model is fine; converting signed content into it is not the same as producing an equivalent signed credential.
Which one should I choose?
In practice, the answer is rarely “pick one forever.” A few rules of thumb:
- Need in-person verification, offline use, or a government ID? Look at mDoc.
- Building web or app flows and your team lives in the JWT/OAuth world? SD-JWT VC is the most natural fit.
- Working in an open ecosystem, with rich semantics or unlinkability requirements? JSON-LD is worth the extra complexity. For strong resistance to correlation, evaluate BBS-based credentials or AnonCreds (a zero-knowledge-proof based system), including maturity, performance and recipient support.
- Building a wallet or verifier for the EU market? Plan for both mDoc and SD-JWT VC.
- Joining an existing ecosystem? Use its prescribed profile and test real interoperability with its issuers, wallets and verifiers.
Whatever you pick, I’d favour the smallest supported profile that meets your acceptance scenarios, and expand it when there’s a concrete interoperability need.
The reassuring bit is that the protocols around the formats - OID4VCI for issuance, OID4VP for presentation - are shared. OID4VCI and OID4VP are both published as 1.0 specifications, and they were designed to carry several credential formats. Choosing a format doesn’t lock you into a different wallet or verifier architecture, which makes it much easier to support more than one.
The decisive question is usually who will accept the credential, and what evidence do they require? A technically elegant credential that nobody in the target ecosystem can verify is still a difficult product to ship.
Summary
- mDoc is the compact, hardware-friendly format from the ISO world, built for in-person identity checks.
- SD-JWT (VC) brings selective disclosure to the JSON/JWT world and fits online and enterprise use cases well.
- JSON-LD is the semantic, extensible W3C approach, strongest in open ecosystems and where advanced privacy features such as unlinkability matter.
All three answer the same question: how can an issuer sign data once so that a holder can prove only what is necessary to a verifier? They just make different trade-offs. Understanding those trade-offs - and deciding on the privacy properties you need and a complete interoperability profile - is a good first step before diving into the specifications. The next time someone says “we need to support mDoc and SD-JWT,” you’ll know why.
“Security is a process, not a product.”
Leave a comment