<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
 <!ENTITY nbsp    "&#160;">
 <!ENTITY zwsp   "&#8203;">
 <!ENTITY nbhy   "&#8209;">
 <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-suit-information-model-13" number="9124" obsoletes="" updates="" submissionType="IETF" category="info" consensus="true" xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true" version="3">

  <!-- xml2rfc v2v3 conversion 3.9.1 -->
  <front>
    <title abbrev="A Firmware Manifest Information Model">A Manifest Information Model for Firmware Updates in Internet of Things (IoT) Devices</title>
    <seriesInfo name="RFC" value="9124"/>
    <author initials="B." surname="Moran" fullname="Brendan Moran">
      <organization>Arm Limited</organization>
      <address>
        <email>Brendan.Moran@arm.com</email>
      </address>
    </author>
    <author initials="H." surname="Tschofenig" fullname="Hannes Tschofenig">
      <organization>Arm Limited</organization>
      <address>
        <email>hannes.tschofenig@gmx.net</email>
      </address>
    </author>
    <author initials="H." surname="Birkholz" fullname="Henk Birkholz">
      <organization>Fraunhofer SIT</organization>
      <address>
        <email>henk.birkholz@sit.fraunhofer.de</email>
      </address>
    </author>
    <date year="2022" month="January"/>
    <area>Security</area>
    <workgroup>SUIT</workgroup>

<keyword>computer security</keyword>
<keyword>smart objects</keyword>

    <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>
  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <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>
      <t>This document describes all the information elements required in a manifest to secure firmware updates of IoT devices. Each information element is motivated by user stories and threats it aims to mitigate. These threats and user stories are not intended to be an exhaustive list of the threats against IoT devices and possible user stories that describe how to conduct a firmware update. Instead, they are intended to describe the threats against firmware updates in isolation and provide sufficient motivation to specify the information elements that cover a wide range of user stories.</t>
      <t>To distinguish information elements from their encoding and serialization over the wire, this document presents an information model. RFC 3444 <xref target="RFC3444" format="default"/> describes the differences between information models and data models.</t>
      <t>Because this document covers a wide range of user stories and a wide range of threats, not all information elements apply to all scenarios. As a result, various information elements are optional to implement and optional to use, depending on which threats exist in a particular domain of application and which user stories are important for deployments.</t>
    </section>
    <section anchor="requirements-and-terminology" numbered="true" toc="default">
      <name>Requirements and Terminology</name>
      <section anchor="requirements-notation" numbered="true" toc="default">
        <name>Requirements Notation</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&nbsp;14
        <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
        when, they appear in all capitals, as shown here.</t>
        <t>Unless otherwise stated, these words apply to the design of the manifest format, not its implementation or application. Hence, whenever an information element is declared as "<bcp14>REQUIRED</bcp14>", this implies that the manifest format document has to include support for it.</t>
      </section>
      <section anchor="terminology" numbered="true" toc="default">
        <name>Terminology</name>
        <t>This document uses terms defined in <xref target="RFC9019" format="default"/>.
The term "Operator" refers to either a device operator or a network operator.</t>
        <t>"Secure time" and "secure clock" refer to a set of requirements on time sources. For local time sources, this primarily means that the clock must be monotonically increasing, including across power cycles, firmware updates, etc. For remote time sources, the provided time must be both authenticated and guaranteed to be correct to within some predetermined bounds, whenever the time source is accessible.</t>
        <t>The term "Envelope" (or "Manifest Envelope") is used to describe an encoding that allows the bundling of a manifest with related information elements that are not directly contained within the manifest.</t>
        <t>The term "payload" is used to describe the data that is delivered to a device during an update. This is distinct from a "firmware image", as described in <xref target="RFC9019" format="default"/>, because the payload is often in an intermediate state, such as being encrypted, compressed, and/or encoded as a differential update. The payload, taken in isolation, is often not the final firmware image.</t>
      </section>
    </section>
    <section anchor="manifest-information-elements" numbered="true" toc="default">
      <name>Manifest Information Elements</name>
      <t>Each manifest information element is anchored in a security requirement or a usability requirement. The manifest elements are described below, justified by their requirements.</t>
      <section anchor="element-version-id" numbered="true" toc="default">
        <name>Version ID of the Manifest Structure</name>
        <t>This is an identifier that describes which iteration of the manifest format is contained in the structure. This allows devices to identify the version of the manifest data model that is in use.</t>
        <t>This element is <bcp14>REQUIRED</bcp14>.</t>
      </section>
      <section anchor="element-sequence-number" numbered="true" toc="default">
        <name>Monotonic Sequence Number</name>
        <t>This element provides a monotonically increasing (unsigned) sequence number to prevent malicious actors from reverting a firmware update against the policies of the relevant authority. This number must not wrap around.</t>
        <t>For convenience, the monotonic sequence number may be a UTC timestamp. This allows global synchronization of sequence numbers without any additional management.</t>
        <t>This element is <bcp14>REQUIRED</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-sequence" format="default">REQ.SEC.SEQUENCE</xref></dd>
	</dl>
      </section>
      <section anchor="element-vendor-id" numbered="true" toc="default">
        <name>Vendor ID</name>
        <t>The Vendor ID element helps to distinguish between identically named products from different vendors. The Vendor ID is not intended to be a human-readable element. It is intended for binary match/mismatch comparison only.</t>
        <t>Recommended practice is to use version 5 Universally Unique Identifiers (UUIDs) <xref target="RFC4122" format="default"/> with the vendor's domain name and the DNS name space ID. Other options include type 1 and type 4 UUIDs.</t>
        <t>Fixed-size binary identifiers are preferred because they are simple to match, unambiguous in length, explicitly non-parsable, and require no issuing authority. Guaranteed unique integers are preferred because they are small and simple to match; however, they may not be fixed length, and they may require an issuing authority to ensure uniqueness. Free-form text is avoided because it is variable length, prone to error, and often requires parsing outside the scope of the manifest serialization.</t>
        <t>If human-readable content is required, it <bcp14>SHOULD</bcp14> be contained in a separate manifest information element: <xref target="manifest-element-text" format="default">Manifest Text Information</xref>.</t>
        <t>This element is <bcp14>RECOMMENDED</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-compatible" format="default">REQ.SEC.COMPATIBLE</xref>, <xref target="req-sec-authentic-compatibility" format="default">REQ.SEC.AUTH.COMPATIBILITY</xref></dd>
	</dl>
        <t>Here is an example for a domain-name-based UUID. Vendor A creates a UUID based on a domain name it controls, such as vendorId = UUID5(DNS, "vendor-a.example").</t>
        <t>Because the DNS infrastructure prevents multiple registrations of the same domain name, this UUID is (with very high probability) guaranteed to be unique. Because the domain name is known, this UUID is reproducible. Type 1 and type 4 UUIDs produce similar guarantees of uniqueness, but not reproducibility.</t>
        <t>This approach creates a contention when a vendor changes its name or relinquishes control of a domain name. In this scenario, it is possible that another vendor would start using that same domain name. However, this UUID is not proof of identity; a device's trust in a vendor must be anchored in a cryptographic key, not a UUID.</t>
      </section>
      <section anchor="element-class-id" numbered="true" toc="default">
        <name>Class ID</name>
        <t>A device "Class" is a set of different device types that can accept the same firmware update without modification. It thereby allows devices to determine the applicability of the firmware in an unambiguous way. Class IDs must be unique within the scope of a Vendor ID. This is to prevent similarly or identically named devices from colliding in their customer's infrastructure.</t>
        <t>Recommended practice is to use version 5 UUIDs <xref target="RFC4122" format="default"/> with as much information as necessary to define firmware compatibility. Possible information used to derive the Class ID UUID includes:</t>
        <ul spacing="normal">
          <li>Model name or number</li>
          <li>Hardware revision</li>
          <li>Runtime library version</li>
          <li>Bootloader version</li>
          <li>ROM revision</li>
          <li>Silicon batch number</li>
        </ul>
        <t>The Class ID UUID should use the Vendor ID as the name space identifier. Classes may be more fine-grained than is required to identify firmware compatibility. Classes must not be less granular than is required to identify firmware compatibility. Devices may have multiple Class IDs.</t>
        <t>The Class ID is not intended to be a human-readable element. It is intended for binary match/mismatch comparison only. A manifest serialization <bcp14>SHOULD NOT</bcp14> permit free-form text content to be used for the Class ID. A fixed-size binary identifier <bcp14>SHOULD</bcp14> be used.</t>
        <t>Some organizations desire to keep the same product naming across multiple, incompatible hardware revisions for ease of user experience. If this naming is propagated into the firmware, then matching a specific hardware version becomes a challenge. An opaque, non-readable binary identifier has no naming implications and so is more likely to be usable for distinguishing among incompatible device groupings, regardless of naming.</t>
        <t>Fixed-size binary identifiers are preferred because they are simple to match, unambiguous in length, opaque and free from naming implications, and explicitly non-parsable. Free-form text is avoided because it is variable length, prone to error, often requires parsing outside the scope of the manifest serialization, and may be homogenized across incompatible device groupings.</t>
        <t>If the Class ID is not implemented, then each logical device class must use a unique trust anchor for authorization.</t>
        <t>This element is <bcp14>RECOMMENDED</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-compatible" format="default">REQ.SEC.COMPATIBLE</xref>, <xref target="req-sec-authentic-compatibility" format="default">REQ.SEC.AUTH.COMPATIBILITY</xref></dd>
	</dl>
        <section anchor="example-1-different-classes" numbered="true" toc="default">
          <name>Example 1: Different Classes</name>
          <t>Vendor A creates Product Z and Product Y. The firmware images of Products Z and Y are not interchangeable. Vendor A creates UUIDs as follows:</t>
          <ul spacing="normal">
            <li>vendorId = UUID5(DNS, "vendor-a.example")</li>
            <li>ZclassId = UUID5(vendorId, "Product Z")</li>
            <li>YclassId = UUID5(vendorId, "Product Y")</li>
          </ul>
          <t>This ensures that Vendor A's Product Z cannot install firmware for Product Y and Product Y cannot install firmware for Product Z.</t>
        </section>
        <section anchor="example-2-upgrading-class-id" numbered="true" toc="default">
          <name>Example 2: Upgrading Class ID</name>
          <t>Vendor A creates Product X. Later, Vendor A adds a new feature to Product X, creating Product X v2. Product X requires a firmware update to work with firmware intended for Product X v2.</t>
          <t>Vendor A creates UUIDs as follows:</t>
          <ul spacing="normal">
            <li>vendorId = UUID5(DNS, "vendor-a.example")</li>
            <li>XclassId = UUID5(vendorId, "Product X")</li>
            <li>Xv2classId = UUID5(vendorId, "Product X v2")</li>
          </ul>
          <t>When Product X receives the firmware update necessary to be compatible with Product X v2, part of the firmware update changes the Class ID to Xv2classId.</t>
        </section>
        <section anchor="example-3-shared-functionality" numbered="true" toc="default">
          <name>Example 3: Shared Functionality</name>
          <t>Vendor A produces two products: Product X and Product Y. These components share a common core (such as an operating system (OS)) but have different applications. The common core and the applications can be updated independently. To enable X and Y to receive the same common core update, they require the same Class ID. To ensure that only Product X receives Application X and only Product Y receives Application Y, Product X and Product Y must have different Class IDs. The vendor creates Class IDs as follows:</t>
          <ul spacing="normal">
            <li>vendorId = UUID5(DNS, "vendor-a.example")</li>
            <li>XclassId = UUID5(vendorId, "Product X")</li>
            <li>YclassId = UUID5(vendorId, "Product Y")</li>
            <li>CommonClassId = UUID5(vendorId, "common core")</li>
          </ul>
          <t>Product X matches against both XclassId and CommonClassId. Product Y matches against both YclassId and CommonClassId.</t>
        </section>
        <section anchor="example-4-rebranding" numbered="true" toc="default">
          <name>Example 4: Rebranding</name>
          <t>Vendor A creates a Product A and its firmware. Vendor B sells the product under its own name as Product B with some customized configuration. The vendors create the Class IDs as follows:</t>
          <ul spacing="normal">
            <li>vendorIdA = UUID5(DNS, "vendor-a.example")</li>
            <li>classIdA = UUID5(vendorIdA, "Product A-Unlabeled")</li>
            <li>vendorIdB = UUID5(DNS, "vendor-b.example")</li>
            <li>classIdB = UUID5(vendorIdB, "Product B")</li>
          </ul>
          <t>The product will match against each of these Class IDs. If Vendor A and Vendor B provide different components for the device, the implementor may choose to make ID matching scoped to each component. Then, the vendorIdA, classIdA match the component ID supplied by Vendor A, and the vendorIdB, classIdB match the component ID supplied by Vendor B.</t>
        </section>
      </section>
      <section anchor="element-precursor-digest" numbered="true" toc="default">
        <name>Precursor Image Digest Condition</name>
        <t>This element provides information about the payload that needs to be present on the device for an update to apply. This may, for example, be the case with differential updates.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-authentic-precursor" format="default">REQ.SEC.AUTH.PRECURSOR</xref></dd>
	</dl>
      </section>
      <section anchor="element-required-version" numbered="true" toc="default">
        <name>Required Image Version List</name>
        <t>Payloads may only be applied to a specific firmware version or multiple firmware versions. For example, a payload containing a differential update may be applied only to a specific firmware version.</t>
        <t>When a payload applies to multiple versions of firmware, the required image version list specifies which firmware versions must be present for the update to be applied. This allows the update author to target specific versions of firmware for an update, while excluding those to which it should not or cannot be applied.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-img-versions" format="default">REQ.USE.IMG.VERSIONS</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-expiration" numbered="true" toc="default">
        <name>Expiration Time</name>
        <t>This element tells a device the time at which the manifest expires and should no longer be used. This element should be used where a secure source of time is provided and firmware is intended to expire predictably. This element may also be displayed (e.g., via an app) for user confirmation, since users typically have a reliable knowledge of the date.</t>
        <t>Special consideration is required for end-of-life if firmware will not be updated again -- for example, if a business stops issuing updates to a device. In this case, the last valid firmware should not have an expiration time.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-exp" format="default">REQ.SEC.EXP</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-format" numbered="true" toc="default">
        <name>Payload Format</name>
        <t>This element describes the payload format within the signed metadata. It is used to enable devices to decode payloads correctly.</t>
        <t>This element is <bcp14>REQUIRED</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-authentic-image-type" format="default">REQ.SEC.AUTH.IMG_TYPE</xref>, <xref target="req-use-img-format" format="default">REQ.USE.IMG.FORMAT</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-processing-steps" numbered="true" toc="default">
        <name>Processing Steps</name>
        <t>This element provides a representation of the processing steps required to decode a payload -- in particular, those that are compressed, packed, or encrypted. The representation must describe which algorithms are used and must convey any additional parameters required by those algorithms.</t>
        <t>A processing step may indicate the expected digest of the payload after the processing is complete.</t>
        <t>This element is <bcp14>RECOMMENDED</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-img-nested" format="default">REQ.USE.IMG.NESTED</xref></dd>
	</dl>
      </section>
      <section anchor="maniest-element-storage-location" numbered="true" toc="default">
        <name>Storage Location</name>
        <t>This element tells the device where to store a payload within a given component. The device can use this to establish which permissions are necessary and the physical storage location to use.</t>
        <t>This element is <bcp14>REQUIRED</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-authentic-image-location" format="default">REQ.SEC.AUTH.IMG_LOC</xref></dd>
	</dl>
        <section anchor="example-1-two-storage-locations" numbered="true" toc="default">
          <name>Example 1: Two Storage Locations</name>
          <t>A device supports two components: an OS and an application. These components can be updated independently, expressing dependencies to ensure compatibility between the components. The author chooses two storage identifiers:</t>
          <ul spacing="normal">
            <li>"OS"</li>
            <li>"APP"</li>
          </ul>
        </section>
        <section anchor="example-2-file-system" numbered="true" toc="default">
          <name>Example 2: Filesystem</name>
          <t>A device supports a full-featured filesystem. The author chooses to use the storage identifier as the path at which to install the payload. The payload may be a tarball, in which case it unpacks the tarball into the specified path.</t>
        </section>
        <section anchor="example-3-flash-memory" numbered="true" toc="default">
          <name>Example 3: Flash Memory</name>
          <t>A device supports flash memory. The author chooses to make the storage identifier the offset where the image should be written.</t>
        </section>
      </section>
      <section anchor="manifest-element-component-identifier" numbered="true" toc="default">
        <name>Component Identifier</name>
        <t>In a device with more than one storage subsystem, a storage identifier is insufficient to identify where and how to store a payload. To resolve this, a component identifier indicates to which part of the storage subsystem the payload shall be placed.</t>
        <t>A serialization may choose to combine the use of a component identifier and <xref target="maniest-element-storage-location" format="default">storage location</xref>.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-mfst-component" format="default">REQ.USE.MFST.COMPONENT</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-payload-indicator" numbered="true" toc="default">
        <name>Payload Indicator</name>
        <t>This element provides the information required for the device to acquire the payload. This functionality is only needed when the target device does not intrinsically know where to find the payload.</t>
        <t>This can be encoded in several ways:</t>
        <ul spacing="normal">
          <li>One URI</li>
          <li>A list of URIs</li>
          <li>A prioritized list of URIs</li>
          <li>A list of signed URIs</li>
        </ul>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-authenticated-remote-payload" format="default">REQ.SEC.AUTH.REMOTE_LOC</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-payload-digest" numbered="true" toc="default">
        <name>Payload Digests</name>
        <t>This element contains one or more digests of one or more payloads. This allows the target device to ensure authenticity of the payload(s) when combined with the <xref target="manifest-element-signature" format="default">Signature</xref> element. A manifest format must provide a mechanism to select one payload from a list based on system parameters, such as an execute-in-place (XIP) installation address.</t>
        <t>This element is <bcp14>REQUIRED</bcp14>. Support for more than one digest is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-authentic" format="default">REQ.SEC.AUTHENTIC</xref>, <xref target="req-use-img-select" format="default">REQ.USE.IMG.SELECT</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-size" numbered="true" toc="default">
        <name>Size</name>
        <t>This element provides the size of the payload in bytes, which informs the target device how big of a payload to expect. Without it, devices are exposed to some classes of denial-of-service attacks.</t>
        <t>This element is <bcp14>REQUIRED</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-authentic-execution" format="default">REQ.SEC.AUTH.EXEC</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-signature" numbered="true" toc="default">
        <name>Manifest Envelope Element: Signature</name>
        <t>The signature element contains all the information necessary to protect the contents of the manifest against modification and to offer authentication of the signer. Because the signature element authenticates the manifest, it cannot be contained within the manifest. Instead, either the manifest is contained within the signature element or the signature element is a member of the Manifest Envelope and bundled with the manifest.</t>
        <t>The signature element represents the foundation of all security properties of the manifest. Manifests, which are included as dependencies by other manifests, should include a signature so that the recipient can distinguish between different actors with different permissions.</t>
        <t>The signature element must support multiple signers and multiple signing algorithms. A manifest format may allow multiple manifests to be covered by a single signature element.</t>
        <t>This element is <bcp14>REQUIRED</bcp14> in non-dependency manifests.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-authentic" format="default">REQ.SEC.AUTHENTIC</xref>, <xref target="req-sec-rights" format="default">REQ.SEC.RIGHTS</xref>, <xref target="req-use-mfst-multi-auth" format="default">REQ.USE.MFST.MULTI_AUTH</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-additional-install-info" numbered="true" toc="default">
        <name>Additional Installation Instructions</name>
        <t>Additional installation instructions are machine-readable commands the device should execute when processing the manifest. This information is distinct from the information necessary to process a payload. Additional installation instructions include information such as update timing (for example, install only on Sunday, at 0200), procedural considerations (for example, shut down the equipment under control before executing the update), and pre- and post-installation steps (for example, run a script). Other installation instructions could include requesting user confirmation before installing.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-mfst-pre-check" format="default">REQ.USE.MFST.PRE_CHECK</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-text" numbered="true" toc="default">
        <name>Manifest Text Information</name>
        <t>This is textual information pertaining to the update described by the manifest. This information is for human consumption only. It <bcp14>MUST NOT</bcp14> be the basis of any decision made by the recipient.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-mfst-text" format="default">REQ.USE.MFST.TEXT</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-aliases" numbered="true" toc="default">
        <name>Aliases</name>
        <t>Aliases provide a mechanism for a manifest to augment or replace URIs or URI lists defined by one or more of its dependencies.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-mfst-override" format="default">REQ.USE.MFST.OVERRIDE_REMOTE</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-dependencies" numbered="true" toc="default">
        <name>Dependencies</name>
        <t>This is a list of other manifests that are required by the current manifest. Manifests are identified in an unambiguous way, such as a cryptographic digest.</t>
        <t>This element is <bcp14>REQUIRED</bcp14> to support deployments that include both multiple authorities and multiple payloads.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-mfst-component" format="default">REQ.USE.MFST.COMPONENT</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-encryption-wrapper" numbered="true" toc="default">
        <name>Encryption Wrapper</name>
        <t>Encrypting firmware images requires symmetric content encryption keys. The encryption wrapper provides the information needed for a device to obtain or locate a key that it uses to decrypt the firmware.</t>
        <t>This element is <bcp14>REQUIRED</bcp14> for encrypted payloads.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-sec-image-confidentiality" format="default">REQ.SEC.IMG.CONFIDENTIALITY</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-xip-address" numbered="true" toc="default">
        <name>XIP Address</name>
        <t>In order to support XIP systems with multiple possible base addresses, it is necessary to specify which address the payload is linked for.</t>
        <t>For example, a microcontroller may have a simple bootloader that chooses one of two images to boot. That microcontroller then needs to choose one of two firmware images to install, based on which of its two images is older.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-img-select" format="default">REQ.USE.IMG.SELECT</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-load-metadata" numbered="true" toc="default">
        <name>Load-Time Metadata</name>
        <t>Load-time metadata provides the device with information that it needs in order to load one or more images. This metadata may include any of the following:</t>
        <ul spacing="normal">
          <li>The source (e.g., non-volatile storage)</li>
          <li>The destination (e.g., an address in RAM)</li>
          <li>Cryptographic information</li>
          <li>Decompression information</li>
          <li>Unpacking information</li>
        </ul>
        <t>Typically, loading is done by copying an image from its permanent storage location into its active use location. The metadata allows operations such as decryption, decompression, and unpacking to be performed during that copy.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-load" format="default">REQ.USE.LOAD</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-exec-metadata" numbered="true" toc="default">
        <name>Runtime Metadata</name>
        <t>Runtime metadata provides the device with any extra information needed to boot the device. This may include the entry point of an XIP image or the kernel command line to boot a Linux image.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-exec" format="default">REQ.USE.EXEC</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-payload" numbered="true" toc="default">
        <name>Payload</name>
        <t>The Payload element is contained within the manifest or Manifest Envelope and enables the manifest and payload to be delivered simultaneously. This is used for delivering small payloads, such as cryptographic keys or configuration data.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-payload" format="default">REQ.USE.PAYLOAD</xref></dd>
	</dl>
      </section>
      <section anchor="manifest-element-key-claims" numbered="true" toc="default">
        <name>Manifest Envelope Element: Delegation Chain</name>
        <t>The delegation chain offers enhanced authorization functionality via authorization tokens, such as Concise Binary Object Representation (CBOR) Web Tokens <xref target="RFC8392" format="default"/> with Proof-of-Possession Key Semantics <xref target="RFC8747" format="default"/>. Each token itself is protected and does not require another layer of protection. Each authorization token typically includes a public key or a public key fingerprint; however, this is dependent on the tokens used. Each token <bcp14>MAY</bcp14> include additional metadata, such as key usage information. Because the delegation chain is needed to verify the signature, it must be placed in the Manifest Envelope, rather than the manifest.</t>
        <t>The first token in any delegation chain <bcp14>MUST</bcp14> be authenticated by the recipient's trust anchor. Each subsequent token <bcp14>MUST</bcp14> be authenticated using the previous token. This allows a recipient to discard each antecedent token after it has authenticated the subsequent token. The final token <bcp14>MUST</bcp14> enable authentication of the manifest. More than one delegation chain <bcp14>MAY</bcp14> be used if more than one signature is used. Note that no restriction is placed on the encoding order of these tokens; the order of elements is logical only.</t>
        <t>This element is <bcp14>OPTIONAL</bcp14>.</t>
        <dl spacing="normal">
        <dt>Implements:</dt><dd><xref target="req-use-delegation" format="default">REQ.USE.DELEGATION</xref>, <xref target="req-sec-key-rotation" format="default">REQ.SEC.KEY.ROTATION</xref></dd>
	</dl>
      </section>
    </section>
    <section anchor="design-motivation" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The following subsections describe the threat model, user stories, security requirements, and usability requirements. This section also provides the motivations for each of the manifest information elements.</t>
      <t>Note that it is worthwhile to recall that a firmware update is, by definition, remote code execution. Hence, if a device is configured to trust an entity to provide firmware, it trusts this entity to behave correctly. Many classes of attacks can be mitigated by verifying that a firmware update came from a trusted party and that no rollback is taking place. However, if the trusted entity has been compromised and distributes attacker-provided firmware to devices, then the possibilities for defense are limited.</t>
      <section anchor="threat-model" numbered="true" toc="default">
        <name>Threat Model</name>
        <t>The following subsections aim to provide information about the threats that were considered, the security requirements that are derived from those threats, and the fields that permit implementation of the security requirements. This model uses the Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege (STRIDE) approach <xref target="STRIDE" format="default"/>. Each threat is classified according to the following:</t>
        <ul spacing="normal">
          <li>Spoofing identity</li>
          <li>Tampering with data</li>
          <li>Repudiation</li>
          <li>Information disclosure</li>
          <li>Denial of service</li>
          <li>Elevation of privilege</li>
        </ul>
        <t>This threat model only covers elements related to the transport of firmware updates. It explicitly does not cover threats outside of the transport of firmware updates. For example, threats to an IoT device due to physical access are out of scope.</t>
      </section>
      <section anchor="threat-descriptions" numbered="true" toc="default">
        <name>Threat Descriptions</name>
        <t>Many of the threats detailed in this section contain a "threat escalation" description. This explains how the described threat might fit together with other threats and produce a high-severity threat. This is important because some of the described threats may seem low severity but could be used with others to construct a high-severity compromise.</t>
        <section anchor="threat-expired" numbered="true" toc="default">
          <name>THREAT.IMG.EXPIRED: Old Firmware</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Elevation of Privilege</dd>
	  </dl>
          <t>An attacker sends an old, but valid, manifest with an old, but valid, firmware image to a device. If there is a known vulnerability in the provided firmware image, this may allow an attacker to exploit the vulnerability and gain control of the device.</t>
        <dl spacing="normal">
          <dt>Threat Escalation:</dt><dd>If the attacker is able to exploit the known vulnerability, then this threat can be escalated to all types.</dd>
          <dt>Mitigated by:</dt><dd><xref target="req-sec-sequence" format="default">REQ.SEC.SEQUENCE</xref></dd>
	</dl>
        </section>
        <section anchor="threat-expired-offline" numbered="true" toc="default">
          <name>THREAT.IMG.EXPIRED.OFFLINE: Offline Device + Old Firmware</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Elevation of Privilege</dd>
	  </dl>
          <t>An attacker targets a device that has been offline for a long time and runs an old firmware version. The attacker sends an old, but valid, manifest to a device with an old, but valid, firmware image. The attacker-provided firmware is newer than the installed firmware but older than the most recently available firmware. If there is a known vulnerability in the provided firmware image, then this may allow an attacker to gain control of a device. Because the device has been offline for a long time, it is unaware of any new updates. As such, it will treat the old manifest as the most current.</t>
          <t>The exact mitigation for this threat depends on where the threat comes from. This requires careful consideration by the implementor. If the threat is from a network actor, including an on-path attacker, or an intruder into a management system, then a user confirmation can mitigate this attack, simply by displaying an expiration date and requesting confirmation. On the other hand, if the user is the attacker, then an online confirmation system (for example, a trusted timestamp server) can be used as a mitigation system.</t>
        <dl spacing="normal">
          <dt>Threat Escalation:</dt><dd>If the attacker is able to exploit the known vulnerability, then this threat can be escalated to all types.</dd>
          <dt>Mitigated by:</dt><dd><xref target="req-sec-exp" format="default">REQ.SEC.EXP</xref>, <xref target="req-use-mfst-pre-check" format="default">REQ.USE.MFST.PRE_CHECK</xref></dd>
	</dl>
        </section>
        <section anchor="threat-incompatible" numbered="true" toc="default">
          <name>THREAT.IMG.INCOMPATIBLE: Mismatched Firmware</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Denial of Service</dd>
	  </dl>
          <t>An attacker sends a valid firmware image, for the wrong type of device, signed by an actor with firmware installation permission on both device types. The firmware is verified by the device positively because it is signed by an actor with the appropriate permission. This could have wide-ranging consequences. For devices that are similar, it could cause minor breakage or expose security vulnerabilities. For devices that are very different, it is likely to render devices inoperable.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-compatible" format="default">REQ.SEC.COMPATIBLE</xref></dd>
	</dl>
          <t>For example, suppose that two vendors -- Vendor A and Vendor B -- adopt the same trade name in different geographic regions, and they both make products with the same names, or product name matching is not used. This causes firmware from Vendor A to match devices from Vendor B.</t>
          <t>If the vendors are the firmware authorities, then devices from Vendor A will reject images signed by Vendor B, since they use different credentials. However, if both devices trust the same author, then devices from Vendor A could install firmware intended for devices from Vendor B.</t>
        </section>
        <section anchor="threat-img-format" numbered="true" toc="default">
          <name>THREAT.IMG.FORMAT: The Target Device Misinterprets the Type of Payload</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Denial of Service</dd>
	  </dl>
          <t>If a device misinterprets the format of the firmware image, it may cause a device to install a firmware image incorrectly. An incorrectly installed firmware image would likely cause the device to stop functioning.</t>
        <dl spacing="normal">
          <dt>Threat Escalation:</dt><dd>An attacker that can cause a device to misinterpret the received firmware image may gain elevation of privilege and potentially expand this to all types of threats.</dd>
          <dt>Mitigated by:</dt><dd><xref target="req-sec-authentic-image-type" format="default">REQ.SEC.AUTH.IMG_TYPE</xref></dd>
	</dl>
        </section>
        <section anchor="threat-img-location" numbered="true" toc="default">
          <name>THREAT.IMG.LOCATION: The Target Device Installs the Payload to the Wrong Location</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Denial of Service</dd>
	  </dl>
          <t>If a device installs a firmware image to the wrong location on the device, then it is likely to break. For example, a firmware image installed as an application could cause a device and/or application to stop functioning.</t>
        <dl spacing="normal">
          <dt>Threat Escalation:</dt><dd>An attacker that can cause a device to misinterpret the received code may gain elevation of privilege and potentially expand this to all types of threats.</dd>
          <dt>Mitigated by:</dt><dd><xref target="req-sec-authentic-image-location" format="default">REQ.SEC.AUTH.IMG_LOC</xref></dd>
	</dl>
        </section>
        <section anchor="threat-net-redirect" numbered="true" toc="default">
          <name>THREAT.NET.REDIRECT: Redirection to Inauthentic Payload Hosting</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Denial of Service</dd>
	  </dl>
          <t>If a device is tricked into fetching a payload for an attacker-controlled site, the attacker may send corrupted payloads to devices.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-authenticated-remote-payload" format="default">REQ.SEC.AUTH.REMOTE_LOC</xref></dd>
	</dl>
        </section>
        <section anchor="threat-net-onpath" numbered="true" toc="default">
          <name>THREAT.NET.ONPATH: Traffic Interception</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Spoofing Identity, Tampering with Data</dd>
	  </dl>
          <t>An attacker intercepts all traffic to and from a device. The attacker can monitor or modify any data sent to or received from the device. This can take the form of manifests, payloads, status reports, and capability reports being modified or not delivered to the intended recipient. It can also take the form of analysis of data sent to or from the device, in content, size, or frequency.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-authentic" format="default">REQ.SEC.AUTHENTIC</xref>, <xref target="req-sec-image-confidentiality" format="default">REQ.SEC.IMG.CONFIDENTIALITY</xref>, <xref target="req-sec-authenticated-remote-payload" format="default">REQ.SEC.AUTH.REMOTE_LOC</xref>, <xref target="req-sec-mfst-confidentiality" format="default">REQ.SEC.MFST.CONFIDENTIALITY</xref>, <xref target="req-sec-reporting" format="default">REQ.SEC.REPORTING</xref></dd>
	</dl>
        </section>
        <section anchor="threat-image-replacement" numbered="true" toc="default">
          <name>THREAT.IMG.REPLACE: Payload Replacement</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Elevation of Privilege</dd>
	  </dl>
          <t>An attacker replaces newly downloaded firmware after a device finishes verifying a manifest. This could cause the device to execute the attacker's code. This attack likely requires physical access to the device. However, it is possible that this attack is carried out in combination with another threat that allows remote execution. This is a typical Time Of Check / Time Of Use (TOCTOU) attack.</t>
        <dl spacing="normal">
          <dt>Threat Escalation:</dt><dd>If the attacker is able to exploit a known vulnerability or if the attacker can supply their own firmware, then this threat can be escalated to all types.</dd>
          <dt>Mitigated by:</dt><dd><xref target="req-sec-authentic-execution" format="default">REQ.SEC.AUTH.EXEC</xref></dd>
	</dl>
        </section>
        <section anchor="threat-img-unauthenticated" numbered="true" toc="default">
          <name>THREAT.IMG.NON_AUTH: Unauthenticated Images</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Elevation of Privilege / all types</dd>
	  </dl>
          <t>If an attacker can install their firmware on a device -- for example, by manipulating either payload or metadata -- then they have complete control of the device.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-authentic" format="default">REQ.SEC.AUTHENTIC</xref></dd>
	</dl>
        </section>
        <section anchor="threat-upd-wrong-precursor" numbered="true" toc="default">
          <name>THREAT.UPD.WRONG_PRECURSOR: Unexpected Precursor Images</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Denial of Service / all types</dd>
	  </dl>
          <t>Modifications of payloads and metadata allow an attacker to introduce a number of denial-of-service attacks. Below are some examples.</t>
          <t>An attacker sends a valid, current manifest to a device that has an unexpected precursor image. If a payload format requires a precursor image (for example, delta updates) and that precursor image is not available on the target device, it could cause the update to break.</t>
          <t>An attacker that can cause a device to install a payload against the wrong precursor image could gain elevation of privilege and potentially expand this to all types of threats. However, it is unlikely that a valid differential update applied to an incorrect precursor would result in functional, but vulnerable, firmware.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-authentic-precursor" format="default">REQ.SEC.AUTH.PRECURSOR</xref></dd>
	</dl>
        </section>
        <section anchor="threat-upd-unapproved" numbered="true" toc="default">
          <name>THREAT.UPD.UNAPPROVED: Unapproved Firmware</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Denial of Service, Elevation of Privilege</dd>
	  </dl>
          <t>This threat can appear in several ways; however, it is ultimately about ensuring that devices retain the behavior required by their owner or Operator. The owner or Operator of a device typically requires that the device maintain certain features, functions, capabilities, behaviors, or interoperability constraints (more generally, behavior). If these requirements are broken, then a device will not fulfill its purpose. Therefore, if any party other than the device's owner or the owner's contracted device operator has the ability to modify device behavior without approval, then this constitutes an elevation of privilege.</t>
          <t>Similarly, a network operator may require that devices behave in a particular way in order to maintain the integrity of the network. If device behavior on a network can be modified without the approval of the network operator, then this constitutes an elevation of privilege with respect to the network.</t>
          <t>For example, if the owner of a device has purchased that device because of Features A, B, and C, and a firmware update that removes Feature A is issued by the manufacturer, then the device may not fulfill the owner's requirements any more. In certain circumstances, this can cause significantly greater threats. Suppose that Feature A is used to implement a safety-critical system, whether the manufacturer intended this behavior or not. When unapproved firmware is installed, the system may become unsafe.</t>
          <t>In a second example, the owner or Operator of a system of two or more interoperating devices needs to approve firmware for their system in order to ensure interoperability with other devices in the system. If the firmware is not qualified, the system as a whole may not work. Therefore, if a device installs firmware without the approval of the device owner or Operator, this is a threat to devices or the system as a whole.</t>
          <t>Similarly, the Operator of a network may need to approve firmware for devices attached to the network in order to ensure favorable operating conditions within the network. If the firmware is not qualified, it may degrade the performance of the network. Therefore, if a device installs firmware without the approval of the network operator, this is a threat to the network itself.</t>
        <dl spacing="normal">
          <dt>Threat Escalation:</dt><dd>If the network operator expects configuration that is present in devices deployed in Network A, but not in devices deployed in Network B, then the device may experience degraded security, leading to threats of all types.</dd>
          <dt>Mitigated by:</dt><dd><xref target="req-sec-rights" format="default">REQ.SEC.RIGHTS</xref>, <xref target="req-sec-access-control" format="default">REQ.SEC.ACCESS_CONTROL</xref></dd>
	</dl>
          <section anchor="example-1-multiple-network-operators-with-a-single-device-operator" numbered="true" toc="default">
            <name>Example 1: Multiple Network Operators with a Single Device Operator</name>
            <t>In this example, assume that device operators expect the rights to create firmware but that network operators expect the rights to qualify firmware as "fit for purpose" on their networks. Additionally, assume that device operators manage devices that can be deployed on any network, including Network A and Network B in our example.</t>
            <t>An attacker may obtain a manifest for a device on Network A. Then, this attacker sends that manifest to a device on Network B. Because Network A and Network B are under the control of different Operators, and the firmware for a device on Network A has not been qualified to be deployed on Network B, the target device on Network B is now in violation of Operator B's policy and may be disabled by this unqualified, but signed, firmware.</t>
            <t>This is a denial of service because it can render devices inoperable. This is an elevation of privilege because it allows the attacker to make installation decisions that should be made by the Operator.</t>
          </section>
          <section anchor="example-2-single-network-operator-with-multiple-device-operators" numbered="true" toc="default">
            <name>Example 2: Single Network Operator with Multiple Device Operators</name>
            <t>Multiple devices that interoperate are used on the same network and communicate with each other. Some devices are manufactured and managed by Device Operator A and other devices by Device Operator B. New firmware is released by Device Operator A that breaks compatibility with devices from Device Operator B. An attacker sends the new firmware to the devices managed by Device Operator A without the approval of the network operator. This breaks the behavior of the larger system, causing denial of service and, possibly, other threats. Where the network is a distributed Supervisory Control and Data Acquisition (SCADA) system, this could cause misbehavior of the process that is under control.</t>
          </section>
        </section>
        <section anchor="threat-img-disclosure" numbered="true" toc="default">
          <name>THREAT.IMG.DISCLOSURE: Reverse Engineering of Firmware Image for Vulnerability Analysis</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>all types</dd>
	  </dl>
          <t>An attacker wants to mount an attack on an IoT device. To prepare the attack, the provided firmware image is reverse engineered and analyzed for vulnerabilities.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-image-confidentiality" format="default">REQ.SEC.IMG.CONFIDENTIALITY</xref></dd>
	</dl>
        </section>
        <section anchor="threat-mfst-override" numbered="true" toc="default">
          <name>THREAT.MFST.OVERRIDE: Overriding Critical Manifest Elements</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Elevation of Privilege</dd>
	  </dl>
          <t>An authorized actor, but not the author, uses an override mechanism (<xref target="user-story-override" format="default">USER_STORY.OVERRIDE</xref>) to change an information element in a manifest signed by the author. For example, if the authorized actor overrides the digest and URI of the payload, the actor can replace the entire payload with a payload of their choice.</t>
        <dl spacing="normal">
          <dt>Threat Escalation:</dt><dd>By overriding elements such as payload installation instructions or a firmware digest, this threat can be escalated to all types.</dd>
          <dt>Mitigated by:</dt><dd><xref target="req-sec-access-control" format="default">REQ.SEC.ACCESS_CONTROL</xref></dd>
	</dl>
        </section>
        <section anchor="threat-mfst-exposure" numbered="true" toc="default">
          <name>THREAT.MFST.EXPOSURE: Confidential Manifest Element Exposure</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>Information Disclosure</dd>
	  </dl>
          <t>A third party may be able to extract sensitive information from the manifest.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-mfst-confidentiality" format="default">REQ.SEC.MFST.CONFIDENTIALITY</xref></dd>
	</dl>
        </section>
        <section anchor="threat-img-extra" numbered="true" toc="default">
          <name>THREAT.IMG.EXTRA: Extra Data after Image</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>all types</dd>
	  </dl>
          <t>If a third party modifies the image so that it contains extra code after a valid, authentic image, that third party can then use their own code in order to make better use of an existing vulnerability.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-img-complete-digest" format="default">REQ.SEC.IMG.COMPLETE_DIGEST</xref></dd>
	</dl>
        </section>
        <section anchor="threat-key-exposure" numbered="true" toc="default">
          <name>THREAT.KEY.EXPOSURE: Exposure of Signing Keys</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>all types</dd>
	  </dl>
          <t>If a third party obtains a key or even indirect access to a key -- for example, in a hardware security module (HSM) -- then they can perform the same actions as the legitimate owner of the key. If the key is trusted for firmware updates, then the third party can perform firmware updates as though they were the legitimate owner of the key.</t>
          <t>For example, if manifest signing is performed on a server connected to the internet, an attacker may compromise the server and then be able to sign manifests, even if the keys for manifest signing are held in an HSM that is accessed by the server.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-key-protection" format="default">REQ.SEC.KEY.PROTECTION</xref>, <xref target="req-sec-key-rotation" format="default">REQ.SEC.KEY.ROTATION</xref></dd>
	</dl>
        </section>
        <section anchor="threat-mfst-modification" numbered="true" toc="default">
          <name>THREAT.MFST.MODIFICATION: Modification of Manifest or Payload prior to Signing</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>all types</dd>
	  </dl>
          <t>If an attacker can alter a manifest or payload before it is signed, they can perform all the same actions as the manifest author. This allows the attacker to deploy firmware updates to any devices that trust the manifest author. If an attacker can modify the code of a payload before the corresponding manifest is created, they can insert their own code. If an attacker can modify the manifest before it is signed, they can redirect the manifest to their own payload.</t>
          <t>For example, the attacker deploys malware to the developer's computer or signing service that watches manifest creation activities and inserts code into any binary that is referenced by a manifest.</t>
          <t>For example, the attacker deploys malware to the developer's computer or signing service that replaces the referenced binary (digest) and URI with the attacker's binary (digest) and URI.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-mfst-check" format="default">REQ.SEC.MFST.CHECK</xref>, <xref target="req-sec-mfst-trusted" format="default">REQ.SEC.MFST.TRUSTED</xref></dd>
	</dl>
        </section>
        <section anchor="threat-mfst-toctou" numbered="true" toc="default">
          <name>THREAT.MFST.TOCTOU: Modification of Manifest between Authentication and Use</name>
          <dl spacing="normal">
          <dt>Classification:</dt><dd>all types</dd>
	  </dl>
          <t>If an attacker can modify a manifest after it is authenticated (time of check) but before it is used (time of use), then the attacker can place any content whatsoever in the manifest.</t>
        <dl spacing="normal">
          <dt>Mitigated by:</dt><dd><xref target="req-sec-mfst-const" format="default">REQ.SEC.MFST.CONST</xref></dd>
	</dl>
        </section>
      </section>
      <section anchor="security-requirements" numbered="true" toc="default">
        <name>Security Requirements</name>
        <t>The security requirements here are a set of policies that mitigate the threats described in <xref target="threat-model" format="default"/>.</t>
        <section anchor="req-sec-sequence" numbered="true" toc="default">
          <name>REQ.SEC.SEQUENCE: Monotonic Sequence Numbers</name>
          <t>Only an actor with firmware installation authority is permitted to decide when device firmware can be installed. To enforce this rule, manifests <bcp14>MUST</bcp14> contain monotonically increasing sequence numbers. Manifests may use UTC epoch timestamps to coordinate monotonically increasing sequence numbers across many actors in many locations. If UTC epoch timestamps are used, they must not be treated as times; they must be treated only as sequence numbers. Devices must reject manifests with sequence numbers smaller than any onboard sequence number, i.e., there is no sequence number rollover.</t>
          <aside><t>Note: This is not a firmware version field. It is a manifest sequence number. A firmware version may be rolled back by creating a new manifest for the old firmware version with a later sequence number.</t></aside>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-expired" format="default">THREAT.IMG.EXPIRED</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="element-sequence-number" format="default">Monotonic Sequence Number</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-compatible" numbered="true" toc="default">
          <name>REQ.SEC.COMPATIBLE: Vendor, Device-Type Identifiers</name>
          <t>Devices <bcp14>MUST</bcp14> only apply firmware that is intended for them. Devices must know that a given update applies to their vendor, model, hardware revision, and software revision. Human-readable identifiers are often prone to error in this regard, so unique identifiers should be used instead.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-incompatible" format="default">THREAT.IMG.INCOMPATIBLE</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="element-vendor-id" format="default">Vendor ID Condition</xref>, <xref target="element-class-id" format="default">Class ID Condition</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-exp" numbered="true" toc="default">
          <name>REQ.SEC.EXP: Expiration Time</name>
          <t>A firmware manifest <bcp14>MAY</bcp14> expire after a given time, and devices may have a secure clock (local or remote). If a secure clock is provided and the firmware manifest has an expiration timestamp, the device must reject the manifest if the current time is later than the expiration time.</t>
          <t>Special consideration is required for end-of-life in cases where a device will not be updated again -- for example, if a business stops issuing updates for a device. The last valid firmware should not have an expiration time.</t>
          <t>If a device has a flawed time source (either local or remote), an old update can be deployed as new.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-expired-offline" format="default">THREAT.IMG.EXPIRED.OFFLINE</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-expiration" format="default">Expiration Time</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-authentic" numbered="true" toc="default">
          <name>REQ.SEC.AUTHENTIC: Cryptographic Authenticity</name>
          <t>The authenticity of an update <bcp14>MUST</bcp14> be demonstrable. Typically, this means that updates must be digitally signed. Because the manifest contains information about how to install the update, the manifest's authenticity must also be demonstrable. To reduce the overhead required for validation, the manifest contains the cryptographic digest of the firmware image, rather than a second digital signature. The authenticity of the manifest can be verified with a digital signature or Message Authentication Code. The authenticity of the firmware image is tied to the manifest by the use of a cryptographic digest of the firmware image.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-img-unauthenticated" format="default">THREAT.IMG.NON_AUTH</xref>, <xref target="threat-net-onpath" format="default">THREAT.NET.ONPATH</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-signature" format="default">Signature</xref>, <xref target="manifest-element-payload-digest" format="default">Payload Digests</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-authentic-image-type" numbered="true" toc="default">
          <name>REQ.SEC.AUTH.IMG_TYPE: Authenticated Payload Type</name>
          <t>The type of payload <bcp14>MUST</bcp14> be authenticated. For example, the target must know whether the payload is XIP firmware, a loadable module, or configuration data.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-img-format" format="default">THREAT.IMG.FORMAT</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-format" format="default">Payload Format</xref>, <xref target="manifest-element-signature" format="default">Signature</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-authentic-image-location" numbered="true" toc="default">
          <name>REQ.SEC.AUTH.IMG_LOC: Authenticated Storage Location</name>
          <t>The location on the target where the payload is to be stored <bcp14>MUST</bcp14> be authenticated.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-img-location" format="default">THREAT.IMG.LOCATION</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="maniest-element-storage-location" format="default">Storage Location</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-authenticated-remote-payload" numbered="true" toc="default">
          <name>REQ.SEC.AUTH.REMOTE_LOC: Authenticated Remote Payload</name>
          <t>The location where a target should find a payload <bcp14>MUST</bcp14> be authenticated. Remote resources need to receive an equal amount of cryptographic protection as the manifest itself, when dereferencing URIs. The security considerations of Uniform Resource Identifiers (URIs) are applicable <xref target="RFC3986" format="default"/>.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-net-redirect" format="default">THREAT.NET.REDIRECT</xref>, <xref target="threat-net-onpath" format="default">THREAT.NET.ONPATH</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-payload-indicator" format="default">Payload Indicator</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-authentic-execution" numbered="true" toc="default">
          <name>REQ.SEC.AUTH.EXEC: Secure Execution</name>
          <t>The target <bcp14>SHOULD</bcp14> verify firmware at the time of boot. This requires authenticated payload size and firmware digest.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-image-replacement" format="default">THREAT.IMG.REPLACE</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-payload-digest" format="default">Payload Digests</xref>, <xref target="manifest-element-size" format="default">Size</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-authentic-precursor" numbered="true" toc="default">
          <name>REQ.SEC.AUTH.PRECURSOR: Authenticated Precursor Images</name>
          <t>If an update uses a differential compression method, it <bcp14>MUST</bcp14> specify the digest of the precursor image, and that digest <bcp14>MUST</bcp14> be authenticated.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-upd-wrong-precursor" format="default">THREAT.UPD.WRONG_PRECURSOR</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="element-precursor-digest" format="default">Precursor Image Digest</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-authentic-compatibility" numbered="true" toc="default">
          <name>REQ.SEC.AUTH.COMPATIBILITY: Authenticated Vendor and Class IDs</name>
          <t>The identifiers that specify firmware compatibility <bcp14>MUST</bcp14> be authenticated to ensure that only compatible firmware is installed on a target device.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-incompatible" format="default">THREAT.IMG.INCOMPATIBLE</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="element-vendor-id" format="default">Vendor ID Condition</xref>, <xref target="element-class-id" format="default">Class ID Condition</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-rights" numbered="true" toc="default">
          <name>REQ.SEC.RIGHTS: Rights Require Authenticity</name>
          <t>If a device grants different rights to different actors, exercising those rights <bcp14>MUST</bcp14> be accompanied by proof of those rights, in the form of proof of authenticity. Authenticity mechanisms, such as those required in <xref target="req-sec-authentic" format="default">REQ.SEC.AUTHENTIC</xref>, can be used to prove authenticity.</t>
          <t>For example, if a device has a policy that requires that firmware have both an Authorship right and a Qualification right and if that device grants Authorship and Qualification rights to different parties, such as a device operator and a network operator, respectively, then the firmware cannot be installed without proof of rights from both the device operator and the network operator.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-upd-unapproved" format="default">THREAT.UPD.UNAPPROVED</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-signature" format="default">Signature</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-image-confidentiality" numbered="true" toc="default">
          <name>REQ.SEC.IMG.CONFIDENTIALITY: Payload Encryption</name>
          <t>The manifest information model <bcp14>MUST</bcp14> enable encrypted payloads. Encryption helps to prevent third parties, including attackers, from reading the content of the firmware image. This can protect against confidential information disclosures and discovery of vulnerabilities through reverse engineering. Therefore, the manifest must convey the information required to allow an intended recipient to decrypt an encrypted payload.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-img-disclosure" format="default">THREAT.IMG.DISCLOSURE</xref>, <xref target="threat-net-onpath" format="default">THREAT.NET.ONPATH</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-encryption-wrapper" format="default">Encryption Wrapper</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-access-control" numbered="true" toc="default">
          <name>REQ.SEC.ACCESS_CONTROL: Access Control</name>
          <t>If a device grants different rights to different actors, then an exercise of those rights <bcp14>MUST</bcp14> be validated against a list of rights for the actor. This typically takes the form of an Access Control List (ACL). ACLs are applied to two scenarios:</t>
          <ol spacing="normal" type="1"><li>An ACL decides which elements of the manifest may be overridden and by which actors.</li>
            <li>An ACL decides which component identifier / storage identifier pairs can be written by which actors.</li>
          </ol>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-mfst-override" format="default">THREAT.MFST.OVERRIDE</xref>, <xref target="threat-upd-unapproved" format="default">THREAT.UPD.UNAPPROVED</xref></dd>
          <dt>Implemented by:</dt><dd>Client-side code, not specified in manifest</dd>
	  </dl>
        </section>
        <section anchor="req-sec-mfst-confidentiality" numbered="true" toc="default">
          <name>REQ.SEC.MFST.CONFIDENTIALITY: Encrypted Manifests</name>
          <t>A manifest format <bcp14>MUST</bcp14> allow encryption of selected parts of the manifest or encryption of the entire manifest to prevent sensitive content of the firmware metadata from being leaked.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-mfst-exposure" format="default">THREAT.MFST.EXPOSURE</xref>, <xref target="threat-net-onpath" format="default">THREAT.NET.ONPATH</xref></dd>
          <dt>Implemented by:</dt><dd>Manifest Encryption Wrapper / Transport Security</dd>
	  </dl>
        </section>
        <section anchor="req-sec-img-complete-digest" numbered="true" toc="default">
          <name>REQ.SEC.IMG.COMPLETE_DIGEST: Whole Image Digest</name>
          <t>The digest <bcp14>SHOULD</bcp14> cover all available space in a fixed-size storage location. Variable-size storage locations <bcp14>MUST</bcp14> be restricted to exactly the size of deployed payload. This prevents any data from being distributed without being covered by the digest. For example, XIP microcontrollers typically have fixed-size storage. These devices should deploy a digest that covers the deployed firmware image, concatenated with the default erased value of any remaining space.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-img-extra" format="default">THREAT.IMG.EXTRA</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-payload-digest" format="default">Payload Digests</xref></dd>
	  </dl>
        </section>
        <section anchor="req-sec-reporting" numbered="true" toc="default">
          <name>REQ.SEC.REPORTING: Secure Reporting</name>
          <t>Status reports from the device to any remote system <bcp14>MUST</bcp14> be performed over an authenticated, confidential channel in order to prevent modification or spoofing of the reports.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-net-onpath" format="default">THREAT.NET.ONPATH</xref></dd>
          <dt>Implemented by:</dt><dd>Transport Security / Manifest format triggering generation of reports</dd>
	  </dl>
        </section>
        <section anchor="req-sec-key-protection" numbered="true" toc="default">
          <name>REQ.SEC.KEY.PROTECTION: Protected Storage of Signing Keys</name>
          <t>Cryptographic keys for signing/authenticating manifests <bcp14>SHOULD</bcp14> be stored in a manner that is inaccessible to networked devices -- for example, in an HSM or an air-gapped computer. This protects against an attacker obtaining the keys.</t>
          <t>Keys <bcp14>SHOULD</bcp14> be stored in a way that limits the risk of a legitimate, but compromised, entity (such as a server or developer computer) issuing signing requests.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-key-exposure" format="default">THREAT.KEY.EXPOSURE</xref></dd>
          <dt>Implemented by:</dt><dd>Hardware-assisted isolation technologies, which are outside the scope of the manifest format</dd>
	  </dl>
        </section>
        <section anchor="req-sec-key-rotation" numbered="true" toc="default">
          <name>REQ.SEC.KEY.ROTATION: Protected Storage of Signing Keys</name>
          <t>Cryptographic keys for signing/authenticating manifests <bcp14>SHOULD</bcp14> be replaced from time to time. Because it is difficult and risky to replace a trust anchor, keys used for signing updates <bcp14>SHOULD</bcp14> be delegates of that trust anchor.</t>
          <t>If key expiration is performed based on time, then a secure clock is needed. If the time source used by a recipient to check for expiration is flawed, an old signing key can be used as current, which compounds <xref target="threat-key-exposure" format="default">THREAT.KEY.EXPOSURE</xref>.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-key-exposure" format="default">THREAT.KEY.EXPOSURE</xref></dd>
          <dt>Implemented by:</dt><dd>Secure storage technology, which is a system design/implementation aspect outside the scope of the manifest format</dd>
	  </dl>
        </section>
        <section anchor="req-sec-mfst-check" numbered="true" toc="default">
          <name>REQ.SEC.MFST.CHECK: Validate Manifests prior to Deployment</name>
          <t>Manifests <bcp14>SHOULD</bcp14> be verified prior to deployment. This reduces problems that may arise with devices installing firmware images that damage devices unintentionally.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-mfst-modification" format="default">THREAT.MFST.MODIFICATION</xref></dd>
          <dt>Implemented by:</dt><dd>Testing infrastructure. While outside the scope of the manifest format, proper testing of low-level software is essential for avoiding unnecessary downtime or worse situations.</dd>
	  </dl>
        </section>
        <section anchor="req-sec-mfst-trusted" numbered="true" toc="default">
          <name>REQ.SEC.MFST.TRUSTED: Construct Manifests in a Trusted Environment</name>
          <t>For high-risk deployments, such as large numbers of devices or devices that provide critical functions, manifests <bcp14>SHOULD</bcp14> be constructed in an environment that is protected from interference, such as an air-gapped computer. Note that a networked computer connected to an HSM does not fulfill this requirement (see <xref target="threat-mfst-modification" format="default">THREAT.MFST.MODIFICATION</xref>).</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-mfst-modification" format="default">THREAT.MFST.MODIFICATION</xref></dd>
          <dt>Implemented by:</dt><dd>Physical and network security for protecting the environment where firmware updates are prepared to avoid unauthorized access to this infrastructure</dd>
	  </dl>
        </section>
        <section anchor="req-sec-mfst-const" numbered="true" toc="default">
          <name>REQ.SEC.MFST.CONST: Manifest Kept Immutable between Check and Use</name>
          <t>Both the manifest and any data extracted from it <bcp14>MUST</bcp14> be held immutable between its authenticity verification (time of check) and its use (time of use). To make this guarantee, the manifest <bcp14>MUST</bcp14> fit within internal memory or secure memory, such as encrypted memory. The recipient <bcp14>SHOULD</bcp14> defend the manifest from tampering by code or hardware resident in the recipient -- for example, other processes or debuggers.</t>
          <t>If an application requires that the manifest be verified before storing it, then this means the manifest <bcp14>MUST</bcp14> fit in RAM.</t>
          <dl spacing="normal">
          <dt>Mitigates:</dt><dd><xref target="threat-mfst-toctou" format="default">THREAT.MFST.TOCTOU</xref></dd>
          <dt>Implemented by:</dt><dd>Proper system design with sufficient resources and implementation avoiding TOCTOU attacks</dd>
	  </dl>
        </section>
      </section>
      <section anchor="user-stories" numbered="true" toc="default">
        <name>User Stories</name>
        <t>User stories provide expected use cases. These are used to feed into usability requirements.</t>
        <section anchor="user-story-install-instructions" numbered="true" toc="default">
          <name>USER_STORY.INSTALL.INSTRUCTIONS: Installation Instructions</name>
          <t>As a device operator, I want to provide my devices with additional installation instructions so that I can keep process details out of my payload data.</t>
          <t>Some installation instructions might be as follows:</t>
          <ul spacing="normal">
            <li>Use a table of hashes to ensure that each block of the payload is validated before writing.</li>
            <li>Do not report progress.</li>
            <li>Pre-cache the update, but do not install.</li>
            <li>Install the pre-cached update matching this manifest.</li>
            <li>Install this update immediately, overriding any long-running tasks.</li>
          </ul>
        <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-mfst-pre-check" format="default">REQ.USE.MFST.PRE_CHECK</xref></dd>
	</dl>
        </section>
        <section anchor="user-story-fail-early" numbered="true" toc="default">
          <name>USER_STORY.MFST.FAIL_EARLY: Fail Early</name>
          <t>As a designer of a resource-constrained IoT device, I want bad updates to fail as early as possible to preserve battery life and limit consumed bandwidth.</t>
        <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-mfst-pre-check" format="default">REQ.USE.MFST.PRE_CHECK</xref></dd>
        </dl>
       </section>
        <section anchor="user-story-override" numbered="true" toc="default">
          <name>USER_STORY.OVERRIDE: Override Non-critical Manifest Elements</name>
          <t>As a device operator, I would like to be able to override the non-critical information in the manifest so that I can control my devices more precisely. The authority to override this information is provided via the installation of a limited trust anchor by another authority.</t>
          <t>Some examples of potentially overridable information:</t>
          <dl spacing="normal">
            <dt><xref target="manifest-element-payload-indicator" format="default">URIs</xref>:</dt><dd>This allows the device operator to direct devices to their own infrastructure in order to reduce network load.</dd>
            <dt>Conditions:</dt><dd>This allows the device operator to impose additional constraints on the installation of the manifest.</dd>
            <dt><xref target="manifest-element-additional-install-info" format="default">Directives</xref>:</dt><dd>This allows the device operator to add more instructions, such as time of installation.</dd>
            <dt><xref target="manifest-element-processing-steps" format="default">Processing Steps</xref>:</dt><dd>If an intermediary performs an action on behalf of a device, it may need to override the processing steps. It is still possible for a device to verify the final content and the result of any processing step that specifies a digest. Some processing steps should be non-overridable.</dd>
          <dt>Satisfied by:</dt><dd><xref target="req-use-mfst-component" format="default">REQ.USE.MFST.COMPONENT</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-component" numbered="true" toc="default">
          <name>USER_STORY.COMPONENT: Component Update</name>
          <t>As a device operator, I want to divide my firmware into components, so that I can reduce the size of updates, make different parties responsible for different components, and divide my firmware into frequently updated and infrequently updated components.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-mfst-component" format="default">REQ.USE.MFST.COMPONENT</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-multi-auth" numbered="true" toc="default">
          <name>USER_STORY.MULTI_AUTH: Multiple Authorizations</name>
          <t>As a device operator, I want to ensure the quality of a firmware update before installing it, so that I can ensure interoperability of all devices in my product family. I want to restrict the ability to make changes to my devices to require my express approval.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-mfst-multi-auth" format="default">REQ.USE.MFST.MULTI_AUTH</xref>, <xref target="req-sec-access-control" format="default">REQ.SEC.ACCESS_CONTROL</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-img-format" numbered="true" toc="default">
          <name>USER_STORY.IMG.FORMAT: Multiple Payload Formats</name>
          <t>As a device operator, I want to be able to send multiple payload formats to suit the needs of my update, so that I can optimize the bandwidth used by my devices.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-img-format" format="default">REQ.USE.IMG.FORMAT</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-img-confidentiality" numbered="true" toc="default">
          <name>USER_STORY.IMG.CONFIDENTIALITY: Prevent Confidential Information Disclosures</name>
          <t>As a firmware author, I want to prevent confidential information in the manifest from being disclosed when distributing manifests and firmware images. Confidential information may include information about the device these updates are being applied to as well as information in the firmware image itself.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-sec-image-confidentiality" format="default">REQ.SEC.IMG.CONFIDENTIALITY</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-img-unknown-format" numbered="true" toc="default">
          <name>USER_STORY.IMG.UNKNOWN_FORMAT: Prevent Devices from Unpacking Unknown Formats</name>
          <t>As a device operator, I want devices to determine whether they can process a payload prior to downloading it.</t>
          <t>In some cases, it may be desirable for a third party to perform some processing on behalf of a target. For this to occur, the third party <bcp14>MUST</bcp14> indicate what processing occurred and how to verify it against the Trust Provisioning Authority's intent.</t>
          <t>This amounts to overriding <xref target="manifest-element-processing-steps" format="default">Processing Steps</xref> and <xref target="manifest-element-payload-indicator" format="default">Payload Indicator</xref>.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-img-format" format="default">REQ.USE.IMG.FORMAT</xref>, <xref target="req-use-img-nested" format="default">REQ.USE.IMG.NESTED</xref>, <xref target="req-use-mfst-override" format="default">REQ.USE.MFST.OVERRIDE_REMOTE</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-img-current-version" numbered="true" toc="default">
          <name>USER_STORY.IMG.CURRENT_VERSION: Specify Version Numbers of Target Firmware</name>
          <t>As a device operator, I want to be able to target devices for updates based on their current firmware version, so that I can control which versions are replaced with a single manifest.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-img-versions" format="default">REQ.USE.IMG.VERSIONS</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-img-select" numbered="true" toc="default">
          <name>USER_STORY.IMG.SELECT: Enable Devices to Choose between Images</name>
          <t>As a developer, I want to be able to sign two or more versions of my firmware in a single manifest so that I can use a very simple bootloader that chooses between two or more images that are executed in place.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-img-select" format="default">REQ.USE.IMG.SELECT</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-exec-mfst" numbered="true" toc="default">
          <name>USER_STORY.EXEC.MFST: Secure Execution Using Manifests</name>
          <t>As a signer for both secure execution/boot and firmware deployment, I would like to use the same signed document for both tasks so that my data size is smaller, I can share common code, and I can reduce signature verifications.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-exec" format="default">REQ.USE.EXEC</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-exec-decompress" numbered="true" toc="default">
          <name>USER_STORY.EXEC.DECOMPRESS: Decompress on Load</name>
          <t>As a developer of firmware for a run-from-RAM device, I would like to use compressed images and to indicate to the bootloader that I am using a compressed image in the manifest so that it can be used with secure execution/boot.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-load" format="default">REQ.USE.LOAD</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-mfst-img" numbered="true" toc="default">
          <name>USER_STORY.MFST.IMG: Payload in Manifest</name>
          <t>As an Operator of devices on a constrained network, I would like the manifest to be able to include a small payload in the same packet so that I can reduce network traffic.</t>
          <t>Small payloads may include, for example, wrapped content encryption keys, configuration information, public keys, authorization tokens, or X.509 certificates.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-payload" format="default">REQ.USE.PAYLOAD</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-mfst-parse" numbered="true" toc="default">
          <name>USER_STORY.MFST.PARSE: Simple Parsing</name>
          <t>As a developer for constrained devices, I want a low-complexity library for processing updates so that I can fit more application code on my device.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-parse" format="default">REQ.USE.PARSE</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-mfst-delegation" numbered="true" toc="default">
          <name>USER_STORY.MFST.DELEGATION: Delegated Authority in Manifest</name>
          <t>As a device operator that rotates delegated authority more often than delivering firmware updates, I would like to delegate a new authority when I deliver a firmware update so that I can accomplish both tasks in a single transmission.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-delegation" format="default">REQ.USE.DELEGATION</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-mfst-pre-check" numbered="true" toc="default">
          <name>USER_STORY.MFST.PRE_CHECK: Update Evaluation</name>
          <t>As an Operator of a constrained network, I would like devices on my network to be able to evaluate the suitability of an update prior to initiating any large download so that I can prevent unnecessary consumption of bandwidth.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-mfst-pre-check" format="default">REQ.USE.MFST.PRE_CHECK</xref></dd>
	  </dl>
        </section>
        <section anchor="user-story-mfst-admin" numbered="true" toc="default">
          <name>USER_STORY.MFST.ADMINISTRATION: Administration of Manifests</name>
          <t>As a device operator, I want to understand what an update will do and to which devices it applies so that I can make informed choices about which updates to apply, when to apply them, and which devices should be updated.</t>
          <dl spacing="normal">
          <dt>Satisfied by:</dt><dd><xref target="req-use-mfst-text" format="default">REQ.USE.MFST.TEXT</xref></dd>
	  </dl>
        </section>
      </section>
      <section anchor="usability-requirements" numbered="true" toc="default">
        <name>Usability Requirements</name>
        <t>The following usability requirements satisfy the user stories listed above.</t>
        <section anchor="req-use-mfst-pre-check" numbered="true" toc="default">
          <name>REQ.USE.MFST.PRE_CHECK: Pre-installation Checks</name>
          <t>A manifest format <bcp14>MUST</bcp14> be able to carry all information required to process an update.</t>
          <t>For example, information about which precursor image is required for a differential update must be placed in the manifest.</t>
        <dl spacing="normal">
        <dt>Satisfies:</dt><dd><xref target="user-story-mfst-pre-check">USER_STORY.MFST.PRE_CHECK</xref>, 
 <xref target="user-story-install-instructions"  format="default">USER_STORY.INSTALL.INSTRUCTIONS</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-additional-install-info" format="default">Additional Installation Instructions</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-mfst-text" numbered="true" toc="default">
          <name>REQ.USE.MFST.TEXT: Descriptive Manifest Information</name>
          <t>It <bcp14>MUST</bcp14> be possible for a device operator to determine what a manifest will do and which devices will accept it prior to distribution.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-mfst-admin" format="default">USER_STORY.MFST.ADMINISTRATION</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-text" format="default">Manifest Text Information</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-mfst-override" numbered="true" toc="default">
          <name>REQ.USE.MFST.OVERRIDE_REMOTE: Override Remote Resource Location</name>
          <t>A manifest format <bcp14>MUST</bcp14> be able to redirect payload fetches. This applies where two manifests are used in conjunction. For example, a device operator creates a manifest specifying a payload and signs it, and provides a URI for that payload. A network operator creates a second manifest, with a dependency on the first. They use this second manifest to override the URIs provided by the device operator, directing them into their own infrastructure instead. Some devices may provide this capability, while others may only look at canonical sources of firmware. For this to be possible, the device must fetch the payload, whereas a device that accepts payload pushes will ignore this feature.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-override" format="default">USER_STORY.OVERRIDE</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-aliases" format="default">Aliases</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-mfst-component" numbered="true" toc="default">
          <name>REQ.USE.MFST.COMPONENT: Component Updates</name>
          <t>A manifest format <bcp14>MUST</bcp14> be able to express the requirement to install one or more payloads from one or more authorities so that a multi-payload update can be described. This allows multiple parties with different permissions to collaborate in creating a single update for the IoT device, across multiple components.</t>
          <t>This requirement implies that it must be possible to construct a tree of manifests on a multi-image target.</t>
          <t>In order to enable devices with a heterogeneous storage architecture, the manifest must enable specification of both a storage system and the storage location within that storage system.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-override" format="default">USER_STORY.OVERRIDE</xref>, <xref target="user-story-component" format="default">USER_STORY.COMPONENT</xref></dd>
          <dt>Implemented by:</dt><dd>Dependencies, StorageIdentifier, ComponentIdentifier</dd>
	  </dl>
          <section anchor="example-1-multiple-microcontrollers" numbered="true" toc="default">
            <name>Example 1: Multiple Microcontrollers</name>
            <t>An IoT device with multiple microcontrollers in the same physical device will likely require multiple payloads with different component identifiers.</t>
          </section>
          <section anchor="example-2-code-and-configuration" numbered="true" toc="default">
            <name>Example 2: Code and Configuration</name>
            <t>A firmware image can be divided into two payloads: code and configuration. These payloads may require authorizations from different actors in order to install (see <xref target="req-sec-rights" format="default">REQ.SEC.RIGHTS</xref> and <xref target="req-sec-access-control" format="default">REQ.SEC.ACCESS_CONTROL</xref>). This structure means that multiple manifests may be required, with a dependency structure between them.</t>
          </section>
          <section anchor="example-3-multiple-software-modules" numbered="true" toc="default">
            <name>Example 3: Multiple Software Modules</name>
            <t>A firmware image can be divided into multiple functional blocks for separate testing and distribution. This means that code would need to be distributed in multiple payloads. For example, this might be desirable in order to ensure that common code between devices is identical in order to reduce distribution bandwidth.</t>
          </section>
        </section>
        <section anchor="req-use-mfst-multi-auth" numbered="true" toc="default">
          <name>REQ.USE.MFST.MULTI_AUTH: Multiple Authentications</name>
          <t>A manifest format <bcp14>MUST</bcp14> be able to carry multiple signatures so that authorizations from multiple parties with different permissions can be required in order to authorize installation of a manifest.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-multi-auth" format="default">USER_STORY.MULTI_AUTH</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-signature" format="default">Signature</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-img-format" numbered="true" toc="default">
          <name>REQ.USE.IMG.FORMAT: Format Usability</name>
          <t>The manifest format <bcp14>MUST</bcp14> accommodate any payload format that an Operator wishes to use. This enables the recipient to detect which format the Operator has chosen. Some examples of payload format are as follows:</t>
          <ul spacing="normal">
            <li>Binary</li>
            <li>Executable and Linkable Format (ELF)</li>
            <li>Differential</li>
            <li>Compressed</li>
            <li>Packed configuration</li>
            <li>Intel HEX</li>
            <li>Motorola S-Record</li>
          </ul>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-img-format" format="default">USER_STORY.IMG.FORMAT</xref> <xref target="user-story-img-unknown-format" format="default">USER_STORY.IMG.UNKNOWN_FORMAT</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-format" format="default">Payload Format</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-img-nested" numbered="true" toc="default">
          <name>REQ.USE.IMG.NESTED: Nested Formats</name>
          <t>The manifest format <bcp14>MUST</bcp14> accommodate nested formats, announcing to the target device all the nesting steps and any parameters used by those steps.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-img-confidentiality" format="default">USER_STORY.IMG.CONFIDENTIALITY</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-processing-steps" format="default">Processing Steps</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-img-versions" numbered="true" toc="default">
          <name>REQ.USE.IMG.VERSIONS: Target Version Matching</name>
          <t>The manifest format <bcp14>MUST</bcp14> provide a method to specify multiple version numbers of firmware to which the manifest applies, either with a list or with range matching.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-img-current-version" format="default">USER_STORY.IMG.CURRENT_VERSION</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="element-required-version" format="default">Required Image Version List</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-img-select" numbered="true" toc="default">
          <name>REQ.USE.IMG.SELECT: Select Image by Destination</name>
          <t>The manifest format <bcp14>MUST</bcp14> provide a mechanism to list multiple equivalent payloads by execute-in-place (XIP) installation address, including the payload digest and, optionally, payload URIs.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-img-select" format="default">USER_STORY.IMG.SELECT</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-xip-address" format="default">XIP Address</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-exec" numbered="true" toc="default">
          <name>REQ.USE.EXEC: Executable Manifest</name>
          <t>The manifest format <bcp14>MUST</bcp14> allow the description of an executable system with a manifest on both XIP microcontrollers and complex operating systems. In addition, the manifest format <bcp14>MUST</bcp14> be able to express metadata, such as a kernel command line, used by any loader or bootloader.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-exec-mfst" format="default">USER_STORY.EXEC.MFST</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-exec-metadata" format="default">Runtime Metadata</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-load" numbered="true" toc="default">
          <name>REQ.USE.LOAD: Load-Time Information</name>
          <t>The manifest format <bcp14>MUST</bcp14> enable carrying additional metadata for load-time processing of a payload, such as cryptographic information, load address, and compression algorithm. Note that load comes before execution/boot.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-exec-decompress" format="default">USER_STORY.EXEC.DECOMPRESS</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-load-metadata" format="default">Load-Time Metadata</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-payload" numbered="true" toc="default">
          <name>REQ.USE.PAYLOAD: Payload in Manifest Envelope</name>
          <t>The manifest format <bcp14>MUST</bcp14> allow placing a payload in the same structure as the manifest. This may place the payload in the same packet as the manifest.</t>
          <t>Integrated payloads may include, for example, binaries as well as configuration information, and keying material.</t>
          <t>When an integrated payload is provided, this increases the size of the manifest. Manifest size can cause several processing and storage concerns that require careful consideration. The payload can prevent the whole manifest from being contained in a single network packet, which can cause fragmentation and the loss of portions of the manifest in lossy networks. This causes the need for reassembly and retransmission logic. The manifest <bcp14>MUST</bcp14> be held immutable between verification and processing (see <xref target="req-sec-mfst-const" format="default">REQ.SEC.MFST.CONST</xref>), so a larger manifest will consume more memory with immutability guarantees -- for example, internal RAM or NVRAM, or external secure memory. If the manifest exceeds the available immutable memory, then it <bcp14>MUST</bcp14> be processed modularly, evaluating each of the following: delegation chains; the security container; and the actual manifest, which includes verifying the integrated payload. If the security model calls for downloading the manifest and validating it before storing to NVRAM in order to prevent wear to NVRAM and energy expenditure in NVRAM, then either increasing memory allocated to manifest storage or modular processing of the received manifest may be required. While the manifest has been organized to enable this type of processing, it creates additional complexity in the parser. If the manifest is stored in NVRAM prior to processing, the integrated payload may cause the manifest to exceed the available storage. Because the manifest is received prior to validation of applicability, authority, or correctness, integrated payloads cause the recipient to expend network bandwidth and energy that may not be required if the manifest is discarded, and these costs vary with the size of the integrated payload.</t>
          <dl spacing="normal">
          <dt>See also:</dt><dd><xref target="req-sec-mfst-const" format="default">REQ.SEC.MFST.CONST</xref></dd>
          <dt>Satisfies:</dt><dd><xref target="user-story-mfst-img" format="default">USER_STORY.MFST.IMG</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-payload" format="default">Payload</xref></dd>
	  </dl>
        </section>
        <section anchor="req-use-parse" numbered="true" toc="default">
          <name>REQ.USE.PARSE: Simple Parsing</name>
          <t>The structure of the manifest <bcp14>MUST</bcp14> be simple to parse to reduce the attack vectors against manifest parsers.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-mfst-parse" format="default">USER_STORY.MFST.PARSE</xref></dd>
          <dt>Implemented by:</dt><dd>N/A</dd>
	  </dl>
        </section>
        <section anchor="req-use-delegation" numbered="true" toc="default">
          <name>REQ.USE.DELEGATION: Delegation of Authority in Manifest</name>
          <t>A manifest format <bcp14>MUST</bcp14> enable the delivery of delegation information. This information delivers a new key with which the recipient can verify the manifest.</t>
          <dl spacing="normal">
          <dt>Satisfies:</dt><dd><xref target="user-story-mfst-delegation" format="default">USER_STORY.MFST.DELEGATION</xref></dd>
          <dt>Implemented by:</dt><dd><xref target="manifest-element-key-claims" format="default">Delegation Chain</xref></dd>
	  </dl>
        </section>
      </section>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4122.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8747.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8392.xml"/>

<!-- draft-ietf-suit-architecture (RFC 9019) -->
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9019.xml"/>

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3444.xml"/>

        <reference anchor="STRIDE" target="https://docs.microsoft.com/en-us/previous-versions/commerce-server/ee823878(v=cs.20)">
          <front>
            <title>The STRIDE Threat Model</title>
            <author>
              <organization>Microsoft</organization>
            </author>
            <date year="2009" month="November"/>
          </front>
        </reference>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
      </references>
    </references>
    <section anchor="acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>We would like to thank our working group chairs -- <contact fullname="Dave Thaler"/>, <contact fullname="Russ Housley"/>, and <contact fullname="David Waltermire"/> -- for their review comments and their support.</t>
      <t>We would like to thank the participants of the 2018 Berlin Software Updates for Internet of Things (SUIT) Hackathon and the June 2018 virtual design team meetings for their discussion input.</t>
      <t>In particular, we would like to thank <contact fullname="Koen Zandberg"/>, <contact fullname="Emmanuel Baccelli"/>, <contact fullname="Carsten Bormann"/>, <contact fullname="David Brown"/>, <contact fullname="Markus Gueller"/>, <contact fullname="Frank Audun Kvamtrø"/>, <contact fullname="Øyvind Rønningstad"/>, <contact fullname="Michael Richardson"/>, <contact fullname="Jan-Frederik Rieckers"/>, <contact fullname="Francisco Acosta"/>, <contact fullname="Anton Gerasimov"/>, 
<contact fullname="Matthias Wählisch"/>, <contact fullname="Max Gröning"/>, <contact fullname="Daniel Petry"/>, <contact fullname="Gaëtan Harter"/>, <contact fullname="Ralph Hamm"/>, <contact fullname="Steve Patrick"/>, <contact fullname="Fabio Utzig"/>, <contact fullname="Paul Lambert"/>, <contact fullname="Saïd Gharout"/>, and <contact fullname="Milen Stoychev"/>.</t>
      <t>We would like to thank those who contributed to the development of this information model. In particular, we would like to thank <contact fullname="Milosch Meriac"/>, <contact fullname="Jean-Luc Giraud"/>, <contact fullname="Dan Ros"/>, <contact fullname="Amyas Phillips"/>, and <contact fullname="Gary Thomson"/>.</t>
      <t>Finally, we would like to thank the following IESG members for their review feedback: <contact fullname="Erik Kline"/>, <contact fullname="Murray Kucherawy"/>, <contact fullname="Barry Leiba"/>, <contact fullname="Alissa Cooper"/>, <contact fullname="Stephen Farrell"/>, and <contact fullname="Benjamin Kaduk"/>.</t>
    </section>
  </back>
</rfc>
