10.1.4.2.2. Wallet App and Wallet Unit Attestation Issuance

This section describes how the Wallet Provider issues a Wallet App and a Wallet Unit Attestations.

The figure illustrates the Sequence Diagram for Wallet App and Wallet Unit Attestations acquisition.

Fig. 10.4 Sequence Diagram for Wallet App and Wallet Unit Attestations acquisition.

Step 1: The User initiates a new operation that necessitates the acquisition of a Wallet App and Wallet Unit Attestations.

Steps 2-4: The Wallet Instance MUST:

  1. Verify the existence of Cryptographic Hardware Keys. If none exist, Wallet Instance re-initialization is required (WP_140a).

  2. Generate an asymmetric credential key pair to be attested in Wallet Unit Attestation (key_pub, key_priv).

  3. Generate an ephemeral asymmetric key pair for Wallet App Attestation (ephemeral_key_pub, ephemeral_key_priv), linking the public key to the attestation (WP_026).

  4. Verify the Wallet Provider's federation membership and retrieve its metadata (WP_023).

Steps 5-7 (Nonce Retrieval): The Wallet Instance requests a nonce value from the Wallet Solution Nonce Endpoint of the Wallet Provider Backend (WP_140b). The nonce is required to be unpredictable and serves as the main defense against replay attacks.

The nonce MUST ensures single-use within a predetermined time frame.

Upon a successful request, the Wallet Provider generates and returns the nonce value to the Wallet Instance.

Step 8: The Wallet Instance performs the following actions (WP_140c):

  • Creates two JSON objects client_data_waa, and client_data_wua each containing the nonce and the thumbprint of their respective JWKs (ephemeral_key_pub, key_pub).

  • Computes the corresponding hashes, client_data_hash_waa, and client_data_hash_wua by applying the SHA256 algorithm to the client_data_waa, and client_data_wua.

Below is a non-normative example of the client_data_waa JSON object.

{
  "nonce": "i4ThI2Jhbu81i8mqyWEuDG5t",
  "jwk_thumbprint": "vbeXJksM45xphtANnCiG6mCyuU4jfGNzopGuKvogg9c"
}

Steps 9-12: The Wallet Instance:

  • produces an hardware_signature value by signing the client_data_hash_waa and client_data_hash_wua with the Wallet Hardware's private key, serving as a proof of possession for the Cryptographic Hardware Keys (WP_140d).

  • requests the Device Integrity Service to create an integrity_assertion value for Wallet App Attestation linked to the client_data_hash_waa.

  • receives a signed integrity_assertion value for Wallet App Attestation from the Device Integrity Service, authenticated by the OEM (WP_140e).

Note

integrity_assertion is a custom payload generated by Device Integrity Service, signed by device OEM and encoded in base64 to have uniformity between different devices.

Note

In the case of Android OS, the flow continues based on Steps 13-16, otherwise for the case of iOS, the flow continues based on Steps 17-20.

Steps 13-16: The Wallet Instance:

  • requests the Key Attestation API to create an key_attestation value linked to the client_data_hash_wua.

  • receives a signed key_attestation value from the Key Attestation API, authenticated by the OEM.

  • generate attested_key value by signing the key_attestation using the private key of the initially generated credential key pair (priv_key).

Steps 17-20: The Wallet Instance:

  • requests the Device Integrity Service to create an integrity_assertion value linked to the client_data_hash_wua.

  • receives a signed integrity_assertion value for the Wallet Unit Attestation from the Device Integrity Service, authenticated by the OEM.

  • generate attested_key value by signing the integrity_assertion that is obtained for the Wallet Unit Attestation using the private key of the initially generated credential key pair (priv_key).

Steps 21-22 (Wallet App and Wallet Unit Attestation Issuance Request): The Wallet Instance:

Note

attested_key contains a key_attestation object in case of Android and integrity_assertion in case of iOS.

The Wallet Instance MUST send the signed Wallet App and Wallet Unit Attestation Request JWT as an assertion parameter in the body of an HTTP request to the Wallet Provider's Wallet App and Wallet Unit Attestation Issuance Endpoint (WP_142).

Steps 23-28: The Wallet Provider Backend evaluates the Wallet App and Wallet unit Attestation Request and MUST perform the following checks (WP_143):

  1. The request MUST include all required HTTP header parameters as defined in Wallet App and Wallet Unit Attestation Issuance Request (WP_143a).

  2. The signature of the Wallet App and Wallet Unit Attestation Request MUST be valid and verifiable using the provided jwk (WP_143b).

  3. The nonce value MUST have been generated by the Wallet Provider and not previously used (WP_143c).

  4. A valid and currently registered Wallet Instance associated with the provided MUST exist (WP_143d).

  5. The signature of the attested_key parameter Must be first validated using the provided jwk and its value (key_attestation in case of Android or integrity_assertion in case of iOS) MUST be validated according to the device manufacturer's guidelines.

  6. The client_data_waa MUST be reconstructed using the nonce and the jwk public key. The hardware_signature parameter value is then validated using the registered Cryptographic Hardware Key's public key associated with the Wallet Instance (WP_143e).

  7. The integrity_assertion for Wallet App Attestation MUST be validated according to the device manufacturer's guidelines. The specific checks performed by the Wallet Provider are detailed in the operating system manufacturer's documentation (WP_143f).

  8. The device in use MUST be free of known security flaws and meet the minimum security requirements defined by the Wallet Provider.

  9. The URL in the iss parameter MUST match the Wallet Provider's URL identifier (WP_143g).

Upon successful completion of all checks, the Wallet Provider issues a Wallet App Attestation valid for less than 24 hours (WP_144), and a Wallet Unit Attestation valid for at least one month.

Step 29 (Wallet App and Wallet Unit Attestation Issuance Response): Upon successful completion, the Wallet Provider MUST return a confirmation response using status code 200 and Content-Type application/json, containing the Wallet App and Wallet Unit Attestations signed by the Wallet Provider. The Wallet provider MUST return the Wallet App Attestation in at least three formats: JWT, SD-JWT and mdoc. The Wallet Instance will then perform security and integrity verification of the Wallet App and Wallet Unit Attestations received in addition to trust verification of its Issuer (WP_030–031).

Below is a non-normative example of the response.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "wallet_attestations": [
    "wallet_app_attestations": [
      {
        "format": "jwt",
        "wallet_app_attestation": "ey..."
      },
      {
        "format": "dc+sd-jwt",
        "wallet_app_attestation": "ey..."
      },
      {
        "format": "mso_mdoc",
        "wallet_app_attestation": "omppc3N1ZXJBdXRohEOhASahG...ArQwggKwMIICVqADAgEC"
      }
    ],

    "wallet_unit_attestation": "omppc3N1ZXJBdXRohEOhASahG...ArQwggKwMIICVqADAgEC"
  ]
}