TEEP                                                       H. Tschofenig
Internet-Draft                                                  Arm Ltd.
Intended status: Standards Track                                  M. Pei
Expires: 28 April 8 September 2022                                       Broadcom
                                                              D. Wheeler
                                                                  Amazon
                                                               D. Thaler
                                                               Microsoft
                                                            A. Tsukamoto
                                                                    AIST
                                                         25 October 2021
                                                            7 March 2022

       Trusted Execution Environment Provisioning (TEEP) Protocol
                      draft-ietf-teep-protocol-07
                      draft-ietf-teep-protocol-08

Abstract

   This document specifies a protocol that installs, updates, and
   deletes Trusted Components in a device with a Trusted Execution
   Environment (TEE).  This specification defines an interoperable
   protocol for managing the lifecycle of Trusted Components.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 28 April 8 September 2022.

Copyright Notice

   Copyright (c) 2021 2022 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.

   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Simplified Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Simplified Revised BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3   4
   3.  Message Overview  . . . . . . . . . . . . . . . . . . . . . .   4
   4.  Detailed Messages Specification . . . . . . . . . . . . . . .   5   6
     4.1.  Creating and Validating TEEP Messages . . . . . . . . . .   5   6
       4.1.1.  Creating a TEEP message . . . . . . . . . . . . . . .   5   6
       4.1.2.  Validating a TEEP Message . . . . . . . . . . . . . .   6
     4.2.  QueryRequest Message  . . . . . . . . . . . . . . . . . .   6   7
     4.3.  QueryResponse Message . . . . . . . . . . . . . . . . . .   9
       4.3.1.  Evidence and Attestation Results  . . . . . . . . . .  12
     4.4.  Update Message  . . . . . . . . . . . .  11
     4.4.  Update Message . . . . . . . . .  13
       4.4.1.  Example 1: Having one SUIT Manifest pointing to a URI
               of a Trusted Component Binary . . . . . . . . . . . .  12  15
       4.4.2.  Example 2: Having a SUIT Manifest include the Trusted
               Component Binary  . . . . . . . . . . . . . . . . . .  17
       4.4.3.  Example 3: Supplying Personalization Data for the
               Trusted Component Binary  . . . . . . . . . . . . . .  18
       4.4.4.  Example 4: Unlinking Trusted Component  . . . . . . .  20
     4.5.  Success Message . . . . . . . . . . . . . . . . . . . . .  14  21
     4.6.  Error Message . . . . . . . . . . . . . . . . . . . . . .  15  22
   5.  EAT Profile . . . . . . . . . . . . . . . . . . . . . . . . .  25
   6.  Mapping of TEEP Message Parameters to CBOR Labels . . . . . .  18
   6.  27
   7.  Behavior Specification  . . . . . . . . . . . . . . . . . . .  20
     6.1.  29
     7.1.  TAM Behavior  . . . . . . . . . . . . . . . . . . . . . .  20
     6.2.  29
     7.2.  TEEP Agent Behavior . . . . . . . . . . . . . . . . . . .  21
   7.  30
   8.  Ciphersuites  . . . . . . . . . . . . . . . . . . . . . . . .  22
   8.  31
   9.  Freshness Mechanisms  . . . . . . . . . . . . . . . . . . . .  22
   9.  32
   10. Security Considerations . . . . . . . . . . . . . . . . . . .  23
   10.  33
   11. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  25
     10.1.  35
     11.1.  Media Type Registration  . . . . . . . . . . . . . . . .  25
     10.2.  Ciphersuite Registry . . . . . . . . . . . . . . . . . .  26
     10.3.  35
     11.2.  Freshness Mechanism Registry . . . . . . . . . . . . . .  27
   11.  36
   12. References  . . . . . . . . . . . . . . . . . . . . . . . . .  27
     11.1.  36
     12.1.  Normative References . . . . . . . . . . . . . . . . . .  27
     11.2.  36
     12.2.  Informative References . . . . . . . . . . . . . . . . .  29  38
   A.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . .  29  39
   B.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  30  39
   C.  Complete CDDL . . . . . . . . . . . . . . . . . . . . . . . .  30  39
   D.  Examples of Diagnostic Notation and Binary Representation . .  34  43
     D.1.  QueryRequest Message  . . . . . . . . . . . . . . . . . .  34  43
       D.1.1.  CBOR Diagnostic Notation  . . . . . . . . . . . . . .  34  43
       D.1.2.  CBOR Binary Representation  . . . . . . . . . . . . .  34  44
     D.2.  Entity Attestation Token  . . . . . . . . . . . . . . . .  35  44
       D.2.1.  CBOR Diagnostic Notation  . . . . . . . . . . . . . .  35  44
     D.3.  QueryResponse Message . . . . . . . . . . . . . . . . . .  35  45
       D.3.1.  CBOR Diagnostic Notation  . . . . . . . . . . . . . .  35  45
       D.3.2.  CBOR Binary Representation  . . . . . . . . . . . . .  36  46
     D.4.  Update Message  . . . . . . . . . . . . . . . . . . . . .  37  47
       D.4.1.  CBOR Diagnostic Notation  . . . . . . . . . . . . . .  37  47
       D.4.2.  CBOR Binary Representation  . . . . . . . . . . . . .  37  47
     D.5.  Success Message . . . . . . . . . . . . . . . . . . . . .  38  48
       D.5.1.  CBOR Diagnostic Notation  . . . . . . . . . . . . . .  38  48
       D.5.2.  CBOR Binary Representation  . . . . . . . . . . . . .  38  48
     D.6.  Error Message . . . . . . . . . . . . . . . . . . . . . .  38  48
       D.6.1.  CBOR Diagnostic Notation  . . . . . . . . . . . . . .  38  48
       D.6.2.  CBOR binary Representation  . . . . . . . . . . . . .  39  49
   E.  Examples of SUIT Manifests  . . . . . . . . . . . . . . . . .  39
     E.1.  Install a  49
     Example 1: SUIT Manifest pointing to URI of the Trusted Component
           Binary  . . . . . . . . . . . . . . .  39
     E.2.  Delete a Trusted Component . . . . . . . . . .  50
       CBOR Diagnostic Notation of SUIT Manifest . . . . .  43
   Authors' Addresses . . . . .  50
       CBOR Binary Representation  . . . . . . . . . . . . . . . . .  51
       CBOR Binary in Hex  .  45

1.  Introduction

   The Trusted Execution Environment (TEE) concept has been designed to
   separate a regular operating system, also referred as a Rich
   Execution Environment (REE), from security-sensitive applications.
   In a TEE ecosystem, device vendors may use different operating
   systems in . . . . . . . . . . . . . . . . . . . .  52
     Example 2: SUIT Manifest including the REE and may use different types of TEEs.  When Trusted Component Developers or Device Administrators use Trusted Application
   Managers (TAMs) to install, update, and delete Trusted Applications
   and their dependencies on a wide range
           Binary  . . . . . . . . . . . . . . . . . . . . . . . . .  53
       CBOR Diagnostic Notation of devices with potentially
   different TEEs then an interoperability need arises.

   This document specifies the protocol SUIT Manifest . . . . . . . . . .  53
       CBOR Binary Representation  . . . . . . . . . . . . . . . . .  54
       CBOR Binary in Hex  . . . . . . . . . . . . . . . . . . . . .  56
     Example 3: Supplying Personalization Data for communicating between a TAM
   and a TEEP Agent.

   The Trusted Execution Environment Provisioning (TEEP) architecture
   document [I-D.ietf-teep-architecture] provides design guidance and
   introduces the necessary terminology.

2.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   This specification re-uses the terminology defined in
   [I-D.ietf-teep-architecture].

   As explained in Section 4.4 of that document, the TEEP protocol
   treats each Trusted Application (TA), any dependencies the TA has,
   and personalization data as separate components that are expressed in
   SUIT manifests, and a SUIT manifest might contain or reference
   multiple binaries (see [I-D.ietf-suit-manifest] for more details).

   As such, the term Trusted Component (TC) in this document refers to a
   set
           Binary  . . . . . . . . . . . . . . . . . . . . . . . . .  56
       CBOR Diagnostic Notation of binaries expressed in a SUIT manifest, to be installed Manifest . . . . . . . . . .  56
       CBOR Binary Represenation . . . . . . . . . . . . . . . . . .  58
       CBOR Binary in Hex  . . . . . . . . . . . . . . . . . . . . .  60
     E.4.  Example 4: Unlink a
   TEE.  Note that a Trusted Component may include one or more TAs and/
   or configuration data and keys needed by a TA to operate correctly.

   Each Trusted Component is uniquely identified by a SUIT Component
   Identifier (see [I-D.ietf-suit-manifest] Section 8.7.2.2).

3.  Message Overview

   The TEEP protocol consists . . . . . . . . . .  60
       CBOR Diagnostic Notation of messages exchanged between a TAM and a
   TEEP Agent.  The messages are encoded in SUIT Manifest . . . . . . . . . .  60
       CBOR and designed to provide
   end-to-end security.  TEEP protocol messages are signed by the
   endpoints, i.e., the TAM and the TEEP Agent, but Binary Representation  . . . . . . . . . . . . . . . . .  61
       CBOR Binary in Hex  . . . . . . . . . . . . . . . . . . . . .  63
   F.  Examples of SUIT Reports  . . . . . . . . . . . . . . . . . .  63
     F.1.  Example 1: Success  . . . . . . . . . . . . . . . . . . .  63
     F.2.  Example 2: Faiure . . . . . . . . . . . . . . . . . . . .  64
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  65

1.  Introduction

   The Trusted Applications
   may Execution Environment (TEE) concept has been designed to
   separate a regular operating system, also be encrypted and signed by referred as a Rich
   Execution Environment (REE), from security-sensitive applications.
   In a TEE ecosystem, device vendors may use different operating
   systems in the REE and may use different types of TEEs.  When Trusted
   Component Developer Developers or Device Administrator.  The TEEP protocol not only uses CBOR but also Administrators use Trusted Application
   Managers (TAMs) to install, update, and delete Trusted Applications
   and their dependencies on a wide range of devices with potentially
   different TEEs then an interoperability need arises.

   This document specifies the respective security wrapper, namely COSE [RFC8152].  Furthermore, protocol for software updates the SUIT manifest format
   [I-D.ietf-suit-manifest] is used, and for attestation the Entity
   Attestation Token (EAT) [I-D.ietf-rats-eat] format is supported
   although other attestation formats are also permitted.

   This specification defines five messages: QueryRequest,
   QueryResponse, Update, Success, and Error.

   A TAM queries communicating between a device's current state with TAM
   and a QueryRequest message.
   A TEEP Agent will, after authenticating Agent.

   The Trusted Execution Environment Provisioning (TEEP) architecture
   document [I-D.ietf-teep-architecture] provides design guidance and authorizing
   introduces the request,
   report attestation information, list all Trusted Components, necessary terminology.

2.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   provide information about supported algorithms
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and extensions only when, they appear in a
   QueryResponse message.  An error message is returned if all
   capitals, as shown here.

   This specification re-uses the request
   could not be processed.  A TAM will process terminology defined in
   [I-D.ietf-teep-architecture].

   As explained in Section 4.4 of that document, the QueryResponse message
   and determine whether to initiate subsequent message exchanges to
   install, update, or delete TEEP protocol
   treats each Trusted Applications.

     +------------+           +-------------+
     | TAM        |           |TEEP Agent   |
     +------------+           +-------------+

       QueryRequest ------->

                              QueryResponse

                    <-------     or

                                Error

   With Application (TA), any dependencies the Update message a TAM can instruct TA has,
   and personalization data as separate components that are expressed in
   SUIT manifests, and a TEEP Agent to install
   and/or delete one SUIT manifest might contain or reference
   multiple binaries (see [I-D.ietf-suit-manifest] for more Trusted Components.  The TEEP Agent will
   process the message, determine whether the TAM is authorized and
   whether details).

   As such, the term Trusted Component has been signed by an authorized (TC) in this document refers to a
   set of binaries expressed in a SUIT manifest, to be installed in a
   TEE.  Note that a Trusted Component Signer.  A Success message is returned when the
   operation has been completed successfully, may include one or an Error message
   otherwise.

    +------------+           +-------------+
    | TAM        |           |TEEP Agent   |
    +------------+           +-------------+

                Update  ---->

                               Success

                       <---- more TAs and/
   or

                               Error

4.  Detailed Messages Specification

   TEEP messages are protected configuration data and keys needed by the COSE_Sign1 structure. a TA to operate correctly.

   Each Trusted Component is uniquely identified by a SUIT Component
   Identifier (see [I-D.ietf-suit-manifest] Section 8.7.2.2).

3.  Message Overview

   The TEEP protocol consists of messages are described in CDDL format [RFC8610] below.

   {
       teep-message                => (query-request /
                                       query-response /
                                       update /
                                       teep-success /
                                       teep-error ),
   }

4.1.  Creating and Validating TEEP Messages

4.1.1.  Creating exchanged between a TEEP message

   To create TAM and a
   TEEP message, the following steps Agent.  The messages are performed.

   1.  Create a TEEP message according to the description below encoded in CBOR and
       populate it with the respective content. designed to provide
   end-to-end security.  TEEP protocol messages sent by
       TAMs (QueryRequest and Update) can include a "token".  The first
       usage of a token generated are signed by a the
   endpoints, i.e., the TAM MUST be randomly created.
       Subsequent token values MUST and the TEEP Agent, but Trusted Applications
   may also be different for each subsequent
       message created encrypted and signed by a TAM.

   2.  Create a COSE Header containing the desired set of Header
       Parameters. Trusted Component Developer or
   Device Administrator.  The COSE Header MUST be valid per the [RFC8152]
       specification.

   3.  Create a COSE_Sign1 object using the TEEP message as protocol not only uses CBOR but also
   the
       COSE_Sign1 Payload; all steps specified in [RFC8152] respective security wrapper, namely COSE [RFC8152].  Furthermore,
   for creating
       a COSE_Sign1 object MUST be followed.

4.1.2.  Validating a TEEP Message

   When TEEP message is received (see the ProcessTeepMessage conceptual
   API defined in [I-D.ietf-teep-architecture] section 6.2.1), the
   following validation steps are performed.  If any of the listed steps
   fail, then software updates the TEEP message MUST be rejected.

   1.  Verify that SUIT manifest format
   [I-D.ietf-suit-manifest] is used, and for attestation the received message Entity
   Attestation Token (EAT) [I-D.ietf-rats-eat] format is supported
   although other attestation formats are also permitted.

   This specification defines five messages: QueryRequest,
   QueryResponse, Update, Success, and Error.

   A TAM queries a valid CBOR object.

   2.  Verify that the message contains device's current state with a COSE_Sign1 structure.

   3.  Verify that the resulting COSE Header includes only parameters
       and values whose syntax QueryRequest message.
   A TEEP Agent will, after authenticating and semantics are both understood authorizing the request,
   report attestation information, list all Trusted Components, and
   provide information about supported or that are specified as being ignored when not
       understood.

   4.  Follow the steps specified algorithms and extensions in Section 4 of [RFC8152] ("Signing
       Objects") for validating a COSE_Sign1 object.  The COSE_Sign1
       payload is the content of the TEEP
   QueryResponse message.

   5.  Verify that the TEEP  An error message is a valid CBOR map and verify returned if the
       fields of request
   could not be processed.  A TAM will process the TEEP QueryResponse message according
   and determine whether to this specification.

4.2.  QueryRequest Message

   A QueryRequest initiate subsequent message is used by exchanges to
   install, update, or delete Trusted Applications.

     +------------+           +-------------+
     | TAM        |           |TEEP Agent   |
     +------------+           +-------------+

       QueryRequest ------->

                              QueryResponse

                    <-------     or

                                Error

   With the Update message a TAM can instruct a TEEP Agent to learn information from
   the install
   and/or delete one or more Trusted Components.  The TEEP Agent, such as Agent will
   process the features supported by message, determine whether the TEEP Agent,
   including ciphersuites, TAM is authorized and protocol versions.  Additionally,
   whether the TAM
   can selectively request data items from Trusted Component has been signed by an authorized
   Trusted Component Signer.  A Success message is returned when the TEEP
   operation has been completed successfully, or an Error message
   otherwise.

    +------------+           +-------------+
    | TAM        |           |TEEP Agent via the
   request parameter.  Currently,   |
    +------------+           +-------------+

                Update  ---->

                               Success

                       <----    or

                               Error

4.  Detailed Messages Specification

   TEEP messages are protected by the following features COSE_Sign1 structure.  The TEEP
   protocol messages are supported:

   *  Request for attestation information,

   *  Listing supported extensions,

   *  Querying installed Trusted Components, described in CDDL format [RFC8610] below.

   {
       teep-message                => (query-request /
                                       query-response /
                                       update /
                                       teep-success /
                                       teep-error ),
   }

4.1.  Creating and

   *  Listing supported SUIT commands.

   Like other Validating TEEP messages, Messages

4.1.1.  Creating a TEEP message

   To create a TEEP message, the QueryRequest following steps are performed.

   1.  Create a TEEP message is signed, according to the description below and
       populate it with the
   relevant CDDL snippet is shown below. respective content.  TEEP messages sent by
       TAMs (QueryRequest and Update) can include a "token".  The complete CDDL structure is
   shown TAM
       can decide, in Appendix C.

   query-request = [
     type: TEEP-TYPE-query-request,
     options: {
       ? token => bstr .size (8..64),
       ? supported-cipher-suites => [ + suite ],
       ? supported-freshness-mechanisms => [ + freshness-mechanism ],
       ? challenge => bstr .size (8..512),
       ? versions => [ + version ],
       * $$query-request-extensions
       * $$teep-option-extensions
     },
     data-item-requested: data-item-requested
   ]

   The message has the following fields:

   type
      The value of (1) corresponds any implementation-specific way, whether to
       include a QueryRequest message sent from
      the TAM to the TEEP Agent. token
      The value in the token parameter is used to match responses to
      requests.  This is particularly useful when a TAM issues multiple
      concurrent requests to a TEEP Agent.  The token MUST be present if
      and only if the attestation bit is clear in the data-item-
      requested value.  The size of the token is at least 8 bytes (64
      bits) and maximum of 64 bytes, which is the same as in an EAT
      Nonce Claim (see [I-D.ietf-rats-eat] Section 3.3). message.  The first usage of a token
       generated by a TAM MUST be randomly created.  Subsequent token
       values MUST be different for each request subsequent message
      to distinguish created by a
       TAM.

   2.  Create a COSE Header containing the correct response from multiple requests. desired set of Header
       Parameters.  The
      token value COSE Header MUST NOT be used for other purposes, such as a TAM to
      identify valid per the devices and/or [RFC8152]
       specification.

   3.  Create a device to identify TAMs or Trusted
      Components.  The TAM SHOULD set an expiration time COSE_Sign1 object using the TEEP message as the
       COSE_Sign1 Payload; all steps specified in [RFC8152] for each token
      and MUST ignore any messages with expired tokens.  The TAM creating
       a COSE_Sign1 object MUST
      expire the token value after receiving be followed.

4.1.2.  Validating a TEEP Message

   When TEEP message is received (see the first response
      containing ProcessTeepMessage conceptual
   API defined in [I-D.ietf-teep-architecture] section 6.2.1), the token value and ignore
   following validation steps are performed.  If any subsequent messages that
      have the same token value.

   data-item-requested
      The data-item-requested parameter indicates what information of the
      TAM requests from listed steps
   fail, then the TEEP Agent in message MUST be rejected.

   1.  Verify that the form of received message is a bitmap.  Each
      value in valid CBOR object.

   2.  Verify that the bitmap corresponds to an IANA registered information
      element.  This specification defines message contains a COSE_Sign1 structure.

   3.  Verify that the following initial set resulting COSE Header includes only parameters
       and values whose syntax and semantics are both understood and
       supported or that are specified as being ignored when not
       understood.

   4.  Follow the steps specified in Section 4 of
      information elements:

      attestation (1)  With this value [RFC8152] ("Signing
       Objects") for validating a COSE_Sign1 object.  The COSE_Sign1
       payload is the TAM requests content of the TEEP Agent
         to return attestation evidence (e.g., an EAT) in message.

   5.  Verify that the response.

      trusted-components (2)  With this value TEEP message is a valid CBOR map and verify the TAM queries
       fields of the TEEP
         Agent for all installed Trusted Components.

      extensions (4)  With message according to this value specification.

4.2.  QueryRequest Message

   A QueryRequest message is used by the TAM queries to learn information from
   the TEEP Agent for Agent, such as the features supported capabilities by the TEEP Agent,
   including ciphersuites and extensions, which allows a protocol versions.  Additionally, the TAM to
         discover
   can selectively request data items from the capabilities of a TEEP Agent implementation.

      Further values may be added in the future via IANA registration.

   supported-cipher-suites
      The supported-cipher-suites parameter lists the ciphersuite(s)
      supported by
   request parameter.  Currently, the TAM.  If this parameter is not present, it is to
      be treated following features are supported:

   *  Request for attestation information,

   *  Listing supported extensions,

   *  Querying installed Trusted Components, and

   *  Listing supported SUIT commands.

   Like other TEEP messages, the same as if it contained both ciphersuites defined
      in this document.  Details about QueryRequest message is signed, and the ciphersuite encoding can be
      found
   relevant CDDL snippet is shown below.  The complete CDDL structure is
   shown in Section 7. Appendix C.

   query-request = [
     type: TEEP-TYPE-query-request,
     options: {
       ? token => bstr .size (8..64),
       ? supported-cipher-suites => [ + suite ],
       ? supported-freshness-mechanisms => [ + freshness-mechanism ],
       ? challenge => bstr .size (8..512),
       ? versions => [ + version ],
       * $$query-request-extensions
       * $$teep-option-extensions
     },
     data-item-requested: data-item-requested
   ]

   The supported-freshness-mechanisms parameter lists message has the freshness
      mechanism(s) supported by following fields:

   type
      The value of (1) corresponds to a QueryRequest message sent from
      the TAM.  Details about TAM to the encoding can
      be found TEEP Agent.

   token
      The value in Section 8.  If this parameter is absent, it means only the nonce mechanism is supported.

   challenge
      The challenge field is an optional token parameter is used for ensuring the
      freshness of the attestation evidence returned with to match responses to
      requests.  This is particularly useful when a
      QueryResponse message.  It TAM issues multiple
      concurrent requests to a TEEP Agent.  The token MUST be absent present if
      and only if the attestation bit is clear (since in the data-item-
      requested value.  The size of the token is used instead at least 8 bytes (64
      bits) and maximum of 64 bytes, which is the same as in that case).  When a
      challenge is provided in the QueryRequest and an EAT is returned
      with
      Nonce Claim (see [I-D.ietf-rats-eat] Section 3.3).  The first
      usage of a QueryResponse token generated by a TAM MUST be randomly created.
      Subsequent token values MUST be different for each request message then
      to distinguish the challenge contained in this
      request correct response from multiple requests.  The
      token value MUST NOT be used to generate the EAT, for other purposes, such as by copying a TAM to
      identify the
      challengt into devices and/or a device to identify TAMs or Trusted
      Components.  The TAM SHOULD set an expiration time for each token
      and MUST ignore any messages with expired tokens.  The TAM MUST
      expire the nonce claim found in token value after receiving the EAT if using first response
      containing the Nonce
      freshness mechanism.  For more details see Section 8.  If token value and ignore any
      format other than EAT is used, it is up to subsequent messages that format to define
      the use of
      have the challenge field.

   versions same token value.

   data-item-requested
      The versions data-item-requested parameter enumerates indicates what information the
      TAM requests from the TEEP protocol version(s)
      supported by Agent in the TAM.  A value form of 0 refers a bitmap.  Each
      value in the bitmap corresponds to an IANA registered information
      element.  This specification defines the current version following initial set of the TEEP protocol.  If
      information elements:

      attestation (1)  With this field is not present, it is to be
      treated the same as if it contained only version 0.

4.3.  QueryResponse Message

   The QueryResponse message is value the successful response by TAM requests the TEEP Agent after receiving a QueryRequest message.

   Like other TEEP messages, the QueryResponse message is signed, and
   the relevant CDDL snippet is shown below.  The complete CDDL
   structure is shown in Appendix C.

   query-response = [
     type: TEEP-TYPE-query-response,
     options: {
       ? token => bstr .size (8..64),
       ? selected-cipher-suite => suite,
       ? selected-version => version,
       ? evidence-format => text,
       ?
         to return attestation evidence => bstr,
       ? tc-list => [ + tc-info ],
       ? requested-tc-list => [ + requested-tc-info ],
       ? unneeded-tc-list => [ + SUIT_Component_Identifier ],
       ? ext-list => [ + ext-info ],
       * $$query-response-extensions,
       * $$teep-option-extensions
     }
   ]

   tc-info = {
     component-id => SUIT_Component_Identifier,
     ? tc-manifest-sequence-number => .within uint .size 8
   }

   requested-tc-info = {
     component-id => SUIT_Component_Identifier,
     ? tc-manifest-sequence-number => .within uint .size 8
     ? have-binary => bool
   }

   The QueryResponse message has (e.g., an EAT) in the following fields:

   type
      The value of response.

      trusted-components (2) corresponds to a QueryResponse message sent from  With this value the TAM queries the TEEP
         Agent to the TAM.

   token
      The value in the token parameter is used to match responses to
      requests.  The for all installed Trusted Components.

      extensions (4)  With this value MUST correspond to the value received with TAM queries the QueryRequest message if one was present, TEEP Agent for
         supported capabilities and MUST extensions, which allows a TAM to
         discover the capabilities of a TEEP Agent implementation.

      Further values may be absent if
      no token was present added in the QueryRequest.

   selected-cipher-suite future via IANA registration.

   supported-cipher-suites
      The selected-cipher-suite supported-cipher-suites parameter indicates lists the selected
      ciphersuite.  Details about ciphersuites
      supported by the ciphersuite encoding can be found
      in Section 7.

   selected-version
      The selected-version TAM.  If this parameter indicates the TEEP protocol version
      selected by the TEEP Agent.  The absense of this parameter
      indicates is not present, it is to
      be treated the same as if it was present with a value of 0.

   evidence-format contained all ciphersuites defined in
      this document that are listed as "MUST".  Details about the
      ciphersuite encoding can be found in Section 8.

   supported-freshness-mechanisms
      The evidence-format supported-freshness-mechanisms parameter indicates lists the IANA Media Type of freshness
      mechanism(s) supported by the
      attestation evidence contained in TAM.  Details about the evidence parameter.  It MUST encoding can
      be present if the evidence found in Section 9.  If this parameter is present and absent, it means only
      the format nonce mechanism is
      not an EAT.

   evidence supported.

   challenge
      The evidence challenge field is an optional parameter contains used for ensuring the
      freshness of the attestation evidence.  This
      parameter evidence returned with a
      QueryResponse message.  It MUST be present absent if the QueryResponse attestation bit
      is sent clear (since the token is used instead in response
      to that case).  When a QueryRequest with the attestation bit set.  If
      challenge is provided in the evidence-
      format parameter QueryRequest and an EAT is absent, returned
      with a QueryResponse message then the attestation evidence challenge contained in this parameter
      request MUST be an Entity Attestation Token following used to generate the
      encoding defined in [I-D.ietf-rats-eat].  See Section 4.3.1 for
      further discussion.

   tc-list
      The tc-list parameter enumerates EAT, such as by copying the Trusted Components installed
      on
      challenge into the device nonce claim found in the form of tc-info objects.  This parameter MUST
      be present EAT if using the QueryResponse Nonce
      freshness mechanism.  For more details see Section 9.  If any
      format other than EAT is sent in response used, it is up to a
      QueryRequest with that format to define
      the trusted-components bit set.

   requested-tc-list
      The requested-tc-list parameter enumerates use of the Trusted Components
      that are not currently installed in challenge field.

   versions
      The versions parameter enumerates the TEE, but which are
      requested to be installed, for example TEEP protocol version(s)
      supported by an installer the TAM.  A value of an
      Untrusted Application that has a TA as a dependency, or by a
      Trusted Application that has another Trusted Component as a
      dependency.  Requested Trusted Components are expressed in 0 refers to the
      form current version
      of requested-tc-info objects.  A the TEEP Agent can get protocol.  If this
      information from the UnrequestTA conceptual API defined in
      [I-D.ietf-teep-architecture] section 6.2.1.

   unneeded-tc-list
      The unneeded-tc-list parameter enumerates the Trusted Components
      that are currently installed in field is not present, it is to be
      treated the TEE, but which are no longer
      needed by any other application. same as if it contained only version 0.

4.3.  QueryResponse Message

   The TAM can use this information
      in determining whether a Trusted Component can be deleted.  Each
      unneeded Trusted Component QueryResponse message is identified the successful response by its SUIT Component
      Identifier.  A the TEEP
   Agent after receiving a QueryRequest message.  As discussed in
   Section 7.2, it can get this information from also be sent unsolicited if the
      UnrequestTA conceptual API defined in [I-D.ietf-teep-architecture]
      section 6.2.1.

   ext-list
      The ext-list parameter lists contents of the supported extensions.  This
      document does
   QueryRequest are already known and do not define any extensions.  This parameter MUST be
      present if vary per message.

   Like other TEEP messages, the QueryResponse message is sent in response to a QueryRequest
      with the extensions bit set.

   The tc-info object has signed, and
   the following fields:

   component-id
      A SUIT Component Identifier.

   tc-manifest-sequence-number
      The suit-manifest-sequence-number value from the SUIT manifest for
      the Trusted Component, if a SUIT manifest was used. relevant CDDL snippet is shown below.  The complete CDDL
   structure is shown in Appendix C.

   query-response = [
     type: TEEP-TYPE-query-response,
     options: {
       ? token => bstr .size (8..64),
       ? selected-cipher-suite => suite,
       ? selected-version => version,
       ? evidence-format => text,
       ? evidence => bstr,
       ? tc-list => [ + tc-info ],
       ? requested-tc-list => [ + requested-tc-info ],
       ? unneeded-tc-list => [ + SUIT_Component_Identifier ],
       ? ext-list => [ + ext-info ],
       * $$query-response-extensions,
       * $$teep-option-extensions
     }
   ]

   tc-info = {
     component-id => SUIT_Component_Identifier,
     ? tc-manifest-sequence-number => .within uint .size 8
   }

   requested-tc-info = {
     component-id => SUIT_Component_Identifier,
     ? tc-manifest-sequence-number => .within uint .size 8
     ? have-binary => bool
   }

   The QueryResponse message has the following fields:

   component-id
      A SUIT Component Identifier.

   tc-manifest-sequence-number

   type
      The minimum suit-manifest-sequence-number value from of (2) corresponds to a SUIT
      manifest for QueryResponse message sent from
      the Trusted Component.  If not present, indicates
      that any sequence number will do.

   have-binary
      If present with a TEEP Agent to the TAM.

   token
      The value of true, indicates that in the TEEP agent
      already has token parameter is used to match responses to
      requests.  The value MUST correspond to the Trusted Component binary and only needs an Update
      message value received with a SUIT manifest that authorizes installing it.  If
      have-binary is true,
      the tc-manifest-sequence-number field QueryRequest message if one was present, and MUST be
      present.

4.3.1.  Evidence

   Section 7.1 of [I-D.ietf-teep-architecture] lists information that
   may be required absent if
      no token was present in the evidence depend on QueryRequest.

   selected-cipher-suite
      The selected-cipher-suite parameter indicates the circumstance.  When an
   Entity Attestation Token is used, selected
      ciphersuite.  Details about the following claims ciphersuite encoding can be used to
   meet those requirements:

   +===========+=====================+=================================+
   |Requirement|Claim                | Reference                       |
   +===========+=====================+=================================+
   |Device     |device-identifier    | [I-D.birkholz-rats-suit-claims] |
   |unique     |                     | section 3.1.3                   |
   |identifier |                     |                                 |
   +-----------+---------------------+---------------------------------+
   |Vendor of  |vendor-identifier    | [I-D.birkholz-rats-suit-claims] |
   |the device |                     | section 3.1.1                   |
   +-----------+---------------------+---------------------------------+
   |Class of   |class-identifier     | [I-D.birkholz-rats-suit-claims] |
   |the device |                     | section 3.1.2                   |
   +-----------+---------------------+---------------------------------+
   |TEE        |chip-version         | [I-D.ietf-rats-eat] section 3.7 |
   |hardware   |                     |                                 |
   |type       |                     |                                 |
   +-----------+---------------------+---------------------------------+
   |TEE        |chip-version         | [I-D.ietf-rats-eat] section 3.7 |
   |hardware   |                     |                                 |
   |version    |                     |                                 |
   +-----------+---------------------+---------------------------------+
   |TEE        |component-identifier | [I-D.birkholz-rats-suit-claims] |
   |firmware   |                     | section 3.1.4                   |
   |type       |                     |                                 |
   +-----------+---------------------+---------------------------------+
   |TEE        |version              | [I-D.birkholz-rats-suit-claims] |
   |firmware   |                     | section 3.1.8                   |
   |version    |                     |                                 |
   +-----------+---------------------+---------------------------------+
   |Freshness  |nonce                | [I-D.ietf-rats-eat] section 3.3 |
   |proof      |                     |                                 |
   +-----------+---------------------+---------------------------------+

                                  Table 1

4.4.  Update Message found
      in Section 8.

   selected-version
      The Update message is used by selected-version parameter indicates the TAM to install and/or delete one or
   more Trusted Components via TEEP protocol version
      selected by the TEEP Agent.

   Like other TEEP messages, the Update message is signed, and the
   relevant CDDL snippet is shown below.  The complete CDDL structure is
   shown in Appendix C.

   update = [
     type: TEEP-TYPE-update,
     options: {
       ? token => bstr .size (8..64),
       ? manifest-list => [ + bstr .cbor SUIT_Envelope ],
       * $$update-extensions,
       * $$teep-option-extensions
     }
   ]  The Update message has absense of this parameter
      indicates the following fields:

   type
      The same as if it was present with a value of (3) corresponds to an Update message sent from the
      TAM to 0.

   evidence-format
      The evidence-format parameter indicates the TEEP Agent.  In case IANA Media Type of successful processing, a
      Success message the
      attestation evidence contained in the evidence parameter.  It MUST
      be present if the evidence parameter is returned by present and the TEEP Agent.  In case of format is
      not an
      error, an Error message EAT.

   evidence
      The evidence parameter contains the attestation evidence.  This
      parameter MUST be present if the QueryResponse is returned.  Note that sent in response
      to a QueryRequest with the Update message attestation bit set.  If the evidence-
      format parameter is used for initial Trusted Component installation as well as absent, the attestation evidence contained in
      this parameter MUST be an Entity Attestation Token following the
      encoding defined in [I-D.ietf-rats-eat].  See Section 4.3.1 for
      updates and deletes.

   token
      further discussion.

   tc-list
      The value tc-list parameter enumerates the Trusted Components installed
      on the device in the token field form of tc-info objects.  This parameter MUST
      be present if the QueryResponse is used to match responses sent in response to
      requests.

   manifest-list a
      QueryRequest with the trusted-components bit set.

   requested-tc-list
      The manifest-list field is used to convey one or multiple SUIT
      manifests requested-tc-list parameter enumerates the Trusted Components
      that are not currently installed in the TEE, but which are
      requested to install.  A manifest is a bundle be installed, for example by an installer of metadata about an
      Untrusted Application that has a TA as a dependency, or by a
      Trusted Component, such Application that has another Trusted Component as where to find the code, a
      dependency.  Requested Trusted Components are expressed in the devices to
      which it applies, and cryptographic
      form of requested-tc-info objects.  A TEEP Agent can get this
      information protecting from the
      manifest. RequestTA conceptual API defined in
      [I-D.ietf-teep-architecture] section 6.2.1.

   unneeded-tc-list
      The manifest may also convey personalization data.
      Trusted Component binaries and personalization data can be signed
      and encrypted by unneeded-tc-list parameter enumerates the same Trusted Component Signer.  Other
      combinations are, however, possible as well.  For example, it is
      also possible for Components
      that are currently installed in the TEE, but which are no longer
      needed by any other application.  The TAM to sign and encrypt the personalization
      data and to let the can use this information
      in determining whether a Trusted Component Developer sign and/or
      encrypt the can be deleted.  Each
      unneeded Trusted Component binary.

   Note that an Update message carrying one or more SUIT manifests will
   inherently involve multiple signatures, one is identified by its SUIT Component
      Identifier.  A TEEP Agent can get this information from the TAM
      UnrequestTA conceptual API defined in [I-D.ietf-teep-architecture]
      section 6.2.1.

   ext-list
      The ext-list parameter lists the TEEP
   message and one from a Trusted Component signer inside each manifest. supported extensions.  This is intentional as they are for different purposes.

   The TAM is what authorizes apps to
      document does not define any extensions.  This parameter MUST be installed, updated, and deleted
   on a given TEE and so the TEEP signature is checked by
      present if the TEEP Agent
   at protocol message processing time.  (This same TEEP security
   wrapper QueryResponse is also used on messages like QueryRequest so that Agents
   only send potentially sensitive data such as evidence sent in response to trusted
   TAMs.)
   The Trusted Component signer on a QueryRequest
      with the other hand is what authorizes extensions bit set.

   The tc-info object has the
   Trusted following fields:

   component-id
      A SUIT Component to actually run, so Identifier.

   tc-manifest-sequence-number
      The suit-manifest-sequence-number value from the SUIT manifest signature could be
   checked at install time or load (or run) time or both, and this
   checking is done by for
      the TEE independent of whether TEEP is used or
   some other update mechanism.  See section 5 of
   [I-D.ietf-teep-architecture] for further discussion.

4.5.  Success Message

   The Success message is used by the TEEP Agent to return Trusted Component, if a success in
   response to an Update message.

   Like other TEEP messages, the Success message is signed, and the
   relevant CDDL snippet is shown below.  The complete CDDL structure is
   shown in Appendix C.

   teep-success = [
     type: TEEP-TYPE-teep-success,
     options: {
       ? token => bstr .size (8..64),
       ? msg => text .size (1..128),
       ? suit-reports => [ + suit-report ],
       * $$teep-success-extensions,
       * $$teep-option-extensions
     }
   ] SUIT manifest was used.

   The Success requested-tc-info message has the following fields:

   type

   component-id
      A SUIT Component Identifier.

   tc-manifest-sequence-number
      The minimum suit-manifest-sequence-number value of (5) corresponds to corresponds to a Success message
      sent from a SUIT
      manifest for the TEEP Agent to the TAM.

   token
      The value in the token parameter is used to match responses to
      requests.  It MUST match the Trusted Component.  If not present, indicates
      that any sequence number will do.

   have-binary
      If present with a value of true, indicates that the token parameter in TEEP agent
      already has the Trusted Component binary and only needs an Update
      message the Success is in response to, if one was present. with a SUIT manifest that authorizes installing it.  If none was present,
      have-binary is true, the token tc-manifest-sequence-number field MUST be absent in the Success
      message.

   msg
      The msg parameter contains optional diagnostics
      present.

4.3.1.  Evidence and Attestation Results

   Section 7 of [I-D.ietf-teep-architecture] lists information
      encoded that may
   appear in UTF-8 [RFC3629] using Net-Unicode form [RFC5198] with
      max 128 bytes returned by evidence depending on the TEEP Agent.

   suit-reports
      If present, circumstance.  However, the suit-reports parameter contains
   evidence is opaque to the TEEP protocol and there are no formal
   requirements on the contents of evidence.

   TAMs however consume Attestation Results and do need enough
   information therein to make decisions on how to remediate a set TEE that
   is out of SUIT
      Reports as defined compliance, or update a TEE that is requesting an
   authorized change.  To do so, the information in Section 4 7 of [I-D.moran-suit-report].  If
      the suit-report-nonce field
   [I-D.ietf-teep-architecture] is present in often required depending on the SUIT Report,
   policy.  When an Entity Attestation Token is
      value MUST match used, the value following
   claims can be used to meet those requirements:

   +=============+==================+=================================+
   | Requirement | Claim            | Reference                       |
   +=============+==================+=================================+
   | Device      | ueid             | [I-D.ietf-rats-eat] section 3.4 |
   | unique      |                  |                                 |
   | identifier  |                  |                                 |
   +-------------+------------------+---------------------------------+
   | Vendor of   | oemid            | [I-D.ietf-rats-eat] section 3.6 |
   | the token parameter in device  |                  |                                 |
   +-------------+------------------+---------------------------------+
   | Class of    | class-identifier | [I-D.birkholz-rats-suit-claims] |
   | the device  |                  | section 3.1.2                   |
   +-------------+------------------+---------------------------------+
   | TEE         | chip-version     | [I-D.ietf-rats-eat] section 3.7 |
   | hardware    |                  |                                 |
   | type        |                  |                                 |
   +-------------+------------------+---------------------------------+
   | TEE         | chip-version     | [I-D.ietf-rats-eat] section 3.7 |
   | hardware    |                  |                                 |
   | version     |                  |                                 |
   +-------------+------------------+---------------------------------+
   | TEE         | sw-name          | [I-D.ietf-rats-eat] section 3.9 |
   | firmware    |                  |                                 |
   | type        |                  |                                 |
   +-------------+------------------+---------------------------------+
   | TEE         | sw-version       | [I-D.ietf-rats-eat] section     |
   | firmware    |                  | 3.10                            |
   | version     |                  |                                 |
   +-------------+------------------+---------------------------------+
   | Freshness   | nonce            | [I-D.ietf-rats-eat] section 3.3 |
   | proof       |                  |                                 |
   +-------------+------------------+---------------------------------+

                                 Table 1

4.4.  Update
      message the Success message is in response to.

4.6.  Error Message

   The Error Update message is used by the TEEP Agent to return an error in
   response TAM to an Update message.

   Like other TEEP messages, the Error message is signed, install and/or delete one or
   more Trusted Components via the TEEP Agent.

   Like other TEEP messages, the Update message is signed, and the
   relevant CDDL snippet is shown below.  The complete CDDL structure is
   shown in Appendix C.

   teep-error

   update = [
     type: TEEP-TYPE-teep-error, TEEP-TYPE-update,
     options: {
       ? token => bstr .size (8..64),
       ? err-msg => text .size (1..128),
        ? supported-cipher-suites => [ + suite ],
        ? supported-freshness-mechanisms => [ + freshness-mechanism ],
        ? versions => [ + version ],
        ? suit-reports manifest-list => [ + suit-report bstr .cbor SUIT_Envelope ],
       * $$teep-error-extensions, $$update-extensions,
       * $$teep-option-extensions
     },
     err-code: uint (0..23)
     }
   ]

   The Error Update message has the following fields:

   type
      The value of (6) (3) corresponds to an Error Update message sent from the
      TEEP Agent
      TAM to the TAM. TEEP Agent.  In case of successful processing, a
      Success message is returned by the TEEP Agent.  In case of an
      error, an Error message is returned.  Note that the Update message
      is used for initial Trusted Component installation as well as for
      updates and deletes.

   token
      The value in the token parameter field is used to match responses to
      requests.  It MUST match the value of the token parameter in the
      Update message the Success

   manifest-list
      The manifest-list field is in response to, if used to convey one was present.
      If none was present, the token MUST be absent in the Error
      message.

   err-msg
      The err-msg parameter or multiple SUIT
      manifests to install.  A manifest is human-readable diagnostic text that MUST
      be encoded using UTF-8 [RFC3629] using Net-Unicode form [RFC5198]
      with max 128 bytes.

   supported-cipher-suites
      The supported-cipher-suites parameter lists a bundle of metadata about a
      Trusted Component, such as where to find the ciphersuite(s)
      supported by code, the TEEP Agent.  Details about devices to
      which it applies, and cryptographic information protecting the ciphersuite
      encoding
      manifest.  The manifest may also convey personalization data.
      Trusted Component binaries and personalization data can be found in Section 7.  This otherwise optional
      parameter MUST be returned if err-code is
      ERR_UNSUPPORTED_CIPHER_SUITES.

   supported-freshness-mechanisms
      The supported-freshness-mechanisms parameter lists the freshness
      mechanism(s) supported by the TEEP Agent.  Details about the
      encoding can be found in Section 8.  This otherwise optional
      parameter MUST be returned if err-code is
      ERR_UNSUPPORTED_FRESHNESS_MECHANISMS.

   versions
      The versions parameter enumerates the TEEP protocol version(s)
      supported signed
      and encrypted by the TEEP Agent.  This otherwise optional parameter
      MUST be returned if err-code is ERR_UNSUPPORTED_MSG_VERSION.

   suit-reports
      If present, the suit-reports parameter contains a set of SUIT
      Reports same Trusted Component Signer.  Other
      combinations are, however, possible as defined in Section 4 of [I-D.moran-suit-report].  If
      the suit-report-nonce field well.  For example, it is present in
      also possible for the SUIT Report, is
      value MUST match TAM to sign and encrypt the value of personalization
      data and to let the token parameter in Trusted Component Developer sign and/or
      encrypt the Trusted Component binary.

   Note that an Update message carrying one or more SUIT manifests will
   inherently involve multiple signatures, one by the Error message is TAM in response to.

   err-code
      The err-code parameter contains one of the error codes listed
      below).  Only selected values are applicable to TEEP
   message and one from a Trusted Component Signer inside each message. manifest.
   This specification defines the following initial error messages:

   ERR_PERMANENT_ERROR (1)
      The TEEP request contained incorrect fields or fields that is intentional as they are
      inconsistent with other fields.  For diagnosis purposes it for different purposes.

   The TAM is
      RECOMMMENDED what authorizes apps to identify the failure reason in be installed, updated, and deleted
   on a given TEE and so the error message.
      A TAM receiving this error might refuse to communicate further
      with TEEP signature is checked by the TEEP Agent for some period of time until it has reason to
      believe it
   at protocol message processing time.  (This same TEEP security
   wrapper is worth trying again, but it should take care not to
      give up also used on communication when there is no attestation evidence
      indicating messages like QueryRequest so that Agents
   only send potentially sensitive data such as evidence to trusted
   TAMs.)
   The Trusted Component signer on the error other hand is genuine.  In contrast,
      ERR_TEMPORARY_ERROR what authorizes the
   Trusted Component to actually run, so the manifest signature could be
   checked at install time or load (or run) time or both, and this
   checking is an indication that a more agressive retry done by the TEE independent of whether TEEP is warranted.

   ERR_UNSUPPORTED_EXTENSION (2) used or
   some other update mechanism.  See section 5 of
   [I-D.ietf-teep-architecture] for further discussion.

   The TEEP Agent does not support an extension included Update Message has a SUIT_Envelope containing SUIT manifests.
   Following are some examples of using SUIT manifests in the
      request message.  For diagnosis purposes it is RECOMMMENDED Update
   Message.

4.4.1.  Example 1: Having one SUIT Manifest pointing to
      identify a URI of a
        Trusted Component Binary

   In this example, a SUIT Manifest has a URI pointing to a Trusted
   Component Binary.

   A Trusted Component Developer creates a new Trusted Component Binary
   and hosts it at a Trusted Component Developer's URI.  Then the unsupported extension in
   Trusted Component Developer generates an associated SUIT manifest
   with the error message.  A TAM
      receiving this error might retry filename "tc-uuid.suit" that contains the request without using
      extensions.

   ERR_UNSUPPORTED_FRESHNESS_MECHANISMS (3) URI.  The TEEP Agent does not support any freshness algorithm mechanisms filename
   "tc-uuid.suit" is used in the request message.  A Example 3 later.

   The TAM receiving this error might retry receives the request using a different set of supported freshness
      mechanisms in the request message.

   ERR_UNSUPPORTED_MSG_VERSION (4)
      The TEEP Agent does not support the TEEP protocol version
      indicated in latest SUIT manifest from the request message.  A TAM receiving this error
      might retry Trusted Component
   Developer, and the request using a different TEEP protocol version.

   ERR_UNSUPPORTED_CIPHER_SUITES (5)
      The TEEP Agent does URI it contains will not support any ciphersuites indicated in be changeable by the
      request message.  A TAM receiving this error might retry the
      request using a different set of supported ciphersuites in
   since the
      request message.

   ERR_BAD_CERTIFICATE (6)
      Processing of a certificate failed.  For diagnosis purposes it SUIT manifest is
      RECOMMMENDED to include information about the failing certificate
      in the error message.  For example, signed by the certificate was of an
      unsupported type, or Trusted Component Developer.

   Pros:

   *  The Trusted Component Developer can ensure that the certificate was revoked intact Trusted
      Component Binary is downloaded by its signer.  A devices

   *  The TAM receiving this error might attempt to use an alternate
      certificate.

   ERR_CERTIFICATE_EXPIRED (9)
      A certificate has expired or is does not currently valid.  A TAM
      receiving this error might attempt have to renew its certificate before
      using it again.

   ERR_TEMPORARY_ERROR (10)
      A miscellaneous temporary error, such as a memory allocation
      failure, occurred while processing send large Update messages containing the request message.  A TAM
      receiving this error might retry
      Trusted Component Binary

   Cons:

   *  The Trusted Component Developer must host the same request at a later point
      in time.

   ERR_MANIFEST_PROCESSING_FAILED (17) Trusted Component
      Binary server

   *  The device must fetch the Trusted Component Binary in another
      connection after receiving an Update message
       +------------+           +-------------+
       | TAM        |           | TEEP Agent encountered one or more manifest processing
      failures.  If the suit-reports parameter is present, it contains
      the failure details.  A TAM receiving this error might still
      attempt to install or update other components that do not depend
      on the failed manifest.

   New error codes should be added sparingly, not for every
   implementation error.  That is the intent of the err-msg field, which
   can be used to provide details meaningful to humans.  New error codes
   should only be added if the TAM is expected to do something
   behaviorally different upon receipt of the error message, rather than
   just logging the event.  Hence, each error code is responsible for
   saying what the behavioral difference is expected to be.

5.  Mapping of TEEP Message Parameters to CBOR Labels

   In COSE, arrays and maps use strings, negative integers, and unsigned
   integers as their keys.  Integers are used for compactness of
   encoding.  Since the word "key" is mainly used in its other meaning,
   as a cryptographic key, this specification uses the term "label" for
   this usage as a map key.

   This specification uses the following mapping:

                +================================+=======+  | Name
       +------------+           +-------------+

                Update  ---->

       +=================== teep-protocol(TAM) ==================+
       | Label TEEP_Message([                                          |
                +================================+=======+
       | supported-cipher-suites   TEEP-TYPE-update,                                     | 1
       |
                +--------------------------------+-------+   options: {                                            | challenge
       | 2     manifest-list: [                                    |
                +--------------------------------+-------+
       | version       += suit-manifest "tc-uuid.suit" (TC Developer) =+ | 3
       |
                +--------------------------------+-------+       | selected-cipher-suite SUIT_Envelope({                               | 5 |
                +--------------------------------+-------+
       | selected-version       | 6   manifest: {                                 |
                +--------------------------------+-------+ | evidence
       | 7       |
                +--------------------------------+-------+     install: {                                | tc-list | 8
       |
                +--------------------------------+-------+       | ext-list       set-parameter: {                        | 9 |
                +--------------------------------+-------+
       | manifest-list       | 10         uri: "https://example.org/tc-uuid.ta" |
                +--------------------------------+-------+ | msg
       | 11       |
                +--------------------------------+-------+       },                                      | err-msg | 12
       |
                +--------------------------------+-------+       | evidence-format       fetch                                   | 13 |
                +--------------------------------+-------+
       | requested-tc-list       | 14     }                                         |
                +--------------------------------+-------+ | unneeded-tc-list
       | 15       |
                +--------------------------------+-------+   }                                           | component-id | 16
       |
                +--------------------------------+-------+       | tc-manifest-sequence-number })                                            | 17 |
                +--------------------------------+-------+
       | have-binary       +===============================================+ | 18
       |
                +--------------------------------+-------+     ]                                                   | suit-reports
       | 19   }                                                     |
                +--------------------------------+-------+
       | token ])                                                      | 20
       +=========================================================+

       and then,

       +-------------+          +--------------+
       |
                +--------------------------------+-------+ TEEP Agent  | supported-freshness-mechanisms          | 21 TC Developer |
                +--------------------------------+-------+

                                 Table 2

6.  Behavior Specification

   Behavior is specified in terms
       +-------------+          +--------------+

                        <----

         fetch "https://example.org/tc-uuid.ta"

             +======= tc-uuid.ta =======+
             | 48 65 6C 6C 6F 2C 20 ... |
             +==========================+

       Figure 1: URI of the conceptual APIs defined in
   section 6.2.1 of [I-D.ietf-teep-architecture].

6.1.  TAM Behavior

   When Trusted Component Binary

   For the ProcessConnect API is invoked, full SUIT Manifest example binary, see Appendix "Example 1:
   SUIT Manifest pointing to URI of the TAM sends Trusted Component Binary".

4.4.2.  Example 2: Having a QueryRequest
   message.

   When SUIT Manifest include the ProcessTeepMessage API is invoked, Trusted Component
        Binary

   In this example, the SUIT manifest contains the entire Trusted
   Component Binary using the integrated-payload (see
   [I-D.ietf-suit-manifest] Section 7.6).

   A Trusted Component Developer delegates to the TAM first does
   validation as specified the task of
   delivering the Trusted Component Binary in Section 4.1.2, the SUIT manifest.  The
   Trusted Component Developer creates a SUIT manifest and drops embeds the message if it
   Trusted Component Binary, which is not valid.  Otherwise, it proceeds as follows.

   If referenced in the message includes a token, it can be used to match URI parameter
   with identifier "#tc".  The Trusted Component Developer provides the response
   SUIT manifest to a request previously sent by the TAM.

   The TAM MUST expire serves the
   token value after receiving SUIT manifest containing the first response from Trusted Component
   Binary to the device that
   has a valid signature and ignore any subsequent messages that have in an Update message.

   Pros:

   *  The device can obtain the same token value. Trusted Component Binary and its SUIT
      manifest together in one Update message

   *  The token value MUST NOT be used for other
   purposes, such as Trusted Component Developer does not have to host a TAM server to identify
      deliver the Trusted Component Binary directly to devices and/or a device

   Cons:

   *  The TAM must host the Trusted Component Binary itself, rather than
      delegating such storage to
   identify TAMs or the Trusted Components.

   If a QueryResponse message is received that contains evidence, Component Developer

   *  The TAM must deliver Trusted Component Binaries in Update
      messages, which result in increased Update message size
       +------------+           +-------------+
       | TAM        |           | TEEP Agent  |
       +------------+           +-------------+

                Update  ---->

         +=========== teep-protocol(TAM) ============+
         | TEEP_Message([                            |
         |   TEEP-TYPE-update,                       |
         |   options: {                              |
         |     manifest-list: [                      |
         |       +== suit-manifest(TC Developer) ==+ |
         |       | SUIT_Envelope({                 | |
         |       |   "#tc": h'48 65 6C 6C ...',    | |
         |       |   manifest: {                   | |
         |       |     install: {                  | |
         |       |       set-parameter: {          | |
         |       |         uri: "#tc"              | |
         |       |       },                        | |
         |       |       fetch                     | |
         |       |     }                           | |
         |       |   }                             | |
         |       | })                              | |
         |       +=================================+ |
         |     ]                                     |
         |   }                                       |
         | ])                                        |
         +===========================================+

       Figure 2: Integrated Payload with Trusted Component Binary

   For the
   evidence is passed to an attestation Verifier (see
   [I-D.ietf-rats-architecture]) to determine whether full SUIT Manifest example binary, see Appendix "Example 2:
   SUIT Manifest including the Agent Trusted Component Binary".

4.4.3.  Example 3: Supplying Personalization Data for the Trusted
        Component Binary

   In this example, Personalization Data is associated with the Trusted
   Component Binary "tc-uuid.suit" from Example 1.

   The Trusted Component Developer places Personalization Data in a
   trustworthy state.  Based on the results of attestation, and the
   lists of installed, requested, file
   named "config.json" and unneeded hosts it on an HTTPS server.  The Trusted Components
   reported in the QueryResponse,
   Component Developer then creates a SUIT manifest with the TAM determines, in any
   implementation specific manner, URI,
   specifying which Trusted Components need to be
   installed, updated, or deleted, if any.  If any Trusted Components
   need Component Binary it correlates to be installed, updated, or deleted, in the
   parameter 'dependency-resolution', and signs the SUIT manifest.

   The TAM sends an Update
   message containing delivers the SUIT Manifests with command sequences to do manifest of the
   relevant installs, updates, or deletes.  It is important to note that Personalization Data which
   depends on the Trusted Component Binary from Example 1.

       +------------+           +-------------+
       | TAM        |           | TEEP Agent's Agent  |
       +------------+           +-------------+

                Update Procedure requires resolving  ---->

         +================= teep-protocol(TAM) ======================+
         | TEEP_Message([                                            |
         |   TEEP-TYPE-update,                                       |
         |   options: {                                              |
         |     manifest-list: [                                      |
         |       +======== suit-manifest(TC Developer) ============+ |
         |       | SUIT_Envelope({                                 | |
         |       |   manifest: {                                   | |
         |       |     common: {                                   | |
         |       |       dependencies: [                           | |
         |       |         {{digest-of-tc.suit}}                   | |
         |       |       ]                                         | |
         |       |     }                                           | |
         |       |     dependency-resolution: {                    | |
         |       |       set-parameter: {                          | |
         |       |         uri: "https://example.org/tc-uuid.suit" | |
         |       |       }                                         | |
         |       |       fetch                                     | |
         |       |     }                                           | |
         |       |     install: {                                  | |
         |       |       set-parameter: {                          | |
         |       |         uri: "https://example.org/config.json"  | |
         |       |       },                                        | |
         |       |       fetch                                     | |
         |       |       set-dependency-index                      | |
         |       |       process-dependency                        | |
         |       |     }                                           | |
         |       |   }                                             | |
         |       | })                                              | |
         |       +=================================================+ |
         |     ]                                                     |
         |   }                                                       |
         | ])                                                        |
         +===========================================================+

       and installing
   any dependencies indicated then,

       +-------------+          +--------------+
       | TEEP Agent  |          | TC Developer |
       +-------------+          +--------------+

                        <----

         fetch "https://example.org/config.json"

             +=======config.json========+
             | 7B 22 75 73 65 72 22 ... |
             +==========================+

       Figure 3: Personalization Data

   For the full SUIT Manifest example binary, see Appendix "Example 3:
   Supplying Personalization Data for Trusted Component Binary".

4.4.4.  Example 4: Unlinking Trusted Component

   This subsection shows an example deleting the Trusted Component
   Binary in the manifest, TEEP Device.

   A Trusted Component Developer can also generate SUIT Manifest which may take some time,
   and
   unlinks the resulting Success or Error message is generated only after
   completing installed Trusted Component.  The TAM deliver it when the Update Procedure.  Hence, depending on
   TAM want to uninstall the freshness
   mechanism component.

   The directive-unlink (see [I-D.moran-suit-trust-domains] Section-
   6.5.4) is located in use, the TAM may need manifest to store data (e.g., a nonce) for
   some time.

   If a Success or Error message is received containing one or more SUIT
   Reports, delete the TAM also validates Trusted Component.
   Note that the nonce in any SUIT Report
   matches the token sent in case other Trusted Components depend on it, i.e. the Update message, and drops the message
   if it does
   reference count is not match.  Otherwise, the TAM handles the update in any
   implementation specific way, such as updating any locally cached
   information about the state of zero, the TEEP Agent, or logging the
   results.

   If any other Error message is received, the TAM can handle Device SHOULD NOT delete it in any
   implementation specific way, but Section 4.6 provides recommendations
   for such handling.

6.2.  TEEP Agent Behavior

   When the RequestTA API is invoked, the
   immediately.

       +------------+           +-------------+
       | TAM        |           | TEEP Agent first checks
   whether  |
       +------------+           +-------------+

                Update  ---->

         +=========== teep-protocol(TAM) ============+
         | TEEP_Message([                            |
         |   TEEP-TYPE-update,                       |
         |   options: {                              |
         |     manifest-list: [                      |
         |       +== suit-manifest(TC Developer) ==+ |
         |       | SUIT_Envelope({                 | |
         |       |   manifest: {                   | |
         |       |     install: [                  | |
         |       |       unlink                    | |
         |       |     ]                           | |
         |       |   }                             | |
         |       | })                              | |
         |       +=================================+ |
         |     ]                                     |
         |   }                                       |
         | ])                                        |
         +===========================================+

       Figure 4: Unlink Trusted Component example (summary)

   For the requested TA is already installed.  If it full SUIT Manifest example binary, see Appendix E.  SUIT
   Example 4 (Appendix "E.4.  Example 4: Unlink a Trusted Component")

4.5.  Success Message

   The Success message is already
   installed, used by the TEEP Agent passes no data back to the caller.
   Otherwise, if the TEEP Agent chooses return a success in
   response to initiate an Update message.

   Like other TEEP messages, the process of
   requesting Success message is signed, and the indicated TA, it determines (in any implementation
   specific way) the TAM URI based on any TAM URI provided by the
   RequestTA caller and any local configuration, and passes back the TAM
   URI to connect to.

   When the RequestPolicyCheck API
   relevant CDDL snippet is invoked, shown below.  The complete CDDL structure is
   shown in Appendix C.

   teep-success = [
     type: TEEP-TYPE-teep-success,
     options: {
       ? token => bstr .size (8..64),
       ? msg => text .size (1..128),
       ? suit-reports => [ + suit-report ],
       * $$teep-success-extensions,
       * $$teep-option-extensions
     }
   ]

   The Success message has the TEEP Agent decides
   whether following fields:

   type
      The value of (5) corresponds to initiate communication with any trusted TAMs (e.g., it
   might choose corresponds to do so for a given TAM unless it detects that it has
   already communicated with that TAM recently).  If so, it passes back a TAM URI to connect to.  If Success message
      sent from the TEEP Agent has multiple TAMs it
   needs to connect with, it just passes back one, with the expectation
   that RequestPolicyCheck API will be invoked to retrieve each one
   successively until there are no more and it can pass back no data at
   that time.  Thus, once a TAM URI is returned, the TEEP Agent can
   remember that it has already initiated communication with that TAM.

   When

   token
      The value in the ProcessError API token parameter is invoked, used to match responses to
      requests.  It MUST match the TEEP Agent can handle it value of the token parameter in
   any implementation specific way, such as logging the error or using
      Update message the information Success is in future choices of TAM URI.

   When response to, if one was present.
      If none was present, the ProcessTeepMessage API is invoked, token MUST be absent in the Agent first does
   validation Success
      message.

   msg
      The msg parameter contains optional diagnostics information
      encoded in UTF-8 [RFC3629] using Net-Unicode form [RFC5198] with
      max 128 bytes returned by the TEEP Agent.

   suit-reports
      If present, the suit-reports parameter contains a set of SUIT
      Reports as specified defined in Section 4.1.2, and drops 4 of [I-D.moran-suit-report].  If a
      token parameter was present in the Update message if it
   is not valid.  Otherwise, processing continues as follows based on the type of message.

   When a QueryRequest Success
      message is received, in response to, the Agent responds suit-report-nonce field MUST be
      present in the SUIT Report with a
   QueryResponse message if all fields were understood, or an Error
   message if any error was encountered.

   When an value matching the token
      parameter in the Update message.

4.6.  Error Message

   The Error message is received, used by the TEEP Agent attempts to update the
   Trusted Components specified in the SUIT manifests by following the
   Update Procedure specified in [I-D.ietf-suit-manifest], and responds
   with a Success message if all SUIT manifests were successfully
   installed, or return an Error message if any error was encountered.  It is
   important in
   response to note that the an Update Procedure requires resolving and
   installing any dependencies indicated in the manifest, which may take
   some time, and message.

   Like other TEEP messages, the Success or Error message is generated only after
   completing the Update Procedure.

7.  Ciphersuites

   A ciphersuite consists of an AEAD algorithm, a MAC algorithm, signed, and a
   signature algorithm.  Each ciphersuite the
   relevant CDDL snippet is identified with an integer
   value, which corresponds to an IANA registered ciphersuite (see
   Section 10.2.  This document specifies two ciphersuites.

        +=======+================================================+
        | Value | Ciphersuite                                    |
        +=======+================================================+
        | 1     | AES-CCM-16-64-128, HMAC 256/256, X25519, EdDSA |
        +-------+------------------------------------------------+
        | 2     | AES-CCM-16-64-128, HMAC 256/256, P-256, ES256  |
        +-------+------------------------------------------------+

                                 Table 3

   A TAM MUST support both ciphersuites.  A TEEP Agent MUST support at
   least one shown below.  The complete CDDL structure is
   shown in Appendix C.

   teep-error = [
     type: TEEP-TYPE-teep-error,
     options: {
        ? token => bstr .size (8..64),
        ? err-msg => text .size (1..128),
        ? supported-cipher-suites => [ + suite ],
        ? supported-freshness-mechanisms => [ + freshness-mechanism ],
        ? versions => [ + version ],
        ? suit-reports => [ + suit-report ],
        * $$teep-error-extensions,
        * $$teep-option-extensions
     },
     err-code: uint (0..23)
   ]

   The Error message has the following fields:

   type
      The value of (6) corresponds to an Error message sent from the two but can choose which one.  For example, a
      TEEP Agent might choose ciphersuite 2 if it has hardware support for it.

   Any ciphersuites without confidentiality protection can only be added
   if to the associated specification includes a discussion of security
   considerations and applicability, since manifests may carry sensitive
   information.  For example, Section 6 TAM.

   token
      The value in the token parameter is used to match responses to
      requests.  It MUST match the value of [I-D.ietf-teep-architecture]
   permits implementations that terminate transport security inside the
   TEE and if token parameter in the transport security provides confidentiality then
   additional encryption might not be needed
      Update message the Success is in response to, if one was present.
      If none was present, the manifest for some
   use cases.  For most use cases, however, manifest confidentiality
   will token MUST be needed to protect sensitive fields from the TAM as discussed absent in Section 9.8 of [I-D.ietf-teep-architecture].

8.  Freshness Mechanisms

   A freshness mechanism determines how a TAM can tell whether evidence
   provided in a Query Response the Error
      message.

   err-msg
      The err-msg parameter is fresh.  There are multiple ways this human-readable diagnostic text that MUST
      be encoded using UTF-8 [RFC3629] using Net-Unicode form [RFC5198]
      with max 128 bytes.

   supported-cipher-suites
      The supported-cipher-suites parameter lists the ciphersuite(s)
      supported by the TEEP Agent.  Details about the ciphersuite
      encoding can be done as discussed found in Section 10 of
   [I-D.ietf-rats-architecture].

   Each freshness mechanism is identified with an integer value, which
   corresponds to an IANA registered freshness mechanism (see
   Section 10.3. 8.  This document defines otherwise optional
      parameter MUST be returned if err-code is
      ERR_UNSUPPORTED_CIPHER_SUITES.

   supported-freshness-mechanisms
      The supported-freshness-mechanisms parameter lists the following freshness
   mechanisms:

                      +=======+=====================+
                      | Value | Freshness mechanism |
                      +=======+=====================+
                      | 1     | Nonce               |
                      +-------+---------------------+
                      | 2     | Timestamp           |
                      +-------+---------------------+
                      | 3     | Epoch ID            |
                      +-------+---------------------+

                                  Table 4

   In
      mechanism(s) supported by the Nonce mechanism, TEEP Agent.  Details about the evidence MUST include a nonce provided
      encoding can be found in
   the QueryRequest challenge.  In other mechanisms, a timestamp or
   epoch ID determined via mechanisms outside Section 9.  This otherwise optional
      parameter MUST be returned if err-code is
      ERR_UNSUPPORTED_FRESHNESS_MECHANISMS.

   versions
      The versions parameter enumerates the TEEP protocol is used,
   and version(s)
      supported by the challenge TEEP Agent.  This otherwise optional parameter
      MUST be returned if err-code is only needed in ERR_UNSUPPORTED_MSG_VERSION.

   suit-reports
      If present, the QueryRequest message if suit-reports parameter contains a
   challenge is needed set of SUIT
      Reports as defined in generating evidence for reasons other than
   freshness. Section 4 of [I-D.moran-suit-report].  If a TAM supports multiple freshness mechanisms that require
   different challenge formats,
      token parameter was present in the QueryRequest Update message the Error
      message can currently
   only send one such challenge.  This situation is expected to be rare,
   but should it occur, in response to, the TAM can choose to prioritize one of them and
   exclude suit-report-nonce field MUST be
      present in the other from SUIT Report with a value matching the supported-freshness-mechanisms token
      parameter in the
   QueryRequest, and resend the QueryRequest with Update message.

   err-code
      The err-code parameter contains one of the other mechanism if
   an ERR_UNSUPPORTED_FRESHNESS_MECHANISMS Error is received that
   indicates error codes listed
      below).  Only selected values are applicable to each message.

   This specification defines the following initial error messages:

   ERR_PERMANENT_ERROR (1)
      The TEEP Agent supports the request contained incorrect fields or fields that are
      inconsistent with other mechanism.

9.  Security Considerations

   This section summarizes fields.  For diagnosis purposes it is
      RECOMMMENDED to identify the security considerations discussed failure reason in this
   specification:

   Cryptographic Algorithms
      TEEP protocol messages exchanged between the error message.
      A TAM and receiving this error might refuse to communicate further
      with the TEEP Agent are protected using COSE.  This specification relies on the
      cryptographic algorithms provided by COSE.  Public key based
      authentication for some period of time until it has reason to
      believe it is used by the TEEP Agent worth trying again, but it should take care not to authenticate the TAM
      and vice versa.

   Attestation
      A TAM can rely
      give up on the communication when there is no attestation evidence provided by the TEEP
      Agent.  To sign
      indicating that the attestation evidence, it error is necessary for the
      device to possess genuine.  In contrast,
      ERR_TEMPORARY_ERROR is an indication that a public key (usually more agressive retry
      is warranted.

   ERR_UNSUPPORTED_EXTENSION (2)
      The TEEP Agent does not support an extension included in the form of a
      certificate [RFC5280]) along with the corresponding private key.
      Depending on the properties of the attestation mechanism,
      request message.  For diagnosis purposes it is
      possible RECOMMMENDED to uniquely
      identify a device based on information in the
      attestation evidence or unsupported extension in the certificate used to sign the
      attestation evidence.  This uniqueness may raise privacy concerns.
      To lower the privacy implications error message.  A TAM
      receiving this error might retry the request without using
      extensions.

   ERR_UNSUPPORTED_FRESHNESS_MECHANISMS (3)
      The TEEP Agent MUST present its
      attestation evidence only to an authenticated and authorized does not support any freshness algorithm mechanisms
      in the request message.  A TAM
      and when receiving this error might retry
      the request using EATS, it SHOULD use encryption as discussed a different set of supported freshness
      mechanisms in
      [I-D.ietf-rats-eat], since confidentiality is the request message.

   ERR_UNSUPPORTED_MSG_VERSION (4)
      The TEEP Agent does not provided by support the TEEP protocol itself and version
      indicated in the transport protocol under request message.  A TAM receiving this error
      might retry the request using a different TEEP protocol version.

   ERR_UNSUPPORTED_CIPHER_SUITES (5)
      The TEEP Agent does not support any ciphersuites indicated in the
      request message.  A TAM receiving this error might be implemented outside retry the
      request using a different set of any TEE.  If any
      mechanism other than EATs is used, supported ciphersuites in the
      request message.

   ERR_BAD_CERTIFICATE (6)
      Processing of a certificate failed.  For diagnosis purposes it is up to that mechanism
      RECOMMMENDED to
      specify how privacy is provided.

   Trusted Component Binaries
      Each Trusted Component binary is signed by a Trusted Component
      Signer.  It is the responsibility of include information about the TAM to relay only
      verified Trusted Components from authorized Trusted Component
      Signers.  Delivery of a Trusted Component to failing certificate
      in the TEEP Agent is
      then error message.  For example, the responsibility certificate was of an
      unsupported type, or the TAM, using the security mechanisms
      provided certificate was revoked by the TEEP protocol.  To protect the Trusted Component
      binary, the SUIT manifest format is used and it offers a variety
      of security features, including digitial signatures and symmetric
      encryption.

   Personalization Data its signer.  A Trusted Component Signer or
      TAM can supply personalization data
      along with a Trusted Component.  This data receiving this error might attempt to use an alternate
      certificate.

   ERR_CERTIFICATE_EXPIRED (9)
      A certificate has expired or is also protected by a
      SUIT manifest.  Personalization data signed and encrypted by a
      Trusted Component Signer other than the not currently valid.  A TAM is opaque
      receiving this error might attempt to the TAM.

   TEEP Broker
      As discussed in section 6 of [I-D.ietf-teep-architecture], the
      TEEP protocol typically relies on renew its certificate before
      using it again.

   ERR_TEMPORARY_ERROR (10)
      A miscellaneous temporary error, such as a TEEP Broker to relay messages
      between memory allocation
      failure, occurred while processing the request message.  A TAM and
      receiving this error might retry the same request at a later point
      in time.

   ERR_MANIFEST_PROCESSING_FAILED (17)
      The TEEP Agent.  When Agent encountered one or more manifest processing
      failures.  If the TEEP Broker suit-reports parameter is
      compromised it can drop messages, delay the delivery of messages,
      and replay messages but present, it cannot modify those messages.  (A
      replay would be, however, detected by contains
      the TEEP Agent.) failure details.  A
      compromised TEEP Broker could reorder messages in an TAM receiving this error might still
      attempt to install an old version of a Trusted Component.  Information in the
      manifest ensures or update other components that TEEP Agents are protected against such
      downgrade attacks based do not depend
      on features offered by the manifest
      itself.

   Trusted Component Signer Compromise
      A TAM is responsible failed manifest.

   New error codes should be added sparingly, not for vetting a Trusted Component and before
      distributing them to TEEP Agents.

      It every
   implementation error.  That is RECOMMENDED the intent of the err-msg field, which
   can be used to provide a way details meaningful to update the trust anchor
      store used by the TEE, for example using a firmware update
      mechanism.  Thus, humans.  New error codes
   should only be added if a Trusted Component Signer is later
      compromised, the TAM can update is expected to do something
   behaviorally different upon receipt of the trust anchor store used by error message, rather than
   just logging the
      TEE, event.  Hence, each error code is responsible for example using a firmware update mechanism.

   CA Compromise
      The CA issuing certificates
   saying what the behavioral difference is expected to be.

5.  EAT Profile

   The TEEP protocol operates between a TEE or TEEP Agent and a Trusted Component Signer
      might get compromised.  It TAM.  While the
   TEEP protocol does not require use of EAT, use of EAT is RECOMMENDED to provide encouraged
   and Section 4.3 explicitly defines a way to
      update the trust anchor store used by the TEE, for example using carry an Entity
   Attestation Token evidence in a
      firmware update mechanism.  If QueryResponse.

   As discussed in Section 4.3.1, the CA issuing certificates to
      devices gets compromised then these devices might be rejected by a
      TAM, if revocation is available content of attestation evidence is
   opaque to the TAM.

   TAM Certificate Expiry
      The integrity and TEEP architecture, but the accuracy content of Attestation
   Results is not, where Attestation Results flow between a Verifier and
   a TAM (as the clock within the TEE
      determines the ability to determine an expired Relying Party).  Although Attestation Results required
   by a TAM certificate, if
      certificates are used.

   Compromised Time Source
      As discussed above, certificate validity checks rely on comparing
      validity dates to separable from the current time, which relies on having a
      trusted source of time, such as [RFC8915].  A compromised time
      source could thus be used to subvert such validity checks.

10.  IANA Considerations

10.1.  Media Type Registration

   IANA TEEP protocol per se, this section is requested to assign a media type for application/teep+cbor.

   Type name:  application

   Subtype name:  teep+cbor

   Required parameters:  none

   Optional parameters:  none

   Encoding considerations:  Same
   included as encoding considerations part of
      application/cbor.

   Security considerations:  See Security Considerations the requirements for building a compliant TAM
   that uses EATs for Attestation Results.

   Section 7 of this
      document.

   Interoperability considerations:  Same as interoperability
      considerations of application/cbor as specified in [RFC7049].

   Published specification: [I-D.ietf-rats-eat] defines the requirement for Entity
   Attestation Token profiles.  This document.

   Applications that section defines an EAT profile for
   use this media type:  TEEP protocol implementations

   Fragment identifier considerations:  N/A

   Additional information:  Deprecated alias names with TEEP.

   *  profile-label: The profile-label for this type:  N/A

                            Magic number(s):  N/A

                            File extension(s):  N/A

                            Macintosh file type code(s):  N/A

   Person to contact for further information:  teep@ietf.org

   Intended usage:  COMMON

   Restrictions on usage:  none

   Author:  See specification is the "Authors' Addresses" section URI

   https://datatracker.ietf.org/doc/html/draft-ietf-teep-protocol-08
   (https://datatracker.ietf.org/doc/html/draft-ietf-teep-protocol-08).
   (RFC-editor: upon RFC publication, replace string with
   "https://www.rfc-editor.org/info/rfcXXXX" where XXXX is the RFC
   number of this document

   Change controller:  IETF

10.2.  Ciphersuite Registry

   IANA is also requested to create a new registry for ciphersuites.

   Name document.)

   *  Use of registry: TEEP Ciphersuites

   Policy: Specification JSON, CBOR, or both: CBOR only.

   *  CBOR Map and Array Encoding: Only definite length arrays and maps.

   *  CBOR String Encoding: Only definite-length strings are allowed.

   *  CBOR Preferred Serialization: Encoders must use preferred
      serialization, and decoders need not accept non-preferred
      serialization.

   *  COSE/JOSE Protection: See Section 8.

   *  Detached EAT Bundle Support: DEB use is permitted.

   *  Verification Key Identification: COSE Key ID (kid) is used, where
      the key ID is the hash of a public key (where the public key may
      be used as a raw public key, or in a certificate).

   *  Endorsement Identification: Optional, but semantics are the same
      as in Verification Key Identification.

   *  Freshness: See Section 9.

   *  Required Claims: None.

   *  Prohibited Claims: None.

   *  Additional requirements: Claims: Optional claims are those listed in
      Section 4.3.1.

   *  Refined Claim Definition: None.

   *  CBOR Tags: CBOT Tags are not used.

   *  Manifests and Software Evidence Claims: The sw-name claim for a
      Trusted Component holds the URI of the SUIT manifest for that
      component.

6.  Mapping of TEEP Message Parameters to CBOR Labels

   In COSE, arrays and maps use strings, negative integers, and unsigned
   integers as their keys.  Integers are used for compactness of
   encoding.  Since the word "key" is mainly used in its other meaning,
   as a cryptographic key, this specification must document relevant
   security considerations.

   Initial values:

            +=======+=========================+===============+ uses the term "label" for
   this usage as a map key.

   This specification uses the following mapping:

                +================================+=======+
                | Value Name                           | Ciphersuite Label | Specification
                +================================+=======+
                |
            +=======+=========================+===============+ supported-cipher-suites        | 1     | AES-CCM-16-64-128, HMAC
                +--------------------------------+-------+
                | RFC TBD challenge                      | 2     |
                +--------------------------------+-------+
                | version                        | 256/256, X25519, EdDSA 3     | Section 7
                +--------------------------------+-------+
                |
            +-------+-------------------------+---------------+ selected-cipher-suite          | 2 5     | AES-CCM-16-64-128, HMAC
                +--------------------------------+-------+
                | RFC TBD selected-version               | 6     |
                +--------------------------------+-------+
                | 256/256, P-256, ES256 evidence                       | Section 7     |
            +-------+-------------------------+---------------+

                                  Table 5

   [RFC Editor: please replace TBD above with the number assigned to
   this document]

10.3.  Freshness Mechanism Registry

   IANA is also requested to create a new registry for freshness
   mechanisms.

   Name of registry: TEEP Freshness Mechanisms

   Policy: Specification Required

   Additional requirements: The specification must document relevant
   security considerations.

   Initial values:

            +=======+=====================+===================+
                +--------------------------------+-------+
                | Value tc-list                        | Freshness mechanism 8     | Specification
                +--------------------------------+-------+
                |
            +=======+=====================+===================+ ext-list                       | 1 9     | Nonce
                +--------------------------------+-------+
                | RFC TBD Section 8 manifest-list                  |
            +-------+---------------------+-------------------+ 10    | 2
                +--------------------------------+-------+
                | Timestamp msg                            | RFC TBD Section 8 11    |
            +-------+---------------------+-------------------+
                +--------------------------------+-------+
                | 3 err-msg                        | Epoch ID 12    | RFC TBD Section 8
                +--------------------------------+-------+
                |
            +-------+---------------------+-------------------+ evidence-format                | 13    |
                +--------------------------------+-------+
                | requested-tc-list              | 14    |
                +--------------------------------+-------+
                | unneeded-tc-list               | 15    |
                +--------------------------------+-------+
                | component-id                   | 16    |
                +--------------------------------+-------+
                | tc-manifest-sequence-number    | 17    |
                +--------------------------------+-------+
                | have-binary                    | 18    |
                +--------------------------------+-------+
                | suit-reports                   | 19    |
                +--------------------------------+-------+
                | token                          | 20    |
                +--------------------------------+-------+
                | supported-freshness-mechanisms | 21    |
                +--------------------------------+-------+

                                 Table 6

   [RFC Editor: please replace TBD above with the number assigned to
   this document]

11.  References

11.1.  Normative References

   [I-D.ietf-rats-architecture]
              Birkholz, H., Thaler, D., Richardson, M., Smith, N., and
              W. Pan, "Remote Attestation Procedures Architecture", Work
              in Progress, Internet-Draft, draft-ietf-rats-architecture-
              12, 23 April 2021, <https://www.ietf.org/archive/id/draft-
              ietf-rats-architecture-12.txt>.

   [I-D.ietf-rats-eat]
              Lundblade, L., Mandyam, G., and J. O'Donoghue, "The Entity
              Attestation Token (EAT)", Work 2

7.  Behavior Specification

   Behavior is specified in Progress, Internet-
              Draft, draft-ietf-rats-eat-11, 24 October 2021,
              <https://www.ietf.org/archive/id/draft-ietf-rats-eat-
              11.txt>.

   [I-D.ietf-suit-manifest]
              Moran, B., Tschofenig, H., Birkholz, H., and K. Zandberg,
              "A Concise Binary Object Representation (CBOR)-based
              Serialization Format for the Software Updates for Internet terms of Things (SUIT) Manifest", Work the conceptual APIs defined in Progress, Internet-
              Draft, draft-ietf-suit-manifest-14, 12 July 2021,
              <https://www.ietf.org/archive/id/draft-ietf-suit-manifest-
              14.txt>.

   [I-D.moran-suit-report]
              Moran, B., "Secure Reporting
   section 6.2.1 of Update Status", Work [I-D.ietf-teep-architecture].

7.1.  TAM Behavior

   When the ProcessConnect API is invoked, the TAM sends a QueryRequest
   message.

   When the ProcessTeepMessage API is invoked, the TAM first does
   validation as specified in
              Progress, Internet-Draft, draft-moran-suit-report-01, 22
              February 2021, <https://www.ietf.org/archive/id/draft-
              moran-suit-report-01.txt>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs Section 4.1.2, and drops the message if it
   is not valid.  Otherwise, it proceeds as follows.

   If the message includes a token, it can be used to match the response
   to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3629]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
              2003, <https://www.rfc-editor.org/info/rfc3629>.

   [RFC5198]  Klensin, J. request previously sent by the TAM.  The TAM MUST expire the
   token value after receiving the first response from the device that
   has a valid signature and M. Padlipsky, "Unicode Format ignore any subsequent messages that have
   the same token value.  The token value MUST NOT be used for Network
              Interchange", RFC 5198, DOI 10.17487/RFC5198, March 2008,
              <https://www.rfc-editor.org/info/rfc5198>.

   [RFC5280]  Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
              Housley, R., and W. Polk, "Internet X.509 Public Key
              Infrastructure Certificate and Certificate Revocation List
              (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
              <https://www.rfc-editor.org/info/rfc5280>.

   [RFC7049]  Bormann, C. other
   purposes, such as a TAM to identify the devices and/or a device to
   identify TAMs or Trusted Components.

   If a QueryResponse message is received that contains evidence, the
   evidence is passed to an attestation Verifier (see
   [I-D.ietf-rats-architecture]) to determine whether the Agent is in a
   trustworthy state.  Based on the results of attestation, and P. Hoffman, "Concise Binary Object
              Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049,
              October 2013, <https://www.rfc-editor.org/info/rfc7049>.

   [RFC8152]  Schaad, J., "CBOR Object Signing the
   lists of installed, requested, and Encryption (COSE)",
              RFC 8152, DOI 10.17487/RFC8152, July 2017,
              <https://www.rfc-editor.org/info/rfc8152>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase unneeded Trusted Components
   reported in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

11.2.  Informative References

   [I-D.birkholz-rats-suit-claims]
              Birkholz, H. and B. Moran, "Trustworthiness Vectors for the Software Updates of Internet of Things (SUIT) Workflow
              Model", Work in Progress, Internet-Draft, draft-birkholz-
              rats-suit-claims-02, 12 July 2021,
              <https://www.ietf.org/archive/id/draft-birkholz-rats-suit-
              claims-02.txt>.

   [I-D.ietf-teep-architecture]
              Pei, M., Tschofenig, H., Thaler, D., and D. Wheeler,
              "Trusted Execution Environment Provisioning (TEEP)
              Architecture", Work QueryResponse, the TAM determines, in Progress, Internet-Draft, draft-
              ietf-teep-architecture-15, 12 July 2021,
              <https://www.ietf.org/archive/id/draft-ietf-teep-
              architecture-15.txt>.

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing any
   implementation specific manner, which Trusted Components need to be
   installed, updated, or deleted, if any.  If any Trusted Components
   need to be installed, updated, or deleted, the TAM sends an IANA Considerations Section in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

   [RFC8610]  Birkholz, H., Vigano, C., and C. Bormann, "Concise Data
              Definition Language (CDDL): A Notational Convention Update
   message containing SUIT Manifests with command sequences to
              Express Concise Binary Object Representation (CBOR) and
              JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610,
              June 2019, <https://www.rfc-editor.org/info/rfc8610>.

   [RFC8915]  Franke, D., Sibold, D., Teichel, K., Dansarie, M., and R.
              Sundblad, "Network Time Security for do the Network Time
              Protocol", RFC 8915, DOI 10.17487/RFC8915, September 2020,
              <https://www.rfc-editor.org/info/rfc8915>.

A.  Contributors

   We would like
   relevant installs, updates, or deletes.  It is important to thank Brian Witten (Symantec), Tyler Kim (Solacia),
   Nick Cook (Arm), note that
   the TEEP Agent's Update Procedure requires resolving and Minho Yoo (IoTrust) for their contributions to installing
   any dependencies indicated in the Open Trust Protocol (OTrP), manifest, which influenced may take some time,
   and the design of this
   specification.

B.  Acknowledgements

   We would like resulting Success or Error message is generated only after
   completing the Update Procedure.  Hence, depending on the freshness
   mechanism in use, the TAM may need to thank Eve Schooler store data (e.g., a nonce) for
   some time.

   If a Success or Error message is received containing one or more SUIT
   Reports, the suggestion of TAM also validates that the
   protocol name.

   We would like to thank Kohei Isobe (TRASIO/SECOM), Kuniyasu Suzaki
   (TRASIO/AIST), Tsukasa Oi (TRASIO), nonce in any SUIT Report
   matches the token sent in the Update message, and Yuichi Takita (SECOM) drops the message
   if it does not match.  Otherwise, the TAM handles the update in any
   implementation specific way, such as updating any locally cached
   information about the state of the TEEP Agent, or logging the
   results.

   If any other Error message is received, the TAM can handle it in any
   implementation specific way, but Section 4.6 provides recommendations
   for
   their valuable such handling.

7.2.  TEEP Agent Behavior

   When the RequestTA API is invoked, the TEEP Agent first checks
   whether the requested TA is already installed.  If it is already
   installed, the TEEP Agent passes no data back to the caller.
   Otherwise, if the TEEP Agent chooses to initiate the process of
   requesting the indicated TA, it determines (in any implementation feedback.

   We would also like
   specific way) the TAM URI based on any TAM URI provided by the
   RequestTA caller and any local configuration, and passes back the TAM
   URI to thank Carsten Bormann connect to.  It MAY also pass back a QueryResponse message if
   all of the following conditions are true:

   *  The last QueryRequest message received from that TAM contained no
      token or challenge,

   *  The ProcessError API was not invoked for that TAM since the last
      QueryResponse message was received from it, and

   *  The public key or certificate of the TAM is cached and not
      expired.

   When the RequestPolicyCheck API is invoked, the TEEP Agent decides
   whether to initiate communication with any trusted TAMs (e.g., it
   might choose to do so for a given TAM unless it detects that it has
   already communicated with that TAM recently).  If so, it passes back
   a TAM URI to connect to.  If the TEEP Agent has multiple TAMs it
   needs to connect with, it just passes back one, with the expectation
   that RequestPolicyCheck API will be invoked to retrieve each one
   successively until there are no more and it can pass back no data at
   that time.  Thus, once a TAM URI is returned, the TEEP Agent can
   remember that it has already initiated communication with that TAM.

   When the ProcessError API is invoked, the TEEP Agent can handle it in
   any implementation specific way, such as logging the error or using
   the information in future choices of TAM URI.

   When the ProcessTeepMessage API is invoked, the Agent first does
   validation as specified in Section 4.1.2, and drops the message if it
   is not valid.  Otherwise, processing continues as follows based on
   the type of message.

   When a QueryRequest message is received, the Agent responds with a
   QueryResponse message if all fields were understood, or an Error
   message if any error was encountered.

   When an Update message is received, the Agent attempts to update the
   Trusted Components specified in the SUIT manifests by following the
   Update Procedure specified in [I-D.ietf-suit-manifest], and responds
   with a Success message if all SUIT manifests were successfully
   installed, or an Error message if any error was encountered.  It is
   important to note that the Update Procedure requires resolving and
   installing any dependencies indicated in the manifest, which may take
   some time, and the Success or Error message is generated only after
   completing the Update Procedure.

8.  Ciphersuites

   The TEEP protocol uses COSE for protection of TEEP messages.  After a
   QueryResponse is received, the selected cryptographic algorithm is
   used in subsequent TEEP messages (Install, Success, and Error).  To
   negotiate cryptographic mechanisms and algorithms, the TEEP protocol
   defines the following ciphersuite structure.

   ciphersuite = [
       teep-cose-sign-algs / nil,
       teep-cose-encrypt-algs / nil ,
       teep-cose-mac-algs / nil
   ]

   The ciphersuite structure is used to present the combination of
   mechanisms and cryptographic algorithms.  Each suite value
   corresponds with a COSE-type defined in Section 2 of [RFC8152].

   supported-cipher-suites = [ + suite ]

   Cryptographic algorithm values are defined in the COSE Algorithms
   registry [COSE.Algorithm].  A TAM MUST support both of the following
   ciphersuites.  A TEEP Agent MUST support at least one of the two but
   can choose which one.  For example, a TEEP Agent might choose a given
   ciphersuite if it has hardware support for it.

   teep-cose-sign-algs /= cose-alg-es256,
   teep-cose-sign-algs /= cose-alg-eddsa

   A TAM or TEEP Agent MUST also support the following algorithms:

   teep-cose-encrypt-algs /= cose-alg-accm-16-64-128

   teep-cose-mac-algs /= cose-alg-hmac-256

   A TAM or TEEP Agent MAY also support one or more of the following
   algorithms:

   teep-cose-sign-algs /= cose-alg-ps256,
   teep-cose-sign-algs /= cose-alg-ps384,
   teep-cose-sign-algs /= cose-alg-ps512,
   teep-cose-sign-algs /= cose-alg-rsa-oaep-256,
   teep-cose-sign-algs /= cose-alg-rsa-oaep-512

   Any ciphersuites without confidentiality protection can only be added
   if the associated specification includes a discussion of security
   considerations and applicability, since manifests may carry sensitive
   information.  For example, Section 6 of [I-D.ietf-teep-architecture]
   permits implementations that terminate transport security inside the
   TEE and if the transport security provides confidentiality then
   additional encryption might not be needed in the manifest for some
   use cases.  For most use cases, however, manifest confidentiality
   will be needed to protect sensitive fields from the TAM as discussed
   in Section 9.8 of [I-D.ietf-teep-architecture].

9.  Freshness Mechanisms

   A freshness mechanism determines how a TAM can tell whether evidence
   provided in a Query Response is fresh.  There are multiple ways this
   can be done as discussed in Section 10 of
   [I-D.ietf-rats-architecture].

   Each freshness mechanism is identified with an integer value, which
   corresponds to an IANA registered freshness mechanism (see
   Section 11.2.  This document defines the following freshness
   mechanisms:

                      +=======+=====================+
                      | Value | Freshness mechanism |
                      +=======+=====================+
                      | 1     | Nonce               |
                      +-------+---------------------+
                      | 2     | Timestamp           |
                      +-------+---------------------+
                      | 3     | Epoch ID            |
                      +-------+---------------------+

                                  Table 3

   In the Nonce mechanism, the evidence MUST include a nonce provided in
   the QueryRequest challenge.  In other mechanisms, a timestamp or
   epoch ID determined via mechanisms outside the TEEP protocol is used,
   and the challenge is only needed in the QueryRequest message if a
   challenge is needed in generating evidence for reasons other than
   freshness.

   If a TAM supports multiple freshness mechanisms that require
   different challenge formats, the QueryRequest message can currently
   only send one such challenge.  This situation is expected to be rare,
   but should it occur, the TAM can choose to prioritize one of them and
   exclude the other from the supported-freshness-mechanisms in the
   QueryRequest, and resend the QueryRequest with the other mechanism if
   an ERR_UNSUPPORTED_FRESHNESS_MECHANISMS Error is received that
   indicates the TEEP Agent supports the other mechanism.

10.  Security Considerations

   This section summarizes the security considerations discussed in this
   specification:

   Cryptographic Algorithms
      TEEP protocol messages exchanged between the TAM and the TEEP
      Agent are protected using COSE.  This specification relies on the
      cryptographic algorithms provided by COSE.  Public key based
      authentication is used by the TEEP Agent to authenticate the TAM
      and vice versa.

   Attestation
      A TAM can rely on the attestation evidence provided by the TEEP
      Agent.  To sign the attestation evidence, it is necessary for the
      device to possess a public key (usually in the form of a
      certificate [RFC5280]) along with the corresponding private key.
      Depending on the properties of the attestation mechanism, it is
      possible to uniquely identify a device based on information in the
      attestation evidence or in the certificate used to sign the
      attestation evidence.  This uniqueness may raise privacy concerns.
      To lower the privacy implications the TEEP Agent MUST present its
      attestation evidence only to an authenticated and authorized TAM
      and when using EATS, it SHOULD use encryption as discussed in
      [I-D.ietf-rats-eat], since confidentiality is not provided by the
      TEEP protocol itself and the transport protocol under the TEEP
      protocol might be implemented outside of any TEE.  If any
      mechanism other than EATs is used, it is up to that mechanism to
      specify how privacy is provided.

   Trusted Component Binaries
      Each Trusted Component binary is signed by a Trusted Component
      Signer.  It is the responsibility of the TAM to relay only
      verified Trusted Components from authorized Trusted Component
      Signers.  Delivery of a Trusted Component to the TEEP Agent is
      then the responsibility of the TAM, using the security mechanisms
      provided by the TEEP protocol.  To protect the Trusted Component
      binary, the SUIT manifest format is used and it offers a variety
      of security features, including digitial signatures and symmetric
      encryption.

   Personalization Data
      A Trusted Component Signer or TAM can supply personalization data
      along with a Trusted Component.  This data is also protected by a
      SUIT manifest.  Personalization data signed and encrypted by a
      Trusted Component Signer other than the TAM is opaque to the TAM.

   TEEP Broker
      As discussed in section 6 of [I-D.ietf-teep-architecture], the
      TEEP protocol typically relies on a TEEP Broker to relay messages
      between the TAM and the TEEP Agent.  When the TEEP Broker is
      compromised it can drop messages, delay the delivery of messages,
      and replay messages but it cannot modify those messages.  (A
      replay would be, however, detected by the TEEP Agent.)  A
      compromised TEEP Broker could reorder messages in an attempt to
      install an old version of a Trusted Component.  Information in the
      manifest ensures that TEEP Agents are protected against such
      downgrade attacks based on features offered by the manifest
      itself.

   Trusted Component Signer Compromise
      A TAM is responsible for vetting a Trusted Component and before
      distributing them to TEEP Agents.

      It is RECOMMENDED to provide a way to update the trust anchor
      store used by the TEE, for example using a firmware update
      mechanism.  Thus, if a Trusted Component Signer is later
      compromised, the TAM can update the trust anchor store used by the
      TEE, for example using a firmware update mechanism.

   CA Compromise
      The CA issuing certificates to a TEE or a Trusted Component Signer
      might get compromised.  It is RECOMMENDED to provide a way to
      update the trust anchor store used by the TEE, for example using a
      firmware update mechanism.  If the CA issuing certificates to
      devices gets compromised then these devices might be rejected by a
      TAM, if revocation is available to the TAM.

   TAM Certificate Expiry
      The integrity and the accuracy of the clock within the TEE
      determines the ability to determine an expired TAM certificate, if
      certificates are used.

   Compromised Time Source
      As discussed above, certificate validity checks rely on comparing
      validity dates to the current time, which relies on having a
      trusted source of time, such as [RFC8915].  A compromised time
      source could thus be used to subvert such validity checks.

11.  IANA Considerations

11.1.  Media Type Registration

   IANA is requested to assign a media type for application/teep+cbor.

   Type name:  application

   Subtype name:  teep+cbor

   Required parameters:  none

   Optional parameters:  none

   Encoding considerations:  Same as encoding considerations of
      application/cbor.

   Security considerations:  See Security Considerations Section of this
      document.

   Interoperability considerations:  Same as interoperability
      considerations of application/cbor as specified in [RFC7049].

   Published specification:  This document.

   Applications that use this media type:  TEEP protocol implementations

   Fragment identifier considerations:  N/A

   Additional information:  Deprecated alias names for this type:  N/A

                            Magic number(s):  N/A

                            File extension(s):  N/A

                            Macintosh file type code(s):  N/A

   Person to contact for further information:  teep@ietf.org

   Intended usage:  COMMON

   Restrictions on usage:  none

   Author:  See the "Authors' Addresses" section of this document

   Change controller:  IETF

11.2.  Freshness Mechanism Registry

   IANA is also requested to create a new registry for freshness
   mechanisms.

   Name of registry: TEEP Freshness Mechanisms

   Policy: Specification Required [RFC8126]

   Additional requirements: The specification must document relevant
   security considerations.

   Initial values:

            +=======+=====================+===================+
            | Value | Freshness mechanism | Specification     |
            +=======+=====================+===================+
            | 1     | Nonce               | RFC TBD Section 9 |
            +-------+---------------------+-------------------+
            | 2     | Timestamp           | RFC TBD Section 9 |
            +-------+---------------------+-------------------+
            | 3     | Epoch ID            | RFC TBD Section 9 |
            +-------+---------------------+-------------------+

                                  Table 4

   (RFC Editor: please replace TBD above with the number assigned to
   this document.)

12.  References

12.1.  Normative References

   [COSE.Algorithm]
              IANA, "COSE Algorithms", n.d.,
              <https://www.iana.org/assignments/cose/
              cose.xhtml#algorithms>.

   [I-D.ietf-rats-architecture]
              Birkholz, H., Thaler, D., Richardson, M., Smith, N., and
              W. Pan, "Remote Attestation Procedures Architecture", Work
              in Progress, Internet-Draft, draft-ietf-rats-architecture-
              15, 8 February 2022, <https://www.ietf.org/archive/id/
              draft-ietf-rats-architecture-15.txt>.

   [I-D.ietf-rats-eat]
              Lundblade, L., Mandyam, G., and J. O'Donoghue, "The Entity
              Attestation Token (EAT)", Work in Progress, Internet-
              Draft, draft-ietf-rats-eat-12, 24 February 2022,
              <https://www.ietf.org/archive/id/draft-ietf-rats-eat-
              12.txt>.

   [I-D.ietf-suit-manifest]
              Moran, B., Tschofenig, H., Birkholz, H., and K. Zandberg,
              "A Concise Binary Object Representation (CBOR)-based
              Serialization Format for the Software Updates for Internet
              of Things (SUIT) Manifest", Work in Progress, Internet-
              Draft, draft-ietf-suit-manifest-16, 25 October 2021,
              <https://www.ietf.org/archive/id/draft-ietf-suit-manifest-
              16.txt>.

   [I-D.moran-suit-report]
              Moran, B., "Secure Reporting of Update Status", Work in
              Progress, Internet-Draft, draft-moran-suit-report-01, 22
              February 2021, <https://www.ietf.org/archive/id/draft-
              moran-suit-report-01.txt>.

   [I-D.moran-suit-trust-domains]
              Moran, B., "SUIT Manifest Extensions for Multiple Trust
              Domains", Work in Progress, Internet-Draft, draft-moran-
              suit-trust-domains-00, 25 October 2021,
              <https://www.ietf.org/archive/id/draft-moran-suit-trust-
              domains-00.txt>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3629]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
              2003, <https://www.rfc-editor.org/info/rfc3629>.

   [RFC5198]  Klensin, J. and M. Padlipsky, "Unicode Format for Network
              Interchange", RFC 5198, DOI 10.17487/RFC5198, March 2008,
              <https://www.rfc-editor.org/info/rfc5198>.

   [RFC5280]  Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
              Housley, R., and W. Polk, "Internet X.509 Public Key
              Infrastructure Certificate and Certificate Revocation List
              (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
              <https://www.rfc-editor.org/info/rfc5280>.

   [RFC7049]  Bormann, C. and P. Hoffman, "Concise Binary Object
              Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049,
              October 2013, <https://www.rfc-editor.org/info/rfc7049>.

   [RFC8152]  Schaad, J., "CBOR Object Signing and Encryption (COSE)",
              RFC 8152, DOI 10.17487/RFC8152, July 2017,
              <https://www.rfc-editor.org/info/rfc8152>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

12.2.  Informative References

   [I-D.birkholz-rats-suit-claims]
              Birkholz, H. and B. Moran, "Trustworthiness Vectors for
              the Software Updates of Internet of Things (SUIT) Workflow
              Model", Work in Progress, Internet-Draft, draft-birkholz-
              rats-suit-claims-03, 12 January 2022,
              <https://www.ietf.org/archive/id/draft-birkholz-rats-suit-
              claims-03.txt>.

   [I-D.ietf-teep-architecture]
              Pei, M., Tschofenig, H., Thaler, D., and D. Wheeler,
              "Trusted Execution Environment Provisioning (TEEP)
              Architecture", Work in Progress, Internet-Draft, draft-
              ietf-teep-architecture-16, 28 February 2022,
              <https://www.ietf.org/archive/id/draft-ietf-teep-
              architecture-16.txt>.

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing an IANA Considerations Section in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

   [RFC8610]  Birkholz, H., Vigano, C., and C. Bormann, "Concise Data
              Definition Language (CDDL): A Notational Convention to
              Express Concise Binary Object Representation (CBOR) and
              JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610,
              June 2019, <https://www.rfc-editor.org/info/rfc8610>.

   [RFC8915]  Franke, D., Sibold, D., Teichel, K., Dansarie, M., and R.
              Sundblad, "Network Time Security for the Network Time
              Protocol", RFC 8915, DOI 10.17487/RFC8915, September 2020,
              <https://www.rfc-editor.org/info/rfc8915>.

A.  Contributors

   We would like to thank Brian Witten (Symantec), Tyler Kim (Solacia),
   Nick Cook (Arm), and Minho Yoo (IoTrust) for their contributions to
   the Open Trust Protocol (OTrP), which influenced the design of this
   specification.

B.  Acknowledgements

   We would like to thank Eve Schooler for the suggestion of the
   protocol name.

   We would like to thank Kohei Isobe (TRASIO/SECOM), Ken Takayama
   (SECOM) Kuniyasu Suzaki (TRASIO/AIST), Tsukasa Oi (TRASIO), and
   Yuichi Takita (SECOM) for their valuable implementation feedback.

   We would also like to thank Carsten Bormann and Henk Birkholz for
   their help with the CDDL.

C.  Complete CDDL

   Valid TEEP messages MUST adhere to the following CDDL data
   definitions, except that SUIT_Envelope and SUIT_Component_Identifier
   are specified in [I-D.ietf-suit-manifest].

   teep-message = $teep-message-type .within teep-message-framework

   SUIT_Envelope = any

   teep-message-framework = [
     type: uint (0..23) / $teep-type-extension,
     options: { * teep-option },
     * uint; further integers, e.g., for data-item-requested
   ]

   teep-option = (uint => any)

   ; messages defined below:
   $teep-message-type /= query-request
   $teep-message-type /= query-response
   $teep-message-type /= update
   $teep-message-type /= teep-success
   $teep-message-type /= teep-error
   ; message type numbers, uint (0..23)
   TEEP-TYPE-query-request = 1
   TEEP-TYPE-query-response = 2
   TEEP-TYPE-update = 3
   TEEP-TYPE-teep-success = 5
   TEEP-TYPE-teep-error = 6

   version = .within uint .size 4
   ext-info = .within uint .size 4

   ; data items as bitmaps
   data-item-requested = $data-item-requested .within uint .size 8
   attestation = 1
   $data-item-requested /= attestation
   trusted-components = 2
   $data-item-requested /= trusted-components
   extensions = 4
   $data-item-requested /= extensions

   query-request = [
     type: TEEP-TYPE-query-request,
     options: {
       ? token => bstr .size (8..64),
       ? supported-cipher-suites => [ + suite ],
       ? supported-freshness-mechanisms => [ + freshness-mechanism ],
       ? challenge => bstr .size (8..512),
       ? versions => [ + version ],
       * $$query-request-extensions
       * $$teep-option-extensions
     },
     data-item-requested: data-item-requested
   ]

   ; ciphersuites
   suite = [
       teep-cose-sign-algs / nil,
       teep-cose-encrypt-algs / nil,
       teep-cose-mac-algs / nil
   ]

   teep-cose-sign-algs /= cose-alg-es256,
   teep-cose-sign-algs /= cose-alg-eddsa
   teep-cose-sign-algs /= cose-alg-ps256,
   teep-cose-sign-algs /= cose-alg-ps384,
   teep-cose-sign-algs /= cose-alg-ps512,
   teep-cose-sign-algs /= cose-alg-rsa-oaep-256,
   teep-cose-sign-algs /= cose-alg-rsa-oaep-512
   teep-cose-encrypt-algs /= cose-alg-accm-16-64-128

   teep-cose-mac-algs /= cose-alg-hmac-256

   ; algorithm identifiers defined in the IANA COSE Algorithms Registry
   cose-alg-es256 = -7
   cose-alg-eddsa = -8
   cose-alg-ps256 = -37
   cose-alg-ps384 = -38
   cose-alg-ps512 = -39
   cose-alg-rsa-oaep-256 = -41
   cose-alg-rsa-oaep-512 = -42
   cose-alg-accm-16-64-128 = 10
   cose-alg-hmac-256 = 5

   ; freshness-mechanisms

   freshness-mechanism = $TEEP-freshness-mechanism .within uint .size 4

   FRESHNESS_NONCE = 0
   FRESHNESS_TIMESTAMP = 1
   FRESHNESS_EPOCH_ID = 2

   $TEEP-freshness-mechanism /= FRESHNESS_NONCE
   $TEEP-freshness-mechanism /= FRESHNESS_TIMESTAMP
   $TEEP-freshness-mechanism /= FRESHNESS_EPOCH_ID

   query-response = [
     type: TEEP-TYPE-query-response,
     options: {
       ? token => bstr .size (8..64),
       ? selected-cipher-suite => suite,
       ? selected-version => version,
       ? evidence-format => text,
       ? evidence => bstr,
       ? tc-list => [ + tc-info ],
       ? requested-tc-list => [ + requested-tc-info ],
       ? unneeded-tc-list => [ + SUIT_Component_Identifier ],
       ? ext-list => [ + ext-info ],
       * $$query-response-extensions,
       * $$teep-option-extensions
     }
   ]

   tc-info = {
     component-id => SUIT_Component_Identifier,
     ? tc-manifest-sequence-number => .within uint .size 8
   }
   requested-tc-info = {
     component-id => SUIT_Component_Identifier,
     ? tc-manifest-sequence-number => .within uint .size 8
     ? have-binary => bool
   }

   update = [
     type: TEEP-TYPE-update,
     options: {
       ? token => bstr .size (8..64),
       ? manifest-list => [ + bstr .cbor SUIT_Envelope ],
       * $$update-extensions,
       * $$teep-option-extensions
     }
   ]

   teep-success = [
     type: TEEP-TYPE-teep-success,
     options: {
       ? token => bstr .size (8..64),
       ? msg => text .size (1..128),
       ? suit-reports => [ + suit-report ],
       * $$teep-success-extensions,
       * $$teep-option-extensions
     }
   ]

   teep-error = [
     type: TEEP-TYPE-teep-error,
     options: {
        ? token => bstr .size (8..64),
        ? err-msg => text .size (1..128),
        ? supported-cipher-suites => [ + suite ],
        ? supported-freshness-mechanisms => [ + freshness-mechanism ],
        ? versions => [ + version ],
        ? suit-reports => [ + suit-report ],
        * $$teep-error-extensions,
        * $$teep-option-extensions
     },
     err-code: uint (0..23)
   ]

   ; The err-code parameter, uint (0..23)
   ERR_PERMANENT_ERROR = 1
   ERR_UNSUPPORTED_EXTENSION = 2
   ERR_UNSUPPORTED_FRESHNESS_MECHANISMS = 3
   ERR_UNSUPPORTED_MSG_VERSION = 4
   ERR_UNSUPPORTED_CIPHER_SUITES = 5
   ERR_BAD_CERTIFICATE = 6
   ERR_CERTIFICATE_EXPIRED = 9
   ERR_TEMPORARY_ERROR = 10
   ERR_MANIFEST_PROCESSING_FAILED = 17

   ; labels of mapkey for teep message parameters, uint (0..23)
   supported-cipher-suites = 1
   challenge = 2
   versions = 3
   selected-cipher-suite = 5
   selected-version = 6
   evidence = 7
   tc-list = 8
   ext-list = 9
   manifest-list = 10
   msg = 11
   err-msg = 12
   evidence-format = 13
   requested-tc-list = 14
   unneeded-tc-list = 15
   component-id = 16
   tc-manifest-sequence-number = 17
   have-binary = 18
   suit-reports = 19
   token = 20
   supported-freshness-mechanisms = 21

D.  Examples of Diagnostic Notation and Henk Birkholz for
   their help Binary Representation

   This section includes some examples with the CDDL.

C.  Complete CDDL

   Valid TEEP messages MUST adhere to following assumptions:

   *  The device will have two TCs with the following CDDL data
   definitions, except that "SUIT_Envelope" and
   "SUIT_Component_Identifier" are specified in
   [I-D.ietf-suit-manifest].

   teep-message SUIT Component
      Identifiers:

      -  [ 0x000102030405060708090a0b0c0d0e0f ]

      -  [ 0x100102030405060708090a0b0c0d0e0f ]

   *  SUIT manifest-list is set empty only for example purposes (see
      Appendix E for actual manifest examples)

D.1.  QueryRequest Message

D.1.1.  CBOR Diagnostic Notation
 / query-request = $teep-message-type /
 [
   1,  / type : TEEP-TYPE-query-request = 1 (uint (0..23)) /
   / options : /
   {
     20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,
             / token = 20 (mapkey) :
               h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..64)),
               generated by TAM /
     1 : [ 1 ], / supported-cipher-suites = 1 (mapkey) :
                  TEEP-AES-CCM-16-64-128-HMAC256--256-X25519-EdDSA =
                  [ 1 ] (array of .within uint .size 4) /
     3 : [ 0 ] / version = 3 (mapkey) :
                  [ 0 ] (array of .within uint .size 4) /
   },
   3   / data-item-requested :
         attestation | trusted-components = 3 (.within uint .size 8) /
 ]

D.1.2.  CBOR Binary Representation

   83                       # array(3)
     01                     # unsigned(1) uint (0..23)
     A4                     # map(4)
       14                   # unsigned(20) uint (0..23)
       4F                   # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF
       01                   # unsigned(1) uint (0..23)
       81                   # array(1)
         01                 # unsigned(1) within uint .size 4
       03                   # unsigned(3) uint (0..23)
       81                   # array(1)
         00                 # unsigned(0) within uint .size 4
       04                   # unsigned(4) uint (0..23)
       43                   # bytes(3)
         010203             # "\x01\x02\x03"
     03                     # unsigned(3) .within teep-message-framework

   SUIT_Envelope uint .size 8

D.2.  Entity Attestation Token

   This is shown below in CBOR diagnostic form.  Only the payload signed
   by COSE is shown.

D.2.1.  CBOR Diagnostic Notation
/ eat-claim-set = any

   teep-message-framework /
{
    / issuer /                   1: "joe",
    / timestamp (iat) /          6: 1(1526542894)
    / nonce /                   10: h'948f8860d13a463e8e',
    / secure-boot /             15: true,
    / debug-status /            16: 3, / disabled-permanently /
    / security-level /          14: 3, / secure-restricted /
    / device-identifier /    <TBD>: h'e99600dd921649798b013e9752dcf0c5',
    / vendor-identifier /    <TBD>: h'2b03879b33434a7ca682b8af84c19fd4',
    / class-identifier /     <TBD>: h'9714a5796bd245a3a4ab4f977cb8487f',
    / chip-version /            26: [ "MyTEE", 1 ],
    / component-identifier / <TBD>: h'60822887d35e43d5b603d18bcaa3f08d',
    / version /              <TBD>: "v0.1"
}

D.3.  QueryResponse Message

D.3.1.  CBOR Diagnostic Notation
 / query-response = /
 [
     type: uint (0..23)
   2,  / $teep-type-extension,
     options: { * teep-option },
     * uint; further integers, e.g., for data-item-requested
   ]

   teep-option type : TEEP-TYPE-query-response = 2 (uint => any)

   ; messages defined below:
   $teep-message-type /= query-request
   $teep-message-type /= query-response
   $teep-message-type /= update
   $teep-message-type /= teep-success
   $teep-message-type /= teep-error

   ; (0..23)) /
   / options : /
   {
     20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,
             / token = 20 (mapkey) :
               h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..64)),
               given from TAM's QueryRequest message type numbers, uint (0..23)
   TEEP-TYPE-query-request /
     5 : 1,  / selected-cipher-suite = 5 (mapkey) :
               TEEP-AES-CCM-16-64-128-HMAC256--256-X25519-EdDSA =
               1
   TEEP-TYPE-query-response (.within uint .size 4) /
     6 : 0,  / selected-version = 2
   TEEP-TYPE-update 6 (mapkey) :
               0 (.within uint .size 4) /
     7 : ... / evidence = 7 (mapkey) :
               Entity Attestation Token /
     8 : [   / tc-list = 8 (mapkey) : (array of tc-info) /
       {
         16 : [ 0x000102030405060708090a0b0c0d0e0f ] / component-id = 3
   TEEP-TYPE-teep-success
                16 (mapkey) : [ h'000102030405060708090a0b0c0d0e0f' ]
                (SUIT_Component_Identifier = 5
   TEEP-TYPE-teep-error  [* bstr]) /
       },
       {
         16 : [ 0x100102030405060708090a0b0c0d0e0f ] / component-id = 6

   version
                16 (mapkey) : [ h'100102030405060708090a0b0c0d0e0f' ]
                (SUIT_Component_Identifier =  [* bstr]) /
       }
         ]
     }
 ]

D.3.2.  CBOR Binary Representation
   82                       # array(2)
     02                     # unsigned(2) uint (0..23)
     A5                     # map(5)
       14                   # unsigned(20) uint (0..23)
       4F                   # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF
       05                   # unsigned(5) uint (0..23)
       01                   # unsigned(1) .within uint .size 4
   ext-info =
       06                   # unsigned(6) uint (0..23)
       00                   # unsigned(0) .within uint .size 4
   ; data items as bitmaps
   data-item-requested = $data-item-requested .within
       07                   # unsigned(7) uint .size 8
   attestation (0..23)
         ...                # Entity Attestation Token
       08                   # unsigned(8) uint (0..23)
       82                   # array(2)
         81                 # array(1)
           4F               # bytes(16)
             000102030405060708090A0B0C0D0E0F
         81                 # array(1)
           4F               # bytes(16)
             100102030405060708090A0B0C0D0E0F

D.4.  Update Message

D.4.1.  CBOR Diagnostic Notation

/ update = 1
   $data-item-requested /= attestation
   trusted-components /
[
  3,  / type : TEEP-TYPE-update = 2
   $data-item-requested /= trusted-components
   extensions 3 (uint (0..23)) /
  / options : /
  {
    20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,
             / token = 4
   $data-item-requested /= extensions

   query-request 20 (mapkey) :
               h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..64)),
               generated by TAM /
    10 : [ ] / manifest-list = 10 (mapkey) :
               [ ] (array of bstr wrapped SUIT_Envelope(any)) /
             / empty, example purpose only /
  }
]

D.4.2.  CBOR Binary Representation
   82                       # array(2)
     03                     # unsigned(3) uint (0..23)
     A3                     # map(3)
       14                   # unsigned(20) uint (0..23)
       4F                   # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF
       0A                   # unsigned(10) uint (0..23)
       80                   # array(0)

D.5.  Success Message

D.5.1.  CBOR Diagnostic Notation

/ teep-success = /
[
     type: TEEP-TYPE-query-request,
     options:
  5,  / type : TEEP-TYPE-teep-success = 5 (uint (0..23)) /
  / options : /
  {
       ?
    20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,
             / token => bstr .size (8..64),
       ? supported-cipher-suites => [ + suite ],
       ? supported-freshness-mechanisms => [ + freshness-mechanism ],
       ? challenge => bstr = 20 (mapkey) :
               h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..512),
       ? versions => [ + version ],
       * $$query-request-extensions
       * $$teep-option-extensions
     },
     data-item-requested: data-item-requested (8..64)),
               given from TAM's Update message /
  }
]

   ; ciphersuites
   suite = $TEEP-suite .within

D.5.2.  CBOR Binary Representation

   82                       # array(2)
     05                     # unsigned(5) uint .size 4

   TEEP-AES-CCM-16-64-128-HMAC256--256-X25519-EdDSA = 1
   TEEP-AES-CCM-16-64-128-HMAC256--256-P-256-ES256  = 2

   $TEEP-suite /= TEEP-AES-CCM-16-64-128-HMAC256--256-X25519-EdDSA
   $TEEP-suite /= TEEP-AES-CCM-16-64-128-HMAC256--256-P-256-ES256

   ; freshness-mechanisms

   freshness-mechanism = $TEEP-freshness-mechanism .within (0..23)
     A1                     # map(1)
       14                   # unsigned(20) uint .size 4

   FRESHNESS_NONCE = 0
   FRESHNESS_TIMESTAMP = 1
   FRESHNESS_EPOCH_ID = 2

   $TEEP-freshness-mechanism /= FRESHNESS_NONCE
   $TEEP-freshness-mechanism /= FRESHNESS_TIMESTAMP
   $TEEP-freshness-mechanism /= FRESHNESS_EPOCH_ID

   query-response (0..23)
       4F                   # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF

D.6.  Error Message

D.6.1.  CBOR Diagnostic Notation
 / teep-error = /
 [
     type: TEEP-TYPE-query-response,
     options:
   6,  / type : TEEP-TYPE-teep-error = 6 (uint (0..23)) /
   / options : /
   {
       ?
     20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,
            / token => bstr .size (8..64),
       ? selected-cipher-suite => suite,
       ? selected-version => version,
       ? evidence-format => text,
       ? evidence => bstr,
       ? tc-list => [ + tc-info ],
       ? requested-tc-list => [ + requested-tc-info ],
       ? unneeded-tc-list => [ + SUIT_Component_Identifier ],
       ? ext-list => [ + ext-info ],
       * $$query-response-extensions,
       * $$teep-option-extensions
     }
   ]

   tc-info = {
     component-id => SUIT_Component_Identifier,
     ? tc-manifest-sequence-number => .within uint 20 (mapkey) :
              h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size 8
   }

   requested-tc-info (8..64)),
              given from TAM's Update message /
     12 : "disk-full"  / err-msg = {
     component-id => SUIT_Component_Identifier,
     ? tc-manifest-sequence-number => .within uint 12 (mapkey) :
                         "disk-full" (text .size 8
     ? have-binary => bool
   }

   update (1..128)) /
   },
   17, / err-code : ERR_MANIFEST_PROCESSING_FAILED = [
     type: TEEP-TYPE-update,
     options: 17 (uint (0..23)) /
 ]

D.6.2.  CBOR binary Representation

   83                       # array(3)
     06                     # unsigned(6) uint (0..23)
     A2                     # map(2)
       14                   # unsigned(20) uint (0..23)
       4F                   # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF
       0C                   # unsigned(12) uint (0..23)
       69                   # text(9) (1..128)
         6469736B2D66756C6C # "disk-full"
     11                     # unsigned(17) uint (0..23)

E.  Examples of SUIT Manifests

   This section shows some examples of SUIT manifests described in
   Section 4.4.

   The examples are signed using the following ECDSA secp256r1 key with
   SHA256 as the digest function.

   COSE_Sign1 Cryptographic Key:

   -----BEGIN PRIVATE KEY-----
   MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgApZYjZCUGLM50VBC
   CjYStX+09jGmnyJPrpDLTz/hiXOhRANCAASEloEarguqq9JhVxie7NomvqqL8Rtv
   P+bitWWchdvArTsfKktsCYExwKNtrNHXi9OB3N+wnAUtszmR23M4tKiW
   -----END PRIVATE KEY-----

   The corresponding public key can be used to verify these examples:

   -----BEGIN PUBLIC KEY-----
   MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEhJaBGq4LqqvSYVcYnuzaJr6qi/Eb
   bz/m4rVlnIXbwK07HypLbAmBMcCjbazR14vTgdzfsJwFLbM5kdtzOLSolg==
   -----END PUBLIC KEY-----

Example 1: SUIT Manifest pointing to URI of the Trusted Component Binary

CBOR Diagnostic Notation of SUIT Manifest

/ SUIT_Envelope_Tagged / 107( {
       ? token => bstr .size (8..64),
       ? manifest-list =>
  / suit-authentication-wrapper / 2: << [ + bstr .cbor SUIT_Envelope ],
       * $$update-extensions,
       * $$teep-option-extensions
     }
    << [
      / suit-digest-algorithm-id: / -16 / suit-cose-alg-sha256 /,
      / suit-digest-bytes: / h'DB601ADE73092B58532CA03FBB663DE49532435336F1558B49BB622726A2FEDD'
    ]

   teep-success = >>,
    << / COSE_Sign1_Tagged / 18( [
     type: TEEP-TYPE-teep-success,
     options:
      / protected: / << {
       ? token => bstr .size (8..64),
       ? msg => text .size (1..128),
       ? suit-reports => [ + suit-report ],
       * $$teep-success-extensions,
       * $$teep-option-extensions
        / algorithm-id / 1: -7 / ES256 /
      } >>,
      / unprotected: / {},
      / payload: / null,
      / signature: / h'5B2D535A2B6D5E3C585C1074F414DA9E10BD285C99A33916DADE3ED38812504817AC48B62B8E984EC622785BD1C411888BE531B1B594507816B201F6F28579A4'
    ]

   teep-error = [
     type: TEEP-TYPE-teep-error,
     options: ) >>
  ] >>,
  / suit-manifest / 3: << {
        ? token => bstr .size (8..64),
        ? err-msg => text .size (1..128),
        ? supported-cipher-suites =>
    / suit-manifest-version / 1: 1,
    / suit-manifest-sequence-number / 2: 3,
    / suit-common / 3: << {
      / suit-components / 2: [ + suite ],
        ? supported-freshness-mechanisms =>
        [ + freshness-mechanism
          h'544545502D446576696365',           / "TEEP-Device" /
          h'5365637572654653',                 / "SecureFS" /
          h'8D82573A926D4754935332DC29997F74', / tc-uuid /
          h'7461'                              / "ta" /
        ]
      ],
        ? versions =>
      / suit-common-sequence / 4: << [ + version ],
        ? suit-reports =>
        / suit-directive-override-parameters / 20, {
          / suit-parameter-vendor-identifier / 1: h'C0DDD5F15243566087DB4F5B0AA26C2F',
          / suit-parameter-class-identifier / 2: h'DB42F7093D8C55BAA8C5265FC5820F4E',
          / suit-parameter-image-digest / 3: << [ + suit-report ],
        * $$teep-error-extensions,
        * $$teep-option-extensions
            / suit-digest-algorithm-id: / -16 / suit-cose-alg-sha256 /,
            / suit-digest-bytes: / h'8CF71AC86AF31BE184EC7A05A411A8C3A14FD9B77A30D046397481469468ECE8'
          ] >>,
          / suit-parameter-image-size / 14: 20
        },
     err-code: uint (0..23)
        / suit-condition-vendor-identifier / 1, 15,
        / suit-condition-class-identifier / 2, 15

      ]

   ; The err-code parameter, uint (0..23)
   ERR_PERMANENT_ERROR = 1
   ERR_UNSUPPORTED_EXTENSION = 2
   ERR_UNSUPPORTED_FRESHNESS_MECHANISMS = 3
   ERR_UNSUPPORTED_MSG_VERSION = 4
   ERR_UNSUPPORTED_CIPHER_SUITES = 5
   ERR_BAD_CERTIFICATE = 6
   ERR_CERTIFICATE_EXPIRED = 9
   ERR_TEMPORARY_ERROR = 10
   ERR_MANIFEST_PROCESSING_FAILED = 17

   ; labels of mapkey for teep message parameters, uint (0..23)
   supported-cipher-suites = 1
   challenge = 2
   versions = 3
   selected-cipher-suite = 5
   selected-version = 6
   evidence = 7
   tc-list = 8
   ext-list = 9
   manifest-list = 10
   msg = 11
   err-msg = 12
   evidence-format >>
    } >>,
    / suit-install / 9: << [
      / suit-directive-override-parameters / 20, {
        / suit-parameter-uri / 21: "https://example.org/8d82573a-926d-4754-9353-32dc29997f74.ta"
      },
      / suit-directive-fetch / 21, 15,
      / suit-condition-image-match / 3, 15
    ] >>
  } >>
} )

CBOR Binary Representation

D8 6B                                               # tag(107) / SUIT_Envelope_Tagged /
   A2                                               # map(2)
      02                                            # unsigned(2) / suit-authentication-wrapper /
      58 73                                         # bytes(115)
         82                                         # array(2)
            58 24                                   # bytes(36)
               82                                   # array(2)
                  2F                                # negative(15) / -16 = 13
   requested-tc-list suit-cose-alg-sha256 /
                  58 20                             # bytes(32)
                     DB601ADE73092B58532CA03FBB663DE49532435336F1558B49BB622726A2FEDD
            58 4A                                   # bytes(74)
               D2                                   # tag(18) / COSE_Sign1_Tagged /
                  84                                # array(4)
                     43                             # bytes(3)
                        A1                          # map(1)
                           01                       # unsigned(1) / algorithm-id /
                           26                       # negative(6) / -7 = ES256 /
                     A0                             # map(0)
                     F6                             # primitive(22) / null /
                     58 40                          # bytes(64)
                        5B2D535A2B6D5E3C585C1074F414DA9E10BD285C99A33916DADE3ED38812504817AC48B62B8E984EC622785BD1C411888BE531B1B594507816B201F6F28579A4
      03                                            # unsigned(3) / suit-manifest: /
      58 D4                                         # bytes(212)
         A4                                         # map(4)
            01                                      # unsigned(1) / suit-manifest-version: /
            01                                      # unsigned(1)
            02                                      # unsigned(2) / suit-manifest-sequence-number: /
            03                                      # unsigned(3)
            03                                      # unsigned(3) / suit-common: /
            58 84                                   # bytes(132)
               A2                                   # map(2)
                  02                                # unsigned(2) / suit-components: /
                  81                                # array(1)
                     84                             # array(4)
                        4B                          # bytes(11)
                           544545502D446576696365   # "TEEP-Device"
                        48                          # bytes(8)
                           5365637572654653         # "SecureFS"
                        50                          # bytes(16)
                           8D82573A926D4754935332DC29997F74 # tc-uuid
                        42                          # bytes(2)
                           7461                     # "ta"
                  04                                # unsigned(4) / suit-common-sequence: /
                  58 54                             # bytes(84)
                     86                             # array(6)
                        14
   unneeded-tc-list = 15
   component-id = 16
   tc-manifest-sequence-number = 17
   have-binary = 18
   suit-reports = 19
   token                          # unsigned(20) / suit-directive-override-parameters: /
                        A4                          # map(4)
                           01                       # unsigned(1) / suit-parameter-vendor-identifier: /
                           50                       # bytes(16)
                              C0DDD5F15243566087DB4F5B0AA26C2F
                           02                       # unsigned(2) / suit-parameter-class-identifier: /
                           50                       # bytes(16)
                              DB42F7093D8C55BAA8C5265FC5820F4E
                           03                       # unsigned(3) / suit-parameter-image-digest: /
                           58 24                    # bytes(36)
                              82                    # array(2)
                                 2F                 # negative(15) / -16 = suit-cose-alg-sha256 /
                                 58 20
   supported-freshness-mechanisms = 21

D.  Examples of Diagnostic Notation and              # bytes(32)
                                    8CF71AC86AF31BE184EC7A05A411A8C3A14FD9B77A30D046397481469468ECE8
                           0E                       # unsigned(14) / suit-parameter-image-size: /
                           14                       # unsigned(20)
                        01                          # unsigned(1) / suit-condition-vendor-identifier: /
                        0F                          # unsigned(15)
                        02                          # unsigned(2) / suit-condition-class-identifier: /
                        0F                          # unsigned(15)
            09                                      # unsigned(9) / suit-install: /
            58 45                                   # bytes(69)
               86                                   # array(6)
                  14                                # unsigned(20) / suit-directive-override-parameters: /
                  A1                                # map(1)
                     15                             # unsigned(21) / suit-parameter-uri: /
                     78 3B                          # text(59)
                        68747470733A2F2F6578616D706C652E6F72672F38643832353733612D393236642D343735342D393335332D3332646332393939376637342E7461 # "https://example.org/8d82573a-926d-4754-9353-32dc29997f74.ta"
                  15                                # unsigned(21) / suit-directive-fetch: /
                  0F                                # unsigned(15)
                  03                                # unsigned(3) / suit-condition-image-match: /
                  0F                                # unsigned(15)

CBOR Binary Representation

   This section includes some examples with the following assumptions:

   *  TEEP Device will have two TCs with the following in Hex
   D86BA2025873825824822F5820DB601ADE73092B58532CA03FBB663DE495
   32435336F1558B49BB622726A2FEDD584AD28443A10126A0F658405B2D53
   5A2B6D5E3C585C1074F414DA9E10BD285C99A33916DADE3ED38812504817
   AC48B62B8E984EC622785BD1C411888BE531B1B594507816B201F6F28579
   A40358D4A401010203035884A20281844B544545502D4465766963654853
   65637572654653508D82573A926D4754935332DC29997F74427461045854
   8614A40150C0DDD5F15243566087DB4F5B0AA26C2F0250DB42F7093D8C55
   BAA8C5265FC5820F4E035824822F58208CF71AC86AF31BE184EC7A05A411
   A8C3A14FD9B77A30D046397481469468ECE80E14010F020F0958458614A1
   15783B68747470733A2F2F6578616D706C652E6F72672F38643832353733
   612D393236642D343735342D393335332D3332646332393939376637342E
   7461150F030F

Example 2: SUIT Manifest including the Trusted Component
      Identifiers:

      - Binary

CBOR Diagnostic Notation of SUIT Manifest

/ SUIT_Envelope_Tagged / 107( {
  / suit-authentication-wrapper / 2: << [ 0x000102030405060708090a0b0c0d0e0f
    << [
      / suit-digest-algorithm-id: / -16 / suit-cose-alg-sha256 /,
      / suit-digest-bytes: / h'14A98BE957DE38FAE37376EA491FD6CAD9BFBD3C90051C8F5B017D7A496C3B05'
    ]

      - >>,
    << / COSE_Sign1_Tagged / 18( [
      / protected: / << {
        / algorithm-id / 1: -7 / ES256 /
      } >>,
      / unprotected: / {},
      / payload: / null,
      / signature: / h'4093B323953785981EB607C8BA61B21E5C4F85726A2AF48C1CB05BD4401B1B1565070728FDA38E6496D631E1D23F966CFF7805EDE721D48507D9192993DA8722'
    ] ) >>
  ] >>,
  / suit-integrated-payload / "#tc": h'48656C6C6F2C2053656375726520576F726C6421', / "Hello, Secure World!" /
  / suit-manifest / 3: << {
    / suit-manifest-version / 1: 1,
    / suit-manifest-sequence-number / 2: 3,
    / suit-common / 3: << {
      / suit-components / 2: [
        [
          h'544545502D446576696365',           / "TEEP-Device" /
          h'5365637572654653',                 / "SecureFS" /
          h'8D82573A926D4754935332DC29997F74', / tc-uuid /
          h'7461'                              / "ta" /
        ]
      ],
      / suit-common-sequence / 4: << [
        / suit-directive-override-parameters / 20, {
          / suit-parameter-vendor-identifier / 1: h'C0DDD5F15243566087DB4F5B0AA26C2F',
          / suit-parameter-class-identifier / 2: h'DB42F7093D8C55BAA8C5265FC5820F4E',
          / suit-parameter-image-digest / 3: << [ 0x100102030405060708090a0b0c0d0e0f
            / suit-digest-algorithm-id: / -16 / suit-cose-alg-sha256 /,
            / suit-digest-bytes: / h'8CF71AC86AF31BE184EC7A05A411A8C3A14FD9B77A30D046397481469468ECE8'
          ]

   *  SUIT manifest-list is set empty only for example purposes (see
      Appendix E for actual manifest examples)

D.1.  QueryRequest Message

D.1.1.  CBOR Diagnostic Notation >>,
          / query-request = suit-parameter-image-size / 14: 20
        },
        / suit-condition-vendor-identifier /
 [ 1, 15,
        / type : TEEP-TYPE-query-request = 1 (uint (0..23)) suit-condition-class-identifier / 2, 15
      ] >>
    } >>,
    / options : suit-install / 9: << [
      / suit-directive-override-parameters / 20, {
     20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,
        / token suit-parameter-uri / 21: "#tc"
      },
      / suit-directive-fetch / 21, 15,
      / suit-condition-image-match / 3, 15
    ] >>
  } >>
} )

CBOR Binary Representation

D8 6B                                               # tag(107) / SUIT_Envelope_Tagged /
   A3                                               # map(3)
      02                                            # unsigned(2) / suit-authentication-wrapper /
      58 73                                         # bytes(115)
         82                                         # array(2)
            58 24                                   # bytes(36)
               82                                   # array(2)
                  2F                                # negative(15) / -16 = suit-cose-alg-sha256 /
                  58 20 (mapkey) :
               h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..64)),
               generated by TAM                             # bytes(32)
                     14A98BE957DE38FAE37376EA491FD6CAD9BFBD3C90051C8F5B017D7A496C3B05
            58 4A                                   # bytes(74)
               D2                                   # tag(18) /
     1 : [ 1 ], COSE_Sign1_Tagged / supported-cipher-suites = 1 (mapkey) :
                  TEEP-AES-CCM-16-64-128-HMAC256--256-X25519-EdDSA
                  84                                # array(4)
                     43                             # bytes(3)
                        A1                          # map(1)
                           01                       # unsigned(1) / algorithm-id /
                           26                       # negative(6) / -7 =
                  [ 1 ] (array of .within uint .size 4) ES256 /
     3 : [ 0 ]
                     A0                             # map(0)
                     F6                             # primitive(22) / null /
                     58 40                          # bytes(64)
                        4093B323953785981EB607C8BA61B21E5C4F85726A2AF48C1CB05BD4401B1B1565070728FDA38E6496D631E1D23F966CFF7805EDE721D48507D9192993DA8722
      63                                            # text(3) / suit-integrated-payload /
         237463                                     # "#tc"
      54                                            # bytes(20)
         48656C6C6F2C2053656375726520576F726C6421   # "Hello, Secure World!"

      03                                            # unsigned(3) / suit-manifest: /
      58 9A                                         # bytes(154)
         A4                                         # map(4)
            01                                      # unsigned(1) / suit-manifest-version: /
            01                                      # unsigned(1)
            02                                      # unsigned(2) / suit-manifest-sequence-number: /
            03                                      # unsigned(3)
            03                                      # unsigned(3) / suit-common: /
            58 84                                   # bytes(132)
               A2                                   # map(2)
                  02                                # unsigned(2) / suit-components: /
                  81                                # array(1)
                     84                             # array(4)
                        4B                          # bytes(11)
                           544545502D446576696365   # "TEEP-Device"
                        48                          # bytes(8)
                           5365637572654653         # "SecureFS"
                        50                          # bytes(16)
                           8D82573A926D4754935332DC29997F74 # tc-uuid
                        42                          # bytes(2)
                           7461                     # "ta"
                  04                                # unsigned(4) / suit-common-sequence: /
                  58 54                             # bytes(84)
                     86                             # array(6)
                        14                          # unsigned(20) / suit-directive-override-parameters: /
                        A4                          # map(4)
                           01                       # unsigned(1) / suit-parameter-vendor-identifier: /
                           50                       # bytes(16)
                              C0DDD5F15243566087DB4F5B0AA26C2F
                           02                       # unsigned(2) / suit-parameter-class-identifier: /
                           50                       # bytes(16)
                              DB42F7093D8C55BAA8C5265FC5820F4E
                           03                       # unsigned(3) / version = 3 (mapkey) :
                  [ 0 ] (array of .within uint .size 4) suit-parameter-image-digest: /
   },
   3
                           58 24                    # bytes(36)
                              82                    # array(2)
                                 2F                 # negative(15) / data-item-requested :
         attestation | trusted-components -16 = 3 (.within uint .size 8) suit-cose-alg-sha256 /
 ]

D.1.2.  CBOR Binary Representation
   83                       # array(3)
     01
                                 58 20              # unsigned(1) uint (0..23)
     A4 bytes(32)
                                    8CF71AC86AF31BE184EC7A05A411A8C3A14FD9B77A30D046397481469468ECE8
                           0E                       # map(4) unsigned(14) / suit-parameter-image-size: /
                           14                       # unsigned(20) uint (0..23)
       4F                   # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF
                        01                          # unsigned(1) uint (0..23)
       81 / suit-condition-vendor-identifier: /
                        0F                          # array(1)
         01 unsigned(15)
                        02                          # unsigned(1) within uint .size 4
       03 unsigned(2) / suit-condition-class-identifier: /
                        0F                          # unsigned(3) uint (0..23)
       81 unsigned(15)
            09                                      # array(1)
         00 unsigned(9) / suit-install: /
            4C                                      # unsigned(0) within uint .size 4
       04 bytes(12)
               86                                   # unsigned(4) uint (0..23)
       43 array(6)
                  14                                # bytes(3)
         010203 unsigned(20) / suit-directive-override-parameters: /
                  A1                                # "\x01\x02\x03" map(1)
                     15                             # unsigned(21) / suit-parameter-uri: /
                     63                             # text(3)
                        237463                      # "#tc"
                  15                                # unsigned(21) / suit-directive-fetch: /
                  0F                                # unsigned(15)
                  03                                # unsigned(3) .within uint .size 8

D.2.  Entity Attestation Token

   This is shown below in / suit-condition-image-match: /
                  0F                                # unsigned(15)

CBOR diagnostic form.  Only the payload signed
   by COSE is shown.

D.2.1. Binary in Hex

   D86BA3025873825824822F582014A98BE957DE38FAE37376EA491FD6CAD9
   BFBD3C90051C8F5B017D7A496C3B05584AD28443A10126A0F658404093B3
   23953785981EB607C8BA61B21E5C4F85726A2AF48C1CB05BD4401B1B1565
   070728FDA38E6496D631E1D23F966CFF7805EDE721D48507D9192993DA87
   22632374635448656C6C6F2C2053656375726520576F726C642103589AA4
   01010203035884A20281844B544545502D44657669636548536563757265
   4653508D82573A926D4754935332DC29997F744274610458548614A40150
   C0DDD5F15243566087DB4F5B0AA26C2F0250DB42F7093D8C55BAA8C5265F
   C5820F4E035824822F58208CF71AC86AF31BE184EC7A05A411A8C3A14FD9
   B77A30D046397481469468ECE80E14010F020F094C8614A1156323746315
   0F030F

Example 3: Supplying Personalization Data for Trusted Component Binary

CBOR Diagnostic Notation of SUIT Manifest

/ eat-claim-set = SUIT_Envelope_Tagged / 107( {
  / issuer suit-authentication-wrapper / 2: << [
    << [
      / suit-digest-algorithm-id: / -16 / suit-cose-alg-sha256 /,
      / suit-digest-bytes: / h'CE596D785169B72712560B3A246AA98F814498EA3625EEBB72CED9AF273E7FFD'
    ] >>,
    << / COSE_Sign1_Tagged / 18( [
      / protected: / << {
        / algorithm-id / 1: "joe", -7 / timestamp (iat) ES256 /          6: 1(1526542894)
      } >>,
      / nonce unprotected: /                   10: h'948f8860d13a463e8e', {},
      / secure-boot payload: /             15: true, null,
      / debug-status signature: /            16: 3, h'E9083AA71D2BFCE48253037B9C3116A5EDF23BE0F4B4357A8A835F724660DA7482C64345B4C73DE95F05513BD09FC2E58BD2CC865CC851AD797513A9A951A3CA'
    ] ) >>
  ] >>,
  / disabled-permanently suit-manifest / 3: << {
    / security-level suit-manifest-version /          14: 1: 1,
    / suit-manifest-sequence-number / 2: 3,
    / secure-restricted suit-common / 3: << {
      / suit-dependencies / device-identifier 1: [
        {
          / suit-dependency-digest / 1: [
            / suit-digest-algorithm-id: / -16 / suit-cose-alg-sha256 /,
            / suit-digest-bytes: / h'F8690E5A86D010BF2B5348ABB99F2254DB7B608D0D626B98DB51AB3ECFC51907'
          ]
        }
      ],
      / suit-components / 2: [
        [
          h'544545502D446576696365', / "TEEP-Device" /
          h'5365637572654653',       / "SecureFS" /
          h'636F6E6669672E6A736F6E'  / "config.json" /
        ]
      ],
      / suit-common-sequence / 4: << [
        / suit-directive-set-component-index / 12, 0,
        / suit-directive-override-parameters / 20, {
          / suit-parameter-vendor-identifier / 1: h'C0DDD5F15243566087DB4F5B0AA26C2F',
          / suit-parameter-class-identifier / 2: h'DB42F7093D8C55BAA8C5265FC5820F4E',
          / suit-parameter-image-digest / 3: << [
            /    <TBD>: h'e99600dd921649798b013e9752dcf0c5', suit-digest-algorithm-id: / vendor-identifier -16 /    <TBD>: h'2b03879b33434a7ca682b8af84c19fd4', suit-cose-alg-sha256 /,
            / class-identifier suit-digest-bytes: /     <TBD>: h'9714a5796bd245a3a4ab4f977cb8487f', h'AAABCCCDEEEF00012223444566678889ABBBCDDDEFFF01112333455567778999'
          ] >>,
          / chip-version suit-parameter-image-size /            26: [ "MyTEE", 1 ], 14: 64
        },
        / component-identifier suit-condition-vendor-idnetifier / <TBD>: h'60822887d35e43d5b603d18bcaa3f08d', 1, 15,
        / version suit-condition-class-identifier /              <TBD>: "v0.1" 2, 15
      ] >>
    }

D.3.  QueryResponse Message

D.3.1.  CBOR Diagnostic Notation >>,
    / query-response = suit-dependency-resolution / 7: << [
   2,
      / type : TEEP-TYPE-query-response = 2 (uint (0..23)) suit-directive-set-dependency-index / 13, 0,
      / options : suit-directive-override-parameters / 20, {
     20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,
        / token = 20 (mapkey) :
               h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..64)),
               given from TAM's QueryRequest message suit-parameter-uri /
     5 : 1, 21: "https://example.org/8d82573a-926d-4754-9353-32dc29997f74.suit"
      },
      / selected-cipher-suite = 5 (mapkey) :
               TEEP-AES-CCM-16-64-128-HMAC256--256-X25519-EdDSA =
               1 (.within uint .size 4) suit-directive-fetch /
     6 : 0, 21, 2,
      / selected-version = 6 (mapkey) :
               0 (.within uint .size 4) suit-condition-image-match /
     7 : ... 3, 15
    ] >>,
    / evidence = 7 (mapkey) :
               Entity Attestation Token suit-install /
     8 : 9: << [
      / tc-list = 8 (mapkey) : (array of tc-info) suit-directive-set-dependency-index /
       {
         16 : [ 0x000102030405060708090a0b0c0d0e0f ] 13, 0,
      / component-id =
                16 (mapkey) : [ h'000102030405060708090a0b0c0d0e0f' ]
                (SUIT_Component_Identifier =  [* bstr]) suit-directive-process-dependency /
       },
       {
         16 : [ 0x100102030405060708090a0b0c0d0e0f ] 18, 0,
      / component-id =
                16 (mapkey) : [ h'100102030405060708090a0b0c0d0e0f' ]
                (SUIT_Component_Identifier =  [* bstr]) suit-directive-set-component-index /
       }
         ]
     }
 ]

D.3.2.  CBOR Binary Representation
   82                       # array(2)
     02                     # unsigned(2) uint (0..23)
     A5                     # map(5)
       14                   # unsigned(20) uint (0..23)
       4F                   # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF
       05                   # unsigned(5) uint (0..23)
       01                   # unsigned(1) .within uint .size 4
       06                   # unsigned(6) uint (0..23)
       00                   # unsigned(0) .within uint .size 4
       07                   # unsigned(7) uint (0..23)
         ...                # Entity Attestation Token
       08                   # unsigned(8) uint (0..23)
       82                   # array(2)
         81                 # array(1)
           4F               # bytes(16)
             000102030405060708090A0B0C0D0E0F
         81                 # array(1)
           4F               # bytes(16)
             100102030405060708090A0B0C0D0E0F

D.4.  Update Message

D.4.1.  CBOR Diagnostic Notation 12, 0,
      / update = suit-directive-override-parameters /
[
  3, 20, {
        / type : TEEP-TYPE-update = 3 (uint (0..23)) suit-parameter-uri / 21: "https://example.org/config.json"
      },
      / options : suit-directive-fetch /
  {
    20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf, 21, 2,
      / token = 20 (mapkey) :
               h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..64)),
               generated by TAM suit-condition-image-match /
    10 : [ 3, 15
    ] >>,
    / manifest-list = 10 (mapkey) : suit-validate / 10: << [ ] (array of bstr wrapped SUIT_Envelope(any))
      / suit-directive-set-component-index / empty, example purpose only 12, 0,
      /
  } suit-condition-image-match/ 3, 15
    ]

D.4.2. >>
  } >>
} )

CBOR Binary Representation
   82 Represenation

D8 6B                                               # array(2)
     03 tag(107) / SUIT_Envelope_Tagged /
   A2                                               # unsigned(3) uint (0..23)
     A3 map(2)
      02                                            # map(3)
       14 unsigned(2) / suit-authentication-wrapper: /
      58 73                                         # unsigned(20) uint (0..23)
       4F bytes(115)
         82                                         # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF
       0A array(2)
            58 24                                   # unsigned(10) uint (0..23)
       80 bytes(36)
               82                                   # array(0)

D.5.  Success Message

D.5.1.  CBOR Diagnostic Notation

/ teep-success = /
[
  5, array(2)
                  2F                                # negative(15) / type : TEEP-TYPE-teep-success -16 = 5 (uint (0..23)) suit-cose-alg-sha256 /
  / options : /
  {
                  58 20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,                             # bytes(32)
                     CE596D785169B72712560B3A246AA98F814498EA3625EEBB72CED9AF273E7FFD
            58 4A                                   # bytes(74)
               D2                                   # tag(18) / token = 20 (mapkey) :
               h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..64)),
               given from TAM's Update message COSE_Sign1_Tagged /
  }
]

D.5.2.  CBOR Binary Representation

   82
                  84                                # array(2)
     05 array(4)
                     43                             # unsigned(5) uint (0..23) bytes(3)
                        A1                          # map(1)
       14                   # unsigned(20) uint (0..23)
       4F
                           01                       # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF

D.6.  Error Message

D.6.1.  CBOR Diagnostic Notation
 / teep-error = /
 [
   6,  / type : TEEP-TYPE-teep-error = 6 (uint (0..23)) /
   / options : /
   {
     20 : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf,
            / token = 20 (mapkey) :
              h'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' (bstr .size (8..64)),
              given from TAM's Update message /
     12 : "disk-full" unsigned(1) / err-msg = 12 (mapkey) :
                         "disk-full" (text .size (1..128)) algorithm-id /
   },
   17,
                           26                       # negative(6) / err-code : ERR_MANIFEST_PROCESSING_FAILED -7 = 17 (uint (0..23)) ES256 /
 ]

D.6.2.  CBOR binary Representation

   83                       # array(3)
     06
                     A0                             # unsigned(6) uint (0..23)
     A2                     # map(2)
       14 map(0)
                     F6                             # unsigned(20) uint (0..23)
       4F primitive(22) / null /
                     58 40                          # bytes(16) (8..64)
         A0A1A2A3A4A5A6A7A8A9AAABACADAEAF
       0C bytes(64)
                        E9083AA71D2BFCE48253037B9C3116A5EDF23BE0F4B4357A8A835F724660DA7482C64345B4C73DE95F05513BD09FC2E58BD2CC865CC851AD797513A9A951A3CA
      03                                            # unsigned(12) uint (0..23)
       69 unsigned(3) / suit-manifest: /
      59 0134                                       # text(9) (1..128)
         6469736B2D66756C6C bytes(308)
         A6                                         # "disk-full"
     11 map(6)
            01                                      # unsigned(17) uint (0..23)

E.  Examples of SUIT Manifests

   This section shows some examples of SUIT manifests for a case where
   the TEE will use a Trusted Application (TA) for OP-TEE on Arm
   TrustZone, storing the TA in Replay Protected Memory Block (RPMB)
   secure storage in a file named "edd94cd8-9d9c-4cc8-9216-
   b3ad5a2d5b8a.ta".

   The TA developer places personalization data for the device on an
   HTTPS server and puts the URI in the TA manifest.  The
   personalization data will also be stored in RPMB secure storage in a
   file named "config.json".

E.1.  Install a Trusted Component

   This sample manifest installs a Trusted Component that depends on
   personalization data resolved separately.

   TA Manifest:

 107({
   / authentication-wrapper unsigned(1) / 2:<<[
     digest: <<[ suit-manifest-version: / algorithm-id
            01                                      # unsigned(1)
            02                                      # unsigned(2) / -16 suit-manifest-sequence-number: / "sha256" /,
            03                                      # unsigned(3)
            03                                      # unsigned(3) / digest-bytes suit-common: / h'd6c1fc7200483092e2db59d4907f9b15'
                        h'05cb3af2795cf78f7ae3d88166fdf743'
     ]>>,
     signature: <<18([
            58 A7                                   # bytes(167)
               A3                                   # map(3)
                  01                                # unsigned(1) / protected suit-dependencies: / <<{
                  81                                # array(1)
                     A1                             # map(1)
                        01                          # unsigned(1) suit-dependency-digest: / alg
                        82                          # array(2)
                           2F                       # negative(15) / 1:-7 -16 = suit-cose-alg-sha256 / "ES256" /,
       }>>,
                           58 20                    # bytes(32)
                              F8690E5A86D010BF2B5348ABB99F2254DB7B608D0D626B98DB51AB3ECFC51907
                  02                                # unsigned(2) / unprotected suit-components: / {},
                  81                                # array(1)
                     83                             # array(3)
                        4B                          # bytes(11)
                           544545502D446576696365   # "TEEP-Device"
                        48                          # bytes(8)
                           5365637572654653         # "SecureFS"
                        4B                          # bytes(11)
                           636F6E6669672E6A736F6E   # "config.json"
                  04                                # unsigned(4) / payload suit-common-sequence: / F6
                  58 57                             # bytes(87)
                     88                             # array(8)
                        0C                          # unsigned(12) / nil /, suit-directive-set-component-index: / signature
                        00                          # unsigned(0)
                        14                          # unsigned(20) / h'd11a2dd9610fb62a707335f584079225'
                     h'709f96e8117e7eeed98a2f207d05c8ec'
                     h'fba1755208f6abea977b8a6efe3bc2ca'
                     h'3215e1193be201467d052b42db6b7287'
     ])>>
   ]>>, suit-directive-override-parameters: / manifest
                        A4                          # map(4)
                           01                       # unsigned(1) / 3:<<{ suit-parameter-vendor-identifier: / manifest-version
                           50                       # bytes(16)
                              C0DDD5F15243566087DB4F5B0AA26C2F
                           02                       # unsigned(2) / 1:1, suit-parameter-class-identifier: / manifest-sequence-number
                           50                       # bytes(16)
                              DB42F7093D8C55BAA8C5265FC5820F4E
                           03                       # unsigned(3) / 2:3, suit-parameter-image-digest: / common
                           58 24                    # bytes(36)
                              82                    # array(2)
                                 2F                 # negative(15) / 3:<<{ -16 = suit-cose-alg-sha256 / components
                                 58 20              # bytes(32)
                                    AAABCCCDEEEF00012223444566678889ABBBCDDDEFFF01112333455567778999
                           0E                       # unsigned(14) / 2:[
         ["OP-TEE","RPMB","edd94cd8-9d9c-4cc8-9216- b3ad5a2d5b8a","ta"]
       ], suit-parameter-image-size: / common-sequence
                           18 40                    # unsigned(64)
                        01                          # unsigned(1) / 4:<<[ suit-condition-vendor-identifier: / directive-override-parameters
                        0F                          # unsigned(15)
                        02                          # unsigned(2) / 20,{ suit-condition-class-identifier: / vendor-id
                        0F                          # unsigned(15)
            07                                      # unsigned(7) / 1:h'c0ddd5f15243566087db4f5b0aa26c2f', suit-dependency-resolution: / class-id
            58 49                                   # bytes(73)
               88                                   # array(8)
                  0D                                # unsigned(13) / 2:h'db42f7093d8c55baa8c5265fc5820f4e', suit-directive-set-dependency-index: / image-digest
                  00                                # unsigned(0)
                  14                                # unsigned(20) / 3:<<[ suit-directive-override-parameters: / algorithm-id
                  A1                                # map(1)
                     15                             # unsigned(21) / -16 suit-parameter-uri: / "sha256" /,
                     78 3D                          # text(61)
                        68747470733A2F2F6578616D706C652E6F72672F38643832353733612D393236642D343735342D393335332D3332646332393939376637342E73756974 # "https://example.org/8d82573a-926d-4754-9353-32dc29997f74.suit"
                  15                                # unsigned(21) / digest-bytes suit-directive-fetch: / h'00112233445566778899aabbccddeeff'
                              h'0123456789abcdeffedcba9876543210'
           ]>>,
                  02                                # unsigned(2)
                  03                                # unsigned(3) / image-size suit-condition-image-match: / 14:76778,
         },
                  0F                                # unsigned(15)
            09                                      # unsigned(9) / condition-vendor-identifier suit-install: / 1,15,
            58 2F                                   # bytes(47)
               8C                                   # array(12)
                  0D                                # unsigned(13) / condition-class-identifier suit-directive-set-dependency-index: / 2,15
       ]>>,
     }>>,
                  00                                # unsigned(0)
                  12                                # unsigned(18) / install suit-directive-process-dependency: / 9:<<[
                  00                                # unsigned(0)
                  0C                                # unsigned(12) / directive-set-parameters suit-directive-set-component-index: / 19,{
                  00                                # unsigned(0)
                  14                                # unsigned(20) / uri suit-directive-override-parameters: / 21:
         'https://teep.example/edd94cd8-9d9c-4cc8-9216-b3ad5a2d5b8a.ta',
       } ,
                  A1                                # map(1)
                     15                             # unsigned(21) / directive-fetch suit-parameter-uri: / 21,2,
                     78 1F                          # text(31)
                        68747470733A2F2F6578616D706C652E6F72672F636F6E6669672E6A736F6E # "https://example.org/config.json"
                  15                                # unsigned(21) / condition-image-match suit-directive-fetch: / 3,15

     ]>>,
                  02                                # unsigned(2)
                  03                                # unsigned(3) / validate suit-condition-image-match: / 10:<<[
                  0F                                # unsigned(15)
            0A                                      # unsigned(10) / condition-image-match suit-validate: / 3,15
     ]>>,
            45                                      # bytes(5)
               84                                   # array(4)
                  0C                                # unsigned(12) / run suit-directive-set-component-index: / 12:<<[
                  00
                  03                                # unsigned(3) / directive-run suit-condition-image-match: / 23,2
     ]>>,
                  0F                                # unsigned(15)

CBOR Binary in Hex

   D86BA2025873825824822F5820CE596D785169B72712560B3A246AA98F81
   4498EA3625EEBB72CED9AF273E7FFD584AD28443A10126A0F65840E9083A
   A71D2BFCE48253037B9C3116A5EDF23BE0F4B4357A8A835F724660DA7482
   C64345B4C73DE95F05513BD09FC2E58BD2CC865CC851AD797513A9A951A3
   CA03590134A6010102030358A7A30181A101822F5820DB601ADE73092B58
   532CA03FBB663DE49532435336F1558B49BB622726A2FEDD0281834B5445
   45502D4465766963654853656375726546534B636F6E6669672E6A736F6E
   045857880C0014A40150C0DDD5F15243566087DB4F5B0AA26C2F0250DB42
   F7093D8C55BAA8C5265FC5820F4E035824822F5820AAABCCCDEEEF000122
   23444566678889ABBBCDDDEFFF011123334555677789990E1840010F020F
   075849880D0014A115783D68747470733A2F2F6578616D706C652E6F7267
   2F38643832353733612D393236642D343735342D393335332D3332646332
   393939376637342E737569741502030F09582F8C0D0012000C0014A11578
   1F68747470733A2F2F6578616D706C652E6F72672F636F6E6669672E6A73
   6F6E1502030F0A45840C00030F

E.4.  Example 4: Unlink a Trusted Component

CBOR Diagnostic Notation of SUIT Manifest
/ text SUIT_Envelope_Tagged / 13:<<{
       [
         h'4f502d544545',
         h'44f301',
         h'edd94cd89d9c4cc89216b3ad5a2d5b8a',
         h'7461'
       ]:{ 107( {
  / model-name suit-authentication-wrapper / 2: 'OP-TEE on TF-A on TrustZone',
         / vendor-domain / 3:'teep.example'
       }
     }>>
   }>>
 })

   Personalization Data Manifest:

   107({
     2:<<[
       digest: <<[ << [
    << [
      / algorithm-id suit-digest-algorithm-id: / -16 / "sha256" suit-cose-alg-sha256 /,
      / digest-bytes / h'a7fd6593eac32eb4be578278e6540c5c'
                          h'09cfd7d4d234973054833b2b93030609'
       ]>>
     ]>>, suit-digest-bytes: / manifest h'632454F19A9440A5B83493628A7EF8704C8A0205A62C34E425BAA34C71341F42'
    ] >>,
    << / 3:<<{ COSE_Sign1_Tagged / manifest-version 18( [
      / 1:1, protected / manifest-sequence-number << {
        / 2:3, algorithm-id / dependencies 1: -7 / 1:[
         { ES256 / dependency-digest
      } >>,
      / 1:[ unprotected: / algorithm-id {},
      / -16 payload: / "sha256" /, null,
      / digest-bytes signature: / h'd6c1fc7200483092e2db59d4907f9b15'
                            h'05cb3af2795cf78f7ae3d88166fdf743' h'A32CDB7C1D089C27408CED3C79087220EB0D77F105BB5330912875F4D94AD108D7658C650463AEB7E1CCA5084F22B2F3993176E8B3529A3202ED735E4D39BBBF'
    ]
         }
       ],
       / components / 2:[
         ["OP-TEE","RPMB","config.json"]
       ], ) >>
  ] >>,
  / common-sequence suit-manifest / 4:<<[ 3: << {
    / directive-set-component-index suit-manifest-version / 12,0, 1: 1,
    / directive-override-parameters suit-manifest-sequence-number / 20,{ 2: 18446744073709551615 / vendor-id UINT64_MAX /,
    / 1:h'ec41787224345ae580003de697ff8d43' suit-common / ec417872-2434-5ae5-8000-3de697ff8d43 /, 3: << {
      / class-id suit-components / 2:h'eb1701b48be85709aca0adf89f056a64' 2: [
        [
          h'544545502D446576696365',           / eb1701b4-8be8-5709-aca0-adf89f056a64 /, "TEEP-Device" / image-digest
          h'5365637572654653',                 / 3:<<[ "SecureFS" / algorithm-id
          h'8D82573A926D4754935332DC29997F74', / -16 tc-uuid / "sha256" /,
          h'7461'                              / digest-bytes "ta" / h'aaabcccdeeef00012223444566678889'
                              h'abbbcdddefff01112333455567778999'
           ]>>
         },
        ]
      ],
      / condition-vendor-identifier suit-common-sequence / 1,15, 4: << [
        / condition-class-identifier suit-directive-override-parameters / 2,15
       ]>>, 20, {
          / dependency-resolution suit-parameter-vendor-identifier / 7:<<[ 1: h'C0DDD5F15243566087DB4F5B0AA26C2F',
          / directive-set-dependency-index suit-parameter-class-identifier / 13,0, 2: h'DB42F7093D8C55BAA8C5265FC5820F4E'
        },
        / directive-set-parameters suit-condition-vendor-identifier / 19,{ 1, 15,
        / uri suit-condition-class-identifier / 21:'tam.teep.example/'
                      'edd94cd8-9d9c-4cc8-'
                      '9216-b3ad5a2d5b8a.suit',
         }, 2, 15
      ] >>
    } >>,
    / directive-fetch suit-install / 21,2, 9: << [
      / condition-image-match suit-directive-set-component-index: / 3,15
       ]>>, 12, 0,
      / install suit-directive-unlink: / 9:<<[ 33, 0
    ] >>
  } >>
} )

CBOR Binary Representation
D8 6B                                               # tag(107) / directive-set-component-index SUIT_Envelope_Tagged / 12,0,
   A2                                               # map(2)
      02                                            # unsigned(2) / directive-set-parameters suit-authentication-wrapper / 19,{
      58 73                                         # bytes(115)
         82                                         # array(2)
            58 24                                   # bytes(36)
               82                                   # array(2)
                  2F                                # negative(15) / uri -16 = suit-cose-alg-sha256 / 21:
           'http://tam.teep.example/config.json',
         },
                  58 20                             # bytes(32)
                     632454F19A9440A5B83493628A7EF8704C8A0205A62C34E425BAA34C71341F42
            58 4A                                   # bytes(74)
               D2                                   # tag(18) / directive-set-dependency-index COSE_Sign1_Tagged / 13,0,
                  84                                # array(4)
                     43                             # bytes(3)
                        A1                          # map(1)
                           01                       # unsigned(1) / directive-process-dependency algorithm-id / 18,0,
                           26                       # negative(6) / directive-set-component-index -7 = ES256 / 12,0,
                     A0                             # map(0)
                     F6                             # primitive(22) / directive-fetch null / 21,2,
                     58 40                          # bytes(64)
                        A32CDB7C1D089C27408CED3C79087220EB0D77F105BB5330912875F4D94AD108D7658C650463AEB7E1CCA5084F22B2F3993176E8B3529A3202ED735E4D39BBBF
      03                                            # unsigned(3) / condition-image-match suit-manifest: / 3,15
       ]>>,
      58 73                                         # bytes(115)
         A4                                         # map(4)
            01                                      # unsigned(1) / validate suit-manifest-version: / 10:<<[
            01                                      # unsigned(1)
            02                                      # unsigned(2) / directive-set-component-index suit-manifest-sequence-number: / 12,0,
            1B FFFFFFFFFFFFFFFF                     # unsigned(18446744073709551615)
            03                                      # unsigned(3) / condition-image-match suit-common: / 3,15,
            58 5B                                   # bytes(91)
               A2                                   # map(2)
                  02                                # unsigned(2) / directive-set-dependency-index suit-components: / 13,0,
                  81                                # array(1)
                     84                             # array(4)
                        4B                          # bytes(11)
                           544545502D446576696365   # "TEEP-Device"
                        48                          # bytes(8)
                           5365637572654653         # "SecureFS"
                        50                          # bytes(16)
                           8D82573A926D4754935332DC29997F74 # tc-uuid
                        42                          # bytes(2)
                           7461                     # "ta"
                  04                                # unsigned(4) / directive-process-dependency suit-common-sequence: / 18,0
       ]>>,
                  58 2B                             # bytes(84)
                     86                             # array(6)
                        14                          # unsigned(20) / run suit-directive-override-parameters: / 12:<<[
                        A2                          # map(2)
                           01                       # unsigned(1) / directive-set-dependency-index suit-parameter-vendor-identifier: / 13,0,
                           50                       # bytes(16)
                              C0DDD5F15243566087DB4F5B0AA26C2F
                           02                       # unsigned(2) / directive-process-dependency suit-parameter-class-identifier: / 18,0
       ]>>,
                           50                       # bytes(16)
                              DB42F7093D8C55BAA8C5265FC5820F4E
                        01                          # unsigned(1) / text suit-condition-vendor-identifier: / 13:<<{
         [h'4f502d544545', h'44f301',
          h'636f6e6669672e6a736f6e']:{
                        0F                          # unsigned(15)
                        02                          # unsigned(2) / model-name suit-condition-class-identifier: / 2: 'Personalised OP-TEE on TF-A on TrustZone',
                        0F                          # unsigned(15)
            09                                      # unsigned(9) / vendor-domain suit-install: / 3:'tam.teep.example',
         },
         [
           h'4f502d544545',
           h'44f301',
           h'edd94cd89d9c4cc89216b3ad5a2d5b8a',
           h'7461'
         ]:{
            46                                      # bytes(6)
               84                                   # array(4)
                  0C                                # unsigned(12) / model-name suit-directive-set-component-index: / 2:'OP-TEE on TF-A on TrustZone',
                  00                                # unsigned(0)
                  18 21                             # unsigned(33) / vendor-domain suit-directive-unlink: / 3:'teep.example'
         }
       }>>
     }>>
   })

E.2.  Delete a Trusted Component
                  00                                # unsigned(0)

CBOR Binary in Hex

   D86BA2025873825824822F5820632454F19A9440A5B83493628A7EF8704C
   8A0205A62C34E425BAA34C71341F42584AD28443A10126A0F65840A32CDB
   7C1D089C27408CED3C79087220EB0D77F105BB5330912875F4D94AD108D7
   658C650463AEB7E1CCA5084F22B2F3993176E8B3529A3202ED735E4D39BB
   BF035873A40101021BFFFFFFFFFFFFFFFF03585BA20281844B544545502D
   446576696365485365637572654653508D82573A926D4754935332DC2999
   7F7442746104582B8614A20150C0DDD5F15243566087DB4F5B0AA26C2F02
   50DB42F7093D8C55BAA8C5265FC5820F4E010F020F0946840C00182100

F.  Examples of SUIT Reports

   This sample manifest removes a Trusted Component and its dependency.

  107({ section shows some examples of SUIT reports.

F.1.  Example 1: Success

   SUIT Reports have no records if no conditions have failed.  The URI
   in this example is the reference URI provided in the SUIT manifest.

{
  / authentication-wrapper suit-report-manifest-digest / 2:<<[
              digest: <<[ 1:<<[
    / algorithm-id / -16 / "sha256" /,
    / digest-bytes /
  h'a6c4590ac53043a98e8c4106e1e31b305516d7cf0a655eddfac6d45c810e036a' h'a7fd6593eac32eb4be578278e6540c5c'
                     h'09cfd7d4d234973054833b2b93030609'
  ]>>,
              signature: <<18([
                      / protected
  / <<{ suit-report-manifest-uri / alg 2: "tam.teep.example/personalisation.suit",
  / 1:-7 suit-report-records / "ES256" /,
                      }>>, 4: []
}
F.2.  Example 2: Faiure

{
  / unprotected suit-report-manifest-digest / {
                      }, 1:<<[
    / payload algorithm-id / F6 -16 / nil "sha256" /,
    / signature digest-bytes / h'd11a2dd9610fb62a707335f58407922570
  9f96e8117e7eeed98a2f207d05c8ecfba1755208f6abea977b8a6efe3bc2ca3215e119
  3be201467d052b42db6b7287'
                  ])>>
              ] h'a7fd6593eac32eb4be578278e6540c5c09cfd7d4d234973054833b2b93030609'
  ]>>,
  / manifest / 3:<<{
              / manifest-version suit-report-manifest-uri / 1:1, 2: "tam.teep.example/personalisation.suit",
  / manifest-sequence-number suit-report-records / 2:0, 4: [
    {
      / common suit-record-manifest-id / 3:<<{ 1:[],
      / components suit-record-manifest-section / 2:[
                      [h'00']
                  ], 2: 7 / common-sequence dependency-resolution /,
      / 4:<<[ suit-record-section-offset / directive-override-parameters 3: 66,
      / 20,{ suit-record-dependency-index / vendor-id 5: 0,
      /
  1:h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' suit-record-failure-reason / fa6b4a53-d5ad-5fdf-
  be9d-e663e4d41ffe /, 6: 404
    }
  ]
}

   where the dependency-resolution refers to:

   107({
     authentication-wrapper,
     / class-id manifest /
  2:h'1492af1425695e48bf429b2d51f2ab45' 3:<<{
       /
  1492af14-2569-5e48-bf42-9b2d51f2ab45 /, manifest-version / image-digest 1:1,
       / 3:<<[ manifest-sequence-number / algorithm-id 2:3,
       common,
       dependency-resolution,
       install,
       validate,
       run,
       text
     }>>,
   })

   and the suit-record-section-offset refers to:

   <<[
     / -16 directive-set-dependency-index / "sha256" /, 13,0 ,
     / digest-bytes directive-set-parameters /
  h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210'
                          ]>>, 19,{
       / image-size uri / 14:34768, 21:'tam.teep.example/'
                  'edd94cd8-9d9c-4cc8-9216-b3ad5a2d5b8a.suit',
       } ,
     / condition-vendor-identifier directive-fetch / 1,15 21,2 ,
     / condition-class-identifier / 2,15
                  ]>>,
              }>>,
              / validate / 10:<<[
                  / condition-image-match / 3,15
   ]>>,
              / run / 12:<<[
                  / directive-run / 23,2
              ]>>,
          }>>,
      })

   Total size of Envelope without COSE authentication object: 161

   Envelope:

   d86ba2025827815824822f5820a6c4590ac53043a98e8c4106e1e31b3055
   16d7cf0a655eddfac6d45c810e036a035871a50101020003585fa2028181
   41000458568614a40150fa6b4a53d5ad5fdfbe9de663e4d41ffe02501492
   af1425695e48bf429b2d51f2ab45035824822f5820001122334455667788
   99aabbccddeeff0123456789abcdeffedcba98765432100e1987d0010f02
   0f0a4382030f0c43821702

   Total size of Envelope with COSE authentication object: 237

   Envelope with COSE authentication object:

   d86ba2025873825824822f5820a6c4590ac53043a98e8c4106e1e31b3055
   16d7cf0a655eddfac6d45c810e036a584ad28443a10126a0f65840d11a2d
   d9610fb62a707335f584079225709f96e8117e7eeed98a2f207d05c8ecfb
   a1755208f6abea977b8a6efe3bc2ca3215e1193be201467d052b42db6b72
   87035871a50101020003585fa202818141000458568614a40150fa6b4a53
   d5ad5fdfbe9de663e4d41ffe02501492af1425695e48bf429b2d51f2ab45
   035824822f582000112233445566778899aabbccddeeff0123456789abcd
   effedcba98765432100e1987d0010f020f0a4382030f0c43821702

Authors' Addresses

   Hannes Tschofenig
   Arm Ltd.
   6067 Absam
   Austria
   Email: hannes.tschofenig@arm.com

   Mingliang Pei
   Broadcom
   350 Ellis St
   Mountain View, CA 94043
   United States of America
   Email: mingliang.pei@broadcom.com

   David Wheeler
   Amazon
   United States of America
   Email: davewhee@amazon.com

   Dave Thaler
   Microsoft
   United States of America
   Email: dthaler@microsoft.com

   Akira Tsukamoto
   AIST
   Japan
   Email: akira.tsukamoto@aist.go.jp