You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing credential format definition for w3c vc v2 with sd-jwt #67
Both OID4VCI and OID4VP do not define the required metadata for issuance and requesting a W3C V2 VC with SD-JWT.
Both specifications only support W3C V1, and only JWT and JSON-LD credentials, not SD-JWT.
So i think we need to define:
Credential format identifier: vc+sd-jwt is the one registered by the W3C spec, so it should probably be this, but i think any wallets that still support the old SD-JWT VC identifier will break on this
Credential issuer metadata - this can probably be the same as is used for jwt_vc_json?
VP formats supported - this can probably be the same as is used for jwt_vc_json as well
DCQL query - this can probably be the same as is used for jwt_vc_json as well
Maybe i missed this definition from somewhere else?
To me and the way we are doing it is that we map vc+sd-jwt only on vcdm2 and sd-jwt vc on dc+sd-jwt. It is unfortunate that there is the clash but everyone will have to change eventually. To me no better time than now.
We have vc+sd-jwt running in producation in our wallet, so we can't just remove it. We will have to support both VCDM v2 and SD-JWT VC for the vc+sd-jwt.
But still i think this should be specified in DIIP v4
(but thanks for the quick answer, we will look into it further and see what we can do!)
@TimoGlastra we try our best to figuring out which format is desired. Like checking for "@context" to be present or other things. So far it seems to work, but I'd also rather drop support for sdjwts with "vc+sd-jwt".
Reacted by Timo Glastra, Henrique Dias and Nander Stabel
Yeah that's what I'm a bit worried about. That we're now going to use the old 1.1 metadata under the vc+sd-jwt without any formal definition, and then it will probably change again when there will be a formal definition in the future.
The metadata should be very close anyway though. It is not like the datamodel for VCs has drastically changed between 1.1 and 2. But yes would be good to come up with a proposal to DCG
we do not actually have a test case at the moment for vp with vcdm2.0 Reviewing the spec and I think you are correct @ubamrein . If nobody objects I will add a new vp test case with EnvelopedVerifiablePresentation
Presentation: The VP is typically a JWT VP containing VC(s) as compact strings, and the credentials inside can be SD‑JWT.
Thanks @endimion, can you elaborate on this one. Is this a serialized W3C VCDM 2.0 as string? And does the SD-JWT inside not use an EnvelopedVerifiableCredential? I don't think that's correct.
I think it needs to be a VP (I think either Enveloped or not) but the presentation itself MUST contain an EnvelopedVerifiableCredential if the VC is a SD-JWT secured W3C VC).
The vp_token(s) in the dcql json should probably match the EnvelopedVerifiablePresentation
I think we have more freedom here to decide and I feel like using the VP directly as string would be sufficient here? It doesn't break the data model.
I see the data model as:
Wrapped Verifiable Presentation
contains serialized Verifiable Presentation
includes one or more Verifiable Credentials (in case of embedded proof) or Wrapped Verifiable Credentials (in case of envelopped proof)
I think specifying OID4VCI to return the serialized verifiable credential (string SD-JWT), and not enveloped is possible, as well as OID4VP to require the serialized verifiable presentation (string JWT) and not enveloped (but the decoded JWT will include an enveloped credential).
Since the vc+sd-jwt format can define additional requirement (such as that for mso_mdoc the return value should be an IssuerSigned structure in OID4VCI.
I think if OID4VCI does not return the enveloped variant, why would we return the enveloped variant in OID4VP? I think we either should return EnvelopedCredential in OID4VCI and EnvelopedPresentation in OID4VP, OR we return the serialized string variant in both cases (talking about SD-JWT/JWT/enveloped securing not DataIntegrity ones)
Edit: I would lean to using the serialized string variant in both cases since it saves bytes, without losing metadata?
Finally -- Do we forsee any issues with defining the vc+sd-jwt format (when we propose this to the DCP WG) returns a JWT secured presentation (instead of a SD-JWT secured presentation) with an SD-JWT credential in it? I think it makes sense
If so, I think this would be fine. Though I still don't quite understand, why not directly return the sd-jwt secured with a kb-jwt? DCQL already defines how one has to map presentations of credentials to requested credentials (via the id), and also DCQL does not allow to have different credentials per id right? Because for DCQL the VerifiablePresentation would only ever allow one entry in the array of verifiableCredential, or do I miss something?
If so, I think this would be fine. Though I still don't quite understand, why not directly return the sd-jwt secured with a kb-jwt?
It's mixing W3C VCDM with SD-JWT specific ways to create a proof. TBH, I'm not sure why DIIPv4 needs to include W3C VCDM v2 at all, but if we do include it, I think we should use the W3C VCDM way of doing it, otherwise we're basically creating another credential/presentation format. And that complicates things even further.
Because for DCQL the VerifiablePresentation would only ever allow one entry in the array of verifiableCredential, or do I miss something?
Same could be said for mdoc device responses, but HAIP just requires every mdoc to be returned in a separate DeviceResponse:
When multiple ISO mdocs are being returned, each ISO mdoc MUST be returned in a separate DeviceResponse (as defined in 8.3.2.1.2.2 of [ISO.18013-5]), each matching to a respective DCQL query. Therefore, the resulting vp_token contains multiple DeviceResponse instances.
Yeah that's fair. So you're proposing to use the string serialization for VC, and for the VP use the EnvelopedVerifiableCredential with EnvelopedVerifiablePresentation?
ahm yes sorry, I annotated the serializer wrongly. And the JWT would be signed by the holder cnf key right?
Hmm looking at Example 4, the SD-JWT does not have a cnf, but rather uses credentialSubject.id to indicate the DID the credential is bound to.
That's also how it works in VCDM 1.0, using cnf is more the (SD-)JWT way to do it. I'm not 100%, but I would expect credentialSubject.id to indicate the verificationMethod the credential is bound to
ahm yes sorry, I annotated the serializer wrongly. And the JWT would be signed by the holder cnf key right?
Hmm looking at Example 4, the SD-JWT does not have a cnf, but rather uses credentialSubject.id to indicate the DID the credential is bound to.
That's also how it works in VCDM 1.0, using cnf is more the (SD-)JWT way to do it. I'm not 100%, but I would expect credentialSubject.id to indicate the verificationMethod the credential is bound to
Okay still don't have time to get into the discussion now and always have to be careful when doing things from my head. Have to recant my previous statement. It is only for presentations that the spec requires enveloped:
Activity
TimoGlastra commentedon Aug 21, 2025
@samuelmr do you have insights what the other Findynet participants are doing here?
(cc @nklomp @ubamrein @nanderstabel)
TimoGlastra commentedon Aug 21, 2025
For us it would be really unfortunate if we have to use
vc+sd-jwt, due to us still supporting older draftsnklomp commentedon Aug 21, 2025
To me and the way we are doing it is that we map vc+sd-jwt only on vcdm2 and sd-jwt vc on dc+sd-jwt. It is unfortunate that there is the clash but everyone will have to change eventually. To me no better time than now.
TimoGlastra commentedon Aug 21, 2025
We have
vc+sd-jwtrunning in producation in our wallet, so we can't just remove it. We will have to support both VCDM v2 and SD-JWT VC for thevc+sd-jwt.But still i think this should be specified in DIIP v4
(but thanks for the quick answer, we will look into it further and see what we can do!)
nklomp commentedon Aug 21, 2025
I guess some form of version discovery could help you out here. Have internal mappings for the 2 types.
ubamrein commentedon Aug 21, 2025
@TimoGlastra we try our best to figuring out which format is desired. Like checking for "@context" to be present or other things. So far it seems to work, but I'd also rather drop support for sdjwts with "vc+sd-jwt".
nklomp commentedon Aug 21, 2025
What do you mean exactly with the last statement because that is how you would do VCDM2 compliant sd-jwts
TimoGlastra commentedon Aug 21, 2025
Okay and are you using the
jwt_vc_jsondefinition for all the other metadata for DCQL/OID4VCI/OID4VP?ubamrein commentedon Aug 21, 2025
yeah I mean the now "dc+sd-jwt" former "vc+sd-jwt" sd-jwts :D
ubamrein commentedon Aug 21, 2025
We currently ignore w3c metadata :D . We should probably define something new, as the
jwt_vc_jsonis indeed based on the w3c vcdm1.1 credentialsTimoGlastra commentedon Aug 21, 2025
Yeah that's what I'm a bit worried about. That we're now going to use the old 1.1 metadata under the
vc+sd-jwtwithout any formal definition, and then it will probably change again when there will be a formal definition in the future.TimoGlastra commentedon Aug 21, 2025
But how do you then filter W3C credentials for
vc+sd-jwt? Since you want to filter based on thetype_valuesright?TimoGlastra commentedon Aug 21, 2025
We should probably come up with a design and propose that to the DCP WG so that it can be added to OID4VCI and OID4VP 1.1
ubamrein commentedon Aug 21, 2025
We aren't filtering based on
type_valuesyet.nklomp commentedon Aug 21, 2025
The metadata should be very close anyway though. It is not like the datamodel for VCs has drastically changed between 1.1 and 2. But yes would be good to come up with a proposal to DCG
7 remaining items
ubamrein commentedon Aug 28, 2025
I assume this matches what we implemented, but it does not match with https://www.w3.org/TR/vc-jose-cose/#securing-vps-sd-jwt . The
vp_token(s)in thedcqljson should probably match theEnvelopedVerifiablePresentationendimion commentedon Aug 28, 2025
we do not actually have a test case at the moment for vp with vcdm2.0 Reviewing the spec and I think you are correct @ubamrein . If nobody objects I will add a new vp test case with EnvelopedVerifiablePresentation
TimoGlastra commentedon Aug 28, 2025
Thanks @endimion, can you elaborate on this one. Is this a serialized W3C VCDM 2.0 as string? And does the SD-JWT inside not use an
EnvelopedVerifiableCredential? I don't think that's correct.I think it needs to be a VP (I think either Enveloped or not) but the presentation itself MUST contain an EnvelopedVerifiableCredential if the VC is a SD-JWT secured W3C VC).
I think we have more freedom here to decide and I feel like using the VP directly as string would be sufficient here? It doesn't break the data model.
I see the data model as:
I think specifying OID4VCI to return the serialized verifiable credential (string SD-JWT), and not enveloped is possible, as well as OID4VP to require the serialized verifiable presentation (string JWT) and not enveloped (but the decoded JWT will include an enveloped credential).
Since the
vc+sd-jwtformat can define additional requirement (such as that formso_mdocthe return value should be anIssuerSignedstructure in OID4VCI.TimoGlastra commentedon Aug 28, 2025
I think if OID4VCI does not return the enveloped variant, why would we return the enveloped variant in OID4VP? I think we either should return EnvelopedCredential in OID4VCI and EnvelopedPresentation in OID4VP, OR we return the serialized string variant in both cases (talking about SD-JWT/JWT/enveloped securing not DataIntegrity ones)
Edit: I would lean to using the serialized string variant in both cases since it saves bytes, without losing metadata?
Finally -- Do we forsee any issues with defining the
vc+sd-jwtformat (when we propose this to the DCP WG) returns a JWT secured presentation (instead of a SD-JWT secured presentation) with an SD-JWT credential in it? I think it makes senseendimion commentedon Aug 28, 2025
hey I am a bit confused :)
the way I read the spec for issuance: https://www.w3.org/TR/vc-jose-cose/#with-sd-jwt I see no reference to enveloping right? Enveloping has only to do with teh VP structure... ? https://www.w3.org/TR/vc-jose-cose/#securing-vps-sd-jwt?
ubamrein commentedon Aug 28, 2025
@TimoGlastra are you proposing something like:
EDIT:
EDIT:
{ "type": "VerifiablePresentation", "@context": [ "https://www.w3.org/ns/credentials/v2", "https://www.w3.org/ns/credentials/examples/v2" ], "verifiableCredential": [ { "id": "data:application/vc+sd-jwt, eyJraWQiOiJFeEhrQk1XOWZtYmt2VjI2Nm1ScHVQMnNVWV9OX0VXSU4xbGFwVXpPOHJvI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waHdRIiwgInR5cGUiLCBbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwgIkV4YW1wbGVBbHVtbmlDcmVkZW50aWFsIl1d~WyJKX294dDhtUGUtaDl4MkQzc29uT1N3IiwgImlkIiwgImh0dHBzOi8vZXhhbXBsZS5vcmcvZXhhbXBsZXMvZGVncmVlLmpzb24iXQ~WyJDMlpWektmZ185RUh1ajB2S1ExdWJnIiwgInR5cGUiLCAiSnNvblNjaGVtYSJd~WyJ6Szd5QlFPbFhfX2Q0X0VoYUc0Y0pRIiwgImlkIiwgImRpZDpleGFtcGxlOjEyMyJd~WyJ6b1pzRzMzeXBMeVRGMm9aS3ZmMVFnIiwgInR5cGUiLCAiQmFjaGVsb3JEZWdyZWUiXQ~", "type": "VerifiableCredential", "@context": "https://www.w3.org/ns/credentials/v2" } ], "iss": "fancy_issuer", "iat": 1756387848, "nbf": 1756387548, "exp": 1757251848 }If so, I think this would be fine. Though I still don't quite understand, why not directly return the sd-jwt secured with a kb-jwt? DCQL already defines how one has to map presentations of credentials to requested credentials (via the
id), and also DCQL does not allow to have different credentials peridright? Because for DCQL theVerifiablePresentationwould only ever allow one entry in the array ofverifiableCredential, or do I miss something?TimoGlastra commentedon Aug 28, 2025
It's mixing W3C VCDM with SD-JWT specific ways to create a proof. TBH, I'm not sure why DIIPv4 needs to include W3C VCDM v2 at all, but if we do include it, I think we should use the W3C VCDM way of doing it, otherwise we're basically creating another credential/presentation format. And that complicates things even further.
TimoGlastra commentedon Aug 28, 2025
Same could be said for mdoc device responses, but HAIP just requires every mdoc to be returned in a separate DeviceResponse:
TimoGlastra commentedon Aug 28, 2025
I'm proposing more something like (as defined in Example 5 of VC-JOSE-COSE):
{ "@context": [ "https://www.w3.org/ns/credentials/v2", "https://www.w3.org/ns/credentials/examples/v2" ], "type": "VerifiablePresentation", "verifiableCredential": [{ "@context": "https://www.w3.org/ns/credentials/v2", "type": "EnvelopedVerifiableCredential", "id": "data:application/vc+sd-jwt,eyJraWQiOiJFeEhrQk1XOWZtYmt2VjI2Nm1ScHVQMnNVWV9OX0VXSU4xbGFwVXpPOHJvIiwiYWxnIjoiRVMyNTYifQ.eyJfc2RfYWxnIjoic2hhLTI1NiIsIkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy9ucy9jcmVkZW50aWFscy92MiIsImh0dHBzOi8vd3d3LnczLm9yZy9ucy9jcmVkZW50aWFscy9leGFtcGxlcy92MiJdLCJpc3N1ZXIiOiJodHRwczovL3VuaXZlcnNpdHkuZXhhbXBsZS9pc3N1ZXJzLzU2NTA0OSIsInZhbGlkRnJvbSI6IjIwMTAtMDEtMDFUMTk6MjM6MjRaIiwiY3JlZGVudGlhbFNjaGVtYSI6eyJfc2QiOlsiNjVFLVZZbmE3UE5mSGVsUDN6THFwcE5ERXhSLWhjWkhSTnlxN2U0ZVdabyIsIjhJbEwtUGx4Ukt3S0hLaTMtTXhXMjM4d0FkTmQ0NHdabC1iY3NBc2JIQjAiXX0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImRlZ3JlZSI6eyJuYW1lIjoiQmFjaGVsb3Igb2YgU2NpZW5jZSBhbmQgQXJ0cyIsIl9zZCI6WyJMVXhqcWtsWS1hdDVSVmFoSXpxM3NJZ015dkdwVDlwdlUwdTRyU2ktMXl3Il19LCJfc2QiOlsiVmxZLW50ZklPOUI5RGRsUWp5U2REMldoVWI0bjc3Zl9HWDZ2U1dLQWpCNCJdfSwiX3NkIjpbIi1iREZ4Um94UUVlcEdjZFl6a250aTVGWXBsUTU5N0djaEdUTGVtLVJSY1UiLCJfREFVZ0xrTF9zVkVtLTBvcE8zaWhpeVFhS0ZzT08xUl9ONk1CUmprOWhFIl19.Kc083RKbBxc3Vr5qR3iEEPp3dKxTa6sPaWNsqtkIw8TvMRf9EZL2ajtgkWSBYzyzOzawOrCXryyp4rMTyI9vfA ~WyJiQ1RTaU9HNUo1VXhPY1QwUlNfd01nIiwgImlkIiwgImh0dHA6Ly91bml2ZXJzaXR5LmV4YW1wbGUvY3JlZGVudGlhbHMvMTg3MiJd~WyJTclNWMS01SjR6cWhOU3N3STIwaHdRIiwgInR5cGUiLCBbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwgIkV4YW1wbGVBbHVtbmlDcmVkZW50aWFsIl1d~WyJKX294dDhtUGUtaDl4MkQzc29uT1N3IiwgImlkIiwgImh0dHBzOi8vZXhhbXBsZS5vcmcvZXhhbXBsZXMvZGVncmVlLmpzb24iXQ~WyJDMlpWektmZ185RUh1ajB2S1ExdWJnIiwgInR5cGUiLCAiSnNvblNjaGVtYSJd~WyJ6Szd5QlFPbFhfX2Q0X0VoYUc0Y0pRIiwgImlkIiwgImRpZDpleGFtcGxlOjEyMyJd~WyJ6b1pzRzMzeXBMeVRGMm9aS3ZmMVFnIiwgInR5cGUiLCAiQmFjaGVsb3JEZWdyZWUiXQ~" }] }ubamrein commentedon Aug 28, 2025
ahm yes sorry, I annotated the serializer wrongly. And the JWT would be signed by the holder
cnfkey right?TimoGlastra commentedon Aug 28, 2025
Yeah that's fair. So you're proposing to use the string serialization for VC, and for the VP use the EnvelopedVerifiableCredential with EnvelopedVerifiablePresentation?
TimoGlastra commentedon Aug 28, 2025
Hmm looking at Example 4, the SD-JWT does not have a
cnf, but rather usescredentialSubject.idto indicate the DID the credential is bound to.That's also how it works in VCDM 1.0, using
cnfis more the (SD-)JWT way to do it. I'm not 100%, but I would expectcredentialSubject.idto indicate the verificationMethod the credential is bound toubamrein commentedon Aug 28, 2025
Hmm true, I was mixing it up with Example 6
nklomp commentedon Aug 28, 2025
Okay still don't have time to get into the discussion now and always have to be careful when doing things from my head. Have to recant my previous statement. It is only for presentations that the spec requires enveloped:
TimoGlastra commentedon Jan 29, 2026
Based on the discussion at the DIIP meetup today I have made an initial PR to the OpenID4VCI specification: openid/OpenID4VCI#699
I think the OpenID4VP will be a bit more complex due the holder binding ambiguity in VCDM 2.0
@samuelmr @nklomp @k00ij @ubamrein @nanderstabel