Skip to content

Commit 584b8b5

Browse files
Define usage of HPKE and info structure to be used. (#703)
4 approvals. open for more than a week. reviewed in DCP WG call multiple times.
1 parent 501d067 commit 584b8b5

1 file changed

Lines changed: 66 additions & 1 deletion

File tree

1.1/openid-4-verifiable-presentations-1_1.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,71 @@ While this shows the payload of the above encrypted Authorization Response examp
14191419
Note that for the ECDH JWE algorithms (from Section 4.6 of [@!RFC7518]), the `apu` and `apv` values are inputs
14201420
into the key derivation process that is used to derive the content encryption key. Regardless of the algorithm used, the values are always part of the AEAD tag computation so will still be bound to the encrypted response.
14211421

1422-
Note: For encryption, implementers have a variety of options available through JOSE, including the use of Hybrid Public Key Encryption (HPKE) as detailed in [@I-D.ietf-jose-hpke-encrypt].
1422+
### Encryption using HPKE
1423+
Hybrid Public Key Encryption (HPKE) may be used for encrypted responses. If HPKE is used, the `alg` value MUST be specified according to [@I-D.ietf-jose-hpke-encrypt]. Additionally, a `session_info` structure MUST be calculated and utilized for encryption and decryption independently by the Wallet and the Verifier. This ensures that decryption fails closed when the session information needed for verification of the credential is invalid. The `session_info` structure is specific to the response modes `direct_post.jwt` and `dc_api.jwt`.
1424+
1425+
When the the presentation is invoked via redirects, such as Response Mode such as `direct_post.jwt`, the encoding is as follows:
1426+
1427+
```example
1428+
session_info = ASCII("OpenID4VP-si") ||
1429+
BYTE(255) ||
1430+
ASCII(clientId) ||
1431+
BYTE(255) ||
1432+
ASCII(nonce) ||
1433+
BYTE(255) ||
1434+
ASCII(responseUri)
1435+
```
1436+
1437+
Where:
1438+
1439+
- `ASCII("OpenID4VP-si")`: A fixed ASCII string identifying this `session_info` structure.
1440+
- `BYTE(255)`: In each occurence is a separator byte (0xFF) used to delimit fields.
1441+
- `ASCII(clientId)`: The `client_id` request parameter, as was passed in the Authorization Request, potentially including the Client Identifier Prefix.
1442+
- `ASCII(nonce)`: The `nonce` request parameter.
1443+
- `ASCII(responseUri)`: The `redirect_uri` or `response_uri` request parameter, depending on which is present, as determined by the Response Mode.
1444+
1445+
The following is a non-normative example of the `session_info` structure for `direct_post.jwt` response mode:
1446+
1447+
```example
1448+
OpenID4VP-si\xffx509_san_dns:example.com\xffexc7gBkxjx1rdc9udRrveKvSsJIq80avlXeLHhGwqtA\xffhttps://example.com/response
1449+
```
1450+
1451+
The corresponding hexadecimal representation is:
1452+
1453+
```
1454+
4f70656e49443456502d7369ff783530395f73616e5f646e733a6578616d706c652e636f6dff6578633767426b786a7831726463397564527276654b7653734a4971383061766c58654c48684777717441ff68747470733a2f2f6578616d706c652e636f6d2f726573706f6e7365
1455+
```
1456+
1457+
When the response mode is `dc_api.jwt` the encoding is as follows:
1458+
1459+
```example
1460+
session_info = ASCII("OpenID4VPDCAPI-si") ||
1461+
BYTE(255) ||
1462+
ASCII(origin) ||
1463+
BYTE(255) ||
1464+
ASCII(nonce)
1465+
```
1466+
1467+
Where:
1468+
1469+
- `ASCII("OpenID4VPDCAPI-si")`: A fixed ASCII string identifying this `session_info` structure.
1470+
- `BYTE(255)`: In each occurence is a separator byte (0xFF) used to delimit fields.
1471+
- `ASCII(origin)`: The ASCII string representing the Origin of the request as described in (#dc_api_request). It MUST NOT be prefixed with `origin:`.
1472+
- `ASCII(nonce)`: The `nonce` request parameter.
1473+
1474+
The following is a non-normative example of the `session_info` structure for `dc_api.jwt` response mode:
1475+
1476+
```example
1477+
OpenID4VPDCAPI-si\xffhttps://example.com\xffexc7gBkxjx1rdc9udRrveKvSsJIq80avlXeLHhGwqtA
1478+
```
1479+
1480+
The corresponding hexadecimal representation is:
1481+
1482+
```
1483+
4f70656e494434565044434150492d7369ff68747470733a2f2f6578616d706c652e636f6dff6578633767426b786a7831726463397564527276654b7653734a4971383061766c58654c48684777717441
1484+
```
1485+
1486+
The `session_info` structure's bytes are used as the value of the `info` parameter when using Integrated Encryption as the Key Management Mode. If the `recipient_structure` is being used then it is used as the value of the `recipient_extra_info` parameter instead.
14231487

14241488
### Response Mode "direct_post.jwt" {#direct_post_jwt}
14251489

@@ -3567,5 +3631,6 @@ The technology described in this specification was made available from contribut
35673631

35683632
-01
35693633

3634+
* Add usage of HPKE for the `info` parameter.
35703635
* Add security consideration not to use VP Token as Access Token
35713636
* Clarify that `encrypted_response_enc_values_supported` applies only if JWE content encryption algorithm is used; e.g., it does not apply to JOSE HPKE

0 commit comments

Comments
 (0)