Skip to content

Commit

Permalink
Clarify ISO mdoc Handover structure.
Browse files Browse the repository at this point in the history
Fixes openid#415.

Signed-off-by: David Zeuthen <[email protected]>
  • Loading branch information
davidz25 committed Feb 10, 2025
1 parent 9b05dea commit 1716677
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions openid-4-verifiable-presentations-1_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2305,29 +2305,33 @@ OpenID4VPDCAPIHandover = [
OpenID4VPDCAPIHandoverInfoHash ; A cryptographic hash of OpenID4VPDCAPIHandoverInfo
]
OpenID4VPDCAPIHandoverInfoHash = bstr ; sha-256 hash of OpenID4VPDCAPIHandoverInfo
; Contains the sha-256 hash of OpenID4VPDCAPIHandoverInfoBytes
OpenID4VPDCAPIHandoverInfoHash = bstr
; Contains the bytes of OpenID4VPDCAPIHandoverInfo encoded as CBOR
OpenID4VPDCAPIHandoverInfoBytes = bstr .cbor OpenID4VPDCAPIHandoverInfo
OpenID4VPDCAPIHandoverInfo = [
origin,
client_id,
nonce
] ; Array containing handover parameters
client_id = tstr ; UTF-8 encoded string
client_id = tstr
origin = tstr ; UTF-8 encoded string
origin = tstr
nonce = tstr ; UTF-8 encoded string
nonce = tstr
```

The `OpenID4VPDCAPIHandover` structure has the following elements:

* The first element MUST be the fixed UTF-8 encoded string `OpenID4VPDCAPIHandover`. This serves as a unique identifier for the handover structure to prevent misinterpretation or confusion.
* The second element MUST be the `OpenID4VPDCAPIHandoverInfoHash`, represented as a CBOR byte string which encodes the sha-256 hash of the `OpenID4VPDCAPIHandoverInfo` CBOR array.
* The first element MUST be the string `OpenID4VPDCAPIHandover`. This serves as a unique identifier for the handover structure to prevent misinterpretation or confusion.
* The second element MUST be a bytestring which contains the sha-256 hash of the bytes of `OpenID4VPDCAPIHandoverInfo` when encoded as CBOR.
* The `OpenID4VPDCAPIHandoverInfo` has the following elements:
* The first element MUST be the UTF-8 encoded string representing the origin of the request as described in (#dc_api_request).
* The second element MUST be the UTF-8 encoded string value of the effective Client Identifier as defined in (#dc_api_request).
* The third element MUST be the UTF-8 encoded string value of the `nonce` request parameter.
* The first element MUST be the string representing the origin of the request as described in (#dc_api_request).
* The second element MUST be the string value of the effective Client Identifier as defined in (#dc_api_request).
* The third element MUST be the string value of the `nonce` request parameter.

#### Invocation via other methods {#non-dc-api-invocation}

Expand Down

0 comments on commit 1716677

Please sign in to comment.