Skip to content

Move credential format specific details into per-format annexes - #57

Open
jogu wants to merge 23 commits into
46-make-credential_type-arrayfrom
jogu/format-annexes
Open

jogu wants to merge 23 commits into
46-make-credential_type-arrayfrom
jogu/format-annexes

Conversation

@jogu

@jogu jogu commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Structure agreed at the 2026-08-31 meeting: one normative annex per credential format, with a generic extension point so other documents can define further formats.

  • New "Credential Formats" clause: the protocol is format agnostic, a "credential format definition" shall specify the ten items from Define format-specific details section #36, and the main body no longer names any format or annex.
  • New annexes for ISO mdoc and SD-JWT VC with identical headings in the order of the Define the ISO mdoc credential format-specific protocol details #21/Define the SD-JWT VC credential format-specific protocol details #22 checklists; existing format text moves there.
  • format_extensions and CredentialItem.data become CDDL sockets ($formatExtensions, $CredentialData); the undefined ZkDocument / zkFormatExtensions alternatives go away.
  • CredentialItem.format renamed to credential_format, matching the request (map key unchanged, so no change to the encoding).
  • ISO/IEC 18013-5, RFC 5280, RFC 7515, RFC 9901 and draft-ietf-oauth-sd-jwt-vc added to Normative references.
  • SD-JWT VC format identifier is now dc+sd-jwt; vc+sd-jwt as a mimetype means a w3c vc encoded in sd-jwt; vp uses dc+sd-jwt.

New text added by this PR:

  • case-sensitive credential_type matching
  • mdoc elements may be issuer- or device-signed, as determined by the wallet subject to the MSO KeyAuthorizations
  • a different data element may be returned where the data element's definition allows it (e.g. age_over_NN)
  • mdoc and SD-JWT VC (x5c) issuer identifiers match the keyIdentifier of the Authority Key Identifier of a certificate in the chain
  • non-key-bound mdocs may only be returned when support_no_cryptographic_binding is true, following the 18013-5 second edition DIS text (check mdoc non-key-bound credentials text against ISO 18013-5 2nd edition once it's published #56)
  • SD-JWT VC: a KB-JWT is required when support_no_cryptographic_binding is false, and may be omitted when it is true

Left "To be completed": SD-JWT VC path (#52), value matching (#9), transaction data (#4), SessionTranscript derivation and KB-JWT nonce/aud (#10), non-X.509 issuer identification for SD-JWT VC.

Raised separately: SD-JWT VC path semantics, aligning with the OpenID4VP / 18013-5 claims path pointer (#52), vct inheritance and aka_vcts (#53), mdoc alg value names and matching rule (#54), collision-resistant credential format identifiers (#68), whether alg value lists are mandatory and how the wallet must treat them (#78)

There's now no mention of ZKP responses - that's already recorded in #17

closes #21, #22, #36

@github-actions

github-actions Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

📄 Editor's Copy preview

https://openid.github.io/dchp/PREVIEW-DO-NOT-USE/pr-57/digital-credentials-harmonized-presentation-editors-copy.html

Preview of 2b6b0f3; updated on every push. For review only — the official specifications are published at https://openid.net/specs/

github-actions Bot pushed a commit that referenced this pull request Sep 7, 2026
@jogu
jogu requested review from awoie and martijnharing September 7, 2026 19:25
@jogu

jogu commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Joseph presented this on today's PR. Oliver & Martijn agreed to review. The CDDL socket syntax wasn't familiar to people on the call and maybe we want to consider other options, but that's editorial and as it is may be more readable to AIs.

github-actions Bot pushed a commit that referenced this pull request Sep 7, 2026
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
@awoie

awoie commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Furthermore, we might need to create an issue to fix the toolchain (not necessarily in this PR) because the word document numbers the annexes as ordinary clauses, e.g., "13 ISO mdoc Credential Format".

github-actions Bot pushed a commit that referenced this pull request Sep 14, 2026
@jogu

jogu commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Furthermore, we might need to create an issue to fix the toolchain (not necessarily in this PR) because the word document numbers the annexes as ordinary clauses, e.g., "13 ISO mdoc Credential Format".

Good point - raised #60 for this, thanks.

jogu added a commit that referenced this pull request Sep 14, 2026
The SD-JWT VC annex cites it for the x5c JOSE header.

Addresses Oliver's comment in
#57 (comment)
github-actions Bot pushed a commit that referenced this pull request Sep 14, 2026
@awoie

awoie commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@redsstriker volunteered to review as well.

jogu added a commit that referenced this pull request Sep 24, 2026
The mdoc annex introduction says Document is one of the structures
defined in ISO/IEC 18013-5, where it is a CBOR map, but the annex CDDL
then declared Document = bstr. Name our type MdocData and define it as
bstr .cbor Document so the ISO name keeps its ISO meaning and the wire
format (a byte string holding the encoded Document) is unchanged.

Addresses Oliver's review comment on #57.
github-actions Bot pushed a commit that referenced this pull request Sep 24, 2026
@andrewhughes3000

Copy link
Copy Markdown
Member

PR has been updated - Needs review

Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md
Comment thread draft/digital-credentials-harmonized-presentation.md
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
@redsstriker

Copy link
Copy Markdown

Credential format definitions for other credential formats may be specified in other documents.

Then how to avoid collision of credential format definition?

Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md
Comment thread draft/digital-credentials-harmonized-presentation.md
github-actions Bot pushed a commit that referenced this pull request Oct 19, 2026
@awoie
awoie self-requested a review October 19, 2026 19:17
jogu and others added 23 commits October 22, 2026 11:06
Structure agreed at the 2026-08-31 meeting: one normative annex per
credential format, with a generic extension point so other documents can
define further formats.

- New "Credential Formats" clause: the protocol is format agnostic, a
  "credential format definition" shall specify the ten items from #36,
  and the main body no longer names any format or annex.
- New annexes for ISO mdoc and SD-JWT VC with identical headings in the
  order of the #21/#22 checklists; existing format text moves there.
- format_extensions and CredentialItem.data become CDDL sockets
  ($formatExtensions, $CredentialData); the undefined ZkDocument /
  zkFormatExtensions alternatives go away.
- ISO/IEC 18013-5, RFC 9901 and draft-ietf-oauth-sd-jwt-vc added to
  Normative references.
- SD-JWT VC format identifier is now dc+sd-jwt; vc+sd-jwt as a mimetype
  means a w3c vc encoded in sd-jwt; vp uses dc+sd-jwt.

New text added by this PR: case-sensitive credential_type matching;
mdoc elements may be issuer- or device-signed; mdoc issuer identifiers
match the AKI of a certificate in the IssuerAuth x5chain; KB-JWT may be
omitted only when support_no_cryptographic_binding is true; for mdocs
that flag maps to nonKeyBoundSupported from the 18013-5 second edition
DIS text (#56).

Left "To be completed": value matching (#9), transaction data (#4),
SessionTranscript derivation and KB-JWT nonce/aud (#10), non-X.509
issuer identification for SD-JWT VC.

Raised separately: array elements in path (#52), vct inheritance (#53),
mdoc alg value names and matching rule (#54)

There's now no mention of ZKP responses - that's already recorded in #17

closes #21, #22, #36
The SD-JWT VC annex only said the x509_ref values are compared against
the x5c chain, without saying what outcome satisfies the request. Use
the same rule as the mdoc annex.
The previous text let the wallet drop the KB-JWT from a key-bound
SD-JWT VC whenever support_no_cryptographic_binding was true. That is a
downgrade the mdoc annex does not permit (a key-bound mdoc always
carries DeviceSigned) and OpenID4VP does not permit either. Tie the
permission to the absence of cnf, matching the mdoc rule.
IssuerSignedItems is not a structure in ISO/IEC 18013-5; the standard
has IssuerSignedItem entries under IssuerNameSpaces and
DeviceSignedItems under DeviceNameSpaces.
The mdoc annex introduction presented its list as the structures the
annex refers to, but omitted IssuerAuth, the MSO, KeyAuthorizations,
IssuerNameSpaces, DeviceNameSpaces and DeviceSignedItems, all used
later in the annex. The SD-JWT VC annex uses the x5c header, which
comes from RFC 7515 rather than the SD-JWT documents.
The annexes say format carries the same value as credential_format, but
the main-body table did not connect the field to the extension point.
The note that an mDL is always key-bound also relies on the unpublished
second edition text, so move the editor's note ahead of it and say it
covers both.
Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
The SD-JWT VC annex cites it for the x5c JOSE header.

Addresses Oliver's comment in
#57 (comment)
The mdoc annex introduction says Document is one of the structures
defined in ISO/IEC 18013-5, where it is a CBOR map, but the annex CDDL
then declared Document = bstr. Name our type MdocData and define it as
bstr .cbor Document so the ISO name keeps its ISO meaning and the wire
format (a byte string holding the encoded Document) is unchanged.

Addresses Oliver's review comment on #57.
Each annex said in prose that its type extends the $CredentialData or
$formatExtensions socket, immediately before the CDDL line that says the
same thing. The Credential Formats clause already states the general
rule once, so remove the four repetitions.
Co-authored-by: Martijn Haring <62745275+martijnharing@users.noreply.github.com>
Co-authored-by: Gareth Oliver <gco@google.com>
Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
Co-authored-by: Joseph Heenan <joseph@heenan.me.uk>
Martijn and Gareth both asked for the sentence to go: DCHP should not
define itself in terms of the ISO/IEC 18013-5 request structure it may
replace. DocRequestInfo is no longer referred to, so it leaves the list
of borrowed structures too.
The mDL key-binding note the #56 editor's note pointed to has been
removed, and item 10 of the format definition requirements lost its
full stop when the review suggestion was applied.
(also remove a stray DOS line ending the github web interface added)

Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
A suggestion applied in the GitHub web UI converted the whole draft to
CRLF, which showed every line as changed and left review comments
detached from their lines. I don't know if the web interface pays
attentions to .gitattributes but I don't think it can make things
worse.
Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
Covers age_over_NN, whose nearest-attestation rule is defined in both
ISO/IEC 18013-5 and ISO/IEC TS 23220-2 (used by PhotoID).

Co-authored-by: Gareth Oliver <gco@google.com>
Adds RFC 5280 to the Normative references.

Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
The response field carries the same value as credential_format in the
request, so use the same name and drop the annex sentences that said
so. The map key is unchanged, so this does not affect the encoding.

Suggested by Martijn Haring.

Co-authored-by: Martijn Haring <62745275+martijnharing@users.noreply.github.com>
OpenID4VP and the ISO/IEC 18013-5 second edition DIS (Annex H.2) share
the same claims path pointer algorithm, which needs path components
other than tstr. Rather than describe a subset of it here, defer to #52.

Co-authored-by: Martijn Haring <62745275+martijnharing@users.noreply.github.com>
Co-authored-by: Martijn Haring <62745275+martijnharing@users.noreply.github.com>
PR #61 turned CredentialQuery.credential_type into the credential_types
array. Update the format definition requirements and the mdoc and
SD-JWT VC credential type sections to describe matching per entry.
@jogu
jogu force-pushed the jogu/format-annexes branch from 4d461ea to 2b6b0f3 Compare October 22, 2026 10:24
github-actions Bot pushed a commit that referenced this pull request Oct 22, 2026
@jogu
jogu changed the base branch from main to 46-make-credential_type-array October 22, 2026 10:25
@jogu

jogu commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

As #61 will merge first I've updated this PR to be stacked on top of it, and adapted the text in the new format annexes to refer to the credential_types array instead of the old credential_type element.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

7 participants