-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make transaction data credential format specific and define details for sd-jwt and mdoc #421
base: main
Are you sure you want to change the base?
Conversation
This enables the QES creation use case where transaction data contains parameters for advanced e-signature creation. In these cases, the transaction data do not get hashed in their JSON representation format using a single hash algorithm. Instead, the X.509 credential format specifies specific ways of processing, that still meet the broadened requirements.
Done, thanks @babisRoutis. |
Pointed description to issue 423. |
@c2bo @sander After re-reading the spec and playing with some examples, I would argue transaction_data_hashes_alg and transaction_data_hashes are designed and might work well for sd-jwt. I'm not so sure for mdoc and I'm pretty sure it does not work well for x.509 (QES). For example, the transaction data type for QES (see below) already contains identifiers for algorithms (hashAlgorithmOID) based on pre-existing standards (ETSi and CSC) and QES/CMS standards define what needs to be incorporated into the signature, some of this data not even passed in the request but obtained from other sources, like time stamping services (in this cases the "T" in "Ades-B-T"). {
"type": "https://cloudsignatureconsortium.org/2025/qes",
"credential_ids": [
"certificate_by_policy"
],
"signatureQualifier": "eu_eidas_qes",
"documentDigests": [
{
"signature_format": "P",
"conformance_level": "Ades-B-T",
"signed_envelope_property": "Certification",
"label": "Example Contract",
"href": "https://protected.rp.example/contract-01.pdf?token=HS9naJKWwp901hBcK348IUHiuH8374",
"checksum": "sha256-sTOgwOm+474gFj0q0x1iSNspKqbcse4IeiqlDg/HWuI=",
"access": {
"type": "OTP",
"oneTimePassword": "51623"
}
}
],
"hashAlgorithmOID": "2.16.840.1.101.3.4.2.1"
} Based on those thoughts, I would suggest to make the way transaction data is included or referenced truly a credential format specific thing. That would mean to move transaction_data_hashes_alg and transaction_data_hashes to appendix B.4 and change the second and third paragraph in section 8.4 to something like "The Wallet that received the transaction_data parameter in the request MUST include a representation or reference to the data in the in the respective credential presentation. How this is done is specific to each credential format and is defined by each Credential Format, such as those in Appendix B. If the wallet does not support transaction_data parameter, it MUST return an error." |
@tlodderstedt agreed. My original PR was to keep the change as small as possible, but your proposal is the better change. For mdoc queries, the transaction data is expected to be returned as Since OID4VCI also specifies a W3C VC credential format, what would be the best way to include transaction data there? |
openid#421 (comment) Co-authored-by: Torsten Lodderstedt <[email protected]>
@@ -2384,6 +2389,19 @@ __Claim `birthdate`__: | |||
* Contents: | |||
`["6Ij7tM-a5iVPGboS5tmvVA", "birthdate", "1940-01-01"]` | |||
|
|||
### Transaction Data | |||
|
|||
The SD JWT VC format supports `transaction_data` as specified in (#transaction_data). If used, it is recommended that the transaction data type specification includes the following parameter, in addition to `type` and `credential_ids` from (#new_parameters): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it just recommended or is this how the data must be represented in SD-JWTs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can still include new mandatory requirements at this stage, let’s indeed make it mandatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would however suggest to have that detail in a separate issue/PR, to keep the current one’s scope limited to enabling the use of transaction data in other credential formats such as X.509.
Co-authored-by: Torsten Lodderstedt <[email protected]>
openid#421 (comment) Better left to a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just added small editorial suggestion.
Co-authored-by: Torsten Lodderstedt <[email protected]>
Co-authored-by: Torsten Lodderstedt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly editorial comments. but I don't understand why mdoc part is doctype specific and i would like to see If this parameter is not present, a default value of
sha-256 MUST be used.
readded
Co-authored-by: Kristina <[email protected]>
Co-authored-by: Kristina <[email protected]>
Co-authored-by: GarethCOliver <[email protected]>
WG discussion:
|
Co-authored-by: Torsten Lodderstedt <[email protected]>
@@ -2174,6 +2169,10 @@ The following is a non-normative example of the Verifiable Presentation in the ` | |||
|
|||
<{{examples/response/ldp_vp.json}} | |||
|
|||
### Transaction Data | |||
|
|||
The W3C Verifiable Credentials format profile as defined in this specification does not support transaction data as defined in (#transaction_data). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to drop this section as credential formats can give recommendations but do not need to. Implementers can freely decide which credential formats they use in conjunction with their transaction data types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in eaa0426
|
||
Note: When following this recommendation, the transaction data mechanism requires use of an SD-JWT VC with cryptographic key binding. | ||
|
||
#### Example Specification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure whether we should make this a recommendation, too. Example sounds a bit to weak to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sakurann WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about Common Mechanism? Like in RFC 9396 § 2.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how common we want these to be? we say parameters are transaction data type specific and then we define parameters without binding them to any transaction data type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this more, this section on static configuration values is probably the closest to what we are looking for here (https://openid.github.io/OpenID4VP/openid-4-verifiable-presentations-wg-draft.html#name-profiles-that-define-static)
#### Example Specification | |
#### A Profile of Transaction Data in SD-JWT VC |
Another option would be to move this section to implementation considerations, tho that might make it harder to read..
Co-authored-by: Torsten Lodderstedt <[email protected]>
|
||
It is RECOMMENDED that each transaction data type defines a top level claim parameter to be used in the Key Binding JWT to return the processed transaction data. Additionally it is RECOMMENDED that it specifies the processing rules, potentially including any hash function to be applied, and the expected resulting structure. | ||
|
||
Note: When following this recommendation, the transaction data mechanism requires use of an SD-JWT VC with cryptographic key binding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: When following this recommendation, the transaction data mechanism requires use of an SD-JWT VC with cryptographic key binding. | |
Note: When following this recommendation, the transaction data mechanism requires use of an SD-JWT VC with Cryptographic Holder Binding. |
Cryptographic Holder Binding
is a defined term we use
|
||
The following is a non-normative example that can be included in a transaction data type specification: | ||
|
||
* The transaction data includes the following parameter, in addition to `type` and `credential_ids` from (#new_parameters): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The transaction data includes the following parameter, in addition to `type` and `credential_ids` from (#new_parameters): | |
* The `transaction_data` request parameter includes the following parameter, in addition to `type` and `credential_ids` from (#new_parameters): |
|
||
* The transaction data includes the following parameter, in addition to `type` and `credential_ids` from (#new_parameters): | ||
* `transaction_data_hashes_alg`: OPTIONAL. Array of strings each representing a hash algorithm identifier, one of which MUST be used to calculate hashes in `transaction_data_hashes` response parameter. The value of the identifier MUST be a hash algorithm value from the "Hash Name String" column in the IANA "Named Information Hash Algorithm" registry [@IANA.Hash.Algorithms] or a value defined in another specification and/or profile of this specification. If this parameter is not present, a default value of `sha-256` MUST be used. To promote interoperability, implementations MUST support the sha-256 hash algorithm. | ||
* The Key Binding JWT includes the following top level claim parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The Key Binding JWT includes the following top level claim parameters: | |
* The Key Binding JWT in the response includes the following top level parameters: |
This enables the QES creation use case where transaction data contains parameters for advanced e-signature creation. In these cases, the transaction data do not get hashed in their JSON representation format using a single hash algorithm. Instead, the X.509 credential format specifies specific ways of processing, that still meet the broadened requirements.
Highlight of changes:
transaction_data_hashes
andtransaction_data_hashes_alg
into SD-JWT VC format spec.sha-256
a mandatory default.sha-256
interoperability promotion remark.Closes #423
Closes #418
Relates to #259
Does not address #442, #443