<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.43 (Ruby 4.0.6) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

]>


<rfc ipr="trust200902" docName="draft-ietf-suit-manifest-38" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="CBOR-based SUIT Manifest">A Concise Binary Object Representation (CBOR)-based Serialization Format for the Software Updates for Internet of Things (SUIT) Manifest</title>

    <author initials="B." surname="Moran" fullname="Brendan Moran">
      <organization>Arm Limited</organization>
      <address>
        <email>brendan.moran.ietf@gmail.com</email>
      </address>
    </author>
    <author initials="H." surname="Tschofenig" fullname="Hannes Tschofenig">
      <organization>University of the Bundeswehr Munich</organization>
      <address>
        <postal>
          <country>Germany</country>
        </postal>
        <email>Hannes.Tschofenig@gmx.net</email>
      </address>
    </author>
    <author initials="H." surname="Birkholz" fullname="Henk Birkholz">
      <organization abbrev="Fraunhofer SIT">Fraunhofer SIT</organization>
      <address>
        <postal>
          <street>Rheinstrasse 75</street>
          <city>Darmstadt</city>
          <code>64295</code>
          <country>Germany</country>
        </postal>
        <email>henk.birkholz@sit.fraunhofer.de</email>
      </address>
    </author>
    <author initials="K." surname="Zandberg" fullname="Koen Zandberg">
      <organization>Inria</organization>
      <address>
        <email>koen.zandberg@inria.fr</email>
      </address>
    </author>
    <author initials="Ø." surname="Rønningstad" fullname="Øyvind Rønningstad">
      <organization>Nordic Semiconductor</organization>
      <address>
        <email>oyvind.ronningstad@gmail.com</email>
      </address>
    </author>

    <date year="2026" month="November" day="04"/>

    
    
    

    <abstract>


<?line 80?>
<t>This specification describes the format of a manifest.  A manifest is
a bundle of metadata about code/data obtained by a recipient (chiefly
the firmware for an Internet of Things (IoT) device), where to find the code/data, the
devices to which it applies, and cryptographic information protecting
the manifest. Software updates and Trusted Invocation both tend to use
sequences of common operations, so the manifest encodes those sequences
of operations, rather than declaring the metadata.</t>



    </abstract>



  </front>

  <middle>


<?line 89?>

<section anchor="introduction"><name>Introduction</name>

<t>A firmware update mechanism is an essential security feature for IoT devices to deal with vulnerabilities. The transport of firmware images to the devices themselves is important security aspect. Luckily, there are already various device management solutions available offering the distribution of firmware images to IoT devices. Equally important is the inclusion of metadata about the conveyed firmware image (in the form of a manifest) and the use of a security wrapper to provide end-to-end security protection to detect modifications and (optionally) to make reverse engineering more difficult. Firmware signing allows the author, who builds the firmware image, to be sure that no other party (including potential adversaries) can install firmware updates on IoT devices without adequate privileges. For confidentiality protected firmware images it is additionally required to encrypt the firmware image and to distribute the content encryption key securely. The support for firmware and payload encryption via the SUIT manifest format is described in a companion document <xref target="I-D.ietf-suit-firmware-encryption"/>. Starting security protection at the author is a risk mitigation technique so firmware images and manifests can be stored on untrusted repositories; it also reduces the scope of a compromise of any repository or intermediate system to be no worse than a denial of service.</t>

<t>A manifest is a bundle of metadata about the firmware for an IoT device, where to
find the firmware, and the devices to which it applies.</t>

<t>This specification defines the SUIT manifest format.
It is intended to meet several goals:</t>

<t><list style="symbols">
  <t>Meet the requirements defined in <xref target="RFC9124"/>.</t>
  <t>Simple to parse on a constrained node.</t>
  <t>Simple to process on a constrained node.</t>
  <t>Compact encoding.</t>
  <t>Comprehensible by an intermediate system.</t>
  <t>Expressive enough to enable advanced use cases on advanced nodes.</t>
  <t>Extensible.</t>
</list></t>

<t>The SUIT manifest can be used for a variety of purposes throughout its lifecycle, such as enabling:</t>

<t><list style="symbols">
  <t>a Network Operator to reason about compatibility of a firmware, such as timing and acceptance of firmware updates.</t>
  <t>a Device Operator to reason about the impact of a firmware.</t>
  <t>a device to evaluate the authenticity of a firmware and the authority of the firmware author prior to installation.</t>
  <t>a device to evaluate the applicability of a firmware.</t>
  <t>a device to determine the installation process of a firmware.</t>
  <t>a device to evaluate the authenticity of a firmware pre-boot</t>
  <t>a device to determine the encoding and boot process of a firmware.</t>
</list></t>

<t>Each of these uses happens at a different stage of the manifest lifecycle, so each has different requirements.</t>

<t>It is assumed that the reader is familiar with the high-level firmware update architecture <xref target="RFC9019"/> and the threats, requirements, and user stories in <xref target="RFC9124"/>.</t>

<t>The design of this specification is based on an observation that the vast majority of operations that a device can perform during an update or Trusted Invocation are composed of a small group of operations:</t>

<t><list style="symbols">
  <t>Copy some data from one place to another</t>
  <t>Transform some data</t>
  <t>Digest some data and compare to an expected value</t>
  <t>Compare some system parameters to an expected value</t>
  <t>Run some code</t>
</list></t>

<t>In this document, these operations are called commands. Commands are classed as either conditions or directives. Conditions have no side-effects, while directives do have side-effects. Conceptually, a sequence of commands is like a script but the language is tailored to software updates and Trusted Invocation.</t>

<t>The available commands support simple steps, such as copying a firmware image from one place to another, checking that a firmware image is correct, verifying that the specified firmware is the correct firmware for the device, or unpacking a firmware. By using these steps in different orders and changing the parameters they use, a broad range of use cases can be supported. The SUIT manifest uses this observation to optimize metadata for consumption by constrained devices.</t>

<t>While the SUIT manifest is informed by and optimized for firmware update and Trusted Invocation use cases, there is nothing in the SUIT Information Model <xref target="RFC9124"/> that restricts its use to only those use cases. Other use cases include the management of trusted applications (TAs) in a Trusted Execution Environment (TEE), as discussed in <xref target="RFC9397"/>.</t>

</section>
<section anchor="conventions-and-terminology"><name>Conventions and Terminology</name>

<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

<?line -18?>

<t>Additionally, the following terminology is used throughout this document:</t>

<t><list style="symbols">
  <t>SUIT: Software Update for the Internet of Things, also the IETF working group for this standard.</t>
  <t>Payload: A piece of information to be delivered. Typically Firmware for the purposes of SUIT.</t>
  <t>Resource: A piece of information that is used to construct a payload.</t>
  <t>Manifest: A manifest is a bundle of metadata about the firmware for an IoT device, where to
find the firmware, and the devices to which it applies.</t>
  <t>Envelope: A container with the manifest, an authentication wrapper with cryptographic information protecting the manifest, authorization information, and severable elements. Severable elements can be removed from the manifest without impacting its security, see <xref target="severable-fields"/>.</t>
  <t>Update: One or more manifests that describe one or more payloads.</t>
  <t>Update Authority: The owner of a cryptographic key used to sign updates, trusted by Recipients.</t>
  <t>Recipient: The system, typically an IoT device, that receives and processes a manifest.</t>
  <t>Manifest Processor: A component of the Recipient that consumes Manifests and executes the commands in the Manifest.</t>
  <t>Component: An updatable logical block of the Firmware, Software, configuration, or data of the Recipient.</t>
  <t>Component Set: A group of interdependent Components that must be updated simultaneously.</t>
  <t>Command: A Condition or a Directive.</t>
  <t>Condition: A test for a property of the Recipient or its Components.</t>
  <t>Directive: An action for the Recipient to perform.</t>
  <t>Trusted Invocation: A process by which a system ensures that only trusted code is executed, for example secure boot or launching a Trusted Application.</t>
  <t>A/B images: Dividing a Recipient's storage into two or more bootable images, at different offsets, such that the active image can write to the inactive image(s).</t>
  <t>Record: The result of a Command and any metadata about it.</t>
  <t>Report: A list of Records.</t>
  <t>Procedure: The process of invoking one or more sequences of commands.</t>
  <t>Update Procedure: A procedure that updates a Recipient by fetching dependencies and images, and installing them.</t>
  <t>Invocation Procedure: A procedure in which a Recipient verifies dependencies and images, loading images, and invokes one or more image.</t>
  <t>Software: Instructions and data that allow a Recipient to perform a useful function.</t>
  <t>Firmware: Software that is typically changed infrequently, stored in nonvolatile memory, and small enough to apply to <xref target="RFC7228"/> Class 0-2 devices.</t>
  <t>Image: Information that a Recipient uses to perform its function, typically firmware/software, configuration, or resource data such as text or images. Also, a Payload, once installed is an Image.</t>
  <t>Slot: One of several possible storage locations for a given Component, typically used in A/B image systems</t>
  <t>Abort: An event in which the Manifest Processor immediately halts execution of the current Procedure. It creates a Record of an error condition.</t>
  <t>Pull parser: A parser that traverses the data and extracts information on an as-needed basis.</t>
  <t>Severable element: An element of the manifest that supports elision of hashed data. If a hash of the data is included in the manifest and the data is included in the envelope, then that data may be elided.</t>
</list></t>

</section>
<section anchor="how-to-use-this-document"><name>How to use this Document</name>

<t>This specification covers five aspects of firmware update:</t>

<t><list style="symbols">
  <t><xref target="background"/> describes the device constraints, use cases, and design principles that informed the structure of the manifest.</t>
  <t><xref target="metadata-structure-overview"/> gives a general overview of the metadata structure to inform the following sections</t>
  <t><xref target="interpreter-behavior"/> describes what actions a Manifest processor should take.</t>
  <t><xref target="creating-manifests"/> describes the process of creating a Manifest.</t>
  <t><xref target="metadata-structure"/> specifies the content of the Envelope and the Manifest.</t>
</list></t>

<t>To implement an updatable device, see <xref target="interpreter-behavior"/> and <xref target="metadata-structure"/>.
To implement a tool that generates updates, see <xref target="creating-manifests"/> and <xref target="metadata-structure"/>.</t>

<t>The IANA consideration section, see <xref target="iana"/>, provides instructions to IANA to create several registries. This section also provides the CBOR labels for the structures defined in this document.</t>

<t>The complete CDDL (<xref target="RFC8610"/>) definition is provided in <xref target="full-cddl"/>, examples are given in <xref target="examples"/> and a design rationale is offered in <xref target="design-rationale"/>. Finally, <xref target="implementation-matrix"/> summarizes the mandatory-to-implement features of this specification.</t>

<t>Additional specifications describe functionality needed to implement all of the requirements of <xref target="RFC9124"/>, such as:</t>

<t><list style="symbols">
  <t>Firmware encryption <xref target="I-D.ietf-suit-firmware-encryption"/></t>
  <t>Update management <xref target="I-D.ietf-suit-update-management"/></t>
  <t>Dependency manifests <xref target="I-D.ietf-suit-trust-domains"/></t>
  <t>Secure reporting of the update status <xref target="I-D.ietf-suit-report"/></t>
</list></t>

<t>A technique to compress firmware images may be standardized in the future.</t>

</section>
<section anchor="background"><name>Background</name>

<t>Distributing software updates to diverse devices with diverse trust anchors in a coordinated system presents unique challenges. Devices have a broad set of constraints, requiring different metadata to make appropriate decisions. There may be many actors in production IoT systems, each of whom has some authority. Distributing firmware in such a multi-party environment presents additional challenges. Each party requires a different subset of data. Some data may not be accessible to all parties. Multiple signatures may be required from parties with different authorities. This topic is covered in more depth in <xref target="RFC9019"/>. The security aspects are described in <xref target="RFC9124"/>.</t>

<section anchor="iot-firmware-update-constraints"><name>IoT Firmware Update Constraints</name>

<t>The various constraints of IoT devices and the range of use cases that need to be supported create a broad set of requirements. For example, devices with:</t>

<t><list style="symbols">
  <t>limited processing power and storage may require a simple representation of metadata.</t>
  <t>bandwidth constraints may require firmware compression or partial update support.</t>
  <t>intermittent or unstable connectivity.</t>
  <t>intermittent power, for example due to energy harvesting.</t>
  <t>bootloader complexity constraints may require simple selection between two bootable images.</t>
  <t>small internal storage may require external storage support.</t>
  <t>multiple microcontrollers may require coordinated update of all applications.</t>
  <t>large storage and complex functionality may require parallel update of many software components.</t>
  <t>extra information may need to be conveyed in the manifest in the earlier stages of the device lifecycle before those data items are stripped when the manifest is delivered to a constrained device.</t>
</list></t>

<t>Supporting the requirements introduced by the constraints on IoT devices requires the flexibility to represent a diverse set of possible metadata, but also requires that the encoding is kept simple.</t>

</section>
<section anchor="suit-workflow-model"><name>SUIT Workflow Model</name>

<t>There are several fundamental assumptions that inform the model of Update Procedure workflow:</t>

<t><list style="symbols">
  <t>Compatibility must be checked before any other operation is performed.</t>
  <t>In some applications, payloads must be fetched and validated prior to installation.</t>
</list></t>

<t>There are several fundamental assumptions that inform the model of the Invocation Procedure workflow:</t>

<t><list style="symbols">
  <t>Compatibility must be checked before any other operation is performed.</t>
  <t>All payloads must be validated prior to loading.</t>
  <t>All loaded images must be validated prior to execution.</t>
</list></t>

<t>Based on these assumptions, the manifest is structured to work with a pull parser, where each section of the manifest is used in sequence. The expected workflow for a Recipient installing an update can be broken down into five steps:</t>

<t><list style="numbers" type="1">
  <t>Verify the signature of the manifest.</t>
  <t>Verify the applicability of the manifest.</t>
  <t>Fetch payload(s).</t>
  <t>Install payload(s).</t>
  <t>Verify image(s).</t>
</list></t>

<t>When installation is complete, similar information can be used for validating and invoking images in a further three steps:</t>

<t><list style="numbers" type="1">
  <t>Verify image(s).</t>
  <t>Load image(s).</t>
  <t>Invoke image(s).</t>
</list></t>

<t>If verification and invocation is implemented in a bootloader, then the bootloader <bcp14>MUST</bcp14> also verify the signature of the manifest and the applicability of the manifest in order to implement secure boot workflows. Because signature verifications can be costly in constrained applications, the bootloader may add its own authentication, e.g., a Message Authentication Code (MAC), to the manifest in order to prevent further signature verifications and save energy, provided that the bootloader can protect its authentication key.</t>

</section>
</section>
<section anchor="metadata-structure-overview"><name>Metadata Structure Overview</name>

<t>This section provides a high level overview of the manifest structure. The full description of the manifest structure is in <xref target="manifest-structure"/></t>

<t>The manifest is structured from several key components:</t>

<t><list style="numbers" type="1">
  <t>The Envelope (see <xref target="ovr-envelope"/>) contains the Authentication Block, the Manifest, any Severable Elements, and any Integrated Payloads.</t>
  <t>The Authentication Block (see <xref target="ovr-auth"/>) contains a list of signatures or MACs of the manifest.</t>
  <t>The Manifest (see <xref target="ovr-manifest"/>) contains all critical, non-severable metadata that the Recipient requires. It is further broken down into:  <list style="numbers" type="1">
      <t>Critical metadata, such as sequence number.</t>
      <t>Common metadata, such as affected components.</t>
      <t>Command sequences, directing the Recipient how to install and use the payload(s).</t>
      <t>Integrity check values for severable elements.</t>
    </list></t>
  <t>Severable elements (see <xref target="ovr-severable"/>).</t>
  <t>Integrated payloads (see <xref target="ovr-integrated"/>).</t>
</list></t>

<t>The diagram below illustrates the hierarchy of the Envelope.</t>

<figure><artwork><![CDATA[
+-------------------------+
| Envelope                |
+-------------------------+
| Authentication Block    |
| Manifest           --------------> +------------------------------+
| Severable Elements      |          | Manifest                     |
| Integrated Payloads     |          +------------------------------+
+-------------------------+          | Structure Version            |
                                     | Sequence Number              |
                                     | Reference to Full Manifest   |
                               +------ Common Structure             |
                               | +---- Command Sequences            |
+-------------------------+    | |   | Digests of Envelope Elements |
| Common Structure        | <--+ |   +------------------------------+
+-------------------------+      |
| Components IDs          |      +-> +-----------------------+
| Common Command Sequence ---------> | Command Sequence      |
+-------------------------+          +-----------------------+
                                     | List of ( pairs of (  |
                                     |   * command code      |
                                     |   * argument /        |
                                     |      reporting policy |
                                     | ))                    |
                                     +-----------------------+
]]></artwork></figure>

<section anchor="ovr-envelope"><name>Envelope</name>

<t>The SUIT Envelope is a container that encloses the Authentication Block, the Manifest, any Severable Elements, and any integrated payloads. The Envelope is used instead of conventional cryptographic envelopes, such as COSE_Envelope because it allows modular processing, severing of elements, and integrated payloads in a way that avoids substantial complexity that would be needed with existing solutions. See <xref target="design-rationale-envelope"/> for a description of the reasoning for this.</t>

<t>See <xref target="envelope"/> for more detail.</t>

</section>
<section anchor="ovr-auth"><name>Authentication Block</name>

<t>The Authentication Block contains a bstr-wrapped SUIT Digest Container, see <xref target="SUIT_Digest"/>, and one or more <xref target="RFC9052"/> CBOR Object Signing and Encryption (COSE) authentication blocks. These blocks are one of:</t>

<t><list style="symbols">
  <t>COSE_Sign_Tagged</t>
  <t>COSE_Sign1_Tagged</t>
  <t>COSE_Mac_Tagged</t>
  <t>COSE_Mac0_Tagged</t>
</list></t>

<t>Each of these objects is used in detached payload mode. The detached payload bytes are the CBOR encoding of the SUIT_Digest array, carried as the contents of the first byte string in SUIT_Authentication (<xref target="authentication-info"/>).</t>

<t>See <xref target="authentication-info"/> for more detail.</t>

</section>
<section anchor="ovr-manifest"><name>Manifest</name>

<t>The Manifest contains most metadata about one or more images. The Manifest is divided into Critical Metadata, Common Metadata, Command Sequences, and Integrity Check Values.</t>

<t>See <xref target="manifest-structure"/> for more detail.</t>

<section anchor="ovr-critical"><name>Critical Metadata</name>

<t>Some metadata needs to be accessed before the manifest is processed. This metadata can be used to determine which manifest is newest and whether the structure version is supported. It also <bcp14>MAY</bcp14> provide a URI for obtaining a canonical copy of the manifest and Envelope.</t>

<t>See <xref target="manifest-version"/>, <xref target="manifest-seqnr"/>, and <xref target="manifest-reference-uri"/> for more detail.</t>

</section>
<section anchor="ovr-common"><name>Common</name>

<t>Some metadata is used repeatedly and in more than one command sequence. In order to reduce the size of the manifest, this metadata is collected into the Common section. Common is composed of two parts: a list of components referenced by the manifest, and a command sequence to execute prior to each other command sequence. The common command sequence is typically used to set commonly used values and perform compatibility checks. The common command sequence <bcp14>MUST NOT</bcp14> have any side-effects outside of setting parameter values.</t>

<t>See <xref target="manifest-common"/> for more detail.</t>

</section>
<section anchor="ovr-commands"><name>Command Sequences</name>

<t>Command sequences provide the instructions that a Recipient requires in order to install or use an image. These sequences tell a device to set parameter values, test system parameters, copy data from one place to another, transform data, digest data, and run code.</t>

<t>Command sequences are broken up into three groups: Common Command Sequence (see <xref target="ovr-common"/>), update commands, and secure boot commands.</t>

<t>Update Command Sequences are: Payload Fetch, Payload Installation and, System Validation. An Update Procedure is the complete set of each Update Command Sequence, each preceded by the Common Command Sequence.</t>

<t>Invocation Command Sequences are: System Validation, Image Loading, and Image Invocation. An Invocation Procedure is the complete set of each Invocation Command Sequence, each preceded by the Common Command Sequence.</t>

<t>Command Sequences are grouped into these sets to ensure that there is common coordination between dependencies and dependents on when to execute each command (dependencies are not defined in this specification).</t>

<t>See <xref target="manifest-commands"/> for more detail.</t>

</section>
<section anchor="ovr-integrity"><name>Integrity Check Values</name>

<t>To enable severable elements <xref target="ovr-severable"/>, there needs to be a mechanism to verify the integrity of the severed data. While the severed data stays outside the manifest, for efficiency reasons, Integrity Check Values are used to include the digest of the data in the manifest. Note that Integrated Payloads, see <xref target="ovr-integrated"/>, are integrity-checked using Command Sequences.</t>

<t>See <xref target="integrity-checks"/> for more detail.</t>

</section>
<section anchor="ovr-text"><name>Human-Readable Text</name>

<t>Text is typically a Severable Element (<xref target="ovr-severable"/>). It contains all the text that describes the update. Because text is explicitly for human consumption, it is all grouped together so that it can be Severed easily. The text section has space both for describing the manifest as a whole and for describing each individual component.</t>

<t>See <xref target="manifest-digest-text"/> for more detail.</t>

</section>
</section>
<section anchor="ovr-severable"><name> Severable Elements</name>

<t>Severable Elements are elements of the Envelope (<xref target="ovr-envelope"/>) that have Integrity Check Values (<xref target="ovr-integrity"/>) in the Manifest (<xref target="ovr-manifest"/>). This is a form of elision of hashed data. The elements in the envelope are verified by Integrity Check Values and therefore cannot be replaced with other elements even if they are authenticated elements.</t>

<t>Because of this organisation, these elements can be discarded or "Severed" from the Envelope without changing the signature of the Manifest. This allows savings based on the size of the Envelope in several scenarios, for example:</t>

<t><list style="symbols">
  <t>A management system severs the Text sections before sending an Envelope to a constrained Recipient, which saves Recipient bandwidth.</t>
  <t>A Recipient severs the Installation section after installing the Update, which saves storage space.</t>
</list></t>

<t>See <xref target="severable-fields"/> for more detail.</t>

</section>
<section anchor="ovr-integrated"><name>Integrated Payloads</name>

<t>In some cases, it is beneficial to include a payload in the Envelope of a manifest. For example:</t>

<t><list style="symbols">
  <t>When an update is delivered via a comparatively unconstrained medium, such as a removable mass storage device, it may be beneficial to bundle updates into single files.</t>
  <t>When a manifest transports a small payload, such as an encrypted key, that payload may be placed in the manifest's envelope.</t>
</list></t>

<t>See <xref target="template-integrated-payload"/> for more detail.</t>

</section>
</section>
<section anchor="interpreter-behavior"><name>Manifest Processor Behavior</name>

<t>This section describes the behavior of the manifest processor and focuses primarily on interpreting commands in the manifest. However, there are several other important behaviors of the manifest processor: encoding version detection, rollback protection, and authenticity verification are chief among these.</t>

<section anchor="interpreter-setup"><name>Manifest Processor Setup</name>

<t>Prior to executing any command sequence, the manifest processor or its host application <bcp14>MUST</bcp14> inspect the manifest version field and fail when it encounters an unsupported encoding version. Next, the manifest processor or its host application <bcp14>MUST</bcp14> extract the manifest sequence number and perform a rollback check using this sequence number. The exact logic of rollback protection may vary by application, but it has the following properties:</t>

<t><list style="symbols">
  <t>Whenever the manifest processor can choose between several manifests, it <bcp14>MUST</bcp14> select the latest valid, authentic manifest.</t>
  <t>If the latest valid, authentic manifest fails, it <bcp14>MAY</bcp14> select the next latest valid, authentic manifest, according to application-specific policy.</t>
</list></t>

<t>Here, valid means that a manifest has a supported encoding version and it has not been excluded for other reasons. Reasons for excluding typically involve first executing the manifest and may include:</t>

<t><list style="symbols">
  <t>Test failed (e.g., Vendor ID/Class ID).</t>
  <t>Unsupported command encountered.</t>
  <t>Unsupported parameter encountered.</t>
  <t>Unsupported Component Identifier encountered.</t>
  <t>Payload not available.</t>
  <t>Application crashed when executed.</t>
  <t>Watchdog timeout occurred.</t>
  <t>Payload verification failed.</t>
  <t>Missing required component from a Component Set.</t>
  <t>Required parameter not supplied.</t>
</list></t>

<t>A Manifest Processor <bcp14>MUST NOT</bcp14> silently ignore functionality that a Recipient is required to process, including commands, conditions, parameters, or other required processing functionality, when the Manifest Processor does not support that functionality. It <bcp14>MUST</bcp14> report a failure according to the processing context in which the unsupported functionality is encountered. Conditions and Directives share a single namespace making unsupported conditions and directives indistinguishable from each other. Consequently, if a Manifest Processor attempts to execute an unsupported command, it <bcp14>MUST</bcp14> Abort the current Procedure, regardless of the value of suit-parameter-soft-failure. This rule does not require processing of metadata that its defining specification explicitly permits the Recipient to ignore, not consume, or sever at the applicable processing stage.</t>

<t>These failure reasons <bcp14>MAY</bcp14> be combined with retry mechanisms prior to marking a manifest as invalid.</t>

<t>Selecting an older manifest in the event of failure of the latest valid manifest is one possible strategy to provide robustness of the firmware update process. It may not be appropriate for all applications. In particular Trusted Execution Environments <bcp14>MAY</bcp14> require a failure to invoke a new installation, rather than a rollback approach. See <xref section="4.2.1" sectionFormat="comma" target="RFC9124"/> for more discussion on the security considerations that apply to rollback.</t>

<t>Following these initial tests, the manifest processor clears all parameter storage. This ensures that the manifest processor begins without any leaked data.</t>

</section>
<section anchor="required-checks"><name> Required Checks</name>

<t>The manifest processor <bcp14>MUST</bcp14> verify the signature of the manifest prior to parsing/executing any section of the manifest. This guards the parser against arbitrary input by unauthenticated third parties. When validating authenticity of manifests, the manifest processor <bcp14>MAY</bcp14> use an ACL (see <xref target="access-control-lists"/>) to determine the extent of the rights conferred by that authenticity.</t>

<t>Once a valid, authentic manifest has been selected, the manifest processor <bcp14>MUST</bcp14> examine the component list and
check that the number of components listed in the manifest is not larger than the number in the target system.</t>

<t>For each listed component, the manifest processor <bcp14>MUST</bcp14> provide storage for the supported parameters. If the manifest processor does not have sufficient temporary storage to process the parameters for all components, it <bcp14>MAY</bcp14> process components serially for each command sequence. See <xref target="serial-processing"/> for more details.</t>

<t>The manifest processor <bcp14>SHOULD</bcp14> check that the shared sequence contains at least Check Vendor Identifier command and at least one Check Class Identifier command.</t>

<t>Because the shared sequence contains Check Vendor Identifier and Check Class Identifier command(s), no custom commands are permitted in the shared sequence. This ensures that any custom commands are only executed by devices that understand them.</t>

<t>If the manifest contains more than one component, each command sequence <bcp14>MUST</bcp14> begin with a Set Component Index <xref target="suit-directive-set-component-index"/>.</t>

<t>If a Recipient supports groups of interdependent components (a Component Set), then it <bcp14>SHOULD</bcp14> verify that all Components in the Component Set are specified by one update, that is:</t>

<t><list style="numbers" type="1">
  <t>the manifest Author has sufficient permissions for the requested operations (see <xref target="access-control-lists"/>) and</t>
  <t>the manifest specifies a digest and a payload for every Component in the Component Set.</t>
</list></t>

</section>
<section anchor="interpreter-fundamental-properties"><name>Interpreter Fundamental Properties</name>

<t>The interpreter has a small set of design goals:</t>

<t><list style="numbers" type="1">
  <t>Executing an update <bcp14>MUST</bcp14> either result in an error, or a correct system state that can be checked against known digests.</t>
  <t>Executing a Trusted Invocation <bcp14>MUST</bcp14> either result in an error, or an invoked image.</t>
  <t>Executing the same manifest on multiple Recipients <bcp14>MUST</bcp14> result in the same system state.</t>
</list></t>

<t>NOTE: when using A/B images, the manifest functions as two (or more) logical manifests, each of which applies to a system in a particular starting state. With that provision, design goal 3 holds.</t>

<section anchor="resilience-to-disruption"><name>Resilience to Disruption</name>

<t>As required in <xref section="3" sectionFormat="of" target="RFC9019"/> and as an extension of design goal 1, devices must remain operable after a disruption, such as a power failure or network interruption, interrupts the update process.</t>

<t>The manifest processor must be resilient to these faults. In order to enable this resilience, systems implementing the manifest processor <bcp14>MUST</bcp14> guarantee that manifests can be either resumed or reapplied.</t>

<t>This can be achieved in a variety of ways:
1. A fallback/recovery image is provided so that a disrupted system can apply the SUIT Manifest again.
2. Manifest Authors construct Manifests in such a way that repeated partial invocations of any Manifest always results in a correct system state. Typically this is done by using Try-Each and Conditions to bypass operations that have already been completed.
3. A journal of manifest operations is stored in nonvolatile memory. The journal enables the parser to re-create the state just prior to the disruption. This journal can, for example, be a SUIT Report or a journaling file system.
4. Where a command is not repeatable because of the way in which it alters system state (e.g., swapping images or in-place delta) it is resumable or revertible. This applies primarily to commands that modify at least one source component as well as the destination component.</t>

</section>
</section>
<section anchor="command-behavior"><name>Abstract Machine Description</name>

<t>The heart of the manifest is the list of commands, which are processed by a Manifest Processor -- a form of interpreter. This Manifest Processor can be modeled as a simple abstract machine. This machine consists of several data storage locations that are modified by commands.</t>

<t>There are two types of commands, namely those that modify state (directives) and those that perform tests (conditions). Parameters are used as the inputs to commands. Some directives offer control flow operations. Directives target a specific component. A component is a unit of code or data that can be targeted by an update. Components are identified by Component Identifiers, but referenced in commands by Component Index; Component Identifiers are arrays of binary strings and a Component Index is an index into the array of Component Identifiers.</t>

<t>Conditions <bcp14>MUST NOT</bcp14> have any side-effects other than informing the interpreter of success or failure. The Interpreter does not Abort if the Soft Failure flag (<xref target="suit-parameter-soft-failure"/>) is set when a Condition reports failure.</t>

<t>Directives <bcp14>MAY</bcp14> have side-effects in the parameter table, the interpreter state, or the current component. The Interpreter <bcp14>MUST</bcp14> Abort if a Directive reports failure regardless of the Soft Failure flag.</t>

<t>To simplify the logic describing the command semantics, the object "current" is used. It represents the component identified by the Component Index:</t>

<figure><artwork><![CDATA[
current := components[component-index]
]]></artwork></figure>

<t>As a result, Set Component Index is described as current := components[arg].</t>

<t>The following table describes the semantics of each operation. The pseudo-code semantics are inspired by the Python programming language.</t>

<texttable>
      <ttcol align='left'>pseudo-code operation</ttcol>
      <ttcol align='left'>Semantics</ttcol>
      <c>assert(test)</c>
      <c>When test is false, causes an error return</c>
      <c>store(dest, source)</c>
      <c>Writes source into dest</c>
      <c>expression0 for-each e in l else expression1</c>
      <c>Performs expression0 once for each element in iterable l; performs expression1 if no break is encountered</c>
      <c>break</c>
      <c>halt a for-each loop</c>
      <c>now()</c>
      <c>return the current UTC time</c>
      <c>expression if test</c>
      <c>performs expression if test is true</c>
</texttable>

<t>The following table describes the behavior of each command. "params" represents the parameters for the current component. Most commands operate on a component.</t>

<texttable>
      <ttcol align='left'>Command Name</ttcol>
      <ttcol align='left'>Semantic of the Operation</ttcol>
      <c>Check Vendor Identifier</c>
      <c>assert(binary-match(current, current.params[vendor-id]))</c>
      <c>Check Class Identifier</c>
      <c>assert(binary-match(current, current.params[class-id]))</c>
      <c>Verify Image</c>
      <c>assert(binary-match(digest(current), current.params[digest]))</c>
      <c>Check Content</c>
      <c>assert(binary-match(current, current.params[content]))</c>
      <c>Set Component Index</c>
      <c>current := components[arg]</c>
      <c>Override Parameters</c>
      <c>current.params[k] := v for-each k,v in arg</c>
      <c>Invoke</c>
      <c>invoke(current)</c>
      <c>Fetch</c>
      <c>store(current, fetch(current.params[uri]))</c>
      <c>Write</c>
      <c>store(current, current.params[content])</c>
      <c>Use Before</c>
      <c>assert(now() &lt; arg)</c>
      <c>Check Component Slot</c>
      <c>assert(current.slot-index == arg)</c>
      <c>Check Device Identifier</c>
      <c>assert(binary-match(current, current.params[device-id]))</c>
      <c>Abort</c>
      <c>assert(0)</c>
      <c>Try Each</c>
      <c>(break if (exec(seq) is not error)) for-each seq in arg else assert(0)</c>
      <c>Copy</c>
      <c>store(current, current.params[src-component])</c>
      <c>Swap</c>
      <c>swap(current, current.params[src-component])</c>
      <c>Run Sequence</c>
      <c>exec(arg)</c>
      <c>Invoke with Arguments</c>
      <c>invoke(current, arg)</c>
</texttable>

</section>
<section anchor="index-true"><name>Special Cases of Component Index</name>

<t>Component Index can take on one of three types:</t>

<t><list style="numbers" type="1">
  <t>Integer</t>
  <t>Array of integers</t>
  <t>True</t>
</list></t>

<t>Integers <bcp14>MUST</bcp14> always be supported by Set Component Index. Arrays of integers <bcp14>MUST</bcp14> be supported by Set Component Index if the Recipient supports 3 or more components. True <bcp14>MUST</bcp14> be supported by Set Component Index if the Recipient supports 2 or more components. Each of these operates on the list of components declared in the manifest.</t>

<t>Integer indices are the default case as described in the previous section. An array of integers represents a list of the components (Set Component Index) to which each subsequent command applies. The value True replaces the list of component indices with the full list of components, as defined in the manifest.</t>

<t>When a command is executed, it</t>

<t><list style="numbers" type="1">
  <t>operates on the component identified by the component index if that index is an integer, or</t>
  <t>it operates on each component identified by an array of indicies, or</t>
  <t>it operates on every component if the index is the boolean True.</t>
</list></t>

<t>This is described by the following pseudocode:</t>

<figure><artwork><![CDATA[
if component-index is True:
    current-list = components
else if component-index is array:
    current-list = [ components[idx] for idx in component-index ]
else:
    current-list = [ components[component-index] ]
for current in current-list:
    cmd(current)
]]></artwork></figure>

<t>Try Each and Run Sequence are affected in the same way as other commands: they are invoked once for each possible Component. This means that the sequences that are arguments to Try Each and Run Sequence are not invoked with Component Index = True, nor are they invoked with array indices. They are only invoked with integer indices. The interpreter loops over the whole sequence, setting the Component Index to each index in turn.</t>

</section>
<section anchor="serial-processing"><name>Serialized Processing Interpreter</name>

<t>In highly constrained devices, where storage for parameters is limited, the manifest processor <bcp14>MAY</bcp14> handle one component at a time, traversing the manifest tree once for each listed component. In this mode, the interpreter ignores any commands executed while the component index is not the current component. This reduces the overall volatile storage required to process the update so that the only limit on number of components is the size of the manifest. However, this approach requires additional processing power.</t>

<t>In order to operate in this mode, the manifest processor loops on each section for every supported component, simply ignoring commands when the current component is not selected.</t>

<t>When a serialized Manifest Processor encounters a component index of True, it does not ignore any commands. It applies them to the current component on each iteration.</t>

</section>
<section anchor="parallel-processing"><name>Parallel Processing Interpreter</name>

<t>To enable parallel or out-of-order processing of Command Sequences, Recipients <bcp14>MAY</bcp14> make use of the Strict Order parameter. The Strict Order parameter indicates to the Manifest Processor that Commands <bcp14>MUST</bcp14> be executed strictly in order. When the Strict Order parameter is False, this indicates to the Manifest Processor that Commands <bcp14>MAY</bcp14> be executed in parallel and/or out of order.</t>

<t>To perform parallel processing, once the Strict Order parameter is set to False, the Recipient <bcp14>MAY</bcp14> add each command to an issue queue for parallel processing or an issue pool for out-of-order processing. The Manifest Processor then executes these pending commands in whatever order or parallelism it deems appropriate. Once there are no more commands to add to the issue queue/pool, the Manifest Processor drains the issue queue/pool by issuing all pending commands and waits for every issued command to complete. The Manifest Processor <bcp14>MAY</bcp14> issue commands before it has completed adding all remaining commands to the issue queue/pool.</t>

<t>While adding commands to the issue queue or pool, if the Manifest Processor encounters any of the following commands, it <bcp14>MUST</bcp14> treat the command as a barrier, draining the issue queue/pool and waiting for all issued commands to complete.</t>

<t><list style="symbols">
  <t>Override Parameters.</t>
  <t>Set Strict Order = True.</t>
  <t>Set Component Index.</t>
</list></t>

<t>Extensions <bcp14>MAY</bcp14> alter this list. Once all issued commands have completed, the Manifest Processor issues the barrier command, after which it may resume parallel processing if Strict Order is still False.</t>

<t>A Component <bcp14>MUST NOT</bcp14> be both a target of an operation and a source of data (for example, in Copy or Swap) in a Command Sequence where Strict Order is False. This would cause a race condition if the Component is written to, then later read from. The Manifest Processor <bcp14>MUST</bcp14> issue an Abort if it detects this exception.</t>

<t>To perform more useful parallel operations, a manifest author may collect sequences of commands in a Run Sequence command. Then, each of these sequences <bcp14>MAY</bcp14> be run in parallel. There are several invocation options for Run Sequence:</t>

<t><list style="symbols">
  <t>Component Index is a positive integer, Strict Order is False: Strict Order is set to True before the sequence argument is run. The sequence argument <bcp14>MUST</bcp14> begin with set-component-index.</t>
  <t>Component Index is true or an array of positive integers, Strict Order is False: The sequence argument is run once for each component (or each component in the array); the Manifest Processor presets the component index and Strict Order = True before each iteration of the sequence argument.</t>
  <t>Component Index is a positive integer, Strict Order is True: No special considerations</t>
  <t>Component Index is True or an array of positive integers, Strict Order is True: The sequence argument is run once for each component (or each component in the array); the Manifest Processor presets the component index before each iteration of the sequence argument.</t>
</list></t>

<t>These rules isolate each sequence from each other sequence, ensuring that they operate as expected. When Strict Order = False, any further Set Component Index directives in the Run Sequence command sequence argument <bcp14>MUST</bcp14> cause an Abort. This allows the interpreter that issues Run Sequence commands to check that the first element is correct, then issue the sequence to a parallel execution context to handle the remainder of the sequence.</t>

</section>
</section>
<section anchor="creating-manifests"><name>Creating Manifests</name>

<t>Manifests are created using tools for constructing COSE structures, calculating cryptographic values and compiling desired system state into a sequence of operations required to achieve that state. The process of constructing COSE structures and the calculation of cryptographic values is covered in <xref target="RFC9052"/>.</t>

<t>Compiling desired system state into a sequence of operations can be accomplished in many ways. Several templates are provided below to cover common use-cases. These templates can be combined to produce more complex behavior.</t>

<t>The author <bcp14>MUST</bcp14> ensure that all parameters consumed by a command are set prior to invoking that command. Where Component Index = True, this means that the parameters consumed by each command <bcp14>MUST</bcp14> have been set for each Component.</t>

<t>This section details a set of templates for creating manifests. These templates explain which parameters, commands, and orders of commands are necessary to achieve a stated goal.</t>

<t>NOTE: On systems that support only a single component, Set Component Index has no effect and can be omitted.</t>

<t>NOTE: <strong>A digest <bcp14>MUST</bcp14> always be set using Override Parameters.</strong></t>

<section anchor="template-compatibility-check"><name>Compatibility Check Template</name>

<t>The goal of the compatibility check template ensure that Recipients only install compatible images.</t>

<t>In this template all information is contained in the shared sequence and the following sequence of commands is used:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>) for Vendor ID and Class ID (see <xref target="secparameters"/>)</t>
  <t>Check Vendor Identifier condition (see <xref target="uuid-identifiers"/>)</t>
  <t>Check Class Identifier condition (see <xref target="uuid-identifiers"/>)</t>
</list></t>

</section>
<section anchor="template-secure-boot"><name>Trusted Invocation Template</name>

<t>The goal of the Trusted Invocation template is to ensure that only authorized code is invoked; such as in Secure Boot or when a Trusted Application is loaded into a TEE.</t>

<t>The following commands are placed into the shared sequence:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>) for Image Digest and Image Size (see <xref target="secparameters"/>)</t>
</list></t>

<t>The system validation sequence contains the following commands:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Check Image Match condition (see <xref target="suit-condition-image-match"/>)</t>
</list></t>

<t>Then, the run sequence contains the following commands:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Invoke directive (see <xref target="suit-directive-invoke"/>)</t>
</list></t>

</section>
<section anchor="firmware-download-template"><name>Component Download Template</name>

<t>The goal of the Component Download template is to acquire and store an image.</t>

<t>The following commands are placed into the shared sequence:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>) for Image Digest and Image Size (see <xref target="secparameters"/>)</t>
</list></t>

<t>Then, the install sequence contains the following commands:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>) for URI (see <xref target="suit-parameter-uri"/>)</t>
  <t>Fetch directive (see <xref target="suit-directive-fetch"/>)</t>
  <t>Check Image Match condition (see <xref target="suit-condition-image-match"/>)</t>
</list></t>

<t>The Fetch directive needs the URI parameter to be set to determine where the image is retrieved from. Additionally, the destination of where the component shall be stored has to be configured. The URI is configured via the Set Parameters directive while the destination is configured via the Set Component Index directive.</t>

</section>
<section anchor="template-install"><name>Install Template</name>

<t>The goal of the Install template is to use an image already stored in an identified component to copy into a second component.</t>

<t>This template is typically used with the Component Download template, however a modification to that template is required: the Component Download operations are moved from the Payload Install sequence to the Payload Fetch sequence.</t>

<t>Then, the install sequence contains the following commands:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>) for Source Component (see <xref target="suit-parameter-source-component"/>)</t>
  <t>Copy directive (see <xref target="suit-directive-copy"/>)</t>
  <t>Check Image Match condition (see <xref target="suit-condition-image-match"/>)</t>
</list></t>

</section>
<section anchor="template-integrated-payload"><name>Integrated Payload Template</name>

<t>The goal of the Integrated Payload template is to install a payload that is included in the manifest envelope. It is identical to the Component Download template (<xref target="firmware-download-template"/>).</t>

<t>An Author <bcp14>MAY</bcp14> choose to place a payload in the envelope of a manifest. The payload envelope key <bcp14>MUST</bcp14> be a string. The payload <bcp14>MUST</bcp14> be serialized in a bstr element.</t>

<t>The URI for a payload enclosed in this way <bcp14>MAY</bcp14> be expressed as a fragment-only reference, as defined in <xref section="4.4" sectionFormat="comma" target="RFC3986"/>, for example: "#device-model-v1.2.3.bin".</t>

<t>An intermediary, such as a Network Operator, <bcp14>MAY</bcp14> choose to pre-fetch a payload and add it to the manifest envelope, using the URI as the key.</t>

</section>
<section anchor="template-load-ext"><name>Load from Nonvolatile Storage Template</name>

<t>The goal of the Load from Nonvolatile Storage template is to load an image from a non-volatile component into a volatile component, for example loading a firmware image from external Flash into RAM.</t>

<t>The following commands are placed into the load sequence:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>) for Source Component (see <xref target="secparameters"/>)</t>
  <t>Copy directive (see <xref target="suit-directive-copy"/>)</t>
</list></t>

<t>As outlined in <xref target="command-behavior"/>, the Copy directive needs a source and a destination to be configured. The source is configured via Component Index (with the Set Parameters directive) and the destination is configured via the Set Component Index directive.</t>

</section>
<section anchor="a-b-template"><name>A/B Image Template</name>

<t>The goal of the A/B Image Template is to acquire, validate, and invoke one of two images, based on a test.</t>

<t>The following commands are placed in the common block:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Try Each
  <list style="symbols">
      <t>First Sequence:
      <list style="symbols">
          <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>, <xref target="secparameters"/>) for Slot A</t>
          <t>Check Slot Condition (see <xref target="suit-condition-component-slot"/>)</t>
          <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>) for Image Digest A and Image Size A (see <xref target="secparameters"/>)</t>
        </list></t>
      <t>Second Sequence:
      <list style="symbols">
          <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>, <xref target="secparameters"/>) for Slot B</t>
          <t>Check Slot Condition (see <xref target="suit-condition-component-slot"/>)</t>
          <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>) for Image Digest B and Image Size B (see <xref target="secparameters"/>)</t>
        </list></t>
    </list></t>
</list></t>

<t>The following commands are placed in the fetch block or install block</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Try Each
  <list style="symbols">
      <t>First Sequence:
      <list style="symbols">
          <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>, <xref target="secparameters"/>) for Slot A</t>
          <t>Check Slot Condition (see <xref target="suit-condition-component-slot"/>)</t>
          <t>Set Parameters directive (see <xref target="suit-directive-override-parameters"/>) for URI A (see <xref target="secparameters"/>)</t>
        </list></t>
      <t>Second Sequence:
      <list style="symbols">
          <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>, <xref target="secparameters"/>) for Slot B</t>
          <t>Check Slot Condition (see <xref target="suit-condition-component-slot"/>)</t>
          <t>Set Parameters directive (see <xref target="suit-directive-override-parameters"/>) for URI B (see <xref target="secparameters"/>)</t>
        </list></t>
    </list></t>
  <t>Fetch</t>
</list></t>

<t>If Trusted Invocation (<xref target="template-secure-boot"/>) is used, only the run sequence is added to this template, since the shared sequence is populated by this template:</t>

<t><list style="symbols">
  <t>Set Component Index directive (see <xref target="suit-directive-set-component-index"/>)</t>
  <t>Try Each
  <list style="symbols">
      <t>First Sequence:
      <list style="symbols">
          <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>, <xref target="secparameters"/>) for Slot A</t>
          <t>Check Slot Condition (see <xref target="suit-condition-component-slot"/>)</t>
        </list></t>
      <t>Second Sequence:
      <list style="symbols">
          <t>Override Parameters directive (see <xref target="suit-directive-override-parameters"/>, <xref target="secparameters"/>) for Slot B</t>
          <t>Check Slot Condition (see <xref target="suit-condition-component-slot"/>)</t>
        </list></t>
    </list></t>
  <t>Invoke</t>
</list></t>

<t>NOTE: Any test can be used to select between images, Check Slot Condition is used in this template because it is a typical test for execute-in-place devices.</t>

</section>
</section>
<section anchor="metadata-structure"><name>Metadata Structure</name>

<t>The metadata for SUIT updates is composed of several primary constituent parts: Authentication Information, Manifest, Severable Elements and Integrated Payloads.</t>

<t>For a diagram of the metadata structure, see <xref target="metadata-structure-overview"/>.</t>

<section anchor="encoding"><name>Encoding Considerations</name>

<t>The map indices in the envelope encoding are reset to 1 for each map within the structure. This is to keep the indices as small as possible. The goal is to keep the index objects to single bytes (CBOR positive integers 1-23).</t>

<t>Wherever enumerations are used, they are started at 1. This allows detection of several common software errors that are caused by uninitialized variables. Positive numbers in enumerations are reserved for IANA registration. Negative numbers are used to identify application-specific values, as described in <xref target="iana"/>.</t>

<t>All elements of the envelope must be wrapped in a bstr to minimize the complexity of the code that evaluates the cryptographic integrity of the element and to ensure correct serialization for integrity and authenticity checks.</t>

<t>All CBOR maps in the Manifest and manifest envelope <bcp14>MUST</bcp14> be encoded with the canonical CBOR ordering as defined in <xref target="RFC8949"/>.</t>

</section>
<section anchor="envelope"><name>Envelope</name>

<t>The Envelope contains each of the other primary constituent parts of the SUIT metadata. It allows for modular processing of the manifest by ordering components in the expected order of processing.</t>

<t>The Envelope is encoded as a CBOR Map. Each element of the Envelope is enclosed in a bstr, which allows computation of a message digest against known bounds.</t>

</section>
<section anchor="authentication-info"><name>Authenticated Manifests</name>

<t>SUIT_Authentication contains a list of elements, which consist of a SUIT_Digest calculated over the manifest, and zero or more SUIT_Authentication_Block's calculated over the SUIT_Digest.</t>

<figure><sourcecode type="cddl-snippet"><![CDATA[
SUIT_Authentication = [
    bstr .cbor SUIT_Digest,
    * bstr .cbor SUIT_Authentication_Block
]
SUIT_Authentication_Block /= COSE_Mac_Tagged
SUIT_Authentication_Block /= COSE_Sign_Tagged
SUIT_Authentication_Block /= COSE_Mac0_Tagged
SUIT_Authentication_Block /= COSE_Sign1_Tagged
]]></sourcecode></figure>

<t>The SUIT_Digest is computed over the bstr-wrapped SUIT_Manifest that is present in the SUIT_Envelope at the suit-manifest key. The SUIT_Digest <bcp14>MUST</bcp14> always be present. The Manifest Processor requires a SUIT_Authentication_Block to be present. The manifest <bcp14>MUST</bcp14> be protected from tampering between the time of creation and the time of signing/MACing.</t>

<t>The SUIT_Authentication_Block is computed using detached payloads as described in <xref target="RFC9052"/>. In each case, the detached payload bytes are the contents of the first byte string in SUIT_Authentication, namely the CBOR encoding of the SUIT_Digest array. These bytes form the value of the payload field in Sig_structure or MAC_structure, whose byte-string encoding is supplied when that structure is encoded. No additional byte-string wrapper is included in the detached payload bytes. The payload field in the transmitted COSE object is nil.</t>

<t>Signers (or MAC calculators) <bcp14>MUST</bcp14> verify the SUIT_Digest prior to performing the cryptographic computation to avoid "Time-of-check to time-of-use" type of attack. When multiple SUIT_Authentication_Blocks are present, then each  SUIT_Authentication_Block <bcp14>MUST</bcp14> be computed over the same SUIT_Digest but using a different algorithm or signing/MAC authority. This feature also allows to transition to new algorithms, such as post-quantum cryptography (PQC) algorithms.</t>

<t>The SUIT_Authentication structure <bcp14>MUST</bcp14> come before the suit-manifest element, regardless of canonical encoding of CBOR. The algorithms used in SUIT_Authentication are defined by the profiles declared in <xref target="I-D.ietf-suit-mti"/>.</t>

</section>
<section anchor="manifest-structure"><name>Manifest</name>

<t>The manifest contains:</t>

<t><list style="symbols">
  <t>a version number (see <xref target="manifest-version"/>)</t>
  <t>a sequence number (see <xref target="manifest-seqnr"/>)</t>
  <t>a reference URI (see <xref target="manifest-reference-uri"/>)</t>
  <t>a common structure with information that is shared between command sequences (see <xref target="manifest-common"/>)</t>
  <t>one or more lists of commands that the Recipient should perform (see <xref target="manifest-commands"/>)</t>
  <t>a reference to the full manifest (see <xref target="manifest-reference-uri"/>)</t>
  <t>human-readable text describing the manifest found in the SUIT_Envelope (see <xref target="manifest-digest-text"/>)</t>
</list></t>

<t>The Text section, or any Command Sequence of the Update Procedure (Image Fetch, Image Installation and, System Validation) can be either a CBOR structure or a SUIT_Digest. In each of these cases, the SUIT_Digest provides for a severable element. Severable elements are <bcp14>RECOMMENDED</bcp14> to implement. In particular, the human-readable text <bcp14>SHOULD</bcp14> be severable, since most useful text elements occupy more space than a SUIT_Digest, but are not needed by the Recipient. Because SUIT_Digest is a CBOR Array and each severable element is a CBOR bstr, it is straight-forward for a Recipient to determine whether an element has been severed. The key used for a severable element is the same in the SUIT_Manifest and in the SUIT_Envelope so that a Recipient can easily identify the correct data in the envelope. See <xref target="integrity-checks"/> for more detail.</t>

<section anchor="manifest-version"><name>suit-manifest-version</name>

<t>The suit-manifest-version indicates the version of serialization used to encode the manifest. Version 1 is the version described in this document. suit-manifest-version is <bcp14>REQUIRED</bcp14> to implement.</t>

</section>
<section anchor="manifest-seqnr"><name>suit-manifest-sequence-number</name>

<t>The suit-manifest-sequence-number is a monotonically increasing anti-rollback counter. Each Recipient <bcp14>MUST</bcp14> reject any manifest that has a sequence number lower than its current sequence number. For convenience, an implementer <bcp14>MAY</bcp14> use a UTC timestamp in seconds as the sequence number. suit-manifest-sequence-number is <bcp14>REQUIRED</bcp14> to implement.</t>

</section>
<section anchor="manifest-reference-uri"><name>suit-reference-uri</name>

<t>suit-reference-uri is a URI where a full version of this manifest can be found. This is convenient for allowing management systems to show the severed elements of a manifest when this URI is reported by a Recipient after installation.
This document is only concerned with the transport of a URI which is 
intended for machine readable uses, not human readable uses. The encoding is the same as CBOR
Tag 32, however the tag is omitted because it is implied by context.</t>

</section>
<section anchor="manifest-digest-text"><name>suit-text</name>

<t>suit-text <bcp14>SHOULD</bcp14> be a severable element. suit-text is a map of language identifiers (identical to Tag38 of RFC9290, Appendix A) to language-specific text maps. Each language-specific text map is a map containing two different types of pair:</t>

<t><list style="symbols">
  <t>integer =&gt; text</t>
  <t>SUIT_Component_Identifier =&gt; map</t>
</list></t>

<t>The SUIT_Text_Map is defined in the following CDDL.</t>

<figure><sourcecode type="cddl-snippet"><![CDATA[
tag38-ltag = text .regexp "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"

SUIT_Text_Map = {
    + tag38-ltag => SUIT_Text_LMap
}
SUIT_Text_LMap = {
    SUIT_Text_Keys,
    * SUIT_Component_Identifier => {
        SUIT_Text_Component_Keys
    }
}
]]></sourcecode></figure>

<t>Each SUIT_Component_Identifier =&gt; map entry contains a map of integer =&gt; text values. All SUIT_Component_Identifiers present in suit-text <bcp14>MUST</bcp14> also be present in suit-common (<xref target="manifest-common"/>).</t>

<t>suit-text contains all the human-readable information that describes any and all parts of the manifest, its payload(s) and its resource(s). The text section is typically severable, allowing manifests to be distributed without the text, since end-nodes do not require text. The meaning of each field is described below.</t>

<t>Each section <bcp14>MAY</bcp14> be present. If present, each section <bcp14>MUST</bcp14> be as described. Negative integer IDs are reserved for application-specific text values.</t>

<t>The following table describes the text fields available in suit-text:</t>

<texttable>
      <ttcol align='left'>CDDL Structure</ttcol>
      <ttcol align='left'>Description</ttcol>
      <c>suit-text-manifest-description</c>
      <c>Free text description of the manifest</c>
      <c>suit-text-update-description</c>
      <c>Free text description of the update</c>
      <c>suit-text-manifest-json-source</c>
      <c>The JSON-formatted document that was used to create the manifest</c>
      <c>suit-text-manifest-yaml-source</c>
      <c>The YAML-formatted document <xref target="YAML"/> that was used to create the manifest</c>
</texttable>

<t>The following table describes the text fields available in each map identified by a SUIT_Component_Identifier.</t>

<texttable>
      <ttcol align='left'>CDDL Structure</ttcol>
      <ttcol align='left'>Description</ttcol>
      <c>suit-text-vendor-name</c>
      <c>Free text vendor name</c>
      <c>suit-text-model-name</c>
      <c>Free text model name</c>
      <c>suit-text-vendor-domain</c>
      <c>The domain used to create the vendor-id condition (see <xref target="uuid-identifiers"/>)</c>
      <c>suit-text-model-info</c>
      <c>The information used to create the class-id condition (see <xref target="uuid-identifiers"/>)</c>
      <c>suit-text-component-description</c>
      <c>Free text description of each component in the manifest</c>
      <c>suit-text-component-version</c>
      <c>A free text representation of the component version</c>
</texttable>

<t>suit-text is <bcp14>OPTIONAL</bcp14> to implement.</t>

</section>
<section anchor="manifest-common"><name>suit-common</name>

<t>suit-common encodes all the information that is shared between each of the command sequences, including: suit-components, and suit-shared-sequence. suit-common is <bcp14>REQUIRED</bcp14> to implement.</t>

<t>suit-components is a list of <xref target="suit-component-identifier">SUIT_Component_Identifier</xref> blocks that specify the component identifiers that will be affected by the content of the current manifest. suit-components is <bcp14>REQUIRED</bcp14> to implement.</t>

<t>suit-shared-sequence is a SUIT_Command_Sequence to execute prior to executing any other command sequence. Typical actions in suit-shared-sequence include setting expected Recipient identity and image digests when they are conditional (see <xref target="suit-directive-try-each"/> and <xref target="a-b-template"/> for more information on conditional sequences). suit-shared-sequence is <bcp14>RECOMMENDED</bcp14> to implement. Whenever a parameter or Try Each command is required by more than one Command Sequence, placing that parameter or command in suit-shared-sequence results in a smaller encoding.</t>

<section anchor="suit-component-identifier"><name>SUIT_Component_Identifier</name>

<t>A component is a unit of code or data that can be targeted by an update. To facilitate composite devices, components are identified by a list of CBOR byte strings, which allows construction of hierarchical component structures. Components are identified by Component Identifiers, but referenced in commands by Component Index; Component Identifiers are arrays of binary strings and a Component Index is an index into the array of Component Identifiers.</t>

<t>A Component Identifier can be trivial, such as the simple array [h'00']. It can also represent a filesystem path by encoding each segment of the path as an element in the list. For example, the path "/usr/bin/env" would encode to ['usr','bin','env'].</t>

<t>This hierarchical construction allows a component identifier to identify any part of a complex, multi-component system.</t>

</section>
</section>
<section anchor="manifest-commands"><name>SUIT_Command_Sequence</name>

<t>A SUIT_Command_Sequence defines a series of actions that the Recipient <bcp14>MUST</bcp14> take to accomplish a particular goal. These goals are defined in the manifest and include:</t>

<t><list style="numbers" type="1">
  <t>Payload Fetch: suit-payload-fetch is a SUIT_Command_Sequence to execute in order to obtain a payload. Some manifests may include these actions in the suit-install section instead if they operate in a streaming installation mode. This is particularly relevant for constrained devices without any temporary storage for staging the update. suit-payload-fetch is <bcp14>OPTIONAL</bcp14> to implement because it is not relevant in all bootloaders.</t>
  <t>Payload Installation: suit-install is a SUIT_Command_Sequence to execute in order to install a payload. Typical actions include verifying a payload stored in temporary storage, copying a staged payload from temporary storage, and unpacking a payload. suit-install is <bcp14>OPTIONAL</bcp14> to implement.</t>
  <t>Image Validation: suit-validate is a SUIT_Command_Sequence to execute in order to validate that the result of applying the update is correct. Typical actions involve image validation. suit-validate is <bcp14>REQUIRED</bcp14> to implement.</t>
  <t>Image Loading: suit-load is a SUIT_Command_Sequence to execute in order to prepare a payload for execution. Typical actions include copying an image from permanent storage into RAM, optionally including actions such as decryption or decompression. suit-load is <bcp14>OPTIONAL</bcp14> to implement.</t>
  <t>Invoke or Boot: suit-invoke is a SUIT_Command_Sequence to execute in order to invoke an image. suit-invoke typically contains a single instruction: the "invoke" directive, but may also contain an image condition. suit-invoke is <bcp14>OPTIONAL</bcp14> to implement because it not needed for restart-based invocation.</t>
</list></t>

<t>Goals 1,2,3 form the Update Procedure. Goals 3,4,5 form the Invocation Procedure.</t>

<t>Each Command Sequence follows exactly the same structure to ensure that the parser is as simple as possible.</t>

<t>Lists of commands are constructed from two kinds of element:</t>

<t><list style="numbers" type="1">
  <t>Conditions that <bcp14>MUST</bcp14> be true and any failure is treated as a failure of the update/load/invocation</t>
  <t>Directives that <bcp14>MUST</bcp14> be executed.</t>
</list></t>

<t>Each condition is composed of:</t>

<t><list style="numbers" type="1">
  <t>A command code identifier</t>
  <t>A <xref target="reporting-policy">SUIT_Reporting_Policy</xref></t>
</list></t>

<t>Each directive is composed of:</t>

<t><list style="numbers" type="1">
  <t>A command code identifier</t>
  <t>An argument block or a <xref target="reporting-policy">SUIT_Reporting_Policy</xref></t>
</list></t>

<t>Argument blocks are consumed only by flow-control directives:</t>

<t><list style="symbols">
  <t>Set Component Index</t>
  <t>Set/Override Parameters</t>
  <t>Try Each</t>
  <t>Run Sequence</t>
</list></t>

<t>Reporting policies provide a hint to the manifest processor of whether to add the success or failure of a command to any report that it generates.</t>

<t>Many conditions and directives apply to a given component, and these generally grouped together. Therefore, a special command to set the current component index is provided. This index is a numeric index into the Component Identifier table defined at the beginning of the manifest.</t>

<t>To facilitate optional conditions, a special directive, suit-directive-try-each (<xref target="suit-directive-try-each"/>), is provided. It runs several new lists of conditions/directives, one after another, that are contained as an argument to the directive. By default, it assumes that a failure of a condition should not indicate a failure of the update/invocation, but a parameter is provided to override this behavior. See suit-parameter-soft-failure (<xref target="suit-parameter-soft-failure"/>).</t>

</section>
<section anchor="reporting-policy"><name>Reporting Policy</name>

<t>To facilitate construction of Reports that describe the success or failure of a given Procedure, each command is given a Reporting Policy. This is an integer bitfield that follows the command and indicates what the Recipient should do with the Record of executing the command. The options are summarized in the table below.</t>

<texttable>
      <ttcol align='left'>Policy</ttcol>
      <ttcol align='left'>Description</ttcol>
      <c>suit-send-record-on-success</c>
      <c>Record when the command succeeds</c>
      <c>suit-send-record-on-failure</c>
      <c>Record when the command fails</c>
      <c>suit-send-sysinfo-success</c>
      <c>Add system information when the command succeeds</c>
      <c>suit-send-sysinfo-failure</c>
      <c>Add system information when the command fails</c>
</texttable>

<t>Any or all of these policies may be enabled at once.</t>

<t>At the completion of each command, a Manifest Processor <bcp14>MAY</bcp14> forward information about the command to a Reporting Engine, which is responsible for reporting boot or update status to a third party. The Reporting Engine is entirely implementation-defined, the reporting policy simply facilitates the Reporting Engine's interface to the SUIT Manifest Processor.</t>

<t>The information elements provided to the Reporting Engine are:</t>

<t><list style="symbols">
  <t>The reporting policy</t>
  <t>The result of the command</t>
  <t>The values of parameters consumed by the command</t>
  <t>The system information consumed by the command</t>
</list></t>

<t>The Reporting Engine consumes these information elements and decides whether to generate an entry in its report output and which information elements to include based on its internal policy decisions. The Reporting Engine uses the reporting policy provided to it by the SUIT Manifest Processor as a set of hints but <bcp14>MAY</bcp14> choose to ignore these hints and apply its own policy instead.</t>

<t>If the component index is set to True or an array when a command is executed with a non-zero reporting policy, then the Reporting Engine <bcp14>MUST</bcp14> receive one set of information elements for each Component, in the order expressed in the Components list or the Component Index array.</t>

<t>This specification does not define a particular format of Records or Reports. This specification only defines hints to the Reporting Engine for which information elements it should aggregate into the Report.</t>

<t>When used in a Invocation Procedure, the output of the Reporting Engine <bcp14>MAY</bcp14> form the basis of an attestation report. When used in an Update Process, the report <bcp14>MAY</bcp14> form the basis for one or more log entries.</t>

</section>
<section anchor="secparameters"><name>SUIT_Parameters</name>

<t>Many conditions and directives require additional information. That information is contained within parameters that can be set in a consistent way. This allows reuse of parameters between commands, thus reducing manifest size.</t>

<t>Most parameters are scoped to a specific component. This means that setting a parameter for one component has no effect on the parameters of any other component. The only exceptions to this are two Manifest Processor parameters: Strict Order and Soft Failure.</t>

<t>The defined manifest parameters are described below.</t>

<texttable>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>CDDL Structure</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>Vendor ID</c>
      <c>suit-parameter-vendor-identifier</c>
      <c><xref target="suit-parameter-vendor-identifier"/></c>
      <c>Class ID</c>
      <c>suit-parameter-class-identifier</c>
      <c><xref target="suit-parameter-class-identifier"/></c>
      <c>Device ID</c>
      <c>suit-parameter-device-identifier</c>
      <c><xref target="suit-parameter-device-identifier"/></c>
      <c>Image Digest</c>
      <c>suit-parameter-image-digest</c>
      <c><xref target="suit-parameter-image-digest"/></c>
      <c>Image Size</c>
      <c>suit-parameter-image-size</c>
      <c><xref target="suit-parameter-image-size"/></c>
      <c>Content</c>
      <c>suit-parameter-content</c>
      <c><xref target="suit-parameter-content"/></c>
      <c>Component Slot</c>
      <c>suit-parameter-component-slot</c>
      <c><xref target="suit-parameter-component-slot"/></c>
      <c>URI</c>
      <c>suit-parameter-uri</c>
      <c><xref target="suit-parameter-uri"/></c>
      <c>Source Component</c>
      <c>suit-parameter-source-component</c>
      <c><xref target="suit-parameter-source-component"/></c>
      <c>Invoke Args</c>
      <c>suit-parameter-invoke-args</c>
      <c><xref target="suit-parameter-invoke-args"/></c>
      <c>Fetch Arguments</c>
      <c>suit-parameter-fetch-arguments</c>
      <c><xref target="suit-parameter-fetch-arguments"/></c>
      <c>Strict Order</c>
      <c>suit-parameter-strict-order</c>
      <c><xref target="suit-parameter-strict-order"/></c>
      <c>Soft Failure</c>
      <c>suit-parameter-soft-failure</c>
      <c><xref target="suit-parameter-soft-failure"/></c>
      <c>Custom</c>
      <c>suit-parameter-custom</c>
      <c><xref target="suit-parameter-custom"/></c>
</texttable>

<t>CBOR-encoded object parameters are still wrapped in a bstr. This is because it allows a parser that is aggregating parameters to reference the object with a single pointer and traverse it without understanding the contents. This is important for modularization and division of responsibility within a pull parser. The same consideration does not apply to Directives because those elements are invoked with their arguments immediately.</t>

<section anchor="cbor-pen"><name>CBOR PEN UUID Namespace Identifier</name>

<t>The CBOR PEN (Private Enterprise Number) UUID Namespace Identifier is constructed as follows:</t>

<t>It uses the OID Namespace as a starting point, then uses the CBOR absolute OID encoding for the IANA PEN OID (1.3.6.1.4.1):</t>

<figure><sourcecode type="cbor-pretty"><![CDATA[
D8 6F                # tag(111)
   45                # bytes(5)
# Absolute OID encoding of IANA Private Enterprise Number:
#    1.3. 6. 1. 4. 1
      2B 06 01 04 01 # X.690 Clause 8.19
]]></sourcecode></figure>

<t>Computing a version 5 UUID from these produces:</t>

<figure><artwork><![CDATA[
NAMESPACE_CBOR_PEN = UUID5(NAMESPACE_OID, h'D86F452B06010401')
NAMESPACE_CBOR_PEN = 47fbdabb-f2e4-55f0-bb39-3620c2f6df4e
]]></artwork></figure>

</section>
<section anchor="uuid-identifiers"><name>Constructing UUIDs</name>

<t>Several conditions use identifiers to determine whether a manifest matches a given Recipient or not. These identifiers are defined to be RFC 9562 <xref target="RFC9562"/> UUIDs. These UUIDs are not human-readable and are therefore used for machine-based processing only.</t>

<t>A Recipient <bcp14>MAY</bcp14> match any number of UUIDs for vendor or class identifier. This may be relevant to physical or software modules. For example, a Recipient that has an OS and one or more applications might list one Vendor ID for the OS and one or more additional Vendor IDs for the applications. This Recipient might also have a Class ID that must be matched for the OS and one or more Class IDs for the applications.</t>

<t>Identifiers are used for compatibility checks. They <bcp14>MUST NOT</bcp14> be used as assertions of identity. They are evaluated by identifier conditions (<xref target="identifier-conditions"/>).</t>

<t>A more complete example: Imagine a device has the following physical components:
1. A host Microcontroller
2. A Wi-Fi module</t>

<t>This same device has three software modules:
1. An operating system
2. A Wi-Fi module interface driver
3. An application</t>

<t>Suppose that the Wi-Fi module's firmware has a proprietary update mechanism and doesn't support manifest processing. This device can report four class IDs:</t>

<t><list style="numbers" type="1">
  <t>Hardware model/revision</t>
  <t>OS</t>
  <t>Wi-Fi module model/revision</t>
  <t>Application</t>
</list></t>

<t>This allows the OS, Wi-Fi module, and application to be updated independently. To combat possible incompatibilities, the OS class ID can be changed each time the OS has a change to its API.</t>

<t>This approach allows a vendor to target, for example, all devices with a particular Wi-Fi module with an update, which is a very powerful mechanism, particularly when used for security updates.</t>

<t>UUIDs <bcp14>MUST</bcp14> be created according to versions 3, 4, or 5 of <xref target="RFC9562"/>. Versions 1 and 2 do not provide a tangible benefit over version 4 for this application.</t>

<t>The <bcp14>RECOMMENDED</bcp14> method to create a vendor ID is:</t>

<figure><artwork><![CDATA[
The "IANA UUID Namespace ID for DNS" is:
6ba7b810-9dad-11d1-80b4-00c04fd430c8

Vendor ID = UUID5(<IANA UUID Namespace ID DNS>, vendor domain name)
]]></artwork></figure>

<t>In this case, the vendor domain name is a UTF-8 encoded string. Since UUID version 5
applies a digest, internationalization considerations are not applied. The native 
UTF-8 domain name is used.</t>

<t>If the Vendor ID is a UUID, the <bcp14>RECOMMENDED</bcp14> method to create a Class ID is:</t>

<figure><artwork><![CDATA[
Class ID = UUID5(Vendor ID, Class-Specific-Information)
]]></artwork></figure>

<t>If the Vendor ID is a CBOR PEN (see <xref target="suit-parameter-vendor-identifier"/>), the <bcp14>RECOMMENDED</bcp14> method to create a Class ID is:</t>

<figure><artwork><![CDATA[
Class ID = UUID5(
    UUID5(NAMESPACE_CBOR_PEN, CBOR_PEN),
    Class-Specific-Information)
]]></artwork></figure>

<t>Class-specific-information is composed of a variety of data, for example:</t>

<t><list style="symbols">
  <t>Model number.</t>
  <t>Hardware revision.</t>
  <t>Bootloader version (for immutable bootloaders).</t>
</list></t>

</section>
<section anchor="suit-parameter-vendor-identifier"><name>suit-parameter-vendor-identifier</name>

<t>suit-parameter-vendor-identifier may be presented in one of two ways:</t>

<t><list style="symbols">
  <t>A Private Enterprise Number</t>
  <t>A byte string containing a UUID <xref target="RFC9562"/></t>
</list></t>

<t>Private Enterprise Numbers are encoded as a relative OID, according to the definition in <xref target="RFC9090"/>. All PENs are relative to the IANA PEN: 1.3.6.1.4.1.</t>

</section>
<section anchor="suit-parameter-class-identifier"><name>suit-parameter-class-identifier</name>

<t>A RFC 9562 UUID representing the class of the device or component. The UUID is encoded as a 16 byte bstr, containing the raw bytes of the UUID. It <bcp14>MUST</bcp14> be constructed as described in <xref target="uuid-identifiers"/></t>

</section>
<section anchor="suit-parameter-device-identifier"><name>suit-parameter-device-identifier</name>

<t>A RFC 9562 UUID representing the specific device or component. The UUID is encoded as a 16 byte bstr, containing the raw bytes of the UUID. It <bcp14>MUST</bcp14> be constructed as described in <xref target="uuid-identifiers"/></t>

</section>
<section anchor="suit-parameter-image-digest"><name>suit-parameter-image-digest</name>

<t>A fingerprint computed over the component itself, encoded in the SUIT_Digest <xref target="SUIT_Digest"/> structure. The SUIT_Digest is wrapped in a bstr, as required in <xref target="secparameters"/>.</t>

</section>
<section anchor="suit-parameter-image-size"><name>suit-parameter-image-size</name>

<t>The size of the firmware image in bytes. This size is encoded as a positive integer.</t>

</section>
<section anchor="suit-parameter-component-slot"><name>suit-parameter-component-slot</name>

<t>This parameter sets the slot index of a component. Some components support multiple possible Slots (offsets into a storage area). This parameter describes the intended Slot to use, identified by its index into the component's storage area. This slot <bcp14>MUST</bcp14> be encoded as a positive integer.</t>

</section>
<section anchor="suit-parameter-content"><name>suit-parameter-content</name>

<t>A block of raw data for use with <xref target="suit-directive-write"/>. It contains a byte string of data to be written to a specified component ID in the same way as a fetch or a copy.</t>

<t>If data is encoded this way, it should be small, e.g., 10's of bytes. Large payloads, e.g., 1000's of bytes, written via this method might prevent the manifest from being held in memory during validation. Typical applications include small configuration parameters.</t>

<t>The size of payload embedded in suit-parameter-content impacts the security requirement defined in <xref target="RFC9124"/>, Section 4.3.21 REQ.SEC.MFST.CONST: Manifest Kept Immutable between Check and Use. Actual limitations on payload size for suit-parameter-content depend on the application, in particular the available memory that satisfies REQ.SEC.MFST.CONST. If the availability of tamper resistant memory is less than the manifest size, then REQ.SEC.MFST.CONST cannot be satisfied.</t>

<t>If suit-parameter-content is instantiated in a severable command sequence, then this becomes functionally very similar to an integrated payload, which may be a better choice.</t>

</section>
<section anchor="suit-parameter-uri"><name>suit-parameter-uri</name>

<t>A URI Reference <xref target="RFC3986"/> from which to fetch a resource. The encoding is the same as CBOR Tag 32, however the tag is omitted because it is implied by the context.
This document is only concerned with the transport of a URI which is 
intended for machine readable uses, not human readable uses.</t>

</section>
<section anchor="suit-parameter-source-component"><name>suit-parameter-source-component</name>

<t>This parameter sets the source component to be used with either suit-directive-copy (<xref target="suit-directive-copy"/>) or with suit-directive-swap (<xref target="suit-directive-swap"/>). The current Component, as set by suit-directive-set-component-index defines the destination, and suit-parameter-source-component defines the source.</t>

</section>
<section anchor="suit-parameter-invoke-args"><name>suit-parameter-invoke-args</name>

<t>This parameter contains an encoded set of arguments for suit-directive-invoke (<xref target="suit-directive-invoke"/>). The arguments <bcp14>MUST</bcp14> be provided as an implementation-defined bstr.</t>

</section>
<section anchor="suit-parameter-fetch-arguments"><name>suit-parameter-fetch-arguments</name>

<t>An implementation-defined set of arguments to suit-directive-fetch (<xref target="suit-directive-fetch"/>). Arguments are encoded in a bstr.</t>

</section>
<section anchor="suit-parameter-strict-order"><name>suit-parameter-strict-order</name>

<t>The Strict Order Parameter allows a manifest to govern when directives can be executed out-of-order. This allows for systems that have a sensitivity to order of updates to choose the order in which they are executed. It also allows for more advanced systems to parallelize their handling of updates. Strict Order defaults to True. It <bcp14>MAY</bcp14> be set to False when the order of operations does not matter. When arriving at the end of a command sequence, ALL commands <bcp14>MUST</bcp14> have completed, regardless of the state of SUIT_Parameter_Strict_Order. If SUIT_Parameter_Strict_Order is returned to True, ALL preceding commands <bcp14>MUST</bcp14> complete before the next command is executed.</t>

<t>See <xref target="parallel-processing"/> for behavioral description of Strict Order.</t>

</section>
<section anchor="suit-parameter-soft-failure"><name>suit-parameter-soft-failure</name>

<t>When executing a command sequence inside suit-directive-try-each (<xref target="suit-directive-try-each"/>) or suit-directive-run-sequence (<xref target="suit-directive-run-sequence"/>) and a condition failure occurs, the manifest processor aborts the sequence. For suit-directive-try-each, if Soft Failure is True, the next sequence in Try Each is invoked, otherwise suit-directive-try-each fails with the condition failure code. In suit-directive-run-sequence, if Soft Failure is True the suit-directive-run-sequence simply halts with no side-effects and the Manifest Processor continues with the following command, otherwise, the suit-directive-run-sequence fails with the condition failure code.</t>

<t>suit-parameter-soft-failure is scoped to the enclosing SUIT_Command_Sequence. Its value is discarded when the enclosing SUIT_Command_Sequence terminates and suit-parameter-soft-failure reverts to the value it had prior to the invocation of the SUIT_Command_Sequence. Nested SUIT_Command_Sequences do not inherit the enclosing sequence's suit-parameter-soft-failure. It <bcp14>MUST NOT</bcp14> be set outside of suit-directive-try-each or suit-directive-run-sequence, modifying suit-parameter-soft-failure outside of these circumstances causes an Abort.</t>

<t>When suit-directive-try-each is invoked, Soft Failure defaults to True in every SUIT_Command_Sequence in the suit-directive-try-each argument. An Update Author may choose to set Soft Failure to False if they require a failed condition in a sequence to force an Abort. When the enclosing SUIT_Command_Sequence terminates, suit-parameter-soft-failure reverts to the value it held before the SUIT_Command_Sequence was invoked.</t>

<t>When suit-directive-run-sequence is invoked, Soft Failure defaults to False. An Update Author may choose to make failures soft within a suit-directive-run-sequence.</t>

</section>
<section anchor="suit-parameter-custom"><name>suit-parameter-custom</name>

<t>This parameter is an extension point for any proprietary, application specific conditions and directives. It <bcp14>MUST NOT</bcp14> be used in the shared sequence. This effectively scopes each custom command to a particular Vendor Identifier/Class Identifier pair.</t>

<t>suit-parameter-custom <bcp14>MAY</bcp14> be consumed by any command, in an application-specific way, however if a suit-parameter-custom is absent, then all standardised suit-commands <bcp14>MUST</bcp14> execute correctly. In this respect, suit-parameter-custom <bcp14>MUST</bcp14> be treated as a hint by any standardised suit-command that consumes it.</t>

</section>
</section>
<section anchor="suitcondition"><name>SUIT_Condition</name>

<t>Conditions are used to define mandatory properties of a system in order for an update to be applied. They can be pre-conditions or post-conditions of any directive or series of directives, depending on where they are placed in the list. All Conditions specify a Reporting Policy as described <xref target="reporting-policy"/>. Conditions include:</t>

<texttable>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>CDDL Structure</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>Vendor Identifier</c>
      <c>suit-condition-vendor-identifier</c>
      <c><xref target="identifier-conditions"/></c>
      <c>Class Identifier</c>
      <c>suit-condition-class-identifier</c>
      <c><xref target="identifier-conditions"/></c>
      <c>Device Identifier</c>
      <c>suit-condition-device-identifier</c>
      <c><xref target="identifier-conditions"/></c>
      <c>Image Match</c>
      <c>suit-condition-image-match</c>
      <c><xref target="suit-condition-image-match"/></c>
      <c>Check Content</c>
      <c>suit-condition-check-content</c>
      <c><xref target="suit-condition-check-content"/></c>
      <c>Component Slot</c>
      <c>suit-condition-component-slot</c>
      <c><xref target="suit-condition-component-slot"/></c>
      <c>Abort</c>
      <c>suit-condition-abort</c>
      <c><xref target="suit-condition-abort"/></c>
      <c>Custom Condition</c>
      <c>suit-command-custom</c>
      <c><xref target="SUIT_Command_Custom"/></c>
</texttable>

<t>The abstract description of these conditions is defined in <xref target="command-behavior"/>.</t>

<t>Conditions compare parameters against properties of the system. These properties may be asserted in many different ways, including: calculation on-demand, volatile definition in memory, static definition within the manifest processor, storage in known location within an image, storage within a key storage system, storage in One-Time-Programmable memory, inclusion in mask ROM, or inclusion as a register in hardware. Some of these assertion methods are global in scope, such as a hardware register, some are scoped to an individual component, such as storage at a known location in an image, and some assertion methods can be either global or component-scope, based on implementation.</t>

<t>Each condition <bcp14>MUST</bcp14> report a result code on completion. If a condition reports failure, then the current sequence of commands <bcp14>MUST</bcp14> terminate. A subsequent command or command sequence <bcp14>MAY</bcp14> continue executing if suit-parameter-soft-failure (<xref target="suit-parameter-soft-failure"/>) is set. If a condition requires additional information, this <bcp14>MUST</bcp14> be specified in one or more parameters before the condition is executed. If a Recipient attempts to process a condition that expects additional information and that information has not been set, it <bcp14>MUST</bcp14> report a failure. If a Recipient encounters an unknown condition, it <bcp14>MUST</bcp14> report a failure.</t>

<t>Condition labels greater than or equal to -256 are reserved for IANA registration while those lesser than -256 are custom conditions reserved for proprietary definition by the author of a manifest processor. See <xref target="iana"/> for more details.</t>

<section anchor="identifier-conditions"><name>suit-condition-vendor-identifier, suit-condition-class-identifier, and suit-condition-device-identifier</name>

<t>There are three identifier-based conditions: suit-condition-vendor-identifier, suit-condition-class-identifier, and suit-condition-device-identifier. Each of these conditions match a UUID <xref target="RFC9562"/> that <bcp14>MUST</bcp14> have already been set as a parameter. The installing Recipient <bcp14>MUST</bcp14> match the specified UUID in order to consider the manifest valid. These identifiers are scoped by component in the manifest. Each component <bcp14>MAY</bcp14> match more than one identifier. Care is needed to ensure that manifests correctly identify their targets using these conditions. Using only a generic class ID for a device-specific firmware could result in matching devices that are not compatible.</t>

<t>The Recipient uses the ID parameter that has already been set using the Set Parameters directive. If no ID has been set, this condition fails. suit-condition-class-identifier and suit-condition-vendor-identifier are <bcp14>REQUIRED</bcp14> to implement. suit-condition-device-identifier is <bcp14>OPTIONAL</bcp14> to implement.</t>

<t>Each identifier condition compares the corresponding identifier parameter to a parameter asserted to the Manifest Processor by the Recipient. Identifiers <bcp14>MUST</bcp14> be known to the Manifest Processor in order to evaluate compatibility.</t>

</section>
<section anchor="suit-condition-image-match"><name>suit-condition-image-match</name>

<t>Verify that the current component matches the suit-parameter-image-digest (<xref target="suit-parameter-image-digest"/>) for the current component. The digest is verified against the digest specified in the Component's parameters list. If no digest is specified, the condition fails. suit-condition-image-match is <bcp14>REQUIRED</bcp14> to implement.</t>

</section>
<section anchor="suit-condition-check-content"><name>suit-condition-check-content</name>

<t>This directive compares the specified component identifier to the data indicated by suit-parameter-content. This functions similarly to suit-condition-image-match, however it does a direct, byte-by-byte comparison rather than a digest-based comparison. Because it is possible that an early stop to check-content could reveal information through timing, suit-condition-check-content <bcp14>MUST</bcp14> be constant time: no early exits.</t>

<t>The following pseudo-code described an example content checking algorithm:</t>

<figure><sourcecode type="c"><![CDATA[
// content & component must be same length
// returns 0 for match
int check_content(content, component, length) {
    int residual = 0;
    for (i = 0; i < length; i++) {
        residual |= content[i] ^ component[i];
    }
    return residual;
}
]]></sourcecode></figure>

</section>
<section anchor="suit-condition-component-slot"><name>suit-condition-component-slot</name>

<t>Verify that the slot index of the current component matches the slot index set in suit-parameter-component-slot (<xref target="suit-parameter-component-slot"/>). This condition allows a manifest to select between several images to match a target slot.</t>

</section>
<section anchor="suit-condition-abort"><name>suit-condition-abort</name>

<t>Unconditionally fail. This operation is typically used in conjunction with suit-directive-try-each (<xref target="suit-directive-try-each"/>).</t>

</section>
</section>
<section anchor="suitdirective"><name>SUIT_Directive</name>

<t>Directives are used to define the behavior of the recipient. Directives include:</t>

<texttable>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>CDDL Structure</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>Set Component Index</c>
      <c>suit-directive-set-component-index</c>
      <c><xref target="suit-directive-set-component-index"/></c>
      <c>Try Each</c>
      <c>suit-directive-try-each</c>
      <c><xref target="suit-directive-try-each"/></c>
      <c>Override Parameters</c>
      <c>suit-directive-override-parameters</c>
      <c><xref target="suit-directive-override-parameters"/></c>
      <c>Fetch</c>
      <c>suit-directive-fetch</c>
      <c><xref target="suit-directive-fetch"/></c>
      <c>Copy</c>
      <c>suit-directive-copy</c>
      <c><xref target="suit-directive-copy"/></c>
      <c>Write</c>
      <c>suit-directive-write</c>
      <c><xref target="suit-directive-write"/></c>
      <c>Invoke</c>
      <c>suit-directive-invoke</c>
      <c><xref target="suit-directive-invoke"/></c>
      <c>Run Sequence</c>
      <c>suit-directive-run-sequence</c>
      <c><xref target="suit-directive-run-sequence"/></c>
      <c>Swap</c>
      <c>suit-directive-swap</c>
      <c><xref target="suit-directive-swap"/></c>
      <c>Custom Directive</c>
      <c>suit-command-custom</c>
      <c><xref target="SUIT_Command_Custom"/></c>
</texttable>

<t>The abstract description of these commands is defined in <xref target="command-behavior"/>.</t>

<t>When a Recipient executes a Directive, it <bcp14>MUST</bcp14> report a result code. If the Directive reports failure, then the current Command Sequence <bcp14>MUST</bcp14> be terminated.</t>

<section anchor="suit-directive-set-component-index"><name>suit-directive-set-component-index</name>

<t>Set Component Index defines the component to which successive directives and conditions will apply. The Set Component Index arguments are described in <xref target="index-true"/>.</t>

<t>If the following commands apply to ONE component, an unsigned integer index into the component list is used. If the following commands apply to ALL components, then the boolean value "True" is used instead of an index. If the following commands apply to more than one, but not all components, then an array of unsigned integer indices into the component list is used.</t>

<t>If component index is set to True when a command is invoked, then the command applies to all components, in the order they appear in suit-common-components. When the Manifest Processor invokes a command while the component index is set to True, it must execute the command once for each possible component index, ensuring that the command receives the parameters corresponding to that component index.</t>

</section>
<section anchor="suit-directive-try-each"><name>suit-directive-try-each</name>

<t>This command runs several SUIT_Command_Sequence instances, one after another, in a strict order, until one succeeds or the list is exhausted. Use this command to implement a "try/catch-try/catch" sequence. Manifest processors <bcp14>MAY</bcp14> implement this command.</t>

<t>suit-parameter-soft-failure (<xref target="suit-parameter-soft-failure"/>) is initialized to True at the beginning of each sequence. If one sequence aborts due to a condition failure, the next is started. If no sequence completes without condition failure, then suit-directive-try-each returns an error. If a particular application calls for all sequences to fail and still continue, then an empty sequence (nil) can be added to the Try Each Argument.</t>

<t>The argument to suit-directive-try-each is a list of SUIT_Command_Sequence. suit-directive-try-each does not specify a reporting policy.</t>

</section>
<section anchor="suit-directive-override-parameters"><name>suit-directive-override-parameters</name>

<t>suit-directive-override-parameters replaces any listed parameters that are already set with the values that are provided in its argument. This allows a manifest to prevent replacement of critical parameters.</t>

<t>Available parameters are defined in <xref target="secparameters"/>.</t>

<t>suit-directive-override-parameters does not specify a reporting policy.</t>

</section>
<section anchor="suit-directive-fetch"><name>suit-directive-fetch</name>

<t>suit-directive-fetch instructs the manifest processor to obtain one or more manifests or payloads, as specified by the manifest index and component index, respectively.</t>

<t>suit-directive-fetch can target one or more payloads. suit-directive-fetch retrieves each component listed in component-index. If component-index is True, instead of an integer, then all current manifest components are fetched. If component-index is an array, then all listed components are fetched.</t>

<t>suit-directive-fetch typically takes no arguments unless one is needed to modify fetch behavior. If an argument is needed, it must be wrapped in a bstr and set in suit-parameter-fetch-arguments.</t>

<t>suit-directive-fetch reads the URI parameter to find the source of the fetch it performs.</t>

<t>The size and digest of the payload to be fetched are typically set prior to the invokation of suit-directive-fetch. If both suit-parameter-image-digest and suit-parameter-image-size are set for the current component when suit-directive-fetch is invoked, the Manifest Processor <bcp14>MAY</bcp14> choose to optimize the fetch by:</t>

<t><list style="symbols">
  <t>Checking if the target component matches the digest supplied before fetching.</t>
  <t>Checking if another component matches the digest supplied before fetching.</t>
</list></t>

<t>The exact mechanisms of these optimizations are implementation defined.</t>

</section>
<section anchor="suit-directive-copy"><name>suit-directive-copy</name>

<t>suit-directive-copy instructs the manifest processor to obtain one or more payloads, as specified by the component index. As described in <xref target="index-true"/> component index may be a single integer, a list of integers, or True. suit-directive-copy retrieves each component specified by the current component-index, respectively.</t>

<t>suit-directive-copy reads its source from suit-parameter-source-component (<xref target="suit-parameter-source-component"/>).</t>

<t>If either the source component parameter or the source component itself is absent, this command fails.</t>

<t>The size and digest of the payload to be fetched are typically set prior to the invokation of suit-directive-copy. If both suit-parameter-image-digest and suit-parameter-image-size are set for the current component when suit-directive-copy is invoked, the Manifest Processor <bcp14>MAY</bcp14> choose to optimize the copy by:</t>

<t><list style="symbols">
  <t>Checking if the target component matches the digest supplied before copying.</t>
  <t>Checking if the source component matches the digest supplied before copying.</t>
</list></t>

<t>The first optimization avoids a copy operation when the data is the same. The second optimization avoids a copy of a corrupted image. The exact mechanisms of these optimizations are implementation defined.</t>

</section>
<section anchor="suit-directive-write"><name>suit-directive-write</name>

<t>This directive writes a small block of data, specified in <xref target="suit-parameter-content"/>, to a component.</t>

<t>Encoding Considerations: Careful consideration must be taken to determine whether it is more appropriate to use an integrated payload or to use <xref target="suit-parameter-content"/> for a particular application. While the encoding of suit-directive-write is smaller than an integrated payload, a large suit-parameter-content payload may prevent the manifest processor from holding the command sequence in memory while executing it.</t>

</section>
<section anchor="suit-directive-invoke"><name>suit-directive-invoke</name>

<t>suit-directive-invoke directs the manifest processor to transfer execution to the current Component Index. When this is invoked, the manifest processor <bcp14>MAY</bcp14> be unloaded and execution continues in the Component Index. Arguments are provided to suit-directive-invoke through suit-parameter-invoke-arguments (<xref target="suit-parameter-invoke-args"/>) and are forwarded to the executable code located in Component Index in an application-specific way. For example, this could form the Linux Kernel Command Line if booting a Linux device.</t>

<t>If the executable code at Component Index is constructed in such a way that it does not unload the manifest processor, then the manifest processor <bcp14>MAY</bcp14> resume execution after the executable completes. This allows the manifest processor to invoke suitable helpers and to verify them with image conditions.</t>

</section>
<section anchor="suit-directive-run-sequence"><name>suit-directive-run-sequence</name>

<t>To enable conditional commands, and to allow several strictly ordered sequences to be executed out-of-order, suit-directive-run-sequence allows the manifest processor to execute its argument as a SUIT_Command_Sequence. The argument must be wrapped in a bstr. This also allows a sequence of instructions to be iterated over, once for each current component index, when component-index = true or component-index = list. See <xref target="index-true"/>.</t>

<t>When a sequence is executed, any failure of a condition causes immediate termination of the sequence.</t>

<t>When suit-directive-run-sequence completes, it forwards the last status code that occurred in the sequence. If the Soft Failure parameter is true, then suit-directive-run-sequence only fails when a directive in the argument sequence fails.</t>

<t>suit-parameter-soft-failure (<xref target="suit-parameter-soft-failure"/>) defaults to False when suit-directive-run-sequence begins. Its value is discarded when suit-directive-run-sequence terminates.</t>

</section>
<section anchor="suit-directive-swap"><name>suit-directive-swap</name>

<t>suit-directive-swap instructs the manifest processor to move the source to the destination and the destination to the source simultaneously. Swap has nearly identical semantics to suit-directive-copy except that suit-directive-swap replaces the source with the current contents of the destination in an application-defined way. As with suit-directive-copy, if the source component is missing, this command fails.</t>

</section>
</section>
<section anchor="SUIT_Command_Custom"><name>suit-command-custom</name>

<t>suit-command-custom identifies an experimental, proprietary, or application-specific condition or directive. The associated value is an integer less than –256, selected by the firmware developer from the Private Use address range defined for the respective registry. If additional information must be provided, it should be encoded in a custom parameter (as described in <xref target="secparameters"/>). Any number of custom commands is permitted. SUIT_Command_Custom is <bcp14>OPTIONAL</bcp14> to implement.</t>

</section>
<section anchor="integrity-checks"><name>Integrity Check Values</name>

<t>When the Text section or any Command Sequence of the Update Procedure is made severable, it is moved to the Envelope and replaced with a SUIT_Digest. The SUIT_Digest is computed over the entire bstr enclosing the Manifest element that has been moved to the Envelope. Each element that is made severable from the Manifest is placed in the Envelope. The keys for the envelope elements have the same values as the keys for the manifest elements.</t>

<t>Each Integrity Check Value covers the corresponding Envelope Element as described in <xref target="severable-fields"/>.</t>

</section>
</section>
<section anchor="implementation-matrix"><name>Implementation Conformance Matrix</name>

<t>This section summarizes the functionality a minimal manifest processor
implementation needs
to offer to claim conformance to this specification, in the absence of
an application profile standard specifying otherwise.</t>

<t>The subsequent table shows the conditions.</t>

<texttable>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <ttcol align='left'>Implementation</ttcol>
      <c>Vendor Identifier</c>
      <c><xref target="uuid-identifiers"/></c>
      <c><bcp14>REQUIRED</bcp14></c>
      <c>Class Identifier</c>
      <c><xref target="uuid-identifiers"/></c>
      <c><bcp14>REQUIRED</bcp14></c>
      <c>Device Identifier</c>
      <c><xref target="uuid-identifiers"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Image Match</c>
      <c><xref target="suit-condition-image-match"/></c>
      <c><bcp14>REQUIRED</bcp14></c>
      <c>Check Content</c>
      <c><xref target="suit-condition-check-content"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Component Slot</c>
      <c><xref target="suit-condition-component-slot"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Abort</c>
      <c><xref target="suit-condition-abort"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Custom Condition</c>
      <c><xref target="SUIT_Command_Custom"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
</texttable>

<t>The subsequent table shows the directives.</t>

<texttable>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <ttcol align='left'>Implementation</ttcol>
      <c>Set Component Index</c>
      <c><xref target="suit-directive-set-component-index"/></c>
      <c><bcp14>REQUIRED</bcp14> if more than one component</c>
      <c>Write Content</c>
      <c><xref target="suit-directive-write"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Try Each</c>
      <c><xref target="suit-directive-try-each"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Override Parameters</c>
      <c><xref target="suit-directive-override-parameters"/></c>
      <c><bcp14>REQUIRED</bcp14></c>
      <c>Fetch</c>
      <c><xref target="suit-directive-fetch"/></c>
      <c><bcp14>REQUIRED</bcp14> for Updater</c>
      <c>Copy</c>
      <c><xref target="suit-directive-copy"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Invoke</c>
      <c><xref target="suit-directive-invoke"/></c>
      <c><bcp14>REQUIRED</bcp14> for Bootloader</c>
      <c>Run Sequence</c>
      <c><xref target="suit-directive-run-sequence"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Swap</c>
      <c><xref target="suit-directive-swap"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
</texttable>

<t>The subsequent table shows the parameters.</t>

<texttable>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <ttcol align='left'>Implementation</ttcol>
      <c>Vendor ID</c>
      <c><xref target="suit-parameter-vendor-identifier"/></c>
      <c><bcp14>REQUIRED</bcp14></c>
      <c>Class ID</c>
      <c><xref target="suit-parameter-class-identifier"/></c>
      <c><bcp14>REQUIRED</bcp14></c>
      <c>Image Digest</c>
      <c><xref target="suit-parameter-image-digest"/></c>
      <c><bcp14>REQUIRED</bcp14></c>
      <c>Image Size</c>
      <c><xref target="suit-parameter-image-size"/></c>
      <c><bcp14>REQUIRED</bcp14></c>
      <c>Component Slot</c>
      <c><xref target="suit-parameter-component-slot"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Content</c>
      <c><xref target="suit-parameter-content"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>URI</c>
      <c><xref target="suit-parameter-uri"/></c>
      <c><bcp14>REQUIRED</bcp14> for Updater</c>
      <c>Source Component</c>
      <c><xref target="suit-parameter-source-component"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Invoke Args</c>
      <c><xref target="suit-parameter-invoke-args"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Device ID</c>
      <c><xref target="suit-parameter-device-identifier"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Strict Order</c>
      <c><xref target="suit-parameter-strict-order"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Soft Failure</c>
      <c><xref target="suit-parameter-soft-failure"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
      <c>Custom</c>
      <c><xref target="suit-parameter-custom"/></c>
      <c><bcp14>OPTIONAL</bcp14></c>
</texttable>

</section>
<section anchor="severable-fields"><name>Severable Elements</name>

<t>Because the manifest can be used by different actors at different times, some parts of the manifest can be removed or "Severed" without affecting later stages of the lifecycle. Severing of information is achieved by separating that information from the signed container so that removing it does not affect the signature. This means that ensuring integrity of severable parts of the manifest is a requirement for the signed portion of the manifest. Severing some parts makes it possible to discard parts of the manifest that are no longer necessary. This is important because it allows the storage used by the manifest to be greatly reduced. For example, no text size limits are needed if text is removed from the manifest prior to delivery to a constrained device.</t>

<t>At time of manifest creation, the Author <bcp14>MAY</bcp14> chose to make a manifest element severable by removing it from the manifest, encoding it in a bstr, and placing a SUIT_Digest of the bstr in the manifest so that it can still be authenticated. Making an element severable changes the digest of the manifest, so the signature <bcp14>MUST</bcp14> be computed after manifest elements are made severable. Only Manifest Elements with corresponding elements in the SUIT_Envelope can be made severable (see <xref target="iana-envelope"/> for SUIT_Envelope elements). The SUIT_Digest typically consumes 4 bytes more than the size of the raw digest, therefore elements smaller than (Digest Bits)/8 + 4 <bcp14>SHOULD NOT</bcp14> be severable. Elements larger than (Digest Bits)/8 + 4 <bcp14>MAY</bcp14> be severable, while elements that are much larger than (Digest Bits)/8 + 4 <bcp14>SHOULD</bcp14> be severable.</t>

<t>Because of this, all command sequences in the manifest are encoded in a bstr so that there is a single code path needed for all command sequences.</t>

</section>
</section>
<section anchor="access-control-lists"><name>Access Control Lists</name>

<t>SUIT Manifest Processors are <bcp14>RECOMMENDED</bcp14> to use one of the following models for managing permissions in the manifest.</t>

<t>First, the simplest model requires that all manifests are authenticated by a single trusted key. This mode has the advantage that only a root manifest needs to be authenticated, since all of its dependencies have digests included in the root manifest.</t>

<t>This simplest model can be extended by adding key delegation without much increase in complexity.</t>

<t>A second model requires an ACL to be presented to the Recipient, authenticated by a trusted party or stored on the Recipient. This ACL grants access rights for specific component IDs or Component Identifier prefixes to the listed identities or identity groups. Any identity can verify an image digest, but fetching into or fetching from a Component Identifier requires approval from the ACL.</t>

<t>A third model allows a Recipient to provide even more fine-grained controls: The ACL lists the Component Identifier or Component Identifier prefix that an identity can use, and also lists the commands and parameters that the identity can use in combination with that Component Identifier.</t>

</section>
<section anchor="SUIT_Digest"><name>SUIT Digest Container</name>

<t>The SUIT digest is a CBOR array containing two elements: an algorithm identifier and a bstr containing the bytes of the digest. Some forms of digest may require additional parameters. These can be added following the digest.</t>

<t>The values of the algorithm identifier are found in the IANA "COSE Algorithms" registry <xref target="COSE-Alg"/>, which was created by <xref target="RFC9054"/>. SHA-256 (-16) <bcp14>MUST</bcp14> be implemented by all Manifest Processors.</t>

<t>Any other algorithm defined in the IANA "COSE Algorithms" registry, such as SHA-512 (-44), <bcp14>MAY</bcp14> be implemented in a Manifest Processor.</t>

</section>
<section anchor="iana"><name>IANA Considerations</name>

<t>IANA is requested to register the following CBOR Tags:</t>

<t><list style="symbols">
  <t>Tag: 107</t>
  <t>Data Item: map</t>
  <t>Semantics: SUIT_Envelope as defined in <xref target="full-cddl"/></t>
  <t>Reference: [this RFC]</t>
  <t>Tag: 1070</t>
  <t>Data Item: map</t>
  <t>Semantics: SUIT_Manifest as defined in <xref target="full-cddl"/></t>
  <t>Reference: [this RFC]</t>
</list></t>

<t>Additionally, IANA is requested to register:</t>

<t><list style="symbols">
  <t>allocate media type application/suit-envelope+cose in the "Media Types" registry, see below.</t>
  <t>allocate Namespace CBOR PEN in the "UUID Namespace IDs" registry with value 47fbdabb-f2e4-55f0-bb39-3620c2f6df4e, as defined in <xref target="cbor-pen"/></t>
  <t>setup several registries as described below.</t>
</list></t>

<t>IANA is requested to create a new category for Software Update for the Internet of Things (SUIT)
and a page within this category for SUIT manifests.</t>

<t>IANA is also requested to create several registries defined in the subsections below.</t>

<t>For each registry, the number space is partitioned, with each range governed by a different allocation policy:</t>

<t><list style="symbols">
  <t>Values 256 and above are subject to Specification Required,</t>
  <t>Values in the range 0 to 255 follow a Standards Action policy,</t>
  <t>Values from –255 to 0 are also governed by Standards Action, and</t>
  <t>Values –256 and below are designated for Private Use (also referred to as custom values).</t>
</list></t>

<t>New entries to those registries need to provide a label, a name and a reference to a specification that describes the functionality. More guidance on the expert review can be found below.</t>

<section anchor="iana-envelope"><name>SUIT Envelope Elements</name>

<t>IANA is requested to create a new registry for SUIT envelope elements.</t>

<texttable>
      <ttcol align='left'>Label</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>-255 to -1</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>0</c>
      <c>Unset Detection</c>
      <c><xref target="encoding"/> of [TBD: this document]</c>
      <c>1</c>
      <c>Reserved (Delegation)</c>
      <c><xref target="design-rationale-envelope"/> of [TBD: this document]</c>
      <c>2</c>
      <c>Authentication Wrapper</c>
      <c><xref target="authentication-info"/> of [TBD: this document]</c>
      <c>3</c>
      <c>Manifest</c>
      <c><xref target="manifest-structure"/> of [TBD: this document]</c>
      <c>4 to 15</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>16</c>
      <c>Payload Fetch</c>
      <c><xref target="manifest-commands"/> of [TBD: this document]</c>
      <c>17 to 19</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>20</c>
      <c>Payload Installation</c>
      <c><xref target="manifest-commands"/> of [TBD: this document]</c>
      <c>21 to 22</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>23</c>
      <c>Text Description</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
</texttable>

</section>
<section anchor="suit-manifest-elements"><name>SUIT Manifest Elements</name>

<t>IANA is requested to create a new registry for SUIT manifest elements.</t>

<texttable>
      <ttcol align='left'>Label</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>-255 to -1</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>0</c>
      <c>Unset Detection</c>
      <c><xref target="encoding"/> of [TBD: this document]</c>
      <c>1</c>
      <c>Encoding Version</c>
      <c><xref target="manifest-version"/> of [TBD: this document]</c>
      <c>2</c>
      <c>Sequence Number</c>
      <c><xref target="manifest-seqnr"/> of [TBD: this document]</c>
      <c>3</c>
      <c>Common Data</c>
      <c><xref target="manifest-common"/> of [TBD: this document]</c>
      <c>4</c>
      <c>Reference URI</c>
      <c><xref target="manifest-reference-uri"/> of [TBD: this document]</c>
      <c>5 to 6</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>7</c>
      <c>Image Validation</c>
      <c><xref target="manifest-commands"/> of [TBD: this document]</c>
      <c>8</c>
      <c>Image Loading</c>
      <c><xref target="manifest-commands"/> of [TBD: this document]</c>
      <c>9</c>
      <c>Image Invocation</c>
      <c><xref target="manifest-commands"/> of [TBD: this document]</c>
      <c>10 to 15</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>16</c>
      <c>Payload Fetch</c>
      <c><xref target="manifest-commands"/> of [TBD: this document]</c>
      <c>17 to 19</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>20</c>
      <c>Payload Installation</c>
      <c><xref target="manifest-commands"/> of [TBD: this document]</c>
      <c>21 to 22</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>23</c>
      <c>Text Description</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
</texttable>

</section>
<section anchor="suit-common-elements"><name>SUIT Common Elements</name>

<t>IANA is requested to create a new registry for SUIT common elements.</t>

<texttable>
      <ttcol align='left'>Label</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>-255 to -1</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>0</c>
      <c>Unset Detection</c>
      <c><xref target="encoding"/> of [TBD: this document]</c>
      <c>1</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>2</c>
      <c>Component Identifiers</c>
      <c><xref target="manifest-common"/> of [TBD: this document]</c>
      <c>3</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>4</c>
      <c>Common Command Sequence</c>
      <c><xref target="manifest-common"/> of [TBD: this document]</c>
</texttable>

</section>
<section anchor="suit-commands"><name>SUIT Commands</name>

<t>IANA is requested to create a new registry for SUIT commands.</t>

<texttable>
      <ttcol align='left'>Label</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>-255 to -1</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>0</c>
      <c>Unset Detection</c>
      <c><xref target="encoding"/> of [TBD: this document]</c>
      <c>1</c>
      <c>Vendor Identifier</c>
      <c><xref target="identifier-conditions"/> of [TBD: this document]</c>
      <c>2</c>
      <c>Class Identifier</c>
      <c><xref target="identifier-conditions"/> of [TBD: this document]</c>
      <c>3</c>
      <c>Image Match</c>
      <c><xref target="suit-condition-image-match"/> of [TBD: this document]</c>
      <c>4</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>5</c>
      <c>Component Slot</c>
      <c><xref target="suit-condition-component-slot"/> of [TBD: this document]</c>
      <c>6</c>
      <c>Check Content</c>
      <c><xref target="suit-condition-check-content"/> of [TBD: this document]</c>
      <c>7 to 11</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>12</c>
      <c>Set Component Index</c>
      <c><xref target="suit-directive-set-component-index"/> of [TBD: this document]</c>
      <c>13</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>14</c>
      <c>Abort</c>
      <c><xref target="suit-condition-abort"/> of [TBD: this document]</c>
      <c>15</c>
      <c>Try Each</c>
      <c><xref target="suit-directive-try-each"/> of [TBD: this document]</c>
      <c>16 to 17</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>18</c>
      <c>Write Content</c>
      <c><xref target="suit-directive-write"/> of [TBD: this document]</c>
      <c>19</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>20</c>
      <c>Override Parameters</c>
      <c><xref target="suit-directive-override-parameters"/> of [TBD: this document]</c>
      <c>21</c>
      <c>Fetch</c>
      <c><xref target="suit-directive-fetch"/> of [TBD: this document]</c>
      <c>22</c>
      <c>Copy</c>
      <c><xref target="suit-directive-copy"/> of [TBD: this document]</c>
      <c>23</c>
      <c>Invoke</c>
      <c><xref target="suit-directive-invoke"/> of [TBD: this document]</c>
      <c>24</c>
      <c>Device Identifier</c>
      <c><xref target="identifier-conditions"/> of [TBD: this document]</c>
      <c>25 to 30</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>31</c>
      <c>Swap</c>
      <c><xref target="suit-directive-swap"/> of [TBD: this document]</c>
      <c>32</c>
      <c>Run Sequence</c>
      <c><xref target="suit-directive-run-sequence"/> of [TBD: this document]</c>
</texttable>

</section>
<section anchor="suit-parameters"><name>SUIT Parameters</name>

<t>IANA is requested to create a new registry for SUIT parameters.</t>

<texttable>
      <ttcol align='left'>Label</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>-255 to -1</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>0</c>
      <c>Unset Detection</c>
      <c><xref target="encoding"/> of [TBD: this document]</c>
      <c>1</c>
      <c>Vendor ID</c>
      <c><xref target="suit-parameter-vendor-identifier"/> of [TBD: this document]</c>
      <c>2</c>
      <c>Class ID</c>
      <c><xref target="suit-parameter-class-identifier"/> of [TBD: this document]</c>
      <c>3</c>
      <c>Image Digest</c>
      <c><xref target="suit-parameter-image-digest"/> of [TBD: this document]</c>
      <c>4</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>5</c>
      <c>Component Slot</c>
      <c><xref target="suit-parameter-component-slot"/> of [TBD: this document]</c>
      <c>6 to 11</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>12</c>
      <c>Strict Order</c>
      <c><xref target="suit-parameter-strict-order"/> of [TBD: this document]</c>
      <c>13</c>
      <c>Soft Failure</c>
      <c><xref target="suit-parameter-soft-failure"/> of [TBD: this document]</c>
      <c>14</c>
      <c>Image Size</c>
      <c><xref target="suit-parameter-image-size"/> of [TBD: this document]</c>
      <c>15 to 17</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>18</c>
      <c>Content</c>
      <c><xref target="suit-parameter-content"/> of [TBD: this document]</c>
      <c>19 to 20</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>21</c>
      <c>URI</c>
      <c><xref target="suit-parameter-uri"/> of [TBD: this document]</c>
      <c>22</c>
      <c>Source Component</c>
      <c><xref target="suit-parameter-source-component"/> of [TBD: this document]</c>
      <c>23</c>
      <c>Invoke Args</c>
      <c><xref target="suit-parameter-invoke-args"/> of [TBD: this document]</c>
      <c>24</c>
      <c>Device ID</c>
      <c><xref target="suit-parameter-device-identifier"/> of [TBD: this document]</c>
</texttable>

</section>
<section anchor="suit-text-values"><name>SUIT Text Values</name>

<t>IANA is requested to create a new registry for SUIT text values.</t>

<texttable>
      <ttcol align='left'>Label</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>-255 to -1</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>0</c>
      <c>Unset Detection</c>
      <c><xref target="encoding"/> of [TBD: this document]</c>
      <c>1</c>
      <c>Manifest Description</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
      <c>2</c>
      <c>Update Description</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
      <c>3</c>
      <c>Manifest JSON Source</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
      <c>4</c>
      <c>Manifest YAML Source</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
</texttable>

</section>
<section anchor="suit-component-text-values"><name> SUIT Component Text Values</name>

<t>IANA is requested to create a new registry for SUIT component text values.</t>

<texttable>
      <ttcol align='left'>Label</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>-255 to -1</c>
      <c>Unassigned</c>
      <c>&#160;</c>
      <c>0</c>
      <c>Unset Detection</c>
      <c><xref target="encoding"/> of [TBD: this document]</c>
      <c>1</c>
      <c>Vendor Name</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
      <c>2</c>
      <c>Model Name</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
      <c>3</c>
      <c>Vendor Domain</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
      <c>4</c>
      <c>Model Info</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
      <c>5</c>
      <c>Component Description</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
      <c>6</c>
      <c>Component Version</c>
      <c><xref target="manifest-digest-text"/> of [TBD: this document]</c>
</texttable>

</section>
<section anchor="expert-review-instructions"><name>Expert Review Instructions</name>

<t>The IANA registries established in this document allow values to be added
based on expert review. This section gives some general guidelines for
what the experts should be looking for, but they are being designated
as experts for a reason, so they should be given substantial
latitude.</t>

<t>Expert reviewers should take into consideration the following points:</t>

<t><list style="symbols">
  <t>Point squatting should be discouraged.  Reviewers are encouraged
   to get sufficient information for registration requests to ensure
   that the usage is not going to duplicate one that is already
   registered, and that the point is likely to be used in
   deployments.  The zones tagged as private use
   are intended for testing purposes and closed environments;
   code points in other ranges should not be assigned for testing.</t>
  <t>Specifications are required for the standards track range of point
   assignment.  Specifications should exist for  all other ranges,
   but early assignment before a specification is
   available is considered to be permissible.
   When specifications are not provided, the description provided
   needs to have sufficient information to identify what the point is
   being used for.</t>
  <t>Experts should take into account the expected usage of fields when
   approving point assignment.  The fact that there is a range for
   standards track documents does not mean that a standards track
   document cannot have points assigned outside of that range.  The
   length of the encoded value should be weighed against how many
   code points of that length are left, the size of device it will be
   used on, and the number of code points left that encode to that
   size.</t>
  <t>Key assignments in the SUIT Parameters table, particularly those
   that encode to 1 CBOR byte (-24 to 23) should be reserved for
   SUIT Directives that match the same key value.</t>
</list></t>

</section>
<section anchor="media-type-registration"><name>Media Type Registration</name>

<t>This section registers the 'application/suit-envelope+cose' media type in the
"Media Types" registry.  This media type are used to indicate that
the content is a SUIT envelope.</t>

<figure><artwork><![CDATA[
      Type name: application

      Subtype name: suit-envelope+cose

      Required parameters: N/A

      Optional parameters: N/A

      Encoding considerations: binary

      Security considerations: See the Security Considerations section
      of [[This RFC]].

      Interoperability considerations: N/A

      Published specification: [[This RFC]]

      Applications that use this media type: Primarily used for
        Firmware and software updates although the content may
        also contain configuration data and other information
        related to software and firmware.

      Fragment identifier considerations: N/A

      Additional information:

      *  Deprecated alias names for this type: N/A

      *  Magic number(s): N/A

      *  File extension(s): cbor, suit

      *  Macintosh file type code(s): N/A

      Person & email address to contact for further information:
      iesg@ietf.org

      Intended usage: COMMON

      Restrictions on usage: N/A

      Author: Brendan Moran, <brendan.moran.ietf@gmail.com>

      Change Controller: IETF

      Provisional registration?  No
]]></artwork></figure>

</section>
</section>
<section anchor="security-considerations"><name>Security Considerations</name>

<t>This document is about a manifest format protecting and describing how to retrieve, install, and invoke firmware images and as such it is part of a larger solution for delivering firmware updates to IoT devices. A detailed security treatment can be found in the architecture <xref target="RFC9019"/> and in the information model <xref target="RFC9124"/> documents.</t>

<t>The security requirements outlined in <xref target="RFC9124"/> are addressed by this draft and its extensions.
The specific mapping of requirements and information elements in <xref target="RFC9124"/> to manifest data structures is
outlined in the table below:</t>

<texttable>
      <ttcol align='left'>Security Requirement</ttcol>
      <ttcol align='left'>Information Element</ttcol>
      <ttcol align='left'>Implementation</ttcol>
      <c>REQ.SEC.SEQUENCE</c>
      <c>Monotonic Sequence Number</c>
      <c><xref target="manifest-seqnr"/></c>
      <c>REQ.SEC.COMPATIBLE</c>
      <c>Vendor ID Condition, Class ID Condition</c>
      <c><xref target="identifier-conditions"/></c>
      <c>REQ.SEC.EXP</c>
      <c>Expiration Time</c>
      <c><xref target="I-D.ietf-suit-update-management"/></c>
      <c>REQ.SEC.AUTHENTIC</c>
      <c>Signature, Payload Digests</c>
      <c><xref target="authentication-info"/>, <xref target="suit-condition-image-match"/></c>
      <c>REQ.SEC.AUTH.IMG_TYPE</c>
      <c>Payload Format</c>
      <c><xref target="I-D.ietf-suit-update-management"/></c>
      <c>REQ.SEC.AUTH.IMG_LOC</c>
      <c>Storage Location</c>
      <c><xref target="suit-component-identifier"/></c>
      <c>REQ.SEC.AUTH.REMOTE_LOC</c>
      <c>Payload Indicator</c>
      <c><xref target="suit-parameter-uri"/></c>
      <c>REQ.SEC.AUTH.EXEC</c>
      <c>Payload Digests, Size</c>
      <c><xref target="suit-parameter-image-digest"/>, <xref target="suit-parameter-image-size"/></c>
      <c>REQ.SEC.AUTH.PRECURSOR</c>
      <c>Precursor Image Digest</c>
      <c><xref target="suit-parameter-image-digest"/></c>
      <c>REQ.SEC.AUTH.COMPATIBILITY</c>
      <c>Authenticated Vendor and Class IDs</c>
      <c><xref target="suit-parameter-vendor-identifier"/>, <xref target="suit-parameter-class-identifier"/></c>
      <c>REQ.SEC.RIGHTS</c>
      <c>Signature</c>
      <c><xref target="authentication-info"/>, <xref target="access-control-lists"/></c>
      <c>REQ.SEC.IMG.CONFIDENTIALITY</c>
      <c>Encryption Wrapper</c>
      <c><xref target="I-D.ietf-suit-firmware-encryption"/></c>
      <c>REQ.SEC.ACCESS_CONTROL: Access Control</c>
      <c>None</c>
      <c><xref target="access-control-lists"/></c>
      <c>REQ.SEC.MFST.CONFIDENTIALITY</c>
      <c>Manifest Encryption Wrapper / Transport Security</c>
      <c><xref target="I-D.ietf-suit-firmware-encryption"/></c>
      <c>REQ.SEC.IMG.COMPLETE_DIGEST</c>
      <c>Payload Digests</c>
      <c>Implementation Consideration</c>
      <c>REQ.SEC.REPORTING</c>
      <c>None</c>
      <c><xref target="I-D.ietf-suit-report"/>, <xref target="RFC9334"/></c>
      <c>REQ.SEC.KEY.PROTECTION</c>
      <c>None</c>
      <c>Implementation Consideration</c>
      <c>REQ.SEC.KEY.ROTATION</c>
      <c>None</c>
      <c><xref target="I-D.tschofenig-cose-cwt-chain"/>, Implementation Consideration</c>
      <c>REQ.SEC.MFST.CHECK</c>
      <c>None</c>
      <c>Deployment Consideration</c>
      <c>REQ.SEC.MFST.TRUSTED</c>
      <c>None</c>
      <c>Deployment Consideration</c>
      <c>REQ.SEC.MFST.CONST</c>
      <c>None</c>
      <c>Implementation Consideration</c>
      <c>REQ.USE.MFST.PRE_CHECK</c>
      <c>Additional Installation Instructions</c>
      <c><xref target="I-D.ietf-suit-update-management"/></c>
      <c>REQ.USE.MFST.TEXT</c>
      <c>Manifest Text Information</c>
      <c><xref target="manifest-digest-text"/></c>
      <c>REQ.USE.MFST.OVERRIDE_REMOTE</c>
      <c>Aliases</c>
      <c><xref target="RFC3986"/> Relative URIs, <xref target="I-D.ietf-suit-trust-domains"/></c>
      <c>REQ.USE.MFST.COMPONENT</c>
      <c>Dependencies, StorageIdentifier, ComponentIdentifier</c>
      <c><xref target="suit-component-identifier">SUIT_Component_Identifier</xref>, <xref target="I-D.ietf-suit-trust-domains"/></c>
      <c>REQ.USE.MFST.MULTI_AUTH</c>
      <c>Signature</c>
      <c><xref target="authentication-info"/></c>
      <c>REQ.USE.IMG.FORMAT</c>
      <c>Payload Format</c>
      <c><xref target="I-D.ietf-suit-update-management"/></c>
      <c>REQ.USE.IMG.NESTED</c>
      <c>Processing Steps</c>
      <c><xref target="I-D.ietf-suit-firmware-encryption"/> (Encryption Wrapper), <xref target="I-D.ietf-suit-update-management"/> (Payload Format)</c>
      <c>REQ.USE.IMG.VERSIONS</c>
      <c>Required Image Version List</c>
      <c><xref target="I-D.ietf-suit-update-management"/></c>
      <c>REQ.USE.IMG.SELECT</c>
      <c>XIP Address</c>
      <c><xref target="suit-condition-component-slot"/></c>
      <c>REQ.USE.EXEC</c>
      <c>Runtime Metadata</c>
      <c><xref target="manifest-commands"/> (suit-invoke)</c>
      <c>REQ.USE.LOAD</c>
      <c>Load-Time Metadata</c>
      <c><xref target="manifest-commands"/> (suit-load)</c>
      <c>REQ.USE.PAYLOAD</c>
      <c>Payload</c>
      <c><xref target="template-integrated-payload"/></c>
      <c>REQ.USE.PARSE</c>
      <c>Simple Parsing</c>
      <c><xref target="command-behavior"/></c>
      <c>REQ.USE.DELEGATION</c>
      <c>Delegation Chain</c>
      <c><xref target="I-D.tschofenig-cose-cwt-chain"/></c>
</texttable>

</section>
<section anchor="acknowledgements"><name>Acknowledgements</name>

<t>We would like to thank the following persons for their support in designing this mechanism:</t>

<t><list style="symbols">
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Milosch Meriac"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Geraint Luff"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Dan Ros"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="John-Paul Stanford"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Hugo Vincent"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Carsten Bormann"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Frank Audun Kvamtrø"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Krzysztof Chruściński"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Andrzej Puzdrowski"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Michael Richardson"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="David Brown"/></t>
      </dd>
    </dl>
  </t>
  <t>    <dl>
      <dt> </dt>
      <dd>
        <t><contact fullname="Emmanuel Baccelli"/></t>
      </dd>
    </dl>
  </t>
</list></t>

<t>We would like to thank our responsible area director, Roman Danyliw, for his detailed review.
Finally, we would like to thank our SUIT working group chairs (Dave Thaler, David Waltermire, Russ Housley)
for their feedback and support.</t>

</section>


  </middle>

  <back>


<references title='References' anchor="sec-combined-references">

    <references title='Normative References' anchor="sec-normative-references">



<reference anchor="RFC9562">
  <front>
    <title>Universally Unique IDentifiers (UUIDs)</title>
    <author fullname="K. Davis" initials="K." surname="Davis"/>
    <author fullname="B. Peabody" initials="B." surname="Peabody"/>
    <author fullname="P. Leach" initials="P." surname="Leach"/>
    <date month="May" year="2024"/>
    <abstract>
      <t>This specification defines UUIDs (Universally Unique IDentifiers) --
also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform
Resource Name namespace for UUIDs. A UUID is 128 bits long and is
intended to guarantee uniqueness across space and time. UUIDs were
originally used in the Apollo Network Computing System (NCS), later
in the Open Software Foundation's (OSF's) Distributed Computing
Environment (DCE), and then in Microsoft Windows platforms.</t>
      <t>This specification is derived from the OSF DCE specification with the
kind permission of the OSF (now known as "The Open Group"). Information from earlier versions of the OSF DCE specification have
been incorporated into this document. This document obsoletes RFC
4122.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9562"/>
  <seriesInfo name="DOI" value="10.17487/RFC9562"/>
</reference>
<reference anchor="RFC9052">
  <front>
    <title>CBOR Object Signing and Encryption (COSE): Structures and Process</title>
    <author fullname="J. Schaad" initials="J." surname="Schaad"/>
    <date month="August" year="2022"/>
    <abstract>
      <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need to be able to define basic security services for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. This specification additionally describes how to represent cryptographic keys using CBOR.</t>
      <t>This document, along with RFC 9053, obsoletes RFC 8152.</t>
    </abstract>
  </front>
  <seriesInfo name="STD" value="96"/>
  <seriesInfo name="RFC" value="9052"/>
  <seriesInfo name="DOI" value="10.17487/RFC9052"/>
</reference>
<reference anchor="RFC3986">
  <front>
    <title>Uniform Resource Identifier (URI): Generic Syntax</title>
    <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee"/>
    <author fullname="R. Fielding" initials="R." surname="Fielding"/>
    <author fullname="L. Masinter" initials="L." surname="Masinter"/>
    <date month="January" year="2005"/>
    <abstract>
      <t>A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. This specification defines the generic URI syntax and a process for resolving URI references that might be in relative form, along with guidelines and security considerations for the use of URIs on the Internet. The URI syntax defines a grammar that is a superset of all valid URIs, allowing an implementation to parse the common components of a URI reference without knowing the scheme-specific requirements of every possible identifier. This specification does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme. [STANDARDS-TRACK]</t>
    </abstract>
  </front>
  <seriesInfo name="STD" value="66"/>
  <seriesInfo name="RFC" value="3986"/>
  <seriesInfo name="DOI" value="10.17487/RFC3986"/>
</reference>
<reference anchor="RFC8949">
  <front>
    <title>Concise Binary Object Representation (CBOR)</title>
    <author fullname="C. Bormann" initials="C." surname="Bormann"/>
    <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
    <date month="December" year="2020"/>
    <abstract>
      <t>The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t>
      <t>This document obsoletes RFC 7049, providing editorial improvements, new details, and errata fixes while keeping full compatibility with the interchange format of RFC 7049. It does not create a new version of the format.</t>
    </abstract>
  </front>
  <seriesInfo name="STD" value="94"/>
  <seriesInfo name="RFC" value="8949"/>
  <seriesInfo name="DOI" value="10.17487/RFC8949"/>
</reference>
<reference anchor="RFC9019">
  <front>
    <title>A Firmware Update Architecture for Internet of Things</title>
    <author fullname="B. Moran" initials="B." surname="Moran"/>
    <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
    <author fullname="D. Brown" initials="D." surname="Brown"/>
    <author fullname="M. Meriac" initials="M." surname="Meriac"/>
    <date month="April" year="2021"/>
    <abstract>
      <t>Vulnerabilities in Internet of Things (IoT) devices have raised the need for a reliable and secure firmware update mechanism suitable for devices with resource constraints. Incorporating such an update mechanism is a fundamental requirement for fixing vulnerabilities, but it also enables other important capabilities such as updating configuration settings and adding new functionality.</t>
      <t>In addition to the definition of terminology and an architecture, this document provides the motivation for the standardization of a manifest format as a transport-agnostic means for describing and protecting firmware updates.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9019"/>
  <seriesInfo name="DOI" value="10.17487/RFC9019"/>
</reference>
<reference anchor="RFC9124">
  <front>
    <title>A Manifest Information Model for Firmware Updates in Internet of Things (IoT) Devices</title>
    <author fullname="B. Moran" initials="B." surname="Moran"/>
    <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
    <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
    <date month="January" year="2022"/>
    <abstract>
      <t>Vulnerabilities with Internet of Things (IoT) devices have raised the need for a reliable and secure firmware update mechanism that is also suitable for constrained devices. Ensuring that devices function and remain secure over their service lifetime requires such an update mechanism to fix vulnerabilities, update configuration settings, and add new functionality.</t>
      <t>One component of such a firmware update is a concise and machine-processable metadata document, or manifest, that describes the firmware image(s) and offers appropriate protection. This document describes the information that must be present in the manifest.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9124"/>
  <seriesInfo name="DOI" value="10.17487/RFC9124"/>
</reference>
<reference anchor="I-D.ietf-suit-mti">
   <front>
      <title>Cryptographic Algorithms for Internet of Things (IoT) Devices</title>
      <author fullname="Brendan Moran" initials="B." surname="Moran">
         <organization>Arm Limited</organization>
      </author>
      <author fullname="Øyvind Rønningstad" initials="O." surname="Rønningstad">
         <organization>Nordic Semiconductor</organization>
      </author>
      <author fullname="Akira Tsukamoto" initials="A." surname="Tsukamoto">
         <organization>Openchip &amp; Software Technologies, S.L.</organization>
      </author>
      <date day="22" month="July" year="2025"/>
      <abstract>
	 <t>   The SUIT manifest, as defined in "A Manifest Information Model for
   Firmware Updates in Internet of Things (IoT) Devices" (RFC 9124),
   provides a flexible and extensible format for describing how firmware
   and software updates are to be fetched, verified, decrypted, and
   installed on resource-constrained devices.  To ensure the security of
   these update processes, the manifest relies on cryptographic
   algorithms for functions such as digital signature verification,
   integrity checking, and confidentiality.

   This document defines cryptographic algorithm profiles for use with
   the Software Updates for Internet of Things (SUIT) manifest.  These
   profiles specify sets of algorithms to promote interoperability
   across implementations.

   Given the diversity of IoT deployments and the evolving cryptographic
   landscape, algorithm agility is essential.  This document groups
   algorithms into named profiles to accommodate varying levels of
   device capabilities and security requirements.  These profiles
   support the use cases laid out in the SUIT architecture, published in
   "A Firmware Update Architecture for Internet of Things" (RFC 9019).

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-suit-mti-23"/>
   
</reference>
<reference anchor="I-D.ietf-suit-firmware-encryption">
   <front>
      <title>Encrypted Payloads in SUIT Manifests</title>
      <author fullname="Hannes Tschofenig" initials="H." surname="Tschofenig">
         <organization>University of Applied Sciences Bonn-Rhein-Sieg</organization>
      </author>
      <author fullname="Russ Housley" initials="R." surname="Housley">
         <organization>Vigil Security, LLC</organization>
      </author>
      <author fullname="Brendan Moran" initials="B." surname="Moran">
         <organization>Arm Limited</organization>
      </author>
      <author fullname="David Brown" initials="D." surname="Brown">
         <organization>Linaro</organization>
      </author>
      <author fullname="Ken Takayama" initials="K." surname="Takayama">
         <organization>SECOM CO., LTD.</organization>
      </author>
      <date day="8" month="December" year="2025"/>
      <abstract>
	 <t>   This document specifies techniques for encrypting software, firmware,
   machine learning models, and personalization data by utilizing the
   IETF SUIT manifest.  Key agreement is provided by ephemeral-static
   (ES) Diffie-Hellman (DH) and AES Key Wrap (AES-KW).  ES-DH uses
   public key cryptography while AES-KW uses a pre-shared key.
   Encryption of the plaintext is accomplished with conventional
   symmetric key cryptography.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-suit-firmware-encryption-26"/>
   
</reference>
<reference anchor="I-D.ietf-suit-update-management">
   <front>
      <title>Update Management Extensions for Software Updates for Internet of Things (SUIT) Manifests</title>
      <author fullname="Brendan Moran" initials="B." surname="Moran">
         <organization>Arm Limited</organization>
      </author>
      <author fullname="Ken Takayama" initials="K." surname="Takayama">
         <organization>SECOM CO., LTD.</organization>
      </author>
      <date day="18" month="June" year="2026"/>
      <abstract>
	 <t>   This specification describes extensions to the SUIT manifest format.
   These extensions allow an update author, update distributor or device
   operator to more precisely control the distribution and installation
   of updates to devices.  These extensions also provide a mechanism to
   inform a management system of Software Identifier and Software Bill
   Of Materials information about an updated device.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-suit-update-management-12"/>
   
</reference>
<reference anchor="I-D.ietf-suit-trust-domains">
   <front>
      <title>Software Update for the Internet of Things (SUIT) Manifest Extensions for Multiple Trust Domain</title>
      <author fullname="Brendan Moran" initials="B." surname="Moran">
         <organization>Arm Limited</organization>
      </author>
      <author fullname="Ken Takayama" initials="K." surname="Takayama">
         <organization>SECOM CO., LTD.</organization>
      </author>
      <date day="22" month="July" year="2025"/>
      <abstract>
	 <t>   A device has more than one trust domain when it enables delegation of
   different rights to mutually distrusting entities for use for
   different purposes or Components in the context of firmware or
   software update.  This specification describes extensions to the
   Software Update for the Internet of Things (SUIT) Manifest format for
   use in deployments with multiple trust domains.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-suit-trust-domains-12"/>
   
</reference>
<reference anchor="I-D.ietf-suit-report">
   <front>
      <title>Secure Reporting of SUIT Update Status</title>
      <author fullname="Brendan Moran" initials="B." surname="Moran">
         <organization>Arm Limited</organization>
      </author>
      <author fullname="Henk Birkholz" initials="H." surname="Birkholz">
         <organization>Fraunhofer SIT</organization>
      </author>
      <date day="26" month="May" year="2026"/>
      <abstract>
	 <t>   The Software Update for the Internet of Things (SUIT) manifest
   provides a way for many different update and boot workflows to be
   described by a common format.  This document specifies a lightweight
   feedback mechanism that allows a developer in possession of a
   manifest to reconstruct the decisions made and actions performed by a
   manifest processor.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-suit-report-20"/>
   
</reference>
<reference anchor="RFC9090">
  <front>
    <title>Concise Binary Object Representation (CBOR) Tags for Object Identifiers</title>
    <author fullname="C. Bormann" initials="C." surname="Bormann"/>
    <date month="July" year="2021"/>
    <abstract>
      <t>The Concise Binary Object Representation (CBOR), defined in RFC 8949, is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation.</t>
      <t>This document defines CBOR tags for object identifiers (OIDs) and is the reference document for the IANA registration of the CBOR tags so defined.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9090"/>
  <seriesInfo name="DOI" value="10.17487/RFC9090"/>
</reference>
<reference anchor="RFC9054">
  <front>
    <title>CBOR Object Signing and Encryption (COSE): Hash Algorithms</title>
    <author fullname="J. Schaad" initials="J." surname="Schaad"/>
    <date month="August" year="2022"/>
    <abstract>
      <t>The CBOR Object Signing and Encryption (COSE) syntax (see RFC 9052) does not define any direct methods for using hash algorithms. There are, however, circumstances where hash algorithms are used, such as indirect signatures, where the hash of one or more contents are signed, and identification of an X.509 certificate or other object by the use of a fingerprint. This document defines hash algorithms that are identified by COSE algorithm identifiers.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9054"/>
  <seriesInfo name="DOI" value="10.17487/RFC9054"/>
</reference>
<reference anchor="RFC8610">
  <front>
    <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
    <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
    <author fullname="C. Vigano" initials="C." surname="Vigano"/>
    <author fullname="C. Bormann" initials="C." surname="Bormann"/>
    <date month="June" year="2019"/>
    <abstract>
      <t>This document proposes a notational convention to express Concise Binary Object Representation (CBOR) data structures (RFC 7049). Its main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="8610"/>
  <seriesInfo name="DOI" value="10.17487/RFC8610"/>
</reference>

<reference anchor="COSE-Alg" target="https://www.iana.org/assignments/cose/cose.xhtml#algorithms">
  <front>
    <title>CBOR Object Signing and Encryption (COSE) — COSE Algorithms</title>
    <author initials="" surname="IANA">
      <organization>Internet Assigned Numbers Authority</organization>
    </author>
    <date />
  </front>
</reference>


<reference anchor="RFC2119">
  <front>
    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
    <author fullname="S. Bradner" initials="S." surname="Bradner"/>
    <date month="March" year="1997"/>
    <abstract>
      <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
    </abstract>
  </front>
  <seriesInfo name="BCP" value="14"/>
  <seriesInfo name="RFC" value="2119"/>
  <seriesInfo name="DOI" value="10.17487/RFC2119"/>
</reference>
<reference anchor="RFC8174">
  <front>
    <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
    <author fullname="B. Leiba" initials="B." surname="Leiba"/>
    <date month="May" year="2017"/>
    <abstract>
      <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
    </abstract>
  </front>
  <seriesInfo name="BCP" value="14"/>
  <seriesInfo name="RFC" value="8174"/>
  <seriesInfo name="DOI" value="10.17487/RFC8174"/>
</reference>



    </references>

    <references title='Informative References' anchor="sec-informative-references">



<reference anchor="RFC9397">
  <front>
    <title>Trusted Execution Environment Provisioning (TEEP) Architecture</title>
    <author fullname="M. Pei" initials="M." surname="Pei"/>
    <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
    <author fullname="D. Thaler" initials="D." surname="Thaler"/>
    <author fullname="D. Wheeler" initials="D." surname="Wheeler"/>
    <date month="July" year="2023"/>
    <abstract>
      <t>A Trusted Execution Environment (TEE) is an environment that enforces the following: any code within the environment cannot be tampered with, and any data used by such code cannot be read or tampered with by any code outside the environment. This architecture document discusses the motivation for designing and standardizing a protocol for managing the lifecycle of Trusted Applications running inside such a TEE.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9397"/>
  <seriesInfo name="DOI" value="10.17487/RFC9397"/>
</reference>
<reference anchor="RFC9334">
  <front>
    <title>Remote ATtestation procedureS (RATS) Architecture</title>
    <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
    <author fullname="D. Thaler" initials="D." surname="Thaler"/>
    <author fullname="M. Richardson" initials="M." surname="Richardson"/>
    <author fullname="N. Smith" initials="N." surname="Smith"/>
    <author fullname="W. Pan" initials="W." surname="Pan"/>
    <date month="January" year="2023"/>
    <abstract>
      <t>In network protocol exchanges, it is often useful for one end of a communication to know whether the other end is in an intended operating state. This document provides an architectural overview of the entities involved that make such tests possible through the process of generating, conveying, and evaluating evidentiary Claims. It provides a model that is neutral toward processor architectures, the content of Claims, and protocols.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9334"/>
  <seriesInfo name="DOI" value="10.17487/RFC9334"/>
</reference>
<reference anchor="I-D.tschofenig-cose-cwt-chain">
   <front>
      <title>CBOR Object Signing and Encryption (COSE): Header Parameters for Carrying and Referencing Chains of CBOR Web Tokens (CWTs)</title>
      <author fullname="Hannes Tschofenig" initials="H." surname="Tschofenig">
         <organization>University of Applied Sciences Bonn-Rhein-Sieg</organization>
      </author>
      <author fullname="Brendan Moran" initials="B." surname="Moran">
         <organization>Arm Limited</organization>
      </author>
      <author fullname="Henk Birkholz" initials="H." surname="Birkholz">
         <organization>Fraunhofer SIT</organization>
      </author>
      <date day="20" month="October" year="2025"/>
      <abstract>
	 <t>   The CBOR Object Signing and Encryption (COSE) message structure uses
   references to keys and defines header parameters to carry chains of
   X.509 certificates.

   This specification extends this functionality to CBOR Web Tokens
   (CWTs).

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-tschofenig-cose-cwt-chain-03"/>
   
</reference>
<reference anchor="RFC7228">
  <front>
    <title>Terminology for Constrained-Node Networks</title>
    <author fullname="C. Bormann" initials="C." surname="Bormann"/>
    <author fullname="M. Ersue" initials="M." surname="Ersue"/>
    <author fullname="A. Keranen" initials="A." surname="Keranen"/>
    <date month="May" year="2014"/>
    <abstract>
      <t>The Internet Protocol Suite is increasingly used on small devices with severe constraints on power, memory, and processing resources, creating constrained-node networks. This document provides a number of basic terms that have been useful in the standardization work for constrained-node networks.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="7228"/>
  <seriesInfo name="DOI" value="10.17487/RFC7228"/>
</reference>

<reference anchor="YAML" target="https://yaml.org/spec/1.2.2/">
  <front>
    <title>YAML Ain’t Markup Language (YAML™) version 1.2</title>
    <author >
      <organization></organization>
    </author>
    <date year="2021"/>
  </front>
</reference>


    </references>

</references>


<?line 1740?>

<section anchor="full-cddl"><name>Full CDDL</name>
<t>In order to create a valid SUIT Manifest document the structure of the corresponding CBOR message <bcp14>MUST</bcp14> adhere to the following CDDL (<xref target="RFC8610"/>) data definition.</t>

<t>To be valid, the following CDDL <bcp14>MUST</bcp14> have the COSE CDDL appended to it. The COSE CDDL can be obtained by following the directions in <xref section="1.4" sectionFormat="comma" target="RFC9052"/>.</t>

<figure><sourcecode type="cddl" name="draft-ietf-suit-manifest.cddl"><![CDATA[
SUIT_start = SUIT_Envelope_Tagged / SUIT_Manifest_Tagged / start
SUIT_Envelope_Tagged = #6.107(SUIT_Envelope)
SUIT_Envelope = {
  suit-authentication-wrapper => bstr .cbor SUIT_Authentication,
  suit-manifest  => bstr .cbor SUIT_Manifest,
  SUIT_Severable_Manifest_Members,
  * SUIT_Integrated_Payload,
  * $$SUIT_Envelope_Extensions,
}

SUIT_Authentication = [
    bstr .cbor SUIT_Digest,
    * bstr .cbor SUIT_Authentication_Block
]

SUIT_Digest = [
  suit-digest-algorithm-id : suit-cose-hash-algs,
  suit-digest-bytes : bstr,
  * $$SUIT_Digest-extensions
]

SUIT_Authentication_Block /= COSE_Mac_Tagged
SUIT_Authentication_Block /= COSE_Sign_Tagged
SUIT_Authentication_Block /= COSE_Mac0_Tagged
SUIT_Authentication_Block /= COSE_Sign1_Tagged

SUIT_Severable_Manifest_Members = (
  ? suit-payload-fetch => bstr .cbor SUIT_Command_Sequence,
  ? suit-install => bstr .cbor SUIT_Command_Sequence,
  ? suit-text => bstr .cbor SUIT_Text_Map,
  * $$SUIT_severable-members-extensions,
)

SUIT_Integrated_Payload = (suit-integrated-payload-key => bstr)
suit-integrated-payload-key = tstr

SUIT_Manifest_Tagged = #6.1070(SUIT_Manifest)

SUIT_Manifest = {
    suit-manifest-version         => 1,
    suit-manifest-sequence-number => uint,
    suit-common                   => bstr .cbor SUIT_Common,
    ? suit-reference-uri          => tstr,
    SUIT_Unseverable_Members,
    SUIT_Severable_Members_Choice,
    * $$SUIT_Manifest_Extensions,
}

SUIT_Unseverable_Members = (
  ? suit-validate => bstr .cbor SUIT_Command_Sequence,
  ? suit-load => bstr .cbor SUIT_Command_Sequence,
  ? suit-invoke => bstr .cbor SUIT_Command_Sequence,
  * $$unseverable-manifest-member-extensions,
)

SUIT_Severable_Members_Choice = (
  ? suit-payload-fetch => SUIT_Digest / 
      bstr .cbor SUIT_Command_Sequence,
  ? suit-install => SUIT_Digest / bstr .cbor SUIT_Command_Sequence,
  ? suit-text => SUIT_Digest / bstr .cbor SUIT_Text_Map,
  * $$severable-manifest-members-choice-extensions
)

SUIT_Common = {
    ? suit-components             => SUIT_Components,
    ? suit-shared-sequence        => bstr .cbor SUIT_Shared_Sequence,
    * $$SUIT_Common-extensions,
}

SUIT_Components           = [ + SUIT_Component_Identifier ]

;REQUIRED to implement:
suit-cose-hash-algs /= cose-alg-sha-256

;OPTIONAL to implement:
suit-cose-hash-algs /= cose-alg-shake128
suit-cose-hash-algs /= cose-alg-sha-384
suit-cose-hash-algs /= cose-alg-sha-512
suit-cose-hash-algs /= cose-alg-shake256

SUIT_Component_Identifier =  [* bstr]

SUIT_Shared_Sequence = [
    + ( SUIT_Condition // SUIT_Shared_Commands )
]

SUIT_Shared_Commands //= (suit-directive-set-component-index,  IndexArg)
SUIT_Shared_Commands //= (suit-directive-run-sequence,
    bstr .cbor SUIT_Shared_Sequence)
SUIT_Shared_Commands //= (suit-directive-try-each,
    SUIT_Directive_Try_Each_Argument_Shared)
SUIT_Shared_Commands //= (suit-directive-override-parameters,
    {+ $$SUIT_Parameters})

IndexArg /= uint
IndexArg /= true
IndexArg /= [+uint]


SUIT_Directive_Try_Each_Argument_Shared = [
    2* bstr .cbor SUIT_Shared_Sequence,
    ?nil
]

SUIT_Command_Sequence = [ + (
    SUIT_Condition // SUIT_Directive // SUIT_Command_Custom
) ]

SUIT_Command_Custom = (suit-command-custom, bstr/tstr/int/nil)
SUIT_Condition //= (suit-condition-vendor-identifier, SUIT_Rep_Policy)
SUIT_Condition //= (suit-condition-class-identifier,  SUIT_Rep_Policy)
SUIT_Condition //= (suit-condition-device-identifier, SUIT_Rep_Policy)
SUIT_Condition //= (suit-condition-image-match,       SUIT_Rep_Policy)
SUIT_Condition //= (suit-condition-component-slot,    SUIT_Rep_Policy)
SUIT_Condition //= (suit-condition-check-content,     SUIT_Rep_Policy)
SUIT_Condition //= (suit-condition-abort,             SUIT_Rep_Policy)

SUIT_Directive //= (suit-directive-write,             SUIT_Rep_Policy)
SUIT_Directive //= (suit-directive-set-component-index,  IndexArg)
SUIT_Directive //= (suit-directive-run-sequence,
    bstr .cbor SUIT_Command_Sequence)
SUIT_Directive //= (suit-directive-try-each,
    SUIT_Directive_Try_Each_Argument)
SUIT_Directive //= (suit-directive-override-parameters,
    {+ $$SUIT_Parameters})
SUIT_Directive //= (suit-directive-fetch,             SUIT_Rep_Policy)
SUIT_Directive //= (suit-directive-copy,              SUIT_Rep_Policy)
SUIT_Directive //= (suit-directive-swap,              SUIT_Rep_Policy)
SUIT_Directive //= (suit-directive-invoke,            SUIT_Rep_Policy)

SUIT_Directive_Try_Each_Argument = [
    2* bstr .cbor SUIT_Command_Sequence,
    ?nil
]

SUIT_Rep_Policy = uint .bits suit-reporting-bits

suit-reporting-bits = &(
    suit-send-record-on-success : 0,
    suit-send-record-on-failure : 1,
    suit-send-sysinfo-success : 2,
    suit-send-sysinfo-failure : 3
)

$$SUIT_Parameters //= (suit-parameter-vendor-identifier =>
    (RFC4122_UUID / cbor-pen))

cbor-pen = #6.112(bstr)

$$SUIT_Parameters //= (suit-parameter-class-identifier => RFC4122_UUID)
$$SUIT_Parameters //= (suit-parameter-image-digest
    => bstr .cbor SUIT_Digest)
$$SUIT_Parameters //= (suit-parameter-image-size => uint)
$$SUIT_Parameters //= (suit-parameter-component-slot => uint)

$$SUIT_Parameters //= (suit-parameter-uri => tstr)
$$SUIT_Parameters //= (suit-parameter-fetch-arguments => bstr)
$$SUIT_Parameters //= (suit-parameter-source-component => uint)
$$SUIT_Parameters //= (suit-parameter-invoke-args => bstr)

$$SUIT_Parameters //= (suit-parameter-device-identifier => RFC4122_UUID)

$$SUIT_Parameters //= (suit-parameter-custom => int/bool/tstr/bstr)

$$SUIT_Parameters //= (suit-parameter-content => bstr)
$$SUIT_Parameters //= (suit-parameter-strict-order => bool)
$$SUIT_Parameters //= (suit-parameter-soft-failure => bool)

RFC4122_UUID = bstr .size 16

tag38-ltag = text .regexp "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"
SUIT_Text_Map = {
    + tag38-ltag => SUIT_Text_LMap
}
SUIT_Text_LMap = {
    SUIT_Text_Keys,
    * SUIT_Component_Identifier => {
        SUIT_Text_Component_Keys
    }
}

SUIT_Text_Component_Keys = (
    ? suit-text-vendor-name           => tstr,
    ? suit-text-model-name            => tstr,
    ? suit-text-vendor-domain         => tstr,
    ? suit-text-model-info            => tstr,
    ? suit-text-component-description => tstr,
    ? suit-text-component-version     => tstr,
    * $$suit-text-component-key-extensions
)

SUIT_Text_Keys = (
    ? suit-text-manifest-description => tstr,
    ? suit-text-update-description   => tstr,
    ? suit-text-manifest-json-source => tstr,
    ? suit-text-manifest-yaml-source => tstr,
    * $$suit-text-key-extensions
)

suit-authentication-wrapper = 2
suit-manifest = 3

;REQUIRED to implement:
cose-alg-sha-256 = -16

;OPTIONAL to implement:
cose-alg-shake128 = -18
cose-alg-sha-384 = -43
cose-alg-sha-512 = -44
cose-alg-shake256 = -45

;Unseverable, recipient-necessary
suit-manifest-version = 1
suit-manifest-sequence-number = 2
suit-common = 3
suit-reference-uri = 4
suit-validate = 7
suit-load = 8
suit-invoke = 9
;Severable, recipient-necessary
suit-payload-fetch = 16
suit-install = 20
;Severable, recipient-unnecessary
suit-text = 23

suit-components = 2
suit-shared-sequence = 4

suit-command-custom = nint

suit-condition-vendor-identifier = 1
suit-condition-class-identifier  = 2
suit-condition-image-match       = 3
suit-condition-component-slot    = 5
suit-condition-check-content     = 6

suit-condition-abort                    = 14
suit-condition-device-identifier        = 24

suit-directive-set-component-index      = 12
suit-directive-try-each                 = 15
suit-directive-write                    = 18
suit-directive-override-parameters      = 20
suit-directive-fetch                    = 21
suit-directive-copy                     = 22
suit-directive-invoke                   = 23

suit-directive-swap                     = 31
suit-directive-run-sequence             = 32

suit-parameter-vendor-identifier = 1
suit-parameter-class-identifier  = 2
suit-parameter-image-digest      = 3
suit-parameter-component-slot    = 5

suit-parameter-strict-order      = 12
suit-parameter-soft-failure      = 13
suit-parameter-image-size        = 14
suit-parameter-content           = 18

suit-parameter-uri               = 21
suit-parameter-source-component  = 22
suit-parameter-invoke-args       = 23

suit-parameter-device-identifier = 24
suit-parameter-fetch-arguments   = 25

suit-parameter-custom = nint

suit-text-manifest-description  = 1
suit-text-update-description    = 2
suit-text-manifest-json-source  = 3
suit-text-manifest-yaml-source  = 4

suit-text-vendor-name           = 1
suit-text-model-name            = 2
suit-text-vendor-domain         = 3
suit-text-model-info            = 4
suit-text-component-description = 5
suit-text-component-version     = 6
]]></sourcecode></figure>

</section>
<section anchor="examples"><name>Examples</name>

<t>The following examples demonstrate a small subset of the functionality of the manifest. Even a simple manifest processor can execute most of these manifests.</t>

<t>The examples are signed using the following ECDSA secp256r1 key:</t>

<figure><artwork><![CDATA[
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgApZYjZCUGLM50VBC
CjYStX+09jGmnyJPrpDLTz/hiXOhRANCAASEloEarguqq9JhVxie7NomvqqL8Rtv
P+bitWWchdvArTsfKktsCYExwKNtrNHXi9OB3N+wnAUtszmR23M4tKiW
-----END PRIVATE KEY-----
]]></artwork></figure>

<t>The corresponding public key can be used to verify these examples:</t>

<figure><artwork><![CDATA[
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEhJaBGq4LqqvSYVcYnuzaJr6qi/Eb
bz/m4rVlnIXbwK07HypLbAmBMcCjbazR14vTgdzfsJwFLbM5kdtzOLSolg==
-----END PUBLIC KEY-----
]]></artwork></figure>

<t>Each example uses SHA256 as the digest function.</t>

<t>Note that reporting policies are declared for each non-flow-control command in these examples. The reporting policies used in the examples are described in the following tables.</t>

<texttable>
      <ttcol align='left'>Policy</ttcol>
      <ttcol align='left'>Label</ttcol>
      <c>suit-send-record-on-success</c>
      <c>Rec-Pass</c>
      <c>suit-send-record-on-failure</c>
      <c>Rec-Fail</c>
      <c>suit-send-sysinfo-success</c>
      <c>Sys-Pass</c>
      <c>suit-send-sysinfo-failure</c>
      <c>Sys-Fail</c>
</texttable>

<texttable>
      <ttcol align='left'>Command</ttcol>
      <ttcol align='left'>Sys-Fail</ttcol>
      <ttcol align='left'>Sys-Pass</ttcol>
      <ttcol align='left'>Rec-Fail</ttcol>
      <ttcol align='left'>Rec-Pass</ttcol>
      <c>suit-condition-vendor-identifier</c>
      <c>1</c>
      <c>1</c>
      <c>1</c>
      <c>1</c>
      <c>suit-condition-class-identifier</c>
      <c>1</c>
      <c>1</c>
      <c>1</c>
      <c>1</c>
      <c>suit-condition-image-match</c>
      <c>1</c>
      <c>1</c>
      <c>1</c>
      <c>1</c>
      <c>suit-condition-component-slot</c>
      <c>0</c>
      <c>1</c>
      <c>0</c>
      <c>1</c>
      <c>suit-directive-fetch</c>
      <c>0</c>
      <c>0</c>
      <c>1</c>
      <c>0</c>
      <c>suit-directive-copy</c>
      <c>0</c>
      <c>0</c>
      <c>1</c>
      <c>0</c>
      <c>suit-directive-invoke</c>
      <c>0</c>
      <c>0</c>
      <c>1</c>
      <c>0</c>
</texttable>

<section anchor="example-0-secure-boot"><name>Example 0: Secure Boot</name>

<t>This example covers the following templates:</t>

<t><list style="symbols">
  <t>Compatibility Check (<xref target="template-compatibility-check"/>)</t>
  <t>Secure Boot (<xref target="template-secure-boot"/>)</t>
</list></t>

<t>It also serves as the minimum example.</t>

<figure><sourcecode type="cbor-diag" name="example0.cbor-diag"><![CDATA[
107({
        / authentication-wrapper / 2:<< [
            / digest: / << [
                / algorithm-id / -16 / "sha256" /,
                / digest-bytes /
h'6658ea560262696dd1f13b782239a064da7c6c5cbaf52fded428a6fc83c7e5af'
            ] >>,
            / signature: / << 18([
                / protected / << {
                    / alg / 1:-7 / "ES256" /
                } >>,
                / unprotected / {
                },
                / payload / null / nil /,
                / signature / h'408d0816f9b510749bf6a51b066951e08a4438
f849eb092a1ac768eed9de696c1b1dd35d82ef149e6a73a61976ad2cfe78444b806429
3350a122f332cb49f0da'
            ]) >>
        ] >>,
        / manifest / 3:<< {
            / manifest-version / 1:1,
            / manifest-sequence-number / 2:0,
            / common / 3:<< {
                / components / 2:[
                    [h'00']
                ],
                / shared-sequence / 4:<< [
                    / directive-override-parameters / 20,{
                        / vendor-id /
1:h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' / fa6b4a53-d5ad-5fdf-
be9d-e663e4d41ffe /,
                        / class-id /
2:h'1492af1425695e48bf429b2d51f2ab45' /
1492af14-2569-5e48-bf42-9b2d51f2ab45 /,
                        / image-digest / 3:<< [
                            / algorithm-id / -16 / "sha256" /,
                            / digest-bytes /
h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210'
                        ] >>,
                        / image-size / 14:34768
                    },
                    / condition-vendor-identifier / 1,15,
                    / condition-class-identifier / 2,15
                ] >>
            } >>,
            / validate / 7:<< [
                / condition-image-match / 3,15
            ] >>,
            / invoke / 9:<< [
                / directive-invoke / 23,2
            ] >>
        } >>
    })
]]></sourcecode></figure>

<t>Total size of Envelope without COSE authentication object:  161</t>

<t>Envelope:</t>

<figure><artwork><![CDATA[
d86ba2025827815824822f58206658ea560262696dd1f13b782239a064da
7c6c5cbaf52fded428a6fc83c7e5af035871a50101020003585fa2028181
41000458568614a40150fa6b4a53d5ad5fdfbe9de663e4d41ffe02501492
af1425695e48bf429b2d51f2ab45035824822f5820001122334455667788
99aabbccddeeff0123456789abcdeffedcba98765432100e1987d0010f02
0f074382030f0943821702
]]></artwork></figure>

<t>Total size of Envelope with COSE authentication object:  237</t>

<t>Envelope with COSE authentication object:</t>

<figure><artwork><![CDATA[
d86ba2025873825824822f58206658ea560262696dd1f13b782239a064da
7c6c5cbaf52fded428a6fc83c7e5af584ad28443a10126a0f65840408d08
16f9b510749bf6a51b066951e08a4438f849eb092a1ac768eed9de696c1b
1dd35d82ef149e6a73a61976ad2cfe78444b8064293350a122f332cb49f0
da035871a50101020003585fa202818141000458568614a40150fa6b4a53
d5ad5fdfbe9de663e4d41ffe02501492af1425695e48bf429b2d51f2ab45
035824822f582000112233445566778899aabbccddeeff0123456789abcd
effedcba98765432100e1987d0010f020f074382030f0943821702
]]></artwork></figure>

</section>
<section anchor="example-1-simultaneous-download-and-installation-of-payload"><name>Example 1: Simultaneous Download and Installation of Payload</name>

<t>This example covers the following templates:</t>

<t><list style="symbols">
  <t>Compatibility Check (<xref target="template-compatibility-check"/>)</t>
  <t>Firmware Download (<xref target="firmware-download-template"/>)</t>
</list></t>

<t>Simultaneous download and installation of payload. No secure boot is present in this example to demonstrate a download-only manifest.</t>

<figure><sourcecode type="cbor-diag" name="example1.cbor-diag"><![CDATA[
107({
        / authentication-wrapper / 2:<< [
            / digest: / << [
                / algorithm-id / -16 / "sha256" /,
                / digest-bytes /
h'1f2e7acca0dc2786f2fe4eb947f50873a6a3cfaa98866c5b02e621f42074daf2'
            ] >>,
            / signature: / << 18([
                / protected / << {
                    / alg / 1:-7 / "ES256" /
                } >>,
                / unprotected / {
                },
                / payload / null / nil /,
                / signature / h'27a3d7986eddcc1bee04e1436746408c308ed3
c15ac590a1ca0cf96f85671ccac216cb9a1497fc59e21c15f33c95cf75203e25c287b3
1a57d6cd2ef950b27a7a'
            ]) >>
        ] >>,
        / manifest / 3:<< {
            / manifest-version / 1:1,
            / manifest-sequence-number / 2:1,
            / common / 3:<< {
                / components / 2:[
                    [h'00']
                ],
                / shared-sequence / 4:<< [
                    / directive-override-parameters / 20,{
                        / vendor-id /
1:h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' / fa6b4a53-d5ad-5fdf-
be9d-e663e4d41ffe /,
                        / class-id /
2:h'1492af1425695e48bf429b2d51f2ab45' /
1492af14-2569-5e48-bf42-9b2d51f2ab45 /,
                        / image-digest / 3:<< [
                            / algorithm-id / -16 / "sha256" /,
                            / digest-bytes /
h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210'
                        ] >>,
                        / image-size / 14:34768
                    },
                    / condition-vendor-identifier / 1,15,
                    / condition-class-identifier / 2,15
                ] >>
            } >>,
            / validate / 7:<< [
                / condition-image-match / 3,15
            ] >>,
            / install / 20:<< [
                / directive-override-parameters / 20,{
                    / uri / 21:"http://example.com/file.bin"
                },
                / directive-fetch / 21,2,
                / condition-image-match / 3,15
            ] >>
        } >>
    })
]]></sourcecode></figure>

<t>Total size of Envelope without COSE authentication object:  196</t>

<t>Envelope:</t>

<figure><artwork><![CDATA[
d86ba2025827815824822f58201f2e7acca0dc2786f2fe4eb947f50873a6
a3cfaa98866c5b02e621f42074daf2035894a50101020103585fa2028181
41000458568614a40150fa6b4a53d5ad5fdfbe9de663e4d41ffe02501492
af1425695e48bf429b2d51f2ab45035824822f5820001122334455667788
99aabbccddeeff0123456789abcdeffedcba98765432100e1987d0010f02
0f074382030f1458258614a115781b687474703a2f2f6578616d706c652e
636f6d2f66696c652e62696e1502030f
]]></artwork></figure>

<t>Total size of Envelope with COSE authentication object:  272</t>

<t>Envelope with COSE authentication object:</t>

<figure><artwork><![CDATA[
d86ba2025873825824822f58201f2e7acca0dc2786f2fe4eb947f50873a6
a3cfaa98866c5b02e621f42074daf2584ad28443a10126a0f6584027a3d7
986eddcc1bee04e1436746408c308ed3c15ac590a1ca0cf96f85671ccac2
16cb9a1497fc59e21c15f33c95cf75203e25c287b31a57d6cd2ef950b27a
7a035894a50101020103585fa202818141000458568614a40150fa6b4a53
d5ad5fdfbe9de663e4d41ffe02501492af1425695e48bf429b2d51f2ab45
035824822f582000112233445566778899aabbccddeeff0123456789abcd
effedcba98765432100e1987d0010f020f074382030f1458258614a11578
1b687474703a2f2f6578616d706c652e636f6d2f66696c652e62696e1502
030f
]]></artwork></figure>

</section>
<section anchor="example-2-simultaneous-download-installation-secure-boot-severed-fields"><name>Example 2: Simultaneous Download, Installation, Secure Boot, Severed Fields</name>

<t>This example covers the following templates:</t>

<t><list style="symbols">
  <t>Compatibility Check (<xref target="template-compatibility-check"/>)</t>
  <t>Secure Boot (<xref target="template-secure-boot"/>)</t>
  <t>Firmware Download (<xref target="firmware-download-template"/>)</t>
</list></t>

<t>This example also demonstrates severable elements (<xref target="ovr-severable"/>), and text (<xref target="manifest-digest-text"/>).</t>

<figure><sourcecode type="cbor-diag" name="example2.cbor-diag"><![CDATA[
107({
        / authentication-wrapper / 2:<< [
            / digest: / << [
                / algorithm-id / -16 / "sha256" /,
                / digest-bytes /
h'6a5197ed8f9dccf733d1c89a359441708e070b4c6dcb9a1c2c82c6165f609b90'
            ] >>,
            / signature: / << 18([
                / protected / << {
                    / alg / 1:-7 / "ES256" /
                } >>,
                / unprotected / {
                },
                / payload / null / nil /,
                / signature / h'073d8d80ca67d61cdf04d813c748b2de98fe78
6fc67b764431307c8dbcbe91dc6f762c2c4d7bb998ff9ead4798e03c8ee26b89ef7a9a
d4569f6e187ce89e16c5'
            ]) >>
        ] >>,
        / manifest / 3:<< {
            / manifest-version / 1:1,
            / manifest-sequence-number / 2:2,
            / common / 3:<< {
                / components / 2:[
                    [h'00']
                ],
                / shared-sequence / 4:<< [
                    / directive-override-parameters / 20,{
                        / vendor-id /
1:h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' / fa6b4a53-d5ad-5fdf-
be9d-e663e4d41ffe /,
                        / class-id /
2:h'1492af1425695e48bf429b2d51f2ab45' /
1492af14-2569-5e48-bf42-9b2d51f2ab45 /,
                        / image-digest / 3:<< [
                            / algorithm-id / -16 / "sha256" /,
                            / digest-bytes /
h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210'
                        ] >>,
                        / image-size / 14:34768
                    },
                    / condition-vendor-identifier / 1,15,
                    / condition-class-identifier / 2,15
                ] >>
            } >>,
            / reference-uri / 4:"https://git.io/JJYoj",
            / validate / 7:<< [
                / condition-image-match / 3,15
            ] >>,
            / invoke / 9:<< [
                / directive-invoke / 23,2
            ] >>,
            / install / 20:[
                / algorithm-id / -16 / "sha256" /,
                / digest-bytes /
h'cfa90c5c58595e7f5119a72f803fd0370b3e6abbec6315cd38f63135281bc498'
            ],
            / text / 23:[
                / algorithm-id / -16 / "sha256" /,
                / digest-bytes /
h'302196d452bce5e8bfeaf71e395645ede6d365e63507a081379721eeecf00007'
            ]
        } >>
    })
]]></sourcecode></figure>

<t>Total size of the Envelope without COSE authentication object or Severable Elements:  257</t>

<t>Envelope:</t>

<figure><artwork><![CDATA[
d86ba2025827815824822f58206a5197ed8f9dccf733d1c89a359441708e
070b4c6dcb9a1c2c82c6165f609b900358d1a80101020203585fa2028181
41000458568614a40150fa6b4a53d5ad5fdfbe9de663e4d41ffe02501492
af1425695e48bf429b2d51f2ab45035824822f5820001122334455667788
99aabbccddeeff0123456789abcdeffedcba98765432100e1987d0010f02
0f047468747470733a2f2f6769742e696f2f4a4a596f6a074382030f0943
82170214822f5820cfa90c5c58595e7f5119a72f803fd0370b3e6abbec63
15cd38f63135281bc49817822f5820302196d452bce5e8bfeaf71e395645
ede6d365e63507a081379721eeecf00007
]]></artwork></figure>
<t>Total size of the Envelope with COSE authentication object but without Severable Elements:  333</t>

<t>Envelope:</t>

<figure><artwork><![CDATA[
d86ba2025873825824822f58206a5197ed8f9dccf733d1c89a359441708e
070b4c6dcb9a1c2c82c6165f609b90584ad28443a10126a0f65840073d8d
80ca67d61cdf04d813c748b2de98fe786fc67b764431307c8dbcbe91dc6f
762c2c4d7bb998ff9ead4798e03c8ee26b89ef7a9ad4569f6e187ce89e16
c50358d1a80101020203585fa202818141000458568614a40150fa6b4a53
d5ad5fdfbe9de663e4d41ffe02501492af1425695e48bf429b2d51f2ab45
035824822f582000112233445566778899aabbccddeeff0123456789abcd
effedcba98765432100e1987d0010f020f047468747470733a2f2f676974
2e696f2f4a4a596f6a074382030f094382170214822f5820cfa90c5c5859
5e7f5119a72f803fd0370b3e6abbec6315cd38f63135281bc49817822f58
20302196d452bce5e8bfeaf71e395645ede6d365e63507a081379721eeec
f00007
]]></artwork></figure>

<t>Total size of Envelope with COSE authentication object and Severable Elements:  923</t>

<t>Envelope with COSE authentication object:</t>

<figure><artwork><![CDATA[
d86ba4025873825824822f58206a5197ed8f9dccf733d1c89a359441708e
070b4c6dcb9a1c2c82c6165f609b90584ad28443a10126a0f65840073d8d
80ca67d61cdf04d813c748b2de98fe786fc67b764431307c8dbcbe91dc6f
762c2c4d7bb998ff9ead4798e03c8ee26b89ef7a9ad4569f6e187ce89e16
c50358d1a80101020203585fa202818141000458568614a40150fa6b4a53
d5ad5fdfbe9de663e4d41ffe02501492af1425695e48bf429b2d51f2ab45
035824822f582000112233445566778899aabbccddeeff0123456789abcd
effedcba98765432100e1987d0010f020f047468747470733a2f2f676974
2e696f2f4a4a596f6a074382030f094382170214822f5820cfa90c5c5859
5e7f5119a72f803fd0370b3e6abbec6315cd38f63135281bc49817822f58
20302196d452bce5e8bfeaf71e395645ede6d365e63507a081379721eeec
f0000714583c8614a1157832687474703a2f2f6578616d706c652e636f6d
2f766572792f6c6f6e672f706174682f746f2f66696c652f66696c652e62
696e1502030f1759020ba165656e2d5553a20179019d2323204578616d70
6c6520323a2053696d756c74616e656f757320446f776e6c6f61642c2049
6e7374616c6c6174696f6e2c2053656375726520426f6f742c2053657665
726564204669656c64730a0a2020202054686973206578616d706c652063
6f766572732074686520666f6c6c6f77696e672074656d706c617465733a
0a202020200a202020202a20436f6d7061746962696c6974792043686563
6b20287b7b74656d706c6174652d636f6d7061746962696c6974792d6368
65636b7d7d290a202020202a2053656375726520426f6f7420287b7b7465
6d706c6174652d7365637572652d626f6f747d7d290a202020202a204669
726d7761726520446f776e6c6f616420287b7b6669726d776172652d646f
776e6c6f61642d74656d706c6174657d7d290a202020200a202020205468
6973206578616d706c6520616c736f2064656d6f6e737472617465732073
6576657261626c6520656c656d656e747320287b7b6f76722d7365766572
61626c657d7d292c20616e64207465787420287b7b6d616e69666573742d
6469676573742d746578747d7d292e814100a2036761726d2e636f6d0578
525468697320636f6d706f6e656e7420697320612064656d6f6e73747261
74696f6e2e205468652064696765737420697320612073616d706c652070
61747465726e2c206e6f742061207265616c206f6e652e
]]></artwork></figure>

</section>
<section anchor="example-3-ab-images"><name>Example 3: A/B images</name>

<t>This example covers the following templates:</t>

<t><list style="symbols">
  <t>Compatibility Check (<xref target="template-compatibility-check"/>)</t>
  <t>Secure Boot (<xref target="template-secure-boot"/>)</t>
  <t>Firmware Download (<xref target="firmware-download-template"/>)</t>
  <t>A/B Image Template (<xref target="a-b-template"/>)</t>
</list></t>

<figure><sourcecode type="cbor-diag" name="example3.cbor-diag"><![CDATA[
107({
        / authentication-wrapper / 2:<< [
            / digest: / << [
                / algorithm-id / -16 / "sha256" /,
                / digest-bytes /
h'f6d44a62ec906b392500c242e78e908e9cc5057f3f04104a06a8566200da2ee0'
            ] >>,
            / signature: / << 18([
                / protected / << {
                    / alg / 1:-7 / "ES256" /
                } >>,
                / unprotected / {
                },
                / payload / null / nil /,
                / signature / h'0bbf7058c1a79dff23c7755d36aae5c6cc1aac
b818f456e2e03f2664c369b9c6700931a52f1f8d808aa4a8e5220d479c9661d2bce0a4
4974004325001e3b1abb'
            ]) >>
        ] >>,
        / manifest / 3:<< {
            / manifest-version / 1:1,
            / manifest-sequence-number / 2:3,
            / common / 3:<< {
                / components / 2:[
                    [h'00']
                ],
                / shared-sequence / 4:<< [
                    / directive-override-parameters / 20,{
                        / vendor-id /
1:h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' / fa6b4a53-d5ad-5fdf-
be9d-e663e4d41ffe /,
                        / class-id /
2:h'1492af1425695e48bf429b2d51f2ab45' /
1492af14-2569-5e48-bf42-9b2d51f2ab45 /
                    },
                    / directive-try-each / 15,[
                        << [
                            / directive-override-parameters / 20,{
                                / slot / 5:0
                            },
                            / condition-component-slot / 5,5,
                            / directive-override-parameters / 20,{
                                / image-digest / 3:<< [
                                    / algorithm-id / -16 / "sha256" /,
                                    / digest-bytes /
h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210'
                                ] >>,
                                / image-size / 14:34768
                            }
                        ] >>,
                        << [
                            / directive-override-parameters / 20,{
                                / slot / 5:1
                            },
                            / condition-component-slot / 5,5,
                            / directive-override-parameters / 20,{
                                / image-digest / 3:<< [
                                    / algorithm-id / -16 / "sha256" /,
                                    / digest-bytes /
h'0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff'
                                ] >>,
                                / image-size / 14:76834
                            }
                        ] >>
                    ],
                    / condition-vendor-identifier / 1,15,
                    / condition-class-identifier / 2,15
                ] >>
            } >>,
            / validate / 7:<< [
                / condition-image-match / 3,15
            ] >>,
            / install / 20:<< [
                / directive-try-each / 15,[
                    << [
                        / directive-override-parameters / 20,{
                            / slot / 5:0
                        },
                        / condition-component-slot / 5,5,
                        / directive-override-parameters / 20,{
                            / uri / 21:"http://example.com/file1.bin"
                        }
                    ] >>,
                    << [
                        / directive-override-parameters / 20,{
                            / slot / 5:1
                        },
                        / condition-component-slot / 5,5,
                        / directive-override-parameters / 20,{
                            / uri / 21:"http://example.com/file2.bin"
                        }
                    ] >>
                ],
                / directive-fetch / 21,2,
                / condition-image-match / 3,15
            ] >>
        } >>
    })
]]></sourcecode></figure>

<t>Total size of Envelope without COSE authentication object:  320</t>

<t>Envelope:</t>

<figure><artwork><![CDATA[
d86ba2025827815824822f5820f6d44a62ec906b392500c242e78e908e9c
c5057f3f04104a06a8566200da2ee00359010fa5010102030358a4a20281
81410004589b8814a20150fa6b4a53d5ad5fdfbe9de663e4d41ffe025014
92af1425695e48bf429b2d51f2ab450f8258348614a10500050514a20358
24822f582000112233445566778899aabbccddeeff0123456789abcdeffe
dcba98765432100e1987d058368614a10501050514a2035824822f582001
23456789abcdeffedcba987654321000112233445566778899aabbccddee
ff0e1a00012c22010f020f074382030f14585b860f8258288614a1050005
0514a115781c687474703a2f2f6578616d706c652e636f6d2f66696c6531
2e62696e58288614a10501050514a115781c687474703a2f2f6578616d70
6c652e636f6d2f66696c65322e62696e1502030f
]]></artwork></figure>

<t>Total size of Envelope with COSE authentication object:  396</t>

<t>Envelope with COSE authentication object:</t>

<figure><artwork><![CDATA[
d86ba2025873825824822f5820f6d44a62ec906b392500c242e78e908e9c
c5057f3f04104a06a8566200da2ee0584ad28443a10126a0f658400bbf70
58c1a79dff23c7755d36aae5c6cc1aacb818f456e2e03f2664c369b9c670
0931a52f1f8d808aa4a8e5220d479c9661d2bce0a44974004325001e3b1a
bb0359010fa5010102030358a4a2028181410004589b8814a20150fa6b4a
53d5ad5fdfbe9de663e4d41ffe02501492af1425695e48bf429b2d51f2ab
450f8258348614a10500050514a2035824822f5820001122334455667788
99aabbccddeeff0123456789abcdeffedcba98765432100e1987d0583686
14a10501050514a2035824822f58200123456789abcdeffedcba98765432
1000112233445566778899aabbccddeeff0e1a00012c22010f020f074382
030f14585b860f8258288614a10500050514a115781c687474703a2f2f65
78616d706c652e636f6d2f66696c65312e62696e58288614a10501050514
a115781c687474703a2f2f6578616d706c652e636f6d2f66696c65322e62
696e1502030f
]]></artwork></figure>

</section>
<section anchor="example-4-load-from-external-storage"><name>Example 4: Load from External Storage</name>

<t>This example covers the following templates:</t>

<t><list style="symbols">
  <t>Compatibility Check (<xref target="template-compatibility-check"/>)</t>
  <t>Secure Boot (<xref target="template-secure-boot"/>)</t>
  <t>Firmware Download (<xref target="firmware-download-template"/>)</t>
  <t>Install (<xref target="template-install"/>)</t>
  <t>Load (<xref target="template-load-ext"/>)</t>
</list></t>

<figure><sourcecode type="cbor-diag" name="example4.cbor-diag"><![CDATA[
107({
        / authentication-wrapper / 2:<< [
            / digest: / << [
                / algorithm-id / -16 / "sha256" /,
                / digest-bytes /
h'5b5f6586b1e6cdf19ee479a5adabf206581000bd584b0832a9bdaf4f72cdbdd6'
            ] >>,
            / signature: / << 18([
                / protected / << {
                    / alg / 1:-7 / "ES256" /
                } >>,
                / unprotected / {
                },
                / payload / null / nil /,
                / signature / h'c53c2826b042384e95c646cbcd4308b181f1ed
2bfbeb4e70b93cac9fbdc82e382d877e2c2bcfaf975ffcd36941f2f4db89f68d3c77d6
a3506e9b1509a49dec46'
            ]) >>
        ] >>,
        / manifest / 3:<< {
            / manifest-version / 1:1,
            / manifest-sequence-number / 2:4,
            / common / 3:<< {
                / components / 2:[
                    [h'00'],
                    [h'02'],
                    [h'01']
                ],
                / shared-sequence / 4:<< [
                    / directive-set-component-index / 12,0,
                    / directive-override-parameters / 20,{
                        / vendor-id /
1:h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' / fa6b4a53-d5ad-5fdf-
be9d-e663e4d41ffe /,
                        / class-id /
2:h'1492af1425695e48bf429b2d51f2ab45' /
1492af14-2569-5e48-bf42-9b2d51f2ab45 /,
                        / image-digest / 3:<< [
                            / algorithm-id / -16 / "sha256" /,
                            / digest-bytes /
h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210'
                        ] >>,
                        / image-size / 14:34768
                    },
                    / condition-vendor-identifier / 1,15,
                    / condition-class-identifier / 2,15
                ] >>
            } >>,
            / validate / 7:<< [
                / directive-set-component-index / 12,0,
                / condition-image-match / 3,15
            ] >>,
            / load / 8:<< [
                / directive-set-component-index / 12,2,
                / directive-override-parameters / 20,{
                    / image-digest / 3:<< [
                        / algorithm-id / -16 / "sha256" /,
                        / digest-bytes /
h'0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff'
                    ] >>,
                    / image-size / 14:76834,
                    / source-component / 22:0 / [h'00'] /
                },
                / directive-copy / 22,2,
                / condition-image-match / 3,15
            ] >>,
            / invoke / 9:<< [
                / directive-set-component-index / 12,2,
                / directive-invoke / 23,2
            ] >>,
            / payload-fetch / 16:<< [
                / directive-set-component-index / 12,1,
                / directive-override-parameters / 20,{
                    / image-digest / 3:<< [
                        / algorithm-id / -16 / "sha256" /,
                        / digest-bytes /
h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210'
                    ] >>,
                    / uri / 21:"http://example.com/file.bin"
                },
                / directive-fetch / 21,2,
                / condition-image-match / 3,15
            ] >>,
            / install / 20:<< [
                / directive-set-component-index / 12,0,
                / directive-override-parameters / 20,{
                    / source-component / 22:1 / [h'02'] /
                },
                / directive-copy / 22,2,
                / condition-image-match / 3,15
            ] >>
        } >>
    })
]]></sourcecode></figure>

<t>Total size of Envelope without COSE authentication object:  327</t>

<t>Envelope:</t>

<figure><artwork><![CDATA[
d86ba2025827815824822f58205b5f6586b1e6cdf19ee479a5adabf20658
1000bd584b0832a9bdaf4f72cdbdd603590116a801010204035867a20283
814100814102814101045858880c0014a40150fa6b4a53d5ad5fdfbe9de6
63e4d41ffe02501492af1425695e48bf429b2d51f2ab45035824822f5820
00112233445566778899aabbccddeeff0123456789abcdeffedcba987654
32100e1987d0010f020f0745840c00030f085838880c0214a3035824822f
58200123456789abcdeffedcba987654321000112233445566778899aabb
ccddeeff0e1a00012c2216001602030f0945840c02170210584e880c0114
a2035824822f582000112233445566778899aabbccddeeff0123456789ab
cdeffedcba987654321015781b687474703a2f2f6578616d706c652e636f
6d2f66696c652e62696e1502030f144b880c0014a116011602030f
]]></artwork></figure>

<t>Total size of Envelope with COSE authentication object:  403</t>

<t>Envelope with COSE authentication object:</t>

<figure><artwork><![CDATA[
d86ba2025873825824822f58205b5f6586b1e6cdf19ee479a5adabf20658
1000bd584b0832a9bdaf4f72cdbdd6584ad28443a10126a0f65840c53c28
26b042384e95c646cbcd4308b181f1ed2bfbeb4e70b93cac9fbdc82e382d
877e2c2bcfaf975ffcd36941f2f4db89f68d3c77d6a3506e9b1509a49dec
4603590116a801010204035867a20283814100814102814101045858880c
0014a40150fa6b4a53d5ad5fdfbe9de663e4d41ffe02501492af1425695e
48bf429b2d51f2ab45035824822f582000112233445566778899aabbccdd
eeff0123456789abcdeffedcba98765432100e1987d0010f020f0745840c
00030f085838880c0214a3035824822f58200123456789abcdeffedcba98
7654321000112233445566778899aabbccddeeff0e1a00012c2216001602
030f0945840c02170210584e880c0114a2035824822f5820001122334455
66778899aabbccddeeff0123456789abcdeffedcba987654321015781b68
7474703a2f2f6578616d706c652e636f6d2f66696c652e62696e1502030f
144b880c0014a116011602030f
]]></artwork></figure>

</section>
<section anchor="example-5-two-images"><name>Example 5: Two Images</name>

<t>This example covers the following templates:</t>

<t><list style="symbols">
  <t>Compatibility Check (<xref target="template-compatibility-check"/>)</t>
  <t>Secure Boot (<xref target="template-secure-boot"/>)</t>
  <t>Firmware Download (<xref target="firmware-download-template"/>)</t>
</list></t>

<t>Furthermore, it shows using these templates with two images.</t>

<figure><sourcecode type="cbor-diag" name="example5.cbor-diag"><![CDATA[
107({
        / authentication-wrapper / 2:<< [
            / digest: / << [
                / algorithm-id / -16 / "sha256" /,
                / digest-bytes /
h'15ce60f77657e4531dc329155f8b0ed78f94bdc6d165b2665473693dcc34f470'
            ] >>,
            / signature: / << 18([
                / protected / << {
                    / alg / 1:-7 / "ES256" /
                } >>,
                / unprotected / {
                },
                / payload / null / nil /,
                / signature / h'53505bf2b1aba7f3c3e142d6c02350daf95331
a8942e77d7378c6670285638e0fe460fe7cebcbe242b14e7ac1a4482cf500136a2568a
92a803f614d5f87ef7a7'
            ]) >>
        ] >>,
        / manifest / 3:<< {
            / manifest-version / 1:1,
            / manifest-sequence-number / 2:5,
            / common / 3:<< {
                / components / 2:[
                    [h'00'],
                    [h'01']
                ],
                / shared-sequence / 4:<< [
                    / directive-set-component-index / 12,0,
                    / directive-override-parameters / 20,{
                        / vendor-id /
1:h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' / fa6b4a53-d5ad-5fdf-
be9d-e663e4d41ffe /,
                        / class-id /
2:h'1492af1425695e48bf429b2d51f2ab45' /
1492af14-2569-5e48-bf42-9b2d51f2ab45 /,
                        / image-digest / 3:<< [
                            / algorithm-id / -16 / "sha256" /,
                            / digest-bytes /
h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210'
                        ] >>,
                        / image-size / 14:34768
                    },
                    / condition-vendor-identifier / 1,15,
                    / condition-class-identifier / 2,15,
                    / directive-set-component-index / 12,1,
                    / directive-override-parameters / 20,{
                        / image-digest / 3:<< [
                            / algorithm-id / -16 / "sha256" /,
                            / digest-bytes /
h'0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff'
                        ] >>,
                        / image-size / 14:76834
                    }
                ] >>
            } >>,
            / validate / 7:<< [
                / directive-set-component-index / 12,0,
                / condition-image-match / 3,15,
                / directive-set-component-index / 12,1,
                / condition-image-match / 3,15
            ] >>,
            / invoke / 9:<< [
                / directive-set-component-index / 12,0,
                / directive-invoke / 23,2
            ] >>,
            / install / 20:<< [
                / directive-set-component-index / 12,0,
                / directive-override-parameters / 20,{
                    / uri / 21:"http://example.com/file1.bin"
                },
                / directive-fetch / 21,2,
                / condition-image-match / 3,15,
                / directive-set-component-index / 12,1,
                / directive-override-parameters / 20,{
                    / uri / 21:"http://example.com/file2.bin"
                },
                / directive-fetch / 21,2,
                / condition-image-match / 3,15
            ] >>
        } >>
    })
]]></sourcecode></figure>

<t>Total size of Envelope without COSE authentication object:  306</t>

<t>Envelope:</t>

<figure><artwork><![CDATA[
d86ba2025827815824822f582015ce60f77657e4531dc329155f8b0ed78f
94bdc6d165b2665473693dcc34f47003590101a601010205035895a20282
8141008141010458898c0c0014a40150fa6b4a53d5ad5fdfbe9de663e4d4
1ffe02501492af1425695e48bf429b2d51f2ab45035824822f5820001122
33445566778899aabbccddeeff0123456789abcdeffedcba98765432100e
1987d0010f020f0c0114a2035824822f58200123456789abcdeffedcba98
7654321000112233445566778899aabbccddeeff0e1a00012c220749880c
00030f0c01030f0945840c00170214584f900c0014a115781c687474703a
2f2f6578616d706c652e636f6d2f66696c65312e62696e1502030f0c0114
a115781c687474703a2f2f6578616d706c652e636f6d2f66696c65322e62
696e1502030f
]]></artwork></figure>

<t>Total size of Envelope with COSE authentication object:  382</t>

<t>Envelope with COSE authentication object:</t>

<figure><artwork><![CDATA[
d86ba2025873825824822f582015ce60f77657e4531dc329155f8b0ed78f
94bdc6d165b2665473693dcc34f470584ad28443a10126a0f6584053505b
f2b1aba7f3c3e142d6c02350daf95331a8942e77d7378c6670285638e0fe
460fe7cebcbe242b14e7ac1a4482cf500136a2568a92a803f614d5f87ef7
a703590101a601010205035895a202828141008141010458898c0c0014a4
0150fa6b4a53d5ad5fdfbe9de663e4d41ffe02501492af1425695e48bf42
9b2d51f2ab45035824822f582000112233445566778899aabbccddeeff01
23456789abcdeffedcba98765432100e1987d0010f020f0c0114a2035824
822f58200123456789abcdeffedcba987654321000112233445566778899
aabbccddeeff0e1a00012c220749880c00030f0c01030f0945840c001702
14584f900c0014a115781c687474703a2f2f6578616d706c652e636f6d2f
66696c65312e62696e1502030f0c0114a115781c687474703a2f2f657861
6d706c652e636f6d2f66696c65322e62696e1502030f
]]></artwork></figure>

</section>
</section>
<section anchor="design-rationale"><name>Design Rationale</name>

<t>In order to provide flexible behavior to constrained devices, while still allowing more powerful devices to use their full capabilities, the SUIT manifest encodes the required behavior of a Recipient device. Behavior is encoded as a specialized byte code, contained in a CBOR list. This promotes a flat encoding, which simplifies the parser. The information encoded by this byte code closely matches the operations that a device will perform, which promotes ease of processing. The core operations used by most update and trusted invocation operations are represented in the byte code. The byte code can be extended by registering new operations.</t>

<t>The specialized byte code approach gives benefits equivalent to those provided by a scripting language or conventional byte code, with two substantial differences. First, the language is extremely high level, consisting of only the operations that a device may perform during update and trusted invocation of a firmware image. Second, the language specifies linear behavior, without reverse branches. Conditional processing is supported, and parallel and out-of-order processing may be performed by sufficiently capable devices.</t>

<t>By structuring the data in this way, the manifest processor becomes a very simple engine that uses a pull parser to interpret the manifest. This pull parser invokes a series of command handlers that evaluate a Condition or execute a Directive. Most data is structured in a highly regular pattern, which simplifies the parser.</t>

<t>The results of this allow a Recipient to implement a very small parser for constrained applications. If needed, such a parser also allows the Recipient to perform complex updates with reduced overhead. Conditional execution of commands allows a simple device to perform important decisions at validation-time.</t>

<t>Dependency handling is vastly simplified as well. Dependencies function like subroutines of the language. When a manifest has a dependency, it can invoke that dependency's commands and modify their behavior by setting parameters. Because some parameters come with security implications, the dependencies also have a mechanism to reject modifications to parameters on a fine-grained level. Dependency handling is covered in <xref target="I-D.ietf-suit-trust-domains"/>.</t>

<t>Developing a robust permissions system works in this model too. The Recipient can use a simple ACL that is a table of Identities and Component Identifier permissions to ensure that operations on components fail unless they are permitted by the ACL. This table can be further refined with individual parameters and commands.</t>

<t>Capability reporting is similarly simplified. A Recipient can report the Commands, Parameters, Algorithms, and Component Identifiers that it supports. This is sufficiently precise for a manifest author to create a manifest that the Recipient can accept.</t>

<t>The simplicity of design in the Recipient due to all of these benefits allows even a highly constrained platform to use advanced update capabilities.</t>

<section anchor="design-rationale-envelope"><name>C.1 Design Rationale: Envelope</name>

<t>The Envelope is used instead of a COSE structure for several reasons:</t>

<t><list style="numbers" type="1">
  <t>This enables the use of Severable Elements (<xref target="severable-fields"/>)</t>
  <t>This enables modular processing of manifests, particularly with large signatures.</t>
  <t>This enables multiple authentication schemes.</t>
  <t>This allows integrity verification by a dependent to be unaffected by adding or removing authentication structures.</t>
</list></t>

<t>Modular processing is important because it allows a Manifest Processor to iterate forward over an Envelope, processing Delegation Chains and Authentication Blocks, retaining only intermediate values, without any need to seek forward and backwards in a stream until it gets to the Manifest itself. This allows the use of large, Post-Quantum signatures without requiring retention of the signature itself, or seeking forward and back.</t>

<t>Four authentication objects are supported by the Envelope:</t>

<t><list style="symbols">
  <t>COSE_Sign_Tagged</t>
  <t>COSE_Sign1_Tagged</t>
  <t>COSE_Mac_Tagged</t>
  <t>COSE_Mac0_Tagged</t>
</list></t>

<t>The SUIT Envelope allows an Update Authority or intermediary to mix and match any number of different authentication blocks it wants without any concern for modifying the integrity of another authentication block. This also allows the addition or removal of an authentication blocks without changing the integrity check of the Manifest, which is important for dependency handling. See <xref target="required-checks"/></t>

</section>
<section anchor="c2-byte-string-wrappers"><name>C.2 Byte String Wrappers</name>

<t>Byte string wrappers are used in several places in the suit manifest. The primary reason for wrappers it to limit the parser extent when invoked at different times, with a possible loss of context.</t>

<t>The elements of the suit envelope are wrapped both to set the extents used by the parser and to simplify integrity checks by clearly defining the length of each element.</t>

<t>The common block is re-parsed in order to find components identifiers from their indices, to find dependency prefixes and digests from their identifiers, and to find the shared sequence. The shared sequence is wrapped so that it matches other sequences, simplifying the code path.</t>

<t>A severed SUIT command sequence will appear in the envelope, so it must be wrapped as with all envelope elements. For consistency, command sequences are also wrapped in the manifest. This also allows the parser to discern the difference between a command sequence and a SUIT_Digest.</t>

<t>Parameters that are structured types (arrays and maps) are also wrapped in a bstr. This is so that parser extents can be set correctly using only a reference to the beginning of the parameter. This enables a parser to store a simple list of references to parameters that can be retrieved when needed.</t>

</section>
</section>


  </back>


</rfc>

