Skip to content

Commit a01f090

Browse files
committed
Define usage of HPKE and info structure to be used.
1 parent c39f50e commit a01f090

File tree

1 file changed

+74
-2
lines changed

1 file changed

+74
-2
lines changed

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

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,78 @@ 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 MAY be used by specifying the `alg` value according to [@I-D.ietf-jose-hpke-encrypt]. When it is, a `session_info` structure is calculated by the Wallet and the Verifier independently and included as mutually known private information. This is to ensure that encryption fails closed when the session information needed for verification of the credential is invalid.
1424+
1425+
When the response mode is `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+
BYTE(jwkThumbprint) ||
1435+
BYTE(255) ||
1436+
ASCII(responseUri)
1437+
```
1438+
1439+
Where:
1440+
1441+
- ASCII("OpenID4VP si"): A fixed ASCII string identifying this session_info structure.
1442+
- BYTE(255): In each occurence is a separator byte (0xFF) used to delimit fields.
1443+
- ASCII(clientId): The `client_id` request parameter. If applicable, this includes the Client Identifier Prefix.
1444+
- ASCII(nonce): The `nonce` request parameter.
1445+
- Byte(jwkThumbprint): The `JWK SHA-256 Thumbprint as defined in [RFC7638], encoded as a Byte, of the Verifier's public key used to encrypt the response.
1446+
- ASCII(responseUri): The `redirect_uri` or `response_uri` request parameter, depending on which is present, as determined by the Response Mode.
1447+
1448+
The following is a non-normative example of the `session_info` structure for `direct_post.jwt` response mode:
1449+
1450+
```example
1451+
"OpenID4VP si\xffx509_san_dns:example.com\xffexc7gBkxjx1rdc9udRrveKvSsJIq80avlXeLHhGwqtA\xffB\x83ì\x92zàò\x08Úª-\x02j\x81O+"Ü¥,ø_ú\x8f?\x86&ƽf\x90G\xffhttps://example.com/response"
1452+
```
1453+
1454+
The corresponding hexadecimal representation is:
1455+
1456+
```
1457+
4f70656e4944345650207369ff783530395f73616e5f646e733a6578616d706c652e636f6dff6578633767426b786a7831726463397564527276654b7653734a4971383061766c58654c48684777717441ff4283ec927ae0f208daaa2d026a814f2b22dca52cf85ffa8f3f8626c6bd669047ff68747470733a2f2f6578616d706c652e636f6d2f726573706f6e7365
1458+
```
1459+
1460+
When the response mode is `dc_api.jwt` the encoding is as follows:
1461+
1462+
```example
1463+
session_info = ASCII("OpenID4VPDCAPI si") ||
1464+
BYTE(255) ||
1465+
ASCII(origin) ||
1466+
BYTE(255) ||
1467+
ASCII(nonce) ||
1468+
BYTE(255) ||
1469+
BYTE(jwkThumbprint) ||
1470+
1471+
```
1472+
1473+
Where:
1474+
1475+
- ASCII("OpenID4VPDCAPI si"): A fixed ASCII string identifying this session_info structure.
1476+
- BYTE(255): In each occurence is a separator byte (0xFF) used to delimit fields.
1477+
- ASCII(origin): The ASCII string representing the Origin of the request as described in (#dc_api_request). It MUST NOT be prefixed with origin:.
1478+
- ASCII(nonce): The `nonce` request parameter.
1479+
- Byte(jwkThumbprint): The `JWK SHA-256 Thumbprint as defined in [RFC7638], encoded as a Byte, of the Verifier's public key used to encrypt the response.
1480+
1481+
The following is a non-normative example of the `session_info` structure for `dc_api.jwt` response mode:
1482+
1483+
```example
1484+
"OpenID4VPDCAPI si\xffhttps://example.com\xffexc7gBkxjx1rdc9udRrveKvSsJIq80avlXeLHhGwqtA\xffB\x83ì\x92zàò\x08Úª-\x02j\x81O+"Ü¥,ø_ú\x8f?\x86&ƽf\x90G"
1485+
```
1486+
1487+
The corresponding hexadecimal representation is:
1488+
1489+
```
1490+
4f70656e49443456504443415049207369ff68747470733a2f2f6578616d706c652e636f6dff6578633767426b786a7831726463397564527276654b7653734a4971383061766c58654c48684777717441ff4283ec927ae0f208daaa2d026a814f2b22dca52cf85ffa8f3f8626c6bd669047
1491+
```
1492+
1493+
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.
14231494

14241495
### Response Mode "direct_post.jwt" {#direct_post_jwt}
14251496

@@ -3562,4 +3633,5 @@ The technology described in this specification was made available from contribut
35623633

35633634
-01
35643635

3565-
* 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
3636+
* Add usage of HPKE an specfication for the `info` parameter.
3637+
* 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)