OpenID4VP icon indicating copy to clipboard operation
OpenID4VP copied to clipboard

Extend the transaction data hashes response structure

Open TimoGlastra opened this issue 9 months ago • 3 comments

The transaction_data_hashes_alg can be separate per transaction_data entry, but in the response it is expected that all transaction data hashes use the same transaction_data_hashes_alg.

Wouldn't it make more sense to make the transaction_data_hashes an array of objects, where each entry has a hash and a hash_alg, so that separate entries can be hashed using different algs?

This could also prevent conflicts where I ask for two transaction data hashes for the same credential id, one that only allows sha-256 and the other that only allows sha-512.

I think it could also help with #442, where the object could contain a transaction_data_index to point to the index from the request to make it easier to link between the request entry and the response entry

TimoGlastra avatar Mar 04 '25 11:03 TimoGlastra

is there a use-case for multiple transaction data objects that use different hash alg? proposed solution of matching alg to an object sounds like an overcomplication to me without a strong use-case.. I thought majority of use-cases will include only one transaction data object?

Sakurann avatar Mar 04 '25 21:03 Sakurann

No not really, but in that case I think the supported algs should not be duplicated in every transaction data entry, but rather defined once.

However #423 might have impact on this if custom algs will be used for specific use cases.

TimoGlastra avatar Mar 04 '25 22:03 TimoGlastra

Agree with @TimoGlastra, either algs should be at the top level in both request or response, or it should be on a per-entry level for request and response. Mixing it is a mistake.

GarethCOliver avatar Mar 10 '25 14:03 GarethCOliver