Aries RFC 0882: DCQL Attachment format for requesting and presenting proofs¶
- Authors: Tarun Vadde (2060.io)
- Status: PROPOSED
- Since: 2026-10-28
- Status Note: Initial draft. See Implementations.
- Supersedes:
- Start Date: 2026-10-28
- Tags: feature, protocol, credentials
Summary¶
This RFC registers attachment formats for the Present Proof Protocol 2.0 (RFC 0454) that use the Digital Credentials Query Language (DCQL) from OpenID for Verifiable Presentations 1.0 (OpenID4VP). A verifier sends a DCQL query with a nonce and an audience. The prover answers with a vp_token object in the shape OpenID4VP 1.0 defines. The formats work over DIDComm v1 and DIDComm v2 and cover three credential formats:
- IETF SD-JWT VC (
dc+sd-jwt) - W3C Verifiable Credentials Data Model 2.0 secured with SD-JWT (
vc+sd-jwt), the format issued by RFC 0881 - ISO mdoc (
mso_mdoc)
For mso_mdoc this RFC defines a DIDComm specific Handover for the ISO 18013-5 SessionTranscript, the DIDComm counterpart of OpenID4VPHandover.
Motivation¶
- The present-proof v2 registry has request and presentation formats for Hyperledger Indy, DIF Presentation Exchange and AnonCreds only. There is no way to request or present an SD-JWT VC or an mdoc over DIDComm.
- RFC 0881 issues
vc+sd-jwtcredentials over issue-credential v2. Its Drawbacks section says a separate attachment format is needed to present them with RFC 0454. - Agents that hold
dc+sd-jwtormso_mdoccredentials issued with OpenID for Verifiable Credential Issuance have no DIDComm path to present them to verifiers they already have a connection with. - OpenID4VP 1.0 already defines a query language (DCQL), a response shape (
vp_token) and the binding rules fordc+sd-jwtandmso_mdoc. This RFC defines the identifier and binding rules forvc+sd-jwt. Reusing DCQL,vp_tokenand the OpenID4VP binding rules avoids a new Aries query language and lets one implementation serve both OpenID4VP and DIDComm. - DCQL names the credential format per query. One attachment format can therefore cover
dc+sd-jwt,vc+sd-jwtandmso_mdoc, including requests that mix them.
Tutorial¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals, as shown here.
The roles are the verifier and the prover of RFC 0454. The prover is the holder of the credentials.
Overview¶
- The verifier sends a
request-presentationwith one attachment in thedidcomm/[email protected]format. It holds a DCQL query, a freshnonceand anaudiencethat names the verifier. - The prover checks that the
audiencenames the party the DIDComm layer will deliver the presentation to, finds credentials that match the query and gets the user's consent, or applies its policy when it presents without a user. - The prover sends a
presentationwith one attachment in thedidcomm/[email protected]format. It holds avp_tokenwith one or more presentations. Presentations with holder binding are bound to thenonceand theaudience. - The verifier checks the presentations and answers with an
ack(whenwill_confirmistrue) or aproblem-report.
Holder binding ties a presentation to the key the credential is bound to: the cnf claim for dc+sd-jwt and vc+sd-jwt, and the device key in the MSO for mso_mdoc. It does not use the DIDComm connection keys or the prover's DID for the connection, which only show who sent the message (step 2 of Verifier processing rules). A credential received over OpenID4VCI and bound to a did:key, a did:jwk or a plain JWK can therefore be presented over a did:peer connection that has nothing to do with that key. Whether holder binding is required comes from require_cryptographic_holder_binding in the request, never from the presentation.
A single query can ask for credentials in different formats. For example, this query accepts either an SD-JWT VC or an mDL:
{
"credentials": [
{
"id": "pid",
"format": "dc+sd-jwt",
"meta": { "vct_values": ["https://credentials.example.com/identity_credential"] },
"claims": [{ "path": ["family_name"] }, { "path": ["given_name"] }]
},
{
"id": "mdl",
"format": "mso_mdoc",
"meta": { "doctype_value": "org.iso.18013.5.1.mDL" },
"claims": [
{ "path": ["org.iso.18013.5.1", "family_name"] },
{ "path": ["org.iso.18013.5.1", "given_name"] }
]
}
],
"credential_sets": [{ "options": [["pid"], ["mdl"]] }]
}
Complete examples of messages are provided in the reference section.
Reference¶
Attachment format identifiers¶
| Message | Format identifier | Content |
|---|---|---|
propose-presentation |
didcomm/[email protected] |
dcql_query only |
request-presentation |
didcomm/[email protected] |
dcql_query, nonce, audience |
presentation |
didcomm/[email protected] |
vp_token |
Proposals and requests share one identifier, as in RFC 0510 and RFC 0771. Read the message @type (or type in DIDComm v2) together with the format to know which one an attachment is.
All attachments of these formats are JSON objects and use the application/json mime type. Implementations MUST ignore unknown top-level properties of these attachments other than transaction_data, and unknown properties inside dcql_query as DCQL requires (OpenID4VP section 6, Digital Credentials Query Language (DCQL)).
RFC 0454 says multiple attachments in one message are alternatives for the same presentation. A message therefore carries at most one attachment in these formats, and that attachment holds the whole query or the whole vp_token.
propose-presentation attachment format¶
Format identifier: didcomm/[email protected]
A prover can propose what it is willing to present. The attachment is a JSON object with:
dcql_query- Required. A DCQL query as defined in OpenID4VP section 6, with the format rules in Credential formats.
nonce and audience MUST NOT be present in a proposal. A verifier that accepts a proposal sends a request-presentation with a query it is willing to verify (which can be the proposed one), a fresh nonce and its audience.
A propose-presentation with a formats entry for didcomm/[email protected] and no attachment tells the verifier that the prover supports this format, as described in RFC 0454.
A complete message is shown in the propose-presentation example.
request-presentation attachment format¶
Format identifier: didcomm/[email protected]
The attachment is a JSON object with:
dcql_query- Required. A DCQL query as defined in OpenID4VP section 6, with the format rules in Credential formats.nonce- Required. A string the verifier creates for this request. It MUST be fresh for everyrequest-presentation, MUST come from a cryptographically secure random source with at least 120 bits of entropy, and MUST only contain ASCII URL safe characters (letters, digits,-,.,_and~). A version 4 UUID made with such a source (RFC 9562 section 5.4, UUID Version 4, 122 random bits) meets this, and so does the base64url encoding of 16 or more random bytes. These are the rules of OpenID4VP section 5.2, Existing Parameters plus a minimum entropy. The verifier stores it with the protocol thread.audience- Required. The stringdidcomm:followed by a DID of the verifier, without a path, query or fragment. The verifier chooses which of its DIDs to name, for example its public DID, within the rules of Audience.
{
"dcql_query": {
"credentials": [
{
"id": "pid",
"format": "dc+sd-jwt",
"meta": { "vct_values": ["https://credentials.example.com/identity_credential"] },
"claims": [{ "path": ["given_name"] }, { "path": ["family_name"] }]
}
]
},
"nonce": "rRgk_0pAsc6WId7Z-xqdq4GFBe6Mz8yWnilxR52-eAs",
"audience": "didcomm:did:example:verifier"
}
When a verifier sends more than one request-presentation in a thread (for example after a counter proposal), each one gets a new nonce. Only the last request the verifier sent in the thread is valid.
These formats use only the parts of OpenID4VP 1.0 that this RFC references. Other OpenID4VP parameters and ../../features are not supported. The exception is transaction_data, which a Wallet that does not support it must reject instead of ignore. A prover MUST reject a request whose attachment has a transaction_data property (OpenID4VP section 5, Authorization Request, section 8.4, Transaction Data).
Audience¶
The audience plays the role of the OpenID4VP Client Identifier. The prover copies it unchanged into every presentation that has holder binding: the aud of a KB-JWT, the aud of a vp+sd-jwt and the first element of the DIDComm Handover info. The verifier compares it as an exact string with the value it sent.
The didcomm: prefix keeps these presentations apart from presentations to the same DID in protocols that use the bare DID as the audience, such as OpenID4VP drafts before 1.0 with the did Client Identifier Scheme, or an OpenID4VP 1.0 pre-registered client whose Client Identifier is the DID (OpenID4VP section 5.9.2, Fallback). OpenID4VP 1.0 itself writes a DID Client Identifier with the decentralized_identifier: prefix (OpenID4VP section 5.9.3, Defined Client Identifier Prefixes). OpenID4VP uses origin: the same way for the Digital Credentials API (OpenID4VP Appendix A.4, Response). OpenID4VP lets a wallet treat a Client Identifier with an unknown prefix as a pre-registered client (OpenID4VP section 5.9.2, Fallback). A wallet that also implements OpenID4VP MUST therefore reject an OpenID4VP request whose Client Identifier starts with didcomm:, including as a pre-registered client.
The value only protects against replay to another verifier if the prover checks it. Before it creates any presentation, the prover MUST check that the DID in audience identifies the party that will receive the presentation. The check uses the DIDComm layer (what it will encrypt to, or the invitation DID the connection was verified against), never the attachment alone.
Over DIDComm v1, messages have no from, so the check uses the recipientKeys of the service the prover sends the presentation to. With a connection, that is the verifier's DIDComm service for the connection. Without a connection, it is the service in the ~service decorator of the request when it has one, and otherwise the service in the services of the out-of-band invitation that carried the request (for a DID in services, the DIDComm service in that DID's document). When a request in an out-of-band invitation also has a ~service decorator, the prover checks the audience against both. Recipient key rule: the DID MUST resolve to a DID document that has every one of these recipient keys. Each of them MUST be referenced from the keyAgreement or authentication relationship of the DID document or listed in recipientKeys of a DIDComm service in it. The X25519 key converted from an Ed25519 recipient key does not count as that recipient key. Routing keys are not part of this check. The verifier's DID for the connection meets this rule, and so does a did:key of the recipient key when the service has only one. The verifier MAY also name any other DID it controls whose DID document meets this rule, such as its public DID.
Invitation DID rule: over a connection where the verifier was the inviter, the prover MAY also accept as audience the DID of the invitation that the connection was made from, when one of these holds:
- The connection was made with DID Exchange (RFC 0023) and the
did_rotate~attachordid_doc~attachof theresponseis signed with a key of the invitation DID, or with the Connection Protocol (RFC 0160) and theconnection~sigof theresponseis signed with such a key. The key MUST be one the prover encrypted itsrequestto. The DID that is signed (thedid_rotate~attachvalue, theidof the DID document indid_doc~attach, or the DID in the signedconnection) MUST be the verifier's DID for the connection. The prover MUST have verified that signature itself when it accepted the connection. Both attachments are optional and the requester validates them only when they are present, so aresponsewith neither of them signed does not meet this rule. - The verifier's DID for the connection is the invitation DID.
The invitation DID MUST be a resolvable DID: the DID in the services entry of the out-of-band invitation that the prover sent its request to, the did of an RFC 0160 invitation, or the public DID of an implicit invitation. Another DID listed in the invitation does not count. An invitation whose services are only inline service blocks with keys has no invitation DID for this rule. When the verifier was the invitee there is no such link, and only the recipient key rule above applies. A connection reused with the RFC 0434 reuse messages keeps the invitation DID it was made from, and so does a connection after a later DID rotation such as RFC 0794. This adds no new trust assumption. When it accepted the connection, the prover already tied the invitation DID to it with that signature, or the two DIDs are the same.
A request that arrives over a connection is checked against that connection, also when its thread matches a request the prover saw in an out-of-band invitation. A verifier that wants the presentation over a connection sends the request-presentation after the connection exists, not in requests~attach of the invitation that sets it up, because it does not know its keys for that connection when it creates the invitation. A prover that answers an attached request over a connection made from or reused for the invitation checks the audience against that connection's keys as above.
When a DID method defines more than one form of the same DID, such as the short and long forms of did:peer:4, the prover treats them as the same DID in these checks. Over a connection that the DIDComm layer matched by the sender of the request, the DID the prover holds for the verifier on that connection passes these checks.
If the check fails, the prover MUST NOT send a presentation (see Prover processing rules). Over DIDComm v2, the check is the one in DIDComm v2.
presentation attachment format¶
Format identifier: didcomm/[email protected]
The attachment is a JSON object with:
vp_token- Required. An object as defined for thevp_tokenresponse parameter in OpenID4VP section 8.1, Response Parameters. Each key is theidof a Credential Query in the request. Each value is a non-empty array of presentations that match that query. The array MUST hold exactly one presentation unless the query hasmultipleset totrue. An optional query that the prover cannot match has no entry. For the three formats in this RFC every presentation is a string, and every SD-JWT in it, including one in adata:URL, uses the compact serialization of RFC 9901 section 4.
{
"vp_token": {
"pid": [
"eyJhbGciOiJFUzI1NiIsInR5cCI6ImRjK3NkLWp3dCIsImtpZCI6ImRpZDpleGFtcGxlOmlzc3VlciNrZXktMSJ9...(clipped)...~eyJhbGciOiJFUzI1NiIsInR5cCI6ImtiK2p3dCJ9...(clipped)"
]
}
}
Credential formats¶
DCQL Credential Queries in these attachments can use the Credential Format Identifiers below. Credential Queries with any other format are out of scope for this version. A prover treats them as queries it cannot satisfy. An option in credential_sets that names one of them is not met, but another option of the same set can be.
| Credential Format Identifier | Credential | Required meta |
Presentation |
|---|---|---|---|
dc+sd-jwt |
IETF SD-JWT VC | vct_values |
SD-JWT with a KB-JWT |
vc+sd-jwt |
W3C VCDM 2.0 secured with SD-JWT | type_values |
vp+sd-jwt signed by the holder |
mso_mdoc |
ISO mdoc | doctype_value |
DeviceResponse with a deviceSignature over DeviceAuthenticationBytes, whose SessionTranscript uses the DIDComm Handover |
The meta object is REQUIRED in every Credential Query (OpenID4VP section 6.1, Credential Query). Claims path pointers follow OpenID4VP section 7, Claims Path Pointer.
dc+sd-jwt¶
The credential is an IETF SD-JWT VC (SD-JWT VC draft -22). The identifier, meta and presentation rules are those of OpenID4VP Appendix B.3, IETF SD-JWT VC, with the audience of the request in place of the Client Identifier.
meta.vct_valuesis REQUIRED (OpenID4VP Appendix B.3.5, Parameter in the meta parameter in Credential Query). For matching, the prover and the verifier SHOULD treat a credential as being of a type if that type is itsvctor one of itsaka_vctsvalues (SD-JWT VC draft -22 section 2.2.2.2, Other Credential Types - aka_vcts Claim). A prover that processes Type Metadata MAY also return a credential whosevctextends a listed type (SD-JWT VC draft -22 section 5.4, Extending Type Metadata), but a verifier that does not process Type Metadata rejects it.- Claims path pointers start at the root of the SD-JWT VC payload.
- When holder binding is required (
require_cryptographic_holder_bindingis absent ortrue), the presentation is an SD-JWT with a Key Binding JWT (SD-JWT+KB). A credential without acnfclaim cannot be returned. The KB-JWT follows RFC 9901 section 4.3, Key Binding JWT: - header
typiskb+jwtandalgis a digital signature algorithm, nevernone nonceis thenonceof the requestaudis theaudienceof the requestiatis the time the KB-JWT was createdsd_hashis computed as in RFC 9901 section 4.3.1, Binding to an SD-JWT- it is signed with the holder key named by the credential's
cnfclaim (cnf.jwk, orcnf.kidas an absolute DID URL) (SD-JWT VC draft -22 section 2.4, Verification and Processing). Withcnf.kid, the verification method it dereferences to MUST be in theauthenticationrelationship of the resolved DID document (DID Core section 5.3.1, Authentication). - When
require_cryptographic_holder_bindingisfalse, the prover MAY return the SD-JWT without a KB-JWT. No nonce comes back in that case. The DIDComm thread links the response to the request, the job OpenID4VP gives tostate(OpenID4VP section 5.3, Requesting Presentations without Holder Binding Proofs). Such a presentation has no replay protection (OpenID4VP section 14.1.1, Presentations without Holder Binding Proofs). - The verifier gets the issuer key with a key discovery method its policy permits for that issuer (SD-JWT VC draft -22 section 2.5, Issuer Verification Key Discovery and Validation). Besides the two mechanisms defined there, a verifier MAY permit DID-based key discovery.
issis a DID and the headerkidMUST be a DID URL of that DID: either relative, such as#key-1, and resolved againstiss, or absolute with the same DID asiss. The key is the verification method that DID URL dereferences to, and it MUST be in theassertionMethodrelationship of the resolved DID document. A verifier that permits DID-based key discovery MUST use only that mechanism whenissis a DID, so that an attacker cannot change which mechanism is used, for example by adding anx5cheader (SD-JWT VC draft -22 section 7.3, Ecosystem-specific Public Key Verification Methods). Thedc+sd-jwtexamples in this RFC use DID-based key discovery.
vc+sd-jwt¶
OpenID4VP 1.0 defines no Credential Format Identifier for W3C Verifiable Credentials Data Model 2.0. Its W3C appendix covers VCDM 1.1 only (OpenID4VP Appendix B.1, W3C Verifiable Credentials). Appendix B lets other specifications define the parameters and rules for Credential Formats it does not mention, and this RFC does so for VCDM 2.0 secured with SD-JWT under the identifier vc+sd-jwt:
- The credential is a VCDM 2.0 credential secured with SD-JWT as in VC-JOSE-COSE section 3.2.1, Securing JSON-LD Verifiable Credentials with SD-JWT, with media type
application/vc+sd-jwt(VC-JOSE-COSE section 6.1.3, application/vc+sd-jwt). Its headertyp, when present, MUST bevc+sd-jwt. This is the credential RFC 0881 issues. - The top-level
@context,type,issuer,validFrom,validUntil,credentialStatus,credentialSchema,relatedResourceandcnfproperties, and any property inside them, MUST NOT be selectively disclosable. RFC 9901 section 9.7, Selectively Disclosable Validity Claims says an Issuer MUST NOT make content that is critical for the authenticity or validity of an SD-JWT selectively disclosable and leaves the list of that content to profiles. VC-JOSE-COSE section 3.2.1 names some of these properties, but only as a SHOULD NOT. Without this rule a holder could withholdvalidUntilorcredentialStatusand hide that the credential expired or was revoked. This is a rule for issuers. A verifier cannot tell which property a withheld top-level disclosure was for, so for that case it relies on trusting the issuer. meta.type_valuesis REQUIRED. It is a non-empty array of non-empty string arrays, as in OpenID4VP Appendix B.1.1, Parameters in the meta parameter in Credential Query. Its values are compared as exact strings with thetypevalues as they appear in the credential, with no JSON-LD processing. Atypethat is a single string counts as an array of one. Each inner array is one alternative. A credential matches an inner array when itstypeincludes every value in that array, in any order and with other types allowed. The credential matchestype_valueswhen it matches at least one inner array. This differs from Appendix B.1.1, which compares fully expanded type IRIs. OpenID4VP 1.0 has no rules for VCDM 2.0 credentials, and expanded matching would need the context documents of each credential, which VC-JOSE-COSE processing does not otherwise need. The sametypevalue can mean different things under different contexts, so a verifier that needs a type to have a set meaning also checks the credential@context, as in VCDM 2.0 section 6.3, Type-Specific Credential Processing.- OpenID4VP drafts up to -22 used
vc+sd-jwtas the identifier for IETF SD-JWT VC (renamed todc+sd-jwtin draft -23). A query written for those drafts has notype_values, so it is invalid here. - Claims path pointers start at the root of the credential, not the presentation (OpenID4VP Appendix B.1.2, Claims Matching). For example
["credentialSubject", "degree", "name"].
When holder binding is required (require_cryptographic_holder_binding is absent or true), the credential MUST have a cnf claim and the presentation is a compact vp+sd-jwt as in VC-JOSE-COSE section 3.2.2, Securing JSON-LD Verifiable Presentations with SD-JWT:
- Header
typMUST bevp+sd-jwt. This tightens the SHOULD in VC-JOSE-COSE section 3.2.2. When present,ctySHOULD bevp.algis a digital signature algorithm, nevernone. - The payload is a VCDM 2.0
VerifiablePresentation.verifiableCredentialholds exactly oneEnvelopedVerifiableCredential(VCDM 2.0, Enveloped Verifiable Credentials). Itsidisdata:application/vc+sd-jwt,followed by the credential SD-JWT with the disclosures the prover selected. That SD-JWT MUST NOT have a KB-JWT. - The payload MUST have
nonce(thenonceof the request) andaud(theaudienceof the request, as a single string, not an array) as plain JWT claims. The base context definesaudandiatbut definesnonceonly inside Data Integrity proofs, so unless another context in the payload@contextdefines it,https://www.w3.org/ns/credentials/undefined-terms/v2MUST be its last value (VCDM 2.0 section 5.2, Extensibility (Semantic Interoperability)).iatis RECOMMENDED.nbfis NOT RECOMMENDED (VC-JOSE-COSE section 3.1.3, JOSE Header Parameters and JWT Claims) and the claim namesvcandvpMUST NOT be used (VC-JOSE-COSE section 1.1.2.1, JWT Format and Requirements).nonce,audandiatMUST NOT be selectively disclosable. Thevp+sd-jwtSHOULD have no disclosures. - The
vp+sd-jwtMUST be signed with the holder key named by thecnfclaim of the enveloped credential (cnf.jwk, orcnf.kidas an absolute DID URL whose verification method MUST be in theauthenticationrelationship of the resolved DID document). Withcnf.kid, the headerkidMUST be present and MUST be the same string ascnf.kid(VC-JOSE-COSE section 4.1.1, kid). Withcnf.jwk, the verifier ignores anykidand usescnf.jwk. Ifholderis present and the credential usescnf.kid,holder(orholder.idwhenholderis an object) MUST be the DID of thecnf.kidDID URL.
The signature on the vp+sd-jwt is the proof of possession of the cnf key. A KB-JWT is not used for vc+sd-jwt. Holder binding uses only cnf, not credentialSubject.id.
When require_cryptographic_holder_binding is false, the presentation is the credential SD-JWT itself with the selected disclosures and no KB-JWT, following the rule in OpenID4VP Appendix B.1.
mso_mdoc¶
The credential is an ISO mdoc. The identifier, meta and claims rules are those of OpenID4VP Appendix B.2, Mobile Documents or mdocs (ISO/IEC 18013 and ISO/IEC 23220 series):
meta.doctype_valueis REQUIRED (OpenID4VP Appendix B.2.3, Parameter in the meta parameter in Credential Query).- A claims path pointer is exactly two strings, the namespace and the data element identifier (OpenID4VP section 7.2, Semantics for ISO mdoc-based credentials). A Claims Query MAY have
intent_to_retain(OpenID4VP Appendix B.2.4, Parameter in the Claims Query). - The presentation is the base64url encoded (without padding)
DeviceResponseCBOR structure (OpenID4VP Appendix B.2.5, Presentation Response). EachDeviceResponseMUST hold exactly one document, so that each presentation in thevp_tokenis one credential. ItsstatusMUST be 0. - The document has no device-signed data elements:
deviceSigned.nameSpacesMUST encode an empty map. - The document MUST use
deviceSignaturefor mdoc authentication.deviceMaccannot be used because its key is derived from a reader key (ISO/IEC 18013-5:2021 section 9.1.3.5, mdoc MAC Authentication), and no reader key is exchanged in this protocol.require_cryptographic_holder_bindinghas no effect onmso_mdoc. - The
deviceSignatureis computed overDeviceAuthenticationBytes(ISO/IEC 18013-5:2021 section 9.1.3.4, Mechanism, under 9.1.3 mdoc authentication), whoseSessionTranscriptis the one of section 9.1.5.1, Session transcript, with these values: DeviceEngagementBytesisnullEReaderKeyBytesisnullHandoveris theDIDCommHandoverdefined below
DIDComm Handover¶
The DIDComm Handover follows the shape of OpenID4VPHandover (OpenID4VP Appendix B.2.6.1, Invocation via Redirects):
DIDCommHandover = [
"DIDCommHandover",
DIDCommHandoverInfoHash
]
DIDCommHandoverInfoHash = bstr
DIDCommHandoverInfoBytes = bstr .cbor DIDCommHandoverInfo
DIDCommHandoverInfo = [
audience,
nonce
]
audience = tstr
nonce = tstr
- The first element of
DIDCommHandoverMUST be the stringDIDCommHandover. It tells this handover apart from every other handover type. DIDCommHandoverInfoHashMUST be the SHA-256 hash ofDIDCommHandoverInfoBytes, the CBOR encoding ofDIDCommHandoverInfo. The hash is over the plain CBOR array, without a tag 24 wrapper, the same as forOpenID4VPHandoverInfo.audienceMUST be theaudienceof the request, including thedidcomm:prefix.nonceMUST be thenonceof the request.DIDCommHandoverInfoandDIDCommHandoverMUST be encoded with the core deterministic encoding requirements of RFC 8949 section 4.2.1, Core Deterministic Encoding Requirements, so that the prover and the verifier compute the same bytes.
There is no counterpart of the jwkThumbprint and responseUri elements of OpenID4VPHandoverInfo. DIDComm encrypts every message to keys in the verifier's DID document and delivers it to the verifier's DIDComm service, and the Audience check ties the audience DID to those keys. The DIDComm thread id is not included either, since the nonce is already unique per request.
The structure of DIDCommHandoverInfo MUST NOT change without a new first element string. The verifier always builds the SessionTranscript itself from its own request and never takes it from the presentation.
Non-normative test vector, computed with two independent CBOR encoders. Inputs:
audience:didcomm:did:example:verifiernonce:MTnN_oAE76NqlCOOIEfyBh3u2uZQFItlTPnNmXXXkpQ
DIDCommHandoverInfo:
Hex:
82781c646964636f6d6d3a6469643a6578616d706c653a7665726966696572782b4d54
6e4e5f6f414537364e716c434f4f494566794268337532755a514649746c54506e4e6d
5858586b7051
CBOR diagnostic:
["didcomm:did:example:verifier", "MTnN_oAE76NqlCOOIEfyBh3u2uZQFItlTPnNmXXXkpQ"]
DIDCommHandoverInfoHash:
DIDCommHandover:
Hex:
826f444944436f6d6d48616e646f76657258209781703613531ed5d4a91b1d7ec9aecd
46e783f0364f6c3345f60644b1cf413b
CBOR diagnostic:
["DIDCommHandover", h'9781703613531ed5d4a91b1d7ec9aecd46e783f0364f6c3345f60644b1cf413b']
SessionTranscript:
Hex:
83f6f6826f444944436f6d6d48616e646f76657258209781703613531ed5d4a91b1d7e
c9aecd46e783f0364f6c3345f60644b1cf413b
CBOR diagnostic:
[null, null, ["DIDCommHandover", h'9781703613531ed5d4a91b1d7ec9aecd46e783f0364f6c3345f60644b1cf413b']]
Credential status¶
If a credential carries status information, the verifier MUST check it as its credential format defines: the status claim of a dc+sd-jwt (SD-JWT VC draft -22 section 2.4, Token Status List draft -21 section 8.3, Validation Rules), the credentialStatus of a vc+sd-jwt (VC-JOSE-COSE section 5.4, Validation) and the status in the MSO of an mso_mdoc when it has one. The verifier MUST discard a presentation whose credential is revoked (for a Token Status List, the status 0x01 INVALID). Other status values, such as 0x02 SUSPENDED, are left to verifier policy. If the verifier cannot determine the status, also when it does not support the status mechanism, it MUST discard the presentation. This is stricter than SD-JWT VC, which says status SHOULD be checked, and than VC-JOSE-COSE, which ignores a credentialStatus type the verifier does not understand.
The verifier fetches a status list only after it has decided to trust the issuer (see Verifier processing rules), only from an https URI, and accepts it only when it is signed by a key the verifier trusts for that issuer. Token Status List leaves key resolution and trust to the verifier (section 11.3).
Prover processing rules¶
On a request-presentation with a didcomm/[email protected] attachment, the prover:
- Checks that the attachment has a
dcql_query, anonceand anaudiencein the forms defined above and notransaction_data, and that the DCQL query is valid (OpenID4VP section 6) with themetarules of Credential formats. The prover can check the characters of thenoncebut not its entropy. - Checks the
audienceas described in Audience. - Evaluates the query with the selection rules of OpenID4VP section 6.4, Selecting Claims and Credentials. A
trusted_authoritiesentry that the prover cannot evaluate for a credential, such as one with a type it does not know, does not match that credential. It MUST NOT disclose selectively disclosable claims that were not selected. If it cannot deliver every credential that is not optional, it MUST NOT return any credential. - Gets the consent of the user when there is one, showing which claims will be shared and who the verifier is (OpenID4VP section 15.1, User Consent). A prover that presents without a user, such as an organization or service agent, applies its policy for automated presentation instead. The
labelof an out-of-band invitation or of a connection (RFC 0023), thegoalof an out-of-band invitation (RFC 0434) and thecommentof the request are chosen by the sender. The prover SHOULD NOT show them as a verified identity of the verifier or use them to identify the verifier in its policy. Only what the prover has tied to theaudienceDID by means it trusts, such as the domain of adid:web, DID Configuration linked domains or a trust registry, can be shown or used as the verifier's verified identity. An invitation DID that the prover accepted asaudienceunder the invitation DID rule in Audience counts as tied to the connection, so a wallet can show, for example, the domain of adid:webinvitation DID. - Creates each presentation as defined for its format in Credential formats.
- Sends a
presentationin the same thread with exactly onedidcomm/[email protected]attachment. When the request came over a connection, the prover MUST authcrypt the presentation over that connection. Over DIDComm v2, see DIDComm v2.
If step 1, 2 or 3 fails, or the user or the prover's policy declines, the prover sends a problem-report and does not present. It MAY instead send a propose-presentation to negotiate. After a step 3 failure the prover SHOULD answer only after the user, when there is one, has seen the request, and a problem-report it sends then SHOULD be the same as the one it sends on a decline, with no hint of which check failed, so that the verifier cannot tell a failed match from a refusal (OpenID4VP section 15.1, User Consent, section 15.4.1, DCQL Value Matching).
Verifier processing rules¶
On a presentation with a didcomm/[email protected] attachment, the verifier:
- Finds the last
request-presentationit sent in the thread and uses itsdcql_query,nonceandaudience. A presentation that does not belong to that thread is rejected. The verifier accepts at most onepresentationpernonce. - Checks that the presentation was sent by the party the request was sent to:
- With a connection: the presentation MUST be authcrypted and its sender key MUST be the prover's key for that connection. An anoncrypted message never belongs to a connection.
- A connectionless request has no expected sender (see Security considerations).
- DIDComm v2 when the request had a
to: see DIDComm v2. - Checks the
vp_tokenshape against OpenID4VP section 8.1. Every key is theidof a Credential Query in the request, and every array holds exactly one presentation unless that query hasmultipleset totrue. - Selects the verification rules for each presentation from the
formatof the Credential Query whoseidis itsvp_tokenkey, never from the presentation itself, and discards a presentation that is not of that format. - Decides with its own policy whether it trusts each issuer for the type of its credential. For that decision it MAY resolve the issuer DID and, for
dc+sd-jwt, MAY retrieve the Type Metadata named byvctand the types itextends(SD-JWT VC draft -22 section 5.3, Retrieving Type Metadata). It SHOULD retrieve Type Metadata only after it has verified the Issuer-signed JWT, which it can do for this ahead of step 6, so that thevctit follows is the one the issuer signed (section 2.4 of the same draft). These retrievals follow section 3, Retrieving Documents and Resources via HTTP and section 7.1, Server-Side Request Forgery of the same draft. The verifier retrieves nothing else a credential names, such as issuer metadata or a status list, before it trusts the issuer. A presentation from an issuer it does not trust is discarded.trusted_authoritiesin the query is only a hint to the prover (OpenID4VP section 6.1). Thetrusted_authoritiestypes of OpenID4VP 1.0 do not identify DID issuers, so a verifier that wants credentials from given DID issuers can match the issuer DID iniss,issuerorissuer.idwithvaluesin a Claims Query instead (OpenID4VP section 6.1.1, Trusted Authorities Query). - Verifies each remaining presentation as described in Verifying each format. A presentation that fails a check is discarded (OpenID4VP section 8.6, VP Token Validation). If any presentation that this step verifies carries a wrong
nonceoraudience, the whole response is rejected. This is thenoncerule of OpenID4VP section 14.1.2, Verifiable Presentations, limited to the presentations this step verifies and applied to theaudienceas well. A presentation that needs holder binding, or adc+sd-jwtpresentation that has a KB-JWT, carries a wrong value when its KB-JWT orvp+sd-jwtdoes not have a plainnonceandaudclaim equal to the request. Formso_mdocthe values are only in theSessionTranscript, so adeviceSignaturethat does not verify counts as a wrong value. - Checks, with the verified data only, that the remaining presentations satisfy the query: the format and
metaof each Credential Query, the requested claims and theirvalues,claim_setsandcredential_sets(OpenID4VP section 6.4). It MUST NOT rely on the prover having applied the query (OpenID4VP section 14.9, Security Checks on the Returned Credentials and Presentations).
If steps 1 to 3 pass, no presentation that step 6 verifies carries a wrong nonce or audience, and the presentations left after steps 4 to 6 satisfy the query in step 7, the verifier moves to done and sends an ack when will_confirm was true. Otherwise it sends a problem-report (RFC 0035) and the protocol is abandoned, as in RFC 0454.
Verifying each format¶
dc+sd-jwt:
- Verify the SD-JWT as in RFC 9901 section 7.1, Verification of the SD-JWT and SD-JWT VC draft -22 section 2.4. Check that the header
typisdc+sd-jwt. The issuer key comes from a key discovery method the verifier's policy permits: one of the mechanisms in section 2.5 of the same draft, or the DID-based key discovery in Credential formats. - Check that
vct, or one of theaka_vctsvalues when the verifier applies theaka_vctsrule in Credential formats, is inmeta.vct_values. A verifier that processes Type Metadata MAY also accept avctthat extends a listed type (SD-JWT VC draft -22 section 5.4, Extending Type Metadata). Whichever way the type matched (vct,aka_vctsorextends), the verifier's policy MUST trust the issuer for that type, not only the issuer in general (section 7.7, Credential Type Extension and Issuer Authorization of the same draft). - Unless the query set
require_cryptographic_holder_bindingtofalse, require a KB-JWT and verify it as in RFC 9901 section 7.3, Verification by the Verifier with the key fromcnf(forcnf.kid, a verification method in theauthenticationrelationship of the resolved DID document):nonceequals the requestnonce,audequals the requestaudience,iatis within the window the verifier accepts, andsd_hashmatches. Whether binding is required comes from the request, never from whether a KB-JWT is present. When it is not required and the presentation has a KB-JWT, verify the KB-JWT the same way, as OpenID4VP section 14.1.2 requires for every presentation with a holder binding proof. - Check the status as in Credential status.
vc+sd-jwt:
- Whether holder binding is required comes from
require_cryptographic_holder_bindingin the request, never from thetypof the presentation. Otherwise anyone who received avp+sd-jwtcould take the credential out of it and present it bare. - When it is absent or
true, the presentation MUST be avp+sd-jwtand a bare credential SD-JWT MUST be rejected. Check that the headertypisvp+sd-jwt, take the oneEnvelopedVerifiableCredentialand read the credential SD-JWT from itsdata:URL. Verify that SD-JWT as in VC-JOSE-COSE section 5.2, Verifying a Credential or Presentation Secured with SD-JWT, with the issuer key found as in section 4, Key Discovery of the same specification. When that key is a verification method of theissuerDID, it MUST be in theassertionMethodrelationship of the resolved DID document. The credential SD-JWT's headertyp, when present, MUST bevc+sd-jwt, and it MUST NOT have a KB-JWT. Then verify thevp+sd-jwtsignature with the key from the credential'scnf(forcnf.kid, a verification method in theauthenticationrelationship of the resolved DID document, named by a headerkidthat is the same string ascnf.kid), and check thatnonceequals the requestnonce,audis a string equal to the requestaudienceandiat, when present, is within the window the verifier accepts. If the payload has aholderand the credential usescnf.kid, check thatholder(orholder.id) is the DID of thecnf.kidDID URL. - When it is
false, the presentation is the credential SD-JWT. Verify it the same way. Avp+sd-jwtMUST be rejected (OpenID4VP Appendix B.1). - Reject the presentation if it has a disclosure for a top-level property that MUST NOT be selectively disclosable, or if such a property holds an
_sdor...digest at any depth (see Credential formats). - Check the credential
typeagainstmeta.type_valueswith the exact string matching in Credential formats. - Reject the credential if the current time is before its
validFromor after itsvalidUntil(VCDM 2.0 section 4.9, Validity Period). - Check
credentialStatusas in Credential status.
mso_mdoc:
- Decode the base64url
DeviceResponse. Check that itsstatusis 0 and that it holds exactly one document whosedocTypeequalsmeta.doctype_value. - Verify the issuer data as in ISO/IEC 18013-5:2021 section 9.3.1, Inspection procedure for issuer data authentication: the issuer certificate chain under the verifier's policy, the issuer signature over the MSO, the digests of the disclosed data elements, that the
docTypein the MSO equals thedocTypeof the document, and the validity period. - Build the
SessionTranscriptwith the DIDComm Handover from the requestaudienceandnonce, and verifydeviceSignatureoverDeviceAuthenticationByteswith the device key in the MSO. RejectdeviceMac. - Only issuer-signed data elements count when checking Claims Queries. Device-signed data elements MUST be ignored.
DIDComm v2¶
Present-proof 2.0 messages with these formats can also be sent over DIDComm v2.1. The attachment content and the format identifiers do not change. These rules replace the DIDComm v1 parts (recipientKeys, ~service, connections) of Audience, Prover processing rules and Verifier processing rules:
- Audience: the prover sends the
presentationto the DID of thefromheader (its value without any path or query) of the message that carried the request, or to the DID the verifier has since rotated to (DID Rotation). That message is therequest-presentationitself, or the out-of-band invitation for a connectionless request (Message Headers, Invitation). The DID inaudienceMUST be thatfromDID, another DID of the verifier that meets the recipient key rule in Audience for thekeyAgreementkeys of the DID the prover sends thepresentationto, or another form of one of these defined by its DID method. Over a connection, thefromDID of the verifier's out-of-band invitation also counts when thefromof the request is that DID or a DID the verifier rotated to from it withfrom_prior. A verifier that used its public DID as thefromof its invitation can therefore name that DID. Theaudiencestays the value in the request. - Sender: a
request-presentationMUST have afromand atowith exactly one DID unless it is carried in an out-of-band invitation. The prover MUST reject a request that breaks this rule. When the request has ato, the prover MUST authcrypt thepresentationfrom that DID, or from a DID it rotated to withfrom_prior. In that case the verifier MUST check that thepresentationis authcrypted and that itsfrommatches the sender key (Message Layer Addressing Consistency). It MUST also check that the DID of thatfrom, without any path or query, is the DID in thetoof the request, another form of that DID defined by its DID method (such as the short and long forms ofdid:peer:4), or a DID that DID rotated to with a validfrom_prior. - Layout: this layout is used until a specification defines present-proof 2.0 over DIDComm v2. Each attachment that would be in
proposals~attach,request_presentations~attachorpresentations~attachgoes in the top-levelattachments(Attachments). It has anid, amedia_typeofapplication/json, the format identifier informat, and the samedataobject as in DIDComm v1, with the content indata.jsonordata.base64.bodyhas noformatsand none of these~attacharrays, except that apropose-presentationformatsentry with no attachment stays inbody.formats. Other fields such ascomment,goal_codeandwill_confirmstay inbody.
A request-presentation over DIDComm v2, as a plaintext message:
{
"id": "d13452a5-a831-4a53-be7e-e637e13edf9f",
"type": "https://didcomm.org/present-proof/2.0/request-presentation",
"from": "did:example:verifier",
"to": ["did:example:prover"],
"body": {
"comment": "Please share your name",
"will_confirm": true
},
"attachments": [
{
"id": "2407340e-0cd3-4e26-98b5-e12837077951",
"media_type": "application/json",
"format": "didcomm/[email protected]",
"data": {
"json": {
"dcql_query": {
"credentials": [
{
"id": "pid",
"format": "dc+sd-jwt",
"meta": { "vct_values": ["https://credentials.example.com/identity_credential"] },
"claims": [{ "path": ["given_name"] }, { "path": ["family_name"] }]
}
]
},
"nonce": "Gn4uqRQaXKFeCOoWt1gSQ-pgzEEwfftyWDH1dCyg654",
"audience": "didcomm:did:example:verifier"
}
}
}
]
}
Present Proof 3.0 is a separate protocol with the same attachment layout. This RFC registers its formats for RFC 0454. The formats do not depend on present-proof 2.0. A later present-proof version can register the same identifiers and only has to restate the protocol rules: one attachment per message, the propose semantics, the state transitions and the DIDComm v2 layout.
Examples¶
The examples use DIDComm v1 messages, did:example DIDs and clipped tokens. Decoded contents are shown below each message.
propose-presentation example¶
A complete propose-presentation message. It has no nonce and no audience:
{
"@id": "7eb2ac27-727f-4be9-9105-f849127bc6e1",
"@type": "https://didcomm.org/present-proof/2.0/propose-presentation",
"comment": "I can share my name",
"formats": [
{
"attach_id": "7343e800-b245-485e-a93f-361148e9a633",
"format": "didcomm/[email protected]"
}
],
"proposals~attach": [
{
"@id": "7343e800-b245-485e-a93f-361148e9a633",
"mime-type": "application/json",
"data": {
"json": {
"dcql_query": {
"credentials": [
{
"id": "pid",
"format": "dc+sd-jwt",
"meta": { "vct_values": ["https://credentials.example.com/identity_credential"] },
"claims": [{ "path": ["given_name"] }, { "path": ["family_name"] }]
}
]
}
}
}
}
]
}
dc+sd-jwt example¶
A complete request-presentation message:
{
"@id": "a3ab6216-ed5a-4f31-9958-7a90609b70be",
"@type": "https://didcomm.org/present-proof/2.0/request-presentation",
"comment": "Please share your name and city",
"will_confirm": true,
"formats": [
{
"attach_id": "5b7bff9e-73a7-454d-9dfa-13bcf46f8827",
"format": "didcomm/[email protected]"
}
],
"request_presentations~attach": [
{
"@id": "5b7bff9e-73a7-454d-9dfa-13bcf46f8827",
"mime-type": "application/json",
"data": {
"json": {
"dcql_query": {
"credentials": [
{
"id": "pid",
"format": "dc+sd-jwt",
"meta": { "vct_values": ["https://credentials.example.com/identity_credential"] },
"claims": [
{ "path": ["given_name"] },
{ "path": ["family_name"] },
{ "path": ["address", "locality"] }
]
}
]
},
"nonce": "rRgk_0pAsc6WId7Z-xqdq4GFBe6Mz8yWnilxR52-eAs",
"audience": "didcomm:did:example:verifier"
}
}
}
]
}
A complete presentation message:
{
"@id": "55eaf2b0-a5e3-4eea-b521-c3d5ec3c2610",
"@type": "https://didcomm.org/present-proof/2.0/presentation",
"~thread": { "thid": "a3ab6216-ed5a-4f31-9958-7a90609b70be" },
"formats": [
{
"attach_id": "b29a8f59-3bb7-45b7-a985-973c10319aa7",
"format": "didcomm/[email protected]"
}
],
"presentations~attach": [
{
"@id": "b29a8f59-3bb7-45b7-a985-973c10319aa7",
"mime-type": "application/json",
"data": {
"json": {
"vp_token": {
"pid": [
"eyJhbGciOiJFUzI1NiIsInR5cCI6ImRjK3NkLWp3dCIsImtpZCI6ImRpZDpleGFtcGxlOmlzc3VlciNrZXktMSJ9...(clipped)~WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwiZ2l2ZW5fbmFtZSIsIkVyaWthIl0~WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwiZmFtaWx5X25hbWUiLCJNdXN0ZXJtYW5uIl0~WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwibG9jYWxpdHkiLCJCZXJsaW4iXQ~eyJhbGciOiJFUzI1NiIsInR5cCI6ImtiK2p3dCJ9...(clipped)"
]
}
}
}
}
]
}
The issuer-signed JWT payload:
{
"iss": "did:example:issuer",
"vct": "https://credentials.example.com/identity_credential",
"_sd": [
"0md4eSFDWig7Gad1CZiRy1I4gcG4fKOmzGNEmOdABiI",
"ZmgxyNRwqRHzYCllHNESq_NuKQJ7GvmDtXJA9OhKJbA"
],
"address": {
"_sd": ["YGz3c8c7IBtD8uofNuzW3FgUygjvTJEufJjsFhh-Q4U"]
},
"cnf": {
"jwk": {
"kty": "EC",
"crv": "P-256",
"x": "TCAER19Zvu3OHF4j4W4vfSVoHIP1ILilDls7vCeGemc",
"y": "ZxjiWWbZMQGHVWKVQ4hbSIirsVfuecCE6t4jT9F2HZQ"
}
},
"_sd_alg": "sha-256"
}
The disclosures in the presentation decode to:
["2GLC42sKQveCfGfryNRN9w", "given_name", "Erika"]
["eluV5Og3gSNII8EYnsxA_A", "family_name", "Mustermann"]
["6Ij7tM-a5iVPGboS5tmvVA", "locality", "Berlin"]
The KB-JWT header and payload:
{
"iat": 1793179800,
"aud": "didcomm:did:example:verifier",
"nonce": "rRgk_0pAsc6WId7Z-xqdq4GFBe6Mz8yWnilxR52-eAs",
"sd_hash": "x8Wh5moL37iiH7sjt6f3sOkGZU2MJDoBZmb3ZdXZwBo"
}
vc+sd-jwt example¶
The credential is a VCDM 2.0 credential issued with RFC 0881. The query matches the type value UniversityDegreeCredential as it appears in the credential.
A complete request-presentation message:
{
"@id": "d34561e8-f3da-403e-8fef-8857009cca5c",
"@type": "https://didcomm.org/present-proof/2.0/request-presentation",
"comment": "Please share your degree",
"formats": [
{
"attach_id": "a623bf54-6e28-4031-99cc-f13e0e1b0e7c",
"format": "didcomm/[email protected]"
}
],
"request_presentations~attach": [
{
"@id": "a623bf54-6e28-4031-99cc-f13e0e1b0e7c",
"mime-type": "application/json",
"data": {
"json": {
"dcql_query": {
"credentials": [
{
"id": "degree",
"format": "vc+sd-jwt",
"meta": {
"type_values": [["UniversityDegreeCredential"]]
},
"claims": [{ "path": ["credentialSubject", "degree", "name"] }]
}
]
},
"nonce": "GcdTZqx-xRhqZnTJ1pKjkL_n_aXc5SraXJOPZsaaft0",
"audience": "didcomm:did:example:verifier"
}
}
}
]
}
A complete presentation message:
{
"@id": "9dc55ab3-c971-4b50-97f0-c6220684a2b0",
"@type": "https://didcomm.org/present-proof/2.0/presentation",
"~thread": { "thid": "d34561e8-f3da-403e-8fef-8857009cca5c" },
"formats": [
{
"attach_id": "201ac237-5619-4d48-9142-bf1f8ef47ad5",
"format": "didcomm/[email protected]"
}
],
"presentations~attach": [
{
"@id": "201ac237-5619-4d48-9142-bf1f8ef47ad5",
"mime-type": "application/json",
"data": {
"json": {
"vp_token": {
"degree": [
"eyJhbGciOiJFUzI1NiIsInR5cCI6InZwK3NkLWp3dCIsImN0eSI6InZwIiwia2lkIjoiZGlkOmV4YW1wbGU6aG9sZGVyI2tleS0xIn0...(clipped)~"
]
}
}
}
}
]
}
The vp+sd-jwt header:
The vp+sd-jwt payload:
{
"@context": ["https://www.w3.org/ns/credentials/v2", "https://www.w3.org/ns/credentials/undefined-terms/v2"],
"type": ["VerifiablePresentation"],
"holder": "did:example:holder",
"verifiableCredential": [
{
"@context": "https://www.w3.org/ns/credentials/v2",
"type": "EnvelopedVerifiableCredential",
"id": "data:application/vc+sd-jwt,eyJhbGciOiJFUzI1NiIsInR5cCI6InZjK3NkLWp3dCIsImN0eSI6InZjIiwia2lkIjoiZGlkOmV4YW1wbGU6dW5pdmVyc2l0eSNrZXktMSJ9...(clipped)~WyJRZzhJeFVWT2I3dFZaUEtJYTdCYUF3IiwibmFtZSIsIkJhY2hlbG9yIG9mIFNjaWVuY2UgYW5kIEFydHMiXQ~"
}
],
"nonce": "GcdTZqx-xRhqZnTJ1pKjkL_n_aXc5SraXJOPZsaaft0",
"aud": "didcomm:did:example:verifier",
"iat": 1793179800
}
The enveloped credential's issuer-signed payload (with its _sd digests clipped) and the one disclosure:
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://example.org/contexts/degree/v1"
],
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:example:university",
"validFrom": "2026-01-01T00:00:00Z",
"credentialSubject": {
"id": "did:example:holder",
"degree": { "_sd": ["...(clipped)"] }
},
"cnf": { "kid": "did:example:holder#key-1" },
"_sd_alg": "sha-256"
}
mso_mdoc example¶
A complete request-presentation message:
{
"@id": "d2d986da-3fac-41e6-91cd-8d8e74b334d6",
"@type": "https://didcomm.org/present-proof/2.0/request-presentation",
"comment": "Please prove you are over 21",
"formats": [
{
"attach_id": "14f3c8cb-d381-43a8-9b82-e3e1d481c7b8",
"format": "didcomm/[email protected]"
}
],
"request_presentations~attach": [
{
"@id": "14f3c8cb-d381-43a8-9b82-e3e1d481c7b8",
"mime-type": "application/json",
"data": {
"json": {
"dcql_query": {
"credentials": [
{
"id": "mdl",
"format": "mso_mdoc",
"meta": { "doctype_value": "org.iso.18013.5.1.mDL" },
"claims": [
{ "path": ["org.iso.18013.5.1", "family_name"], "intent_to_retain": false },
{ "path": ["org.iso.18013.5.1", "age_over_21"], "intent_to_retain": false }
]
}
]
},
"nonce": "MTnN_oAE76NqlCOOIEfyBh3u2uZQFItlTPnNmXXXkpQ",
"audience": "didcomm:did:example:verifier"
}
}
}
]
}
A complete presentation message:
{
"@id": "b1d3a084-5465-4cdc-96cc-899db7ffccb9",
"@type": "https://didcomm.org/present-proof/2.0/presentation",
"~thread": { "thid": "d2d986da-3fac-41e6-91cd-8d8e74b334d6" },
"formats": [
{
"attach_id": "66b611ea-a0f8-44f6-9da4-45f458c2a25f",
"format": "didcomm/[email protected]"
}
],
"presentations~attach": [
{
"@id": "66b611ea-a0f8-44f6-9da4-45f458c2a25f",
"mime-type": "application/json",
"data": {
"json": {
"vp_token": {
"mdl": ["o2d2ZXJzaW9uYzEuMGlkb2N1bWVudHOBo2dkb2NUeXBl...(clipped)"]
}
}
}
}
]
}
The DeviceResponse in CBOR diagnostic notation (abbreviated):
{
"version": "1.0",
"documents": [
{
"docType": "org.iso.18013.5.1.mDL",
"issuerSigned": {
"nameSpaces": {
"org.iso.18013.5.1": [
24(<< {"digestID": 3, "random": h'...', "elementIdentifier": "family_name", "elementValue": "Mustermann"} >>),
24(<< {"digestID": 9, "random": h'...', "elementIdentifier": "age_over_21", "elementValue": true} >>)
]
},
"issuerAuth": [h'...', {...}, h'...', h'...']
},
"deviceSigned": {
"nameSpaces": 24(<< {} >>),
"deviceAuth": {
"deviceSignature": [h'a10126', {}, null, h'...']
}
}
}
],
"status": 0
}
The deviceSignature is computed over DeviceAuthenticationBytes built with the SessionTranscript from the DIDComm Handover test vector, since this example uses the same audience and nonce.
Specifications¶
This RFC uses these versions:
- OpenID for Verifiable Presentations 1.0, the latest errata version as section 1.2, Errata revisions asks other documents to reference. The as-approved text is at https://openid.net/specs/openid-4-verifiable-presentations-1_0-final.html.
- RFC 9901: Selective Disclosure for JSON Web Tokens
- SD-JWT-based Verifiable Digital Credentials (SD-JWT VC), draft -22
- Token Status List, draft -21
- Securing Verifiable Credentials using JOSE and COSE, W3C Recommendation (13 October 2026)
- Verifiable Credentials Data Model v2.0, W3C Recommendation
- Decentralized Identifiers (DIDs) v1.0, W3C Recommendation
- DIDComm Messaging v2.1
- ISO/IEC 18013-5:2021
- RFC 8949: Concise Binary Object Representation (CBOR)
OpenID4VP section 13.4, Pre-Final Specifications lists SD-JWT draft -22 and SD-JWT VC draft -09. Its reference list in section 16, Normative References cites SD-JWT VC draft -10. This RFC references the published RFC 9901 and SD-JWT VC draft -22 instead. aka_vcts was added in SD-JWT VC draft -18 and is not in the draft OpenID4VP pins.
The media types application/vc+sd-jwt and application/vp+sd-jwt are registered by the W3C (IANA Media Types). They are the names to use for vc+sd-jwt credentials and their presentations.
Security considerations¶
- The
nonceandaudiencebind each presentation that has holder binding to one request and one verifier. They only work if the verifier creates a freshnonceper request, checks both in every such presentation it verifies and accepts onepresentationmessage pernonce, and the prover checks theaudienceagainst the DIDComm channel as described in Audience. For a request sent over a connection, the prover's check stops a malicious verifier from forwarding another verifier's request and relaying the answer. - An out-of-band invitation or a request with a
~servicedecorator can be copied, also when the invitation only sets up the connection that the request is sent over later. Someone who starts a session at a verifier can put the QR code or link that verifier shows in front of another holder, who then presents to that verifier for the attacker's session. Theaudiencecheck does not stop this, because the holder really is presenting to that verifier. The presentation does not prove that the presenter is the user of the session that showed the QR code or link (OpenID4VP section 14.2, Session Fixation, RFC 10027, Best Current Practice for Security of Cross-Device Flows). - Presentations without holder binding can be replayed by anyone who has seen them (OpenID4VP section 14.1.1). Verifiers should only request them when that risk is acceptable. For a connectionless request the thread id is then the only link between such a presentation and the request, so the verifier MUST choose that thread id the same way as the
nonce: from a cryptographically secure random source with at least 120 bits of entropy (a version 4 UUID made with such a source meets this). This is lower than the 128 bits OpenID4VP section 5.3 requires forstate, so that the usual DIDComm message ids qualify. - DCQL constraints are applied by the prover, and
valuesonly as a best effort (OpenID4VP section 6.4.1, Selecting Claims). The verifier checks the verified data itself, as step 7 of Verifier processing rules requires. - The DIDComm Handover identifier keeps mdoc device signatures made for DIDComm from being accepted in OpenID4VP or proximity flows, and the other way around.
Privacy considerations¶
- The prover discloses only the selectively disclosable claims the query selected (OpenID4VP section 6.4) and presents only with the user's consent or under the prover's policy.
- Fetching a status list tells the status list host that some verifier is checking a credential from that list. A verifier SHOULD NOT keep
uriandidxto poll the status later without the holder knowing (Token Status List draft -21 section 12.3, Observability of Relying Parties).
Drawbacks¶
- Verifiers and provers need SD-JWT, SD-JWT VC, Token Status List and mdoc support. That is a large stack compared to the existing JSON-LD and AnonCreds formats.
- The DIDComm Handover is new. mdoc libraries often only decode the handover types they know. For example
@owf/mdocrejectsSessionTranscriptbytes with an unknown handover, both when signing and when verifying. Until libraries support it, provers and verifiers have to build theSessionTranscriptstructure themselves. vc+sd-jwthad a different meaning in OpenID4VP drafts up to -22, where it named IETF SD-JWT VC. Wallets and DCQL libraries that still support those drafts read it that way, and an agent that supports them next to this RFC sees both meanings. Implementations that still use the old meaning will not interoperate.- For
vc+sd-jwt,type_valuesholds thetypevalues as they appear in the credential, not the expanded IRIs that OpenID4VP Appendix B.1.1 uses for its W3C formats. An agent that uses one DCQL engine for OpenID4VP and for this RFC passes the credentialtypevalues unchanged forvc+sd-jwtand expanded types for the OpenID4VP formats. A verifier that sends expanded IRIs forvc+sd-jwtgets no match. - The prover's
audiencecheck needs data from the DIDComm layer (the sender DID, the keys it will encrypt to or the invitation DID of the connection) inside the attachment format handler. Deriving theaudienceinstead of sending it would need the same data. - The format depends on DCQL as defined in OpenID4VP 1.0. Later DCQL changes need a new version of these identifiers.
- There is no
transaction_datasupport. - DCQL picks the credential formats and can return several credentials in one
vp_token. Both are protocol-level concerns in RFC 0454, and here they sit inside one attachment. The RFC 0454formatsarray names only these identifiers, not the credential formats inside. Neither discover ../../features RFC has a feature type for attachment formats, so a verifier only learns that a prover supports these formats from apropose-presentation.
Rationale and alternatives¶
- RFC 0510 (DIF Presentation Exchange) requires presentations in JSON-LD syntax and lists only
ldp_vcandldp_vp. It defines nothing for SD-JWT key binding or mdoc device authentication. OpenID4VP 1.0 requests presentations with DCQL only and does not use Presentation Exchange. - One RFC per credential format was considered. DCQL already names the format per Credential Query, a query can mix formats, and RFC 0454 does not allow several attachments for different presentations. One pair of identifiers is simpler.
- Tunnelling OpenID4VP itself over DIDComm was considered. Like the Digital Credentials API binding in OpenID4VP Appendix A, it would need its own response mode and its own Client Identifier and audience rules, and the thread,
ackandproblem-reportof present-proof would be lost. - A new present-proof version built around DCQL was considered, with the query and
vp_tokenin the message body, protocol-level nonce and audience, and discovery through its protocol identifier. Present-proof 2.0 is what agents run today, RFC 0881 uses the same registry for issuance, and DCQL fits the RFC 0454 state machine without changes. A new version would also tie protocol versions to DCQL versions. The formats in this RFC do not depend on the protocol, so a later version can reuse them. - The
audiencecould be derived by both sides from the DIDComm layer instead of being sent. Sending it lets the verifier pick which of its DIDs the presentation is bound to. A public DID such as adid:webordid:webvhties the presentation to the verifier's real identity. A derived value can only be a DID both sides already know from the DIDComm layer, often just a pairwise connection DID or key. Only the verifier knows which of its DIDs it wants named. Deriving would also need the same DIDComm layer data as checking. The prover's check works on keys, not on DID strings, so an explicit value is as safe as a derived one. Sending it also gives one exact string to compare, while a DID can have several equivalent forms (for example the long and short forms ofdid:peer:4) and implementations compareaudas exact strings. RFC 0510 also has the verifier send itsdomain. - The prefix
didcomm:followsorigin:in OpenID4VP andia:in the OpenID4VCI 1.1 editor's draft. Together with the rule in Audience, it keeps a DIDComm audience distinct from any OpenID4VP Client Identifier for the same DID. - Reusing
OpenID4VPHandoverwith theaudienceas the client id was considered. DIDComm has no response URI, and a separate first element string means an mdoc device signature for one protocol can never be accepted by the other. - For
vc+sd-jwt, an SD-JWT+KB of the credential (as fordc+sd-jwt) was considered. VC-JOSE-COSE section 3.2.2 defines avp+sd-jwtpresentation with anEnvelopedVerifiableCredentialand gives no rules for a KB-JWT on a credential. Avp+jwt(VC-JOSE-COSE section 3.1.2, Securing JSON-LD Verifiable Presentations with JOSE) with the sameEnvelopedVerifiableCredentialwas also considered. This RFC usesvp+sd-jwtbecause it is the presentation VC-JOSE-COSE defines for SD-JWT credentials. - A new identifier instead of
vc+sd-jwtwas considered.vc+sd-jwtmatches the VC-JOSE-COSEtypand media type, and thedcqllibrary (formerly dcql-ts) already treatsvc+sd-jwtwithmeta.type_valuesas a W3C credential. OpenID4VP 1.0 uses onlydc+sd-jwtfor IETF SD-JWT VC, so the old meaning ofvc+sd-jwtis left only in implementations of earlier drafts. - For
vc+sd-jwt, matchingtype_valuesagainst fully expanded type IRIs, as OpenID4VP Appendix B.1.1 does, was considered. In VCDM 2.0 everytypeterm expands to an absolute IRI, an undefined term through the@vocabof a context such ashttps://www.w3.org/ns/credentials/undefined-terms/v2. So the relative IRI shortcut in Appendix B.1.1 never applies, and both sides would need the context documents of each credential. VC-JOSE-COSE has no expansion step, and thedcqllibrary compares thetypestrings it is given. Accepting both forms was also considered. It would not spare the prover from expansion, and a verifier could not tell which form a prover supports.
Prior art¶
- OpenID for Verifiable Presentations 1.0 defines DCQL, the
vp_token, the nonce and audience rules andOpenID4VPHandover. This RFC reuses them over DIDComm. - RFC 0881 issues
vc+sd-jwtcredentials over issue-credential v2. This RFC is the presentation side. - RFC 0510 and RFC 0771 share one identifier for proposals and requests. RFC 0771 also forbids a
noncein proposals. - Present Proof 3.0 is the DIDComm v2 native present-proof protocol. This RFC uses its attachment layout for present-proof 2.0 over DIDComm v2. It does not register formats for Present Proof 3.0, but they could be used with it unchanged.
- The OpenID4VCI 1.1 editor's draft defines
OpenID4VCIIAEHandoveroutside OpenID4VP with the same pattern as the DIDComm Handover. ISO/IEC TS 18013-7:2025 defines further handovers for remote mdoc presentation.
Unresolved questions¶
- OpenID4VP or OpenID4VCI may later define an identifier for VCDM 2.0 credentials (OpenID4VCI issue 194) and guidance on identifier collisions (OpenID4VP issue 777). If they do, this RFC should follow.
- Which status mechanisms should a verifier support for
vc+sd-jwt? - RFC 0881 allows
cnfasjwkorkid. This RFC supports both. Should a verifier be able to require one of them? - Should
transaction_databe supported in a later version? - When SD-JWT VC and Token Status List are published as RFCs, this RFC should reference those.
Implementations¶
The following lists the implementations (if any) of this RFC. Please do a pull request to add your implementation. If the implementation is open source, include a link to the repo or to the implementation within the repo. Please be consistent in the "Name" field so that a mechanical processing of the RFCs can generate a list of all RFCs supported by an Aries implementation.
Credo has an implementation of dc+sd-jwt and vc+sd-jwt in progress. It will be listed here when this RFC moves to DEMONSTRATED.
| Name / Link | Implementation Notes |
|---|---|