Skip to content

Commit a7d9162

Browse files
authored
Add session transcript for redirect-based oid4vp flow (#610)
5 approvals. wg agreement to merge. as discussed, if additional ISO feedback comes in, we will discuss it
1 parent 7c64866 commit a7d9162

File tree

1 file changed

+135
-4
lines changed

1 file changed

+135
-4
lines changed

openid-4-verifiable-presentations-1_0.md

Lines changed: 135 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,8 @@ The following is a non-normative example of a set of static configuration values
16341634
"kb-jwt_alg_values": [
16351635
"ES256"
16361636
]
1637-
}
1637+
},
1638+
"mso_mdoc": {}
16381639
},
16391640
"request_object_signing_alg_values_supported": [
16401641
"ES256"
@@ -2733,7 +2734,137 @@ The VP Token contains the base64url-encoded `DeviceResponse` CBOR structure as d
27332734

27342735
### `Handover` and `SessionTranscript` Definitions
27352736

2736-
#### Invocation via the Digital Credentials API
2737+
#### Invocation via Redirects
2738+
2739+
If the presentation request is invoked using redirects, the `SessionTranscript` CBOR structure as defined in Section 9.1.5.1 in [@ISO.18013-5] MUST be used with the following changes:
2740+
2741+
* `DeviceEngagementBytes` MUST be `null`.
2742+
* `EReaderKeyBytes` MUST be `null`.
2743+
* `Handover` MUST be the `OpenID4VPHandover` CBOR structure as defined below.
2744+
2745+
```cddl
2746+
OpenID4VPHandover = [
2747+
"OpenID4VPHandover", ; A fixed identifier for this handover type
2748+
OpenID4VPHandoverInfoHash ; A cryptographic hash of OpenID4VPHandoverInfo
2749+
]
2750+
2751+
; Contains the sha-256 hash of OpenID4VPHandoverInfoBytes
2752+
OpenID4VPHandoverInfoHash = bstr
2753+
2754+
; Contains the bytes of OpenID4VPHandoverInfo encoded as CBOR
2755+
OpenID4VPHandoverInfoBytes = bstr .cbor OpenID4VPHandoverInfo
2756+
2757+
OpenID4VPHandoverInfo = [
2758+
clientId,
2759+
nonce,
2760+
jwkThumbprint,
2761+
responseUri
2762+
] ; Array containing handover parameters
2763+
2764+
clientId = tstr
2765+
2766+
nonce = tstr
2767+
2768+
jwkThumbprint = bstr
2769+
2770+
responseUri = tstr
2771+
```
2772+
2773+
The `OpenID4VPHandover` structure has the following elements:
2774+
2775+
* The first element MUST be the string `OpenID4VPHandover`. This serves as a unique identifier for the handover structure to prevent misinterpretation or confusion.
2776+
* The second element MUST be a Byte String which contains the sha-256 hash of the bytes of `OpenID4VPHandoverInfo` when encoded as CBOR.
2777+
* The `OpenID4VPHandoverInfo` has the following elements:
2778+
* The first element MUST be the `client_id` request parameter. If applicable, this includes the Client Identifier Prefix.
2779+
* The second element MUST be the value of the `nonce` request parameter.
2780+
* If the response is encrypted, e.g., using `direct_post.jwt`, the third element MUST be the JWK SHA-256 Thumbprint as defined in [@!RFC7638], encoded as a Byte String, of the Verifier's public key used to encrypt the response. Otherwise, the third element MUST be `null`. See (#session_transcript_dc_api) for an explanation of why this is important.
2781+
* The fourth element MUST be either the `redirect_uri` or `response_uri` request parameter, depending on which is present, as determined by the Response Mode.
2782+
2783+
Unless otherwise stated, the values of `client_id`, `nonce`, `redirect_uri`, and `response_uri` request parameters referenced above MUST be obtained from the Authorization Request query parameters if the request is unsigned, or from the signed Request Object if the request is signed.
2784+
2785+
The following is a non-normative example of the input JWK for calculating the JWK Thumbprint in the context of `OpenID4VPHandoverInfo`:
2786+
```json
2787+
{
2788+
"kty": "EC",
2789+
"crv": "P-256",
2790+
"x": "DxiH5Q4Yx3UrukE2lWCErq8N8bqC9CHLLrAwLz5BmE0",
2791+
"y": "XtLM4-3h5o3HUH0MHVJV0kyq0iBlrBwlh8qEDMZ4-Pc",
2792+
"use": "enc",
2793+
"alg": "ECDH-ES",
2794+
"kid": "1"
2795+
}
2796+
```
2797+
2798+
The following is a non-normative example of the `OpenID4VPHandoverInfo` structure:
2799+
```
2800+
Hex:
2801+
2802+
847818783530395f73616e5f646e733a6578616d706c652e636f6d782b6578633767
2803+
426b786a7831726463397564527276654b7653734a4971383061766c58654c486847
2804+
7771744158204283ec927ae0f208daaa2d026a814f2b22dca52cf85ffa8f3f8626c6
2805+
bd669047781c68747470733a2f2f6578616d706c652e636f6d2f726573706f6e7365
2806+
2807+
CBOR diagnostic:
2808+
2809+
84 # array(4)
2810+
78 18 # string(24)
2811+
783530395f73616e5f646e733a6578 # "x509_san_dns:ex"
2812+
616d706c652e636f6d # "ample.com"
2813+
78 2b # string(43)
2814+
6578633767426b786a783172646339 # "exc7gBkxjx1rdc9"
2815+
7564527276654b7653734a49713830 # "udRrveKvSsJIq80"
2816+
61766c58654c48684777717441 # "avlXeLHhGwqtA"
2817+
58 20 # bytes(32)
2818+
4283ec927ae0f208daaa2d026a814f # "B\x83ì\x92zàò\x08Úª-\x02j\x81O"
2819+
2b22dca52cf85ffa8f3f8626c6bd66 # "+"Ü¥,ø_ú\x8f?\x86&ƽf"
2820+
9047 # "\x90G"
2821+
78 1c # string(28)
2822+
68747470733a2f2f6578616d706c65 # "https://example"
2823+
2e636f6d2f726573706f6e7365 # ".com/response"
2824+
```
2825+
2826+
The following is a non-normative example of the `OpenID4VPHandover` structure:
2827+
```
2828+
Hex:
2829+
2830+
82714f70656e494434565048616e646f7665725820048bc053c00442af9b8eed494c
2831+
efdd9d95240d254b046b11b68013722aad38ac
2832+
2833+
CBOR diagnostic:
2834+
2835+
82 # array(2)
2836+
71 # string(17)
2837+
4f70656e494434565048616e646f76 # "OpenID4VPHandov"
2838+
6572 # "er"
2839+
58 20 # bytes(32)
2840+
048bc053c00442af9b8eed494cefdd # "\x04\x8bÀSÀ\x04B¯\x9b\x8eíILïÝ"
2841+
9d95240d254b046b11b68013722aad # "\x9d\x95$\x0d%K\x04k\x11¶\x80\x13r*­"
2842+
38ac # "8¬"
2843+
```
2844+
2845+
The following is a non-normative example of the `SessionTranscript` structure:
2846+
```
2847+
Hex:
2848+
2849+
83f6f682714f70656e494434565048616e646f7665725820048bc053c00442af9b8e
2850+
ed494cefdd9d95240d254b046b11b68013722aad38ac
2851+
2852+
CBOR diagnostic:
2853+
2854+
83 # array(3)
2855+
f6 # null
2856+
f6 # null
2857+
82 # array(2)
2858+
71 # string(17)
2859+
4f70656e494434565048616e646f # "OpenID4VPHando"
2860+
766572 # "ver"
2861+
58 20 # bytes(32)
2862+
048bc053c00442af9b8eed494cef # "\x04\x8bÀSÀ\x04B¯\x9b\x8eíILï"
2863+
dd9d95240d254b046b11b6801372 # "Ý\x9d\x95$\x0d%K\x04k\x11¶\x80\x13r"
2864+
2aad38ac # "*­8¬"
2865+
```
2866+
2867+
#### Invocation via the Digital Credentials API {#session_transcript_dc_api}
27372868

27382869
If the presentation request is invoked using the Digital Credentials API, the `SessionTranscript` CBOR structure as defined in Section 9.1.5.1 in [@ISO.18013-5] MUST be used with the following changes:
27392870

@@ -2758,14 +2889,14 @@ OpenID4VPDCAPIHandoverInfoBytes = bstr .cbor OpenID4VPDCAPIHandoverInfo
27582889
OpenID4VPDCAPIHandoverInfo = [
27592890
origin,
27602891
nonce,
2761-
jwk_thumbprint
2892+
jwkThumbprint
27622893
] ; Array containing handover parameters
27632894
27642895
origin = tstr
27652896
27662897
nonce = tstr
27672898
2768-
jwk_thumbprint = bstr
2899+
jwkThumbprint = bstr
27692900
```
27702901

27712902
The `OpenID4VPDCAPIHandover` structure has the following elements:

0 commit comments

Comments
 (0)