Skip to main content
Version: 0.7

Credential formats

A credential format defines what a credential looks like, how the issuer signs it and how the holder presents it. Formats are separate from exchange protocols: you can sign, store, present and verify a credential with the agent APIs alone, and most formats work over more than one protocol. The pages in this section cover each format on its own. For the flows, see Protocols.

Compare the formats​

SD-JWT VCmdocW3C VCAnonCreds
StandardIETFISO/IEC 18013-5W3CHyperledger AnonCreds
Selective disclosurePer claimPer data elementOnly data model 2.0 secured as SD-JWTPer attribute, plus predicates such as "age at least 18"
Unlinkable presentationsWith batch issuanceWith batch issuanceWith batch issuanceYes
Holder bindingKey (cnf), as JWK or DIDDevice keyDID of the subject, or key (cnf) in data model 2.0Link secret
Issuer signs withDID or X.509 certificateX.509 certificateDIDKeys of a credential definition on a registry
Revocation in CredoToken Status ListToken Status ListNoneRevocation registry
Exchange in CredoOpenID4VC, Digital Credentials APIOpenID4VC, Digital Credentials API, ISO 18013-5 proximityOpenID4VC, DIDComm, depending on the variantDIDComm
Used inEUDI Wallet (PID and attestations)Mobile driving licence, EUDI Wallet (PID)Open Badges, EBSIAries and Indy based ecosystems

For SD-JWT VC, mdoc and W3C VCs, every presentation of a credential carries the same issuer signature, so verifiers that compare notes can link presentations of it. Batch issuance avoids that: the holder gets several copies, each bound to its own key, and presents each copy once. AnonCreds presentations are zero-knowledge proofs and don't need this.

For the protocol versions and the full matrix, see Supported standards.

Which one should I use?​

Follow your ecosystem first. Without a required format:

You're buildingUse
An issuer, wallet or verifier for the EUDI WalletSD-JWT VC and mdoc. The EUDI Wallet uses both, including for the PID.
A mobile driving licence, or in-person presentation over NFC or Bluetoothmdoc. It's the only format Credo presents with ISO 18013-5.
A new OpenID4VC deploymentSD-JWT VC. It has selective disclosure, plain JSON claims, and works with both DIDs and X.509 certificates.
Something for an ecosystem built on W3C VCs, such as EBSI or Open BadgesW3C VC. Choose a variant explains which one.
A DIDComm deployment that needs predicates, or unlinkable presentations without batch issuanceAnonCreds.

Choices for every format​

Holder binding​

Bind credentials to a key of the holder, so that a copy of a credential is useless to someone else. For SD-JWT VC and W3C data model 2.0, bind to a JWK by default: the holder needs no DID, and the key can stay in the secure hardware of a phone. Bind to a DID when holders and verifiers already use DIDs. mdocs are always bound to a device key, AnonCreds credentials to the link secret, and W3C data model 1.1 credentials to the DID in credentialSubject.id.

Key type​

For SD-JWT VC and mdoc, use P-256 keys (ES256) for both issuer and holder. HAIP requires every party to support ES256, and it's the curve that the secure hardware of phones supports. W3C JSON-LD and Data Integrity credentials need Ed25519 keys, because all signature suites that Credo has for them use Ed25519.

Revocation​

Use a status list or revocation registry only if you must be able to revoke credentials before they expire. Short-lived credentials that you reissue don't need one. See Status lists and AnonCreds revocation.

Agent APIs​

FormatAgent APIRecord
SD-JWT VCagent.sdJwtVcSdJwtVcRecord
mdocagent.mdocMdocRecord
W3C VC 1.1agent.w3cCredentialsW3cCredentialRecord
W3C VC 2.0agent.w3cV2CredentialsW3cV2CredentialRecord
AnonCredsagent.modules.anoncreds (the key you register it under)W3cCredentialRecord

All formats except AnonCreds are part of @credo-ts/core, and their modules are registered on every agent. AnonCreds needs @credo-ts/anoncreds and a registry such as a ledger.