Proximity Flow

This section describes how a Relying Party Instance requests the presentation of an mdoc-CBOR Credential to a Wallet Instance according to the ISO 18013-5 Specification.

The high-level presentation phase is structured into three broad sub-phases as depicted in the following figure:

_images/high-level-presentation-proximity.svg

High-Level Presentation Flow in proximity

The sub-phases are described below:

1. Device Engagement: This subphase begins when the User is prompted to disclose certain attributes from the mdoc(s). The objective of this subphase is to establish a secure communication channel between the Wallet Instance and the Relying Party Instance, so that the mdoc requests and responses can be exchanged during the communication subphase. The messages exchanged in this subphase are transmitted through short-range technologies to limit the possibility of interception and eavesdropping.

2. Session establishment: During the session establishment phase, the Relying Party Instance sets up a secure connection. All data transmitted over this connection is encrypted using a session key, which is known to both the Wallet Instance and the Relying Party Instance at this stage. The established session MAY be terminated based on the conditions as detailed in [ISO18013-5 #9.1.1.4].

3. Communication - Device Retrieval: The Relying Party Instance encrypts the mdoc request with the appropriate session key and sends it to the Wallet Instance together with its public key in a session establishment message. The mdoc uses the data from the session establishment message to derive the session key and decrypt the mdoc request. During the communication subphase, the Relying Party Instance has the option to request information from the Wallet Instance using mdoc requests and responses. The primary mode of communication is the secure channel established during the session setup. The Wallet Instance encrypts the mdoc response using the session key and transmits it to the mobile Relying Party via a session data message.

Relying Party and Wallet Instances registered in the IT-Wallet ecosystem MUST support at least:

  • Supervised Device Retrieval flow where a human Relying Party is overseeing the verification process in person, in contrast with unsupervised flow where verification might happen through automated systems without human oversight.

  • Device Engagement based on QR Code.

  • RP Instance Authentication following the mechanisms defined in the ISO18013-5 for the reader authentication.

  • Device Retrieval mechanism based on Bluetooth Low Energy (BLE) for the communication sub-phase. Server Retrieval mechanism MUST NOT be supported.

  • Domestic Document Type and Namespaces defined in this technical specification in addition to those already defined in the ISO18013-5 for the mDL (see mdoc-CBOR Credential Format for more details).

  • Wallet Instance validation through the Wallet Attestation.

The following figure illustrates the low-level flow compliant with ISO 18013-5 for proximity flow.

_images/High-Level-Flow-ITWallet-Presentation-ISO-updated.svg

High-Level Proximity Flow

Step 1: The User opens the Wallet Instance initiating the process.

Step 2: The User authenticates itself to the Wallet Instance. This can be done by the Wallet Instance or a Wallet Secure Cryptographic Application (WSCA). It is a prerequisite for accessing sensitive data and presenting attributes.

Step 3: The User selects the proximity presentation functionality.

Step 4: [Optional] If the initial authentication in Step 2 was not done through WSCA, a separate authentication via WSCA MAY be required.

Step 5: The Wallet Instance generates a new ephemeral Elliptic Curve key pair for secure communication. The public key (EDeviceKey.Pub) will be used for session encryption. This is part of the device engagement process.

Step 6: The Wallet Instance presents a QR Code to the Relying Party Instance. This QR code contains the DeviceEngagement data, which includes the EDeviceKey.Pub and information about supported cipher suites.

Below is a non-normative example using the diagnostic notation of a CBOR-encoded DeviceEngagement that utilizes QR for device engagement and Bluetooth Low Energy (BLE) for data retrieval.

{
  0: "1.1", % Version (Updated to 1.1 because Capabilities and OriginInfos are present)
  1: % Security
  [
    1, % defines the cipher suite , which contains only EC curves
    24(<< % embedded CBOR data item
    {
      1: 2, % kty:EC2 (Elliptic curves with x and y coordinate pairs)
      -1: 1, % crv:p256
      -2:h'5A88D182BCE5F42EFA59943F33359D2E8A968FF289D93E5FA444B624343167FE', % x-coordinate
      -3:h'B16E8CF858DDC7690407BA61D4C338237A8CFCF3DE6AA672FC60A557AA32FC67' % y-coordinate
    }
    >>)
  ],
  2: % DeviceRetrievalMethods (Device engagement using QR code with BLE for retrieval)
  [
    [
      2, % BLE
      1, % Version
      { % BLE options
        0: false, % no support for mdoc peripheral server mode
        1: true,  % support for mdoc central client mode
        11: h'45EFEF742B2C4837A9A3B0E1D05A6917' % UUID of mdoc client central mode
      }
    ]
  ],
  5: % OriginInfos (Required because Capabilities is present)
  [],
  6: % Capabilities (Defines supported features)
  {
    2: false, % HandoverSessionEstablishmentSupport (Supports negotiated handover)
    3: true % ReaderAuthAllSupport (Supports reader authentication)
  }
}

Step 7: The verifier uses its Relying Party Instance to scan the QR code and retrieve the DeviceEngagement data from the mdoc.

Step 8: The Relying Party Instance generates its ephemeral key pair (EReaderKey.Priv, EReaderKey.Pub). The private key (EReaderKey.Priv) MUST be kept secret, and the public key (EReaderKey.Pub) MUST be used in establishing the session.

Step 9: The Wallet Instance and Relying Party Instance independently MUST derive the session keys using their private ephemeral key and the other party's public ephemeral key through a key agreement protocol. This ensures session encryption. In this particular step, the Relying Party Instance MUST compute its session key.

Step 10: The RP Instance MUST prepare a SessionEstablishment message. This message MUST be signed by the Relying Party Instance (mdoc reader authentication as specified in [ISO18013-5 #9.1.4]) and encrypted using the session keys derived in the previous step. The SessionEstablishment message MUST include the EReaderKey.Pub and a request for specific attribute(s).

Below is a non-normative example using the diagnostic notation of a CBOR-encoded SessionEstablishment that contains the mdoc request of a Wallet Attestation along with an mDL Digital Credential.

{
  "version": "1.0",  % Version
  "docRequests": 
  [
    {
    "itemsRequest": 
    24(<<  % Embedded CBOR data item
      {
        "docType": "org.iso.18013.5.1.mDL",
        "nameSpaces": 
        {
          "org.iso.18013.5.1": 
          {
            "family_name": true,
            "document_number": true,
            "driving_privileges": true,
            "issue_date": true,
            "expiry_date": true,
            "portrait": false
          }
        }
      }
    >>)
    },
    {
    "itemsRequest": 
    24(<<  % Embedded CBOR data item
      {
        "docType": "org.iso.18013.5.1.IT.WalletAttestation",
        "nameSpaces": {
          "org.iso.18013.5.1.IT": 
          {
            "wallet_name": true,
            "wallet_link": true,
            "sub": true,
            "aal": true
          }
        }
      }
    >>)
    }
  ],
  "readerAuthAll": 
  [
    h'a10126', % COSE_Sign1 authentication header
    {
      33: h'308201253081cda00302010202012a300a06082a8648ce3d0403023020311e301c06035504030c15536f6d652052656164657220417574686f72697479301e170d3233313132343130323832325a170d3238313132323130323832325a301a3118301606035504030c0f536f6d6520526561646572204b65793059301306072a8648ce3d020106082a8648ce3d03010703420004aa1092fb59e26ddd182cfdbc85f1aa8217a4f0fae6a6a5536b57c5ef7be2fb6d0dfd319839e6c24d087cd26499ec4f87c8c766200ba4c6218c74de50cd1243b'
    },
    null, % No additional reader authentication
    h'58a0d421a7e53b7db0412a196fea50ca6d4c8a530a47dd84d88588ab145374bd0ab2a724cf2ed2facf32c7184591c5969efd53f5aba63194105440bc1904e1b9'  % Reader authentication signature
  ]
}

Step 11: The Relying Party Instance MUST transmit the encrypted and signed SessionEstablishment message to the Wallet Instance over a secure BLE connection that was established based on the device engagement information.

Step 12: The Wallet Instance MUST compute the session key, as described in Step 9.

Step 13: Upon receiving the SessionEstablishment message, the Wallet Instance MUST decrypt it using the shared session key and MUST verify the Relying Party Instance's signature (mdoc reader authentication as specified in [ISO18013-5 #9.1.1.4]) to ensure its authenticity.

Step 14: The Wallet Instance MUST decrypt the attribute request and MUST prompt the User for their consent to release the requested attributes. It MUST also display the contents of the Relying Party's registration certificate to ensure transparency about the requested data and its registered purpose.

Step 15: The User reviews the request and the Relying Party's registration information and then approves the presentation of the requested attributes.

Step 16: After receiving User approval, the Wallet Instance MUST retrieve the requested mdoc Digital Credentials. It then MUST prepare a SessionData message containing these Digital Credentials, and it MUST sign the required authentication data (as part of the mdoc authentication process, as specified in [ISO18013-5 #9.1.3]). It MUST encrypt it using the established session keys before transmitting it to the Relying Party Instance over the secure BLE channel. The signing ensures device binding and data integrity. The mdoc response MUST be encoded in CBOR, with its structure outlined in [ISO18013-5 #8.3.2.1.2.2].

Below is a non-normative example using the diagnostic notation of a CBOR-encoded SessionData that contains the mdoc response of a Wallet Attestation and an mDL.

{
    "version": "1.0",
    "documents": 
    [
      {
        "docType": "org.iso.18013.5.1.mDL",
        "issuerSigned": 
        {
          "nameSpaces": 
          {
            "org.iso.18013.5.1": 
            [
              24(<<
                {
                    "digestID": 0,
                    "random": h'790401ed5d0822d1aced942e4b0c41f754eee67b89c5ee3b8fd2c97491a96406',
                    "elementIdentifier": "family_name",
                    "elementValue": "Rossi"
                }
              >>),
              24(<<
                {
                    "digestID": 3,
                    "random": h'0c8f68d1ec3aa445ef68aa10b7a5875fa18ca222a821e23890a227cdc7d25e8f',
                    "elementIdentifier": "issue_date",
                    "elementValue": 1004(2025-03-27)
                }
              >>),
              24(<<
                {
                    "digestID": 4,
                    "random": h'0a9ed0d4937673152e52fb3fac0722baf4252e0d0c9869919e3339670203178e',
                    "elementIdentifier": "expiry_date",
                    "elementValue": 1004(2030-03-27)
                }
              >>),
              24(<<
                {
                    "digestID": 8,
                    "random": h'88e94c0365c611b523518d9a1b179ae52e242383576249f4965c40c6c97cf214',
                    "elementIdentifier": "document_number",
                    "elementValue": "XX1234567"
                }
              >>),
              24(<<
                {
                    "digestID": 9,
                    "random": h'944758b43602b01ad68911b062349845492c04c6a78129bcf8cb5fb1396af2fc',
                    "elementIdentifier": "portrait",
                    "elementValue": h'ffd8ffe000104a46494600010101009000900000ffdb004300130d0e110e0c
                    13110f11151413171d301f1d1a1a1d3a2a2c2330453d4947443d43414c566d5d4c51685241435f82
                    606871757b7c7b4a5c869085778f6d787b76ffdb0043011415151d191d381f1f38764f434f767676
                    76767676767676767676767676767676767676767676767676767676767676767676767676767676
                    76767676767676ffc00011080018006403012200021101031101ffc4001b00000301000301000000
                    000000000000000005060401020307ffc40032100001030303020502030900000000000001020304
                    0005110612211331141551617122410781a1163542527391b2c1f1ffc40015010101000000000000
                    00000000000000000001ffc4001a110101010003010000000000000000000000014111213161ffda
                    000c03010002110311003f00a5bbde22da2329c7d692bc7d0d03f52cfb0ff75e7a7ef3e7709723a1
                    d0dae146ddfbb3c039ce07ad2bd47a7e32dbb8dd1d52d6ef4b284f64a480067dfb51f87ffb95ff00
                    eb9ff14d215de66af089ce44b7dbde9cb6890a2838eddf18078f7add62d411ef4db9b10a65d6b95a
                    147381ea0d495b933275fe6bba75c114104a8ba410413e983dff004f5af5d34b4b4cde632d0bf1fd
                    1592bdd91c6411f3934c2fa6af6b54975d106dcf4a65ae56e856001ebc03c7ce29dd9eef1ef10fc4
                    47dc9da76ad2aee93537a1ba7e4f70dd8eff0057c6dffb5e1a19854a83758e54528750946ec67048
                    50cd037bceb08b6d7d2cc76d3317fc7b5cc04fb6707269c5c6e0c5b60ae549242123b0e493f602a0
                    75559e359970d98db89525456b51c951c8afa13ea8e98e3c596836783d5c63f5a61a99fdb7290875
                    db4be88ab384bbbbbfc7183fdeaa633e8951db7da396dc48524fb1a8bd611a5aa2a2432f30ab420a
                    7a6d3240c718cf031fa9ef4c9ad550205aa02951df4a1d6c8421b015b769db8c9229837ea2be8b1b
                    0d39d0eba9c51484efdb8c0efd8d258daf3c449699f2edbd4584e7af9c64e3f96b9beb28d4ac4093
                    1e6478c8e76a24a825449501d867d2b1dcdebae99b9c752ae4ecd6dde4a179c1c1e460938f9149ef
                    655e515c03919a289cb3dca278fb7bf177f4faa829dd8ce3f2ac9a7ecde490971fafd7dce15eed9b
                    71c018c64fa514514b24e8e4f8c5c9b75c1e82579dc1233dfec08238f6add62d391acc1c5256a79e
                    706d52d431c7a0145140b9fd149eb3a60dc5e88cbbc2da092411e9dc71f39a7766b447b344e847dc
                    ac9dcb5abba8d145061d43a6fcf1e65cf15d0e90231d3dd9cfe62995c6dcc5ca12a2c904a15f71dd
                    27d451453e09d1a21450961cbb3ea8a956433b781f1ce33dfed54f0e2b50a2b71d84ed6db18028a2
                    8175f74fc6bda105c529a791c25c4f3c7a11f71586268f4a66b726e33de9ea6f1b52b181c760724e
                    47b514520a5a28a283ffd9'  
                }
              >>),
              24(<<
                {
                    "digestID": 10,
                    "random": h'577e4822125f55fe923117aba01fdaefcc67d4aea80018fc22efa8d48e17982f',
                    "elementIdentifier": "driving_privileges",
                    "elementValue": [
                      {
                        "vehicle_category_code": "A",
                        "issue_date": 1004("2020-09-17"),
                        "expiry_date": 1004("2031-06-10")
                        }
                      ]
                }
              >>)
            ]
          },
          "issuerAuth": 
          [
            << {1: -7} >>,
            {
              33: h'30820208308201afa00302010202142eb39c647c81836bcf79fa9cd0b201ec0bf52307300a0
              6082a8648ce3d0403023064310b30090603550406130255533113301106035504080c0a43616c6966
              6f726e69613116301406035504070c0d53616e204672616e636973636f31133011060355040a0c0a4
              d7920436f6d70616e793113301106035504030c0a6d79736974652e636f6d301e170d323530333237
              3135353532305a170d3235303430363135353532305a3064310b30090603550406130255533113301
              106035504080c0a43616c69666f726e69613116301406035504070c0d53616e204672616e63697363
              6f31133011060355040a0c0a4d7920436f6d70616e793113301106035504030c0a6d79736974652e6
              36f6d3059301306072a8648ce3d020106082a8648ce3d03010703420004f33da72d0dd0009b62221b
              0e839099b12dab5e01021124ebf9060422e648f3c3ec6614a86da1e91e552b2ae35e04d3058ae82b5
              c65a7f1f26800cb4499652a09a33f303d303b0603551d1104343032863068747470733a2f2f637265
              64656e7469616c2d6973737565722e6f6964632d66656465726174696f6e2e6f6e6c696e65300a060
              82a8648ce3d040302034700304402204d1f0819971652b79ebe4825547de3d5554d2f41410225e6b1
              3dab949cda125e022079ba71b823619e49719dce5daa565bf745d3d97e2b87c7f7d6a626f981e653ed'
            },
            <<
              24(<<
                {
                  "version": "1.0",
                  "digestAlgorithm": "SHA-256",
                  "docType": "org.iso.18013.5.1.mDL",
                  "valueDigests": {
                    "org.iso.18013.5.1": 
                    {
                        0: h'f46b65d5060ad060ab9be62ff22ea8633437619ebdc7fa81f2d151159e92bffe',
                        1: h'e506545f6a6fd5d982670b4d62fc2b0688dc8f26754e7b0c574d63f5d72a85ac',
                        2: h'cfcf96fa12d100eeed5f00183d3b6a0888baa47eae85b5b95037eca7bbc0d07e',
                        3: h'8b0772252b0e06b611676b6b3402eb33bf866eb145e49f4d5f23215e6a047772',
                        4: h'14135c96693e2ab08d956876ee491357d906a6dd125557196dfb9811ba54aa8d',
                        5: h'86dcbd99233fbb84a9a2dce3a864a425e6e809300067a4475e3ea2a4d233dc74',
                        6: h'2e9512d35ea225e69e7b2180ecc1678dcc3e77a16e36427e64b4f0e2861b4d3a',
                        7: h'4efe55c36f6249d23c473a125afc5181aa30633936494781554971b72ff13700',
                        8: h'cc44a4f9983c5b0b1efc0e82e2867c8d5bbdf89c34bff16a1953c923bb4e4b3e',
                        9: h'775eb2af0aa55f2071d62662b35c99698ae3bc0e2c4af5724ff88476cddd152f',
                       10: h'915d0ad53dd23dace34968c263d307c04701a9bb9dc9865af91dc409786fd833',
                       11: h'47d89ff4fb513044e6f2394236755ac0abf3e4f4a46f40454a458a59f8b7a6fb'
                    },
                    "org.iso.18013.5.1.IT": {
                       12: h'16d2098702e896b4614dff1859bd3b42105cac2e62ce7f87dcacc249a656db32',
                       13: h'755fd7c0f9272a8589c4a661a8aa80dc916018e500884eba316899d653fcb8d1'
                      }
                  },
                  "deviceKeyInfo": {
                    "deviceKey": {
                        1: 2,
                       -1: 1,
                       -2: h'f96b29873b61f05403e2963a7ecbc799c9aab28d8a6629e5848cfdef85442866',
                       -3: h'a9fef033a900c63e3894d8deb805a2a1fb55ef0d2b88e3c0d3336408186485ef'
                    }
                  },
                  "validityInfo": {
                    "signed": 0("2025-03-27T00:00:00Z"),
                    "validFrom": 0("2025-03-27T00:00:00Z"),
                    "validUntil": 0("2026-03-27T00:00:00Z")
                  },
                  "status": {
                    "status_list": {
                      "idx": 1340,
                      "uri": "https://statusprovider.example.org/statuslists/1"                           
                    }
                  }
                }
              >>)
            >>,
            h'd09f9acdf7a6be5e4aeb405bfb3b297b1b8003bcf52558a2f39fc6e5cffed40f18f49d2cc0e72a2a5645
            8d8aade591dee8d6540e639bca637f94bd9fa56f345c'
          ]
        },
        "deviceSigned": 
        {
          "nameSpaces": 24(<< {} >>),
          "deviceAuth": 
          {
            "deviceSignature": 
            [
              << {1: -7} >>,
              {},
              null,
              h'E99521A85AD75943BF5AEAE68943BF5AE249943BF5AE943BF5AE43BF5AEDE99521A85AD75943BF5AEAE
              68943BF5AE249943BF5AE943BF5AE43BF5AED'

            ]
          }
        }
      },
      {
        "docType": "org.iso.18013.5.1.IT.WalletAttestation",
        "issuerSigned": 
        {
          "nameSpaces": 
          {
            "org.iso.18013.5.1.IT": 
            [
              24(<<
                {
                  "digestID": 0,
                  "random": h'691a4e9c599982a009e6e0e4d64784e53dd8b1ebca79e7d6eb2146b16c7def7a',
                  "elementIdentifier": "wallet_name",
                  "elementValue": "Wallet_Hobbiton_v1"
                }
              >>),
              24(<<
                {
                  "digestID": 1,
                  "random": h'6659db56b91fd967107742dc45dff9e692f03bb9298e8b90b0cefbe6f7475f25',
                  "elementIdentifier": "wallet_link",
                  "elementValue": "https://example.com/wallet/detail_info.html"
                }
              >>),
              24(<<
                {
                  "digestID": 2,
                  "random": h'147cb4f9a4a8b71cb13a963e73dfa01ec59953831dda0a818e9b8c457ff91b31',
                  "elementIdentifier": "sub",
                  "elementValue": "3B4hK2m7fA9TdVzqLrGp6W8XyJ1sNtQc"
                }
              >>),
              24(<<
                {
                  "digestID": 3,
                  "random": h'c1e2ded83eb15143e16f3e4bcda9a7804f467263a59b0f4f3269ccdc240ce453',
                  "elementIdentifier": "aal",
                  "elementValue": "https://trust-list.eu/aal/high"
                }
              >>)
            ]
          },
          "issuerAuth": 
          [
            << {1: -7} >>,
            {
              33: h'207581c0bc387bf3d7e7c7a3991395ed28069806e5ed21fdeb19aaa6f33bd9da98c88e44fc32
              cb19578e472a2cf4ed2c9182864265754dc19941a4b408d056a657a649bc67a9aa0e22ff76460680e7
              4b26197dd542a41ac6d99dc6a94bbfc668844705cd4dd6b56f521339174deda55676088b531901c992
              a65e97213037215057cb4d8519b2ea8c03b376b048b9c60f75586b067456ae78aac9e472b1fa6ce0cf
              65345c463ae0c94e59bb034597533a14a84f4b99d19b72207607c2f692e6956822cb19736de6b38477
              d726ac07983cfe9cd1e27b59f3cabae28653eac2bbf884fca22122df8c78da110c411f310abd6fae86
              2e7766044e1af78525dabf5412ebcf57532ee25b959fa1d591f950adb46da1cec14c0a6c08383a95de
              5fad9673fdf72130029b81350d048568fa1b962ba2118af48a8c4aaf074e5265f367d134055a4c9f99
              21a8f03050e062a5b91bb053bcbd69bc59e37ac0c3a6358461893fae6f87021c6492638864ae38afb6
              aa444406c1c296300be1a152b27fbcdd543d73888199f2daf3bc007bdcbacf2f6a8d498c4d6f42f59f
              0cc8967db15016faf81c3fbd4585e5eb657c13c86d4149d17a10417d3a65342d206fdbd3ba139b8d9a
              175b27a4578f37703b20cd2179c6e9ce49c26391e46753c86b80ea0837bc71c57893cacf4e76f1bbe1
              ce2292914d5d247cecb579d36271ae0b7d0988ef42105c90fda654a7a41908a8680b38896689f3e511
              663bcf667d7a2787e1bb8effa3b9910064d59609f58f98e3e9edd35aa4f170da7521db1c6ab6b3a6fb
              e585778fccf2426417d509c5f2e7d5b726148a46373f0b43bf6749b4c8af592b0a032a3971cb0ea453
              9c2493314b4429b7d88b8abd160342e9d8e790dd61c0def2e84df2db0d7f8603814ca49a49c76513b0
              94c283ca5bf60710ee5fd7511d0307184b8b3349f5ac6cc29d2d5429b0e9cdb6ba72a53159833f45d3
              72c1b191f20434e7a9120f528d1c9463d5b58380e1087f288c444cc55c182663ee3a4a70ae21784093
              5276a1c8424a8a893175dd080704daeceffee9c8e453adcadd3f0ba383bbed6f0d3cada8055d08008d
              b244da9e59f9972641c036fcac047d2d067bca02bca7f752'
            },
            <<
              24(<<
                {
                  "version": "1.0",
                  "digestAlgorithm": "SHA-256",
                  "docType": "org.iso.18013.5.1.it.WalletAttestation",
                  "valueDigests": {
                  "org.iso.18013.5.1.IT": {
                      0: h'0f1571a988fcdf29290d4a509d25b24c7b182d8c3f5db27c761f6b7ec9b0c830',
                      1: h'0cdfe0774a2b596c90b147ae3a61fd55f06cb7490aab76d3a49105dc3c5a987b',
                      2: h'e238214925589843954da4f60772ce3054fd8f0a0c1f5a4b6f2a791b7ec1993f',
                      3: h'bbc77e6cce544edf864f2cf60d9f1eb13998a99126584b3615a6437f822ea820'
                    }
                  },
                  "deviceKeyInfo": {
                    "deviceKey": {
                      1: 2,
                     -1: 1,
                     -2: h'b820963964e5483cb929a3e8bb79da5a7137f50f859f6a173d3d642cefa8f419',
                     -3: h'0a6da0af437ebf9672351dcac420f1a37924bde1076c4cf09f4cb05ad3dba8b0'
                    }
                  },
                  "validityInfo": {
                    "signed": 0("2025-03-03T10:00:00Z"),
                    "validFrom": 0("2025-03-03T10:00:00Z"),
                    "validUntil": 0("2026-03-03T10:00:00Z")
                  }
                }
              >>)
            >>,
            h'98F1D2C47EB3AA09F5F3CCF2839D7E6A12B37E5A4C9E42E7B0D5D299AB5CE87F7A0DFF12B6A5CC
            9D9B329A8165F8B163D479DEA9A2E4B0C30FD6C83FADB5E244'
          ]
        },
        "deviceSigned": 
        {
          "nameSpaces": 24(<< {} >>),
          "deviceAuth": 
          {
            "deviceSignature": 
            [
              << {1: -7} >>,
              {},
              null,
              h'E99521A85AD75943BF5AEAE68943BF5AE249943BF5AE943BF5AE43BF5AEDE99521A85AD75943
              BF5AEAE68943BF5AE249943BF5AE943BF5AE43BF5AED'
            ]
          }
        }
      }
    ],
    "status": 0
}

Step 17: The Relying Party Instance receives the SessionData, then it MUST decrypt it, and it MUST verify the Wallet Instance's signature to ensure the data's integrity and that it originates from the expected device (device binding). It also MUST check the validity of the mdoc, including its Issuer's signature. In case of long-lived Digital Credentials, it SHOULD also check the revocation status using TOKEN-STATUS-LIST.

Step 18: Once the data exchange is complete, either party can terminate the session. If BLE is used, this can involve sending a status code for session termination or the “End” command. In this scenario, the GATT Client (Relying Party Instance) MUST unsubscribe from characteristics and disconnect from the GATT server (Wallet Instance).

Final Consideration: The presentation flow focused on the technical data exchange in proximity settings. It is crucial to recognise that supervised proximity flows involving a human verifier play a vital role in many use cases (e.g., age verification at a store, identity check by law enforcement). The human element adds a layer of identity verification through visual inspection and comparison, contributing to User Binding and overall authentication assurance aspects not fully captured in a purely technical presentation flow.

Note

During proximity presentation the Wallet Instance might not be able to fetch a fresh Wallet Attestation, in this case, the Wallet Instance SHOULD send the latest version of the Wallet Attestation. It is left up to the Relying Party to determine whether a presentation with a valid but expired Wallet Attestation is valid or not.

Device Engagement

The Device Engagement structure MUST be CBOR encoded and have at least the following components:

Component

Description

Version

(tstr). Version of the device engagement structure.

Security

(array). Contains two mandatory values:

  • (int). Cipher suite identifier. See Table 22 of ISO18013-5.

  • (bstr). Public ephemeral key generated by the Wallet Instance, used by the Relying Party Instance to derive the Session Key. The key MUST be of a type allowed by the selected cipher suite.

BleOptions

(map). Provides options for the BLE connection, such as Peripheral Server or Central Client mode, and the device UUID.

Only Central Client Mode MUST be supported by this implementation profile.

Capabilities

(map). Declares optional capabilities supported by the mdoc, that are:

  • HandoverSessionEstablishmentSupport (bool). If present, it MUST be set to true. Indicates support for receiving the SessionEstablishment message during Negotiated Handover, as defined in [ISO18013-5 #8.2.2.4].

  • ReaderAuthAllSupport (bool). If present, it MUST be set to true. Indicates support for receiving the ReaderAuthAll structure in the mdoc request, as defined in [ISO18013-5 #8.3.2.1.2.1].

OriginInfos

(array). Describes the interface used to receive and deliver the engagement structure.

When used in flows defined in [ISO18013-5 #6.3.2.1], OriginInfos MAY be an empty array.

mdoc Request

The messages in the mdoc Request MUST be encoded using CBOR. The resulting CBOR byte string for the mdoc Request MUST be encrypted with the Session Key obtained after the Device Engagement phase and MUST be transmitted using the BLE protocol. Each mdoc Request MUST be compliant with the following structure, and MUST include the following components, unless otherwise specified:

Component

Description

version

(tstr). Version of the mdoc Request structure. Enables compatibility management across different versions or implementation profiles.

docRequests

(array). Each entry is a DocRequest containing:

  • itemsRequest. CBOR-encoded ItemsRequest structure, formatted as:

    • docType (tstr). The type of document requested. See mdoc-CBOR Credential Format.

    • nameSpaces (map). A map of namespace identifiers to requested DataElements.

      Each entry in DataElements includes:

      • DataElementIdentifier (tstr). The identifier of the requested data element.

      • IntentToRetain (bool). Indicates whether the Relying Party intends to retain the value of the data element.

  • readerAuth (COSE_Sign1, CONDITIONAL). Used to authenticate the the Relying Party Instance for each DocRequest. The signature is computed over ReaderAuthentication data, as defined in [ISO18013-5 #9.1.4].

    This component MUST be present only if readerAuthAll is not used.

readerAuthAll

(COSE_Sign1, CONDITIONAL). Used to authenticate the Relying Party once for all DocRequest`s. The signature is computed over `ReaderAuthenticationAll data, as defined in [ISO18013-5 #9.1.4].

This component MUST be present only if ReaderAuthAllSupport is set to true in the DeviceEngagement structure, and individual readerAuth fields are not used.

mdoc Response

The messages in the mdoc Response MUST be encoded using CBOR and MUST be encrypted with the Session Key obtained after the Device Engagement phase. Each mdoc Response MUST be compliant with the following structure, and MUST include the following components, unless otherwise specified:

Component

Description

version

(tstr). Version of the mdoc Response structure. Enables tracking changes and maintaining compatibility across versions of the standard or implementation profiles.

documents

(array of Documents, OPTIONAL). CBOR-encoded collection of documents returned in response to the request. Each document includes issuerSigned and deviceSigned components, and follows the structure defined in the below table.

documentErrors

(map, OPTIONAL). A map of error codes for unreturned documents, as defined in [ISO18013-5 #8.3.2.1.2.3]. Each key is a docType, and each value is an ErrorCode (int) indicating the reason why the document was not returned.

status

(uint). Status code indicating the outcome of the request. For example, "status": 0 means successful processing. For details, see Table 8 (ResponseStatus) of [ISO18013-5 #8.3.2.1.2].

Each document in documents MUST be compliant with the following structure, and it MUST include the following components, unless otherwise specified:

Component

Description

docType

(tstr). Document type identifier. For example, for an mDL, the value MUST be org.iso.18013.5.1.mDL.

issuerSigned

(bstr). Contains the IssuerNameSpaces structure, which includes data elements signed by the Issuer, and the issuerAuth structure, which ensures their authenticity and integrity using the Mobile Security Object (MSO). See mdoc-CBOR Credential Format.

deviceSigned

(bstr). Contains the DeviceNameSpaces structure (data elements signed by the Wallet Instance), and the deviceAuth structure, which includes the authentication data signed by the Wallet Instance. See the table below for details.

errors

(map, OPTIONAL). A map of error codes for each unreturned data element grouped by namespace. Each key represents a namespace, and each value is a map of data element identifiers to corresponding error codes. See [ISO18013-5 #8.3.2.1.2.3] for details on the errors structure.

A deviceSigned data structure MUST be compliant with the following structure, and MUST include the following components:

Component

Description

nameSpaces

(bstr). Contains the DeviceNameSpaces structure. It MAY be an empty structure. DeviceNameSpaces maps namespace identifiers to a set of data elements signed by the Wallet Instance.

Each namespace contains one or more DeviceSignedItem, where each item includes:

  • DataItemName (tstr). The identifier of the data element.

  • DataItemValue (any). The value of the data element.

deviceAuth

(COSE_Sign1). Contains the DeviceAuth structure, which MUST include the deviceSignature for the Wallet Instance authentication. The signature is computed over the DeviceAuthentication data, which binds the returned elements to the session and the request. See [ISO18013-5 #9.1.3] for details on the authentication structure.

Session Termination

The session MUST be terminated if at least one of the following conditions occur:

  • after a time-out of no activity of receiving or sending session establishment or session data messages occurs. The time-out for no activity implemented by the Wallet Instance and the Relying Party Instance SHOULD be no less than 300 seconds;

  • when the Wallet Instance does not accept any more requests;

  • when the Relying Party Instance does not send any further requests.

If the Wallet Instance and the Relying Party Instance does not send or receive any further requests, the session termination MUST be initiated as follows:

  • send the status code for session termination, or

  • dispatch the "End" command as outlined in [ISO18013-5 #8.3.3.1.1.5].

When a session is terminated, the Wallet Instance and the Relying Party Instance MUST perform at least the following actions:

  • destruction of session keys and related ephemeral key material;

  • closure of the communication channel used for data retrieval.

Note

See mdoc-CBOR Credential Format for the meaning of CBOR type acronyms.