| < draft-ietf-suit-manifest-00.txt | draft-ietf-suit-manifest-01.txt > | |||
|---|---|---|---|---|
| SUIT B. Moran | SUIT B. Moran | |||
| Internet-Draft H. Tschofenig | Internet-Draft H. Tschofenig | |||
| Intended status: Informational Arm Limited | Intended status: Informational Arm Limited | |||
| Expires: April 23, 2020 H. Birkholz | Expires: April 30, 2020 H. Birkholz | |||
| Fraunhofer SIT | Fraunhofer SIT | |||
| October 21, 2019 | October 28, 2019 | |||
| SUIT CBOR manifest serialisation format | SUIT CBOR manifest serialisation format | |||
| draft-ietf-suit-manifest-00 | draft-ietf-suit-manifest-01 | |||
| Abstract | Abstract | |||
| This specification describes the format of a manifest. A manifest is | This specification describes the format of a manifest. A manifest is | |||
| a bundle of metadata about the firmware for an IoT device, where to | a bundle of metadata about the firmware for an IoT device, where to | |||
| find the firmware, the devices to which it applies, and cryptographic | find the firmware, the devices to which it applies, and cryptographic | |||
| information protecting the manifest. | information protecting the manifest. | |||
| Status of This Memo | Status of This Memo | |||
| skipping to change at page 1, line 35 ¶ | skipping to change at page 1, line 35 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on April 23, 2020. | This Internet-Draft will expire on April 30, 2020. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2019 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 23 ¶ | skipping to change at page 2, line 23 ¶ | |||
| the copyright in such materials, this document may not be modified | the copyright in such materials, this document may not be modified | |||
| outside the IETF Standards Process, and derivative works of it may | outside the IETF Standards Process, and derivative works of it may | |||
| not be created outside the IETF Standards Process, except to format | not be created outside the IETF Standards Process, except to format | |||
| it for publication as an RFC or to translate it into languages other | it for publication as an RFC or to translate it into languages other | |||
| than English. | than English. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
| 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 4 | 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 4 | |||
| 3. SUIT digest container . . . . . . . . . . . . . . . . . . . . 5 | 3. Distributing firmware . . . . . . . . . . . . . . . . . . . . 5 | |||
| 4. Distributing firmware . . . . . . . . . . . . . . . . . . . . 6 | 4. Workflow of a device applying a firmware update . . . . . . . 5 | |||
| 5. Workflow of a device applying a firmware update . . . . . . . 6 | 5. SUIT manifest goals . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 6. SUIT manifest goals . . . . . . . . . . . . . . . . . . . . . 6 | 6. SUIT manifest design overview . . . . . . . . . . . . . . . . 7 | |||
| 7. SUIT manifest design overview . . . . . . . . . . . . . . . . 8 | 6.1. Manifest Design Evaluation . . . . . . . . . . . . . . . 8 | |||
| 7.1. Severable Elements . . . . . . . . . . . . . . . . . . . 9 | 6.2. Severable Elements . . . . . . . . . . . . . . . . . . . 9 | |||
| 7.2. Conventions . . . . . . . . . . . . . . . . . . . . . . . 9 | 6.3. Conventions . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 7.3. Payloads . . . . . . . . . . . . . . . . . . . . . . . . 10 | 6.4. Payloads . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 8. Manifest Structure . . . . . . . . . . . . . . . . . . . . . 10 | 7. Manifest Structure . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 8.1. Outer wrapper . . . . . . . . . . . . . . . . . . . . . . 12 | 7.1. Outer wrapper . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 8.2. Manifest . . . . . . . . . . . . . . . . . . . . . . . . 13 | 7.2. Manifest . . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 8.3. SUIT_Dependency . . . . . . . . . . . . . . . . . . . . . 16 | 7.3. SUIT_Dependency . . . . . . . . . . . . . . . . . . . . . 16 | |||
| 8.4. SUIT_Component . . . . . . . . . . . . . . . . . . . . . 17 | 7.4. SUIT_Component_Reference . . . . . . . . . . . . . . . . 17 | |||
| 8.5. SUIT_Component_Reference . . . . . . . . . . . . . . . . 17 | 7.5. Manifest Parameters . . . . . . . . . . . . . . . . . . . 17 | |||
| 8.6. Manifest Parameters . . . . . . . . . . . . . . . . . . . 18 | 7.5.1. SUIT_Parameter_Strict_Order . . . . . . . . . . . . . 19 | |||
| 8.6.1. SUIT_Parameter_Strict_Order . . . . . . . . . . . . . 20 | 7.5.2. SUIT_Parameter_Coerce_Condition_Failure . . . . . . . 20 | |||
| 8.6.2. SUIT_Parameter_Coerce_Condition_Failure . . . . . . . 20 | 7.6. SUIT_Parameter_Encryption_Info . . . . . . . . . . . . . 20 | |||
| 8.7. SUIT_Parameter_Encryption_Info . . . . . . . . . . . . . 20 | 7.7. SUIT_Parameter_Compression_Info . . . . . . . . . . . . . 20 | |||
| 8.8. SUIT_Parameter_Compression_Info . . . . . . . . . . . . . 20 | 7.8. SUIT_Parameter_Unpack_Info . . . . . . . . . . . . . . . 20 | |||
| 8.9. SUIT_Parameter_Unpack_Info . . . . . . . . . . . . . . . 21 | 7.9. SUIT_Parameters CDDL . . . . . . . . . . . . . . . . . . 21 | |||
| 8.10. SUIT_Parameters CDDL . . . . . . . . . . . . . . . . . . 21 | 7.10. SUIT_Command_Sequence . . . . . . . . . . . . . . . . . . 22 | |||
| 8.11. SUIT_Command_Sequence . . . . . . . . . . . . . . . . . . 23 | 7.11. SUIT_Condition . . . . . . . . . . . . . . . . . . . . . 24 | |||
| 8.12. SUIT_Condition . . . . . . . . . . . . . . . . . . . . . 24 | 7.11.1. Identifier Conditions . . . . . . . . . . . . . . . 25 | |||
| 8.12.1. ID Conditions . . . . . . . . . . . . . . . . . . . 25 | 7.11.2. suit-condition-image-match . . . . . . . . . . . . . 25 | |||
| 8.12.2. SUIT_Condition_Image_Match . . . . . . . . . . . . . 26 | 7.11.3. suit-condition-image-not-match . . . . . . . . . . . 25 | |||
| 8.12.3. SUIT_Condition_Image_Not_Match . . . . . . . . . . . 26 | 7.11.4. suit-condition-use-before . . . . . . . . . . . . . 25 | |||
| 8.12.4. SUIT_Condition_Use_Before . . . . . . . . . . . . . 26 | 7.11.5. suit-condition-minimum-battery . . . . . . . . . . . 25 | |||
| 8.12.5. SUIT_Condition_Minimum_Battery . . . . . . . . . . . 26 | 7.11.6. suit-condition-update-authorised . . . . . . . . . . 26 | |||
| 8.12.6. SUIT_Condition_Update_Authorised . . . . . . . . . . 27 | 7.11.7. suit-condition-version . . . . . . . . . . . . . . . 26 | |||
| 8.12.7. SUIT_Condition_Version . . . . . . . . . . . . . . . 27 | 7.11.8. SUIT_Condition_Custom . . . . . . . . . . . . . . . 27 | |||
| 8.12.8. SUIT_Condition_Custom . . . . . . . . . . . . . . . 28 | 7.11.9. Identifiers . . . . . . . . . . . . . . . . . . . . 27 | |||
| 8.12.9. Identifiers . . . . . . . . . . . . . . . . . . . . 28 | 7.11.10. SUIT_Condition CDDL . . . . . . . . . . . . . . . . 29 | |||
| 8.12.10. SUIT_Condition CDDL . . . . . . . . . . . . . . . . 29 | 7.12. SUIT_Directive . . . . . . . . . . . . . . . . . . . . . 29 | |||
| 8.13. SUIT_Directive . . . . . . . . . . . . . . . . . . . . . 30 | 7.12.1. suit-directive-set-component-index . . . . . . . . . 30 | |||
| 8.13.1. SUIT_Directive_Set_Component_Index . . . . . . . . . 31 | 7.12.2. suit-directive-set-dependency-index . . . . . . . . 31 | |||
| 8.13.2. SUIT_Directive_Set_Manifest_Index . . . . . . . . . 32 | 7.12.3. suit-directive-abort . . . . . . . . . . . . . . . . 31 | |||
| 8.13.3. SUIT_Directive_Run_Sequence . . . . . . . . . . . . 32 | 7.12.4. suit-directive-run-sequence . . . . . . . . . . . . 31 | |||
| 8.13.4. SUIT_Directive_Run_Sequence_Conditional . . . . . . 33 | 7.12.5. suit-directive-try-each . . . . . . . . . . . . . . 32 | |||
| 8.13.5. SUIT_Directive_Process_Dependency . . . . . . . . . 33 | 7.12.6. suit-directive-process-dependency . . . . . . . . . 32 | |||
| 8.13.6. SUIT_Directive_Set_Parameters . . . . . . . . . . . 33 | 7.12.7. suit-directive-set-parameters . . . . . . . . . . . 33 | |||
| 8.13.7. SUIT_Directive_Set_Parameter_State_Append . . . . . 34 | 7.12.8. suit-directive-override-parameters . . . . . . . . . 33 | |||
| 8.13.8. SUIT_Directive_Override_Parameters . . . . . . . . . 34 | 7.12.9. suit-directive-fetch . . . . . . . . . . . . . . . . 34 | |||
| 8.13.9. SUIT_Directive_Fetch . . . . . . . . . . . . . . . . 34 | 7.12.10. suit-directive-copy . . . . . . . . . . . . . . . . 34 | |||
| 8.13.10. SUIT_Directive_Copy . . . . . . . . . . . . . . . . 35 | 7.12.11. suit-directive-swap . . . . . . . . . . . . . . . . 35 | |||
| 8.13.11. SUIT_Directive_Run . . . . . . . . . . . . . . . . . 36 | 7.12.12. suit-directive-run . . . . . . . . . . . . . . . . . 35 | |||
| 8.13.12. SUIT_Directive_Wait . . . . . . . . . . . . . . . . 36 | 7.12.13. suit-directive-wait . . . . . . . . . . . . . . . . 36 | |||
| 8.13.13. SUIT_Directive CDDL . . . . . . . . . . . . . . . . 37 | 7.12.14. SUIT_Directive CDDL . . . . . . . . . . . . . . . . 37 | |||
| 9. Dependency processing . . . . . . . . . . . . . . . . . . . . 39 | 8. Dependency processing . . . . . . . . . . . . . . . . . . . . 39 | |||
| 10. Access Control Lists . . . . . . . . . . . . . . . . . . . . 40 | 9. Access Control Lists . . . . . . . . . . . . . . . . . . . . 40 | |||
| 11. Creating conditional sequences . . . . . . . . . . . . . . . 40 | 10. SUIT digest container . . . . . . . . . . . . . . . . . . . . 40 | |||
| 12. Full CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . 41 | 11. Creating conditional sequences . . . . . . . . . . . . . . . 41 | |||
| 13. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 46 | 12. Full CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . 43 | |||
| 13.1. Example 0: . . . . . . . . . . . . . . . . . . . . . . . 47 | 13. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 49 | |||
| 13.2. Example 1: . . . . . . . . . . . . . . . . . . . . . . . 48 | 13.1. Example 0: . . . . . . . . . . . . . . . . . . . . . . . 50 | |||
| 13.3. Example 2: . . . . . . . . . . . . . . . . . . . . . . . 50 | 13.2. Example 1: . . . . . . . . . . . . . . . . . . . . . . . 52 | |||
| 13.4. Example 3: . . . . . . . . . . . . . . . . . . . . . . . 53 | 13.3. Example 2: . . . . . . . . . . . . . . . . . . . . . . . 54 | |||
| 13.5. Example 4: . . . . . . . . . . . . . . . . . . . . . . . 56 | 13.4. Example 3: . . . . . . . . . . . . . . . . . . . . . . . 57 | |||
| 13.6. Example 5: . . . . . . . . . . . . . . . . . . . . . . . 59 | 13.5. Example 4: . . . . . . . . . . . . . . . . . . . . . . . 61 | |||
| 13.7. Example 6: . . . . . . . . . . . . . . . . . . . . . . . 62 | 13.6. Example 5: . . . . . . . . . . . . . . . . . . . . . . . 65 | |||
| 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 65 | 13.7. Example 6: . . . . . . . . . . . . . . . . . . . . . . . 69 | |||
| 15. Security Considerations . . . . . . . . . . . . . . . . . . . 65 | 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 73 | |||
| 16. Mailing List Information . . . . . . . . . . . . . . . . . . 66 | 15. Security Considerations . . . . . . . . . . . . . . . . . . . 73 | |||
| 17. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 66 | 16. Mailing List Information . . . . . . . . . . . . . . . . . . 74 | |||
| 18. References . . . . . . . . . . . . . . . . . . . . . . . . . 66 | 17. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 74 | |||
| 18.1. Normative References . . . . . . . . . . . . . . . . . . 66 | 18. References . . . . . . . . . . . . . . . . . . . . . . . . . 74 | |||
| 18.2. Informative References . . . . . . . . . . . . . . . . . 67 | 18.1. Normative References . . . . . . . . . . . . . . . . . . 74 | |||
| 18.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 67 | 18.2. Informative References . . . . . . . . . . . . . . . . . 75 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 68 | 18.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 75 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 76 | ||||
| 1. Introduction | 1. Introduction | |||
| A firmware update mechanism is an essential security feature for IoT | A firmware update mechanism is an essential security feature for IoT | |||
| devices to deal with vulnerabilities. While the transport of | devices to deal with vulnerabilities. While the transport of | |||
| firmware images to the devices themselves is important there are | firmware images to the devices themselves is important there are | |||
| already various techniques available, such as the Lightweight | already various techniques available, such as the Lightweight | |||
| Machine-to-Machine (LwM2M) protocol offering device management of IoT | Machine-to-Machine (LwM2M) protocol offering device management of IoT | |||
| devices. Equally important is the inclusion of meta-data about the | devices. Equally important is the inclusion of meta-data about the | |||
| conveyed firmware image (in the form of a manifest) and the use of | conveyed firmware image (in the form of a manifest) and the use of | |||
| skipping to change at page 4, line 22 ¶ | skipping to change at page 4, line 23 ¶ | |||
| integrity protection is required it is sufficient to install a trust | integrity protection is required it is sufficient to install a trust | |||
| anchor on the IoT device. For confidentiality protected firmware | anchor on the IoT device. For confidentiality protected firmware | |||
| images it is additionally required to install either one or multiple | images it is additionally required to install either one or multiple | |||
| symmetric or asymmetric keys on the IoT device. Starting security | symmetric or asymmetric keys on the IoT device. Starting security | |||
| protection at the author is a risk mitigation technique so firmware | protection at the author is a risk mitigation technique so firmware | |||
| images and manifests can be stored on untrusted respositories; it | images and manifests can be stored on untrusted respositories; it | |||
| also reduces the scope of a compromise of any repository or | also reduces the scope of a compromise of any repository or | |||
| intermediate system to be no worse than a denial of service. | intermediate system to be no worse than a denial of service. | |||
| It is assumed that the reader is familiar with the high-level | It is assumed that the reader is familiar with the high-level | |||
| firmware update architecture [Architecture]. This document is | firmware update architecture [Architecture]. | |||
| structured as follows: In Section 8 we describe the main building | ||||
| blocks of the manifest and Section 12 contains the description of the | ||||
| CBOR of the manifest. | ||||
| The SUIT manifest is heavily optimised for consumption by constrained | The SUIT manifest is heavily optimised for consumption by constrained | |||
| devices. This means that it is not constructed as a conventional | devices. This means that it is not constructed as a conventional | |||
| descriptive document, as described in [Behaviour]. This means that a | descriptive document. Instead, of describing what an update IS, it | |||
| user viewing the contents of the document will require tooling to | describes what a recipient should DO. | |||
| view the contents in a more descriptive way. | ||||
| While the SUIT manifest is informed by and optimised for firmware | ||||
| update use cases, there is nothing in the [Information] that | ||||
| restricts its use to only firmware use cases. Software update and | ||||
| delivery of arbitrary data can equally be managed by SUIT-based | ||||
| metadata. | ||||
| 2. Conventions and Terminology | 2. Conventions and Terminology | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
| "OPTIONAL" in this document are to be interpreted as described in | "OPTIONAL" in this document are to be interpreted as described in | |||
| BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
| capitals, as shown here. | capitals, as shown here. | |||
| - SUIT: Sofware Update for the Internet of Things, the IETF working | - SUIT: Sofware Update for the Internet of Things, the IETF working | |||
| skipping to change at page 5, line 24 ¶ | skipping to change at page 5, line 24 ¶ | |||
| - Recipient: The system, typically an IoT device, that receives a | - Recipient: The system, typically an IoT device, that receives a | |||
| manifest. | manifest. | |||
| - Condition: A test for a property of the Recipient or its | - Condition: A test for a property of the Recipient or its | |||
| components. | components. | |||
| - Directive: An action for the Recipient to perform. | - Directive: An action for the Recipient to perform. | |||
| - Command: A Condition or a Directive. | - Command: A Condition or a Directive. | |||
| 3. SUIT digest container | - Trusted Execution: A process by which a system ensures that only | |||
| trusted code is executed, for example secure boot. | ||||
| RFC 8152 [RFC8152] provides containers for signature, MAC, and | ||||
| encryption, but no basic digest container. The container needed for | ||||
| a digest requires a type identifier and a container for the raw | ||||
| digest data. Some forms of digest may require additional parameters. | ||||
| These can be added following the digest. Algorithm identifiers | ||||
| defined in RFC 6920 [RFC6920] are reused for this digest container. | ||||
| This structure is described by the following CDDL: | ||||
| SUIT_Digest = [ | ||||
| suit-digest-algorithm-id : $suit-digest-algorithm-ids, | ||||
| suit-digest-bytes : bytes, | ||||
| ? suit-digest-parameters : any | ||||
| ] | ||||
| ; Named Information Hash Algorithm Identifiers | ||||
| digest-algorithm-ids /= algorithm-id-sha256 | ||||
| digest-algorithm-ids /= algorithm-id-sha256-128 | ||||
| digest-algorithm-ids /= algorithm-id-sha256-120 | ||||
| digest-algorithm-ids /= algorithm-id-sha256-96 | ||||
| digest-algorithm-ids /= algorithm-id-sha256-64 | ||||
| digest-algorithm-ids /= algorithm-id-sha256-32 | ||||
| digest-algorithm-ids /= algorithm-id-sha384 | ||||
| digest-algorithm-ids /= algorithm-id-sha512 | ||||
| digest-algorithm-ids /= algorithm-id-sha3-224 | ||||
| digest-algorithm-ids /= algorithm-id-sha3-256 | ||||
| digest-algorithm-ids /= algorithm-id-sha3-384 | ||||
| digest-algorithm-ids /= algorithm-id-sha3-512 | ||||
| 4. Distributing firmware | 3. Distributing firmware | |||
| Distributing firmware in a multi-party environment is a difficult | Distributing firmware in a multi-party environment is a difficult | |||
| operation. Each party requires a different subset of data. Some | operation. Each party requires a different subset of data. Some | |||
| data may not be accessible to all parties. Multiple signatures may | data may not be accessible to all parties. Multiple signatures may | |||
| be required from parties with different authorities. This topic is | be required from parties with different authorities. This topic is | |||
| covered in more depth in [Architecture] | covered in more depth in [Architecture]. | |||
| 5. Workflow of a device applying a firmware update | 4. Workflow of a device applying a firmware update | |||
| The manifest is designed to work with a pull parser, where each | The manifest is designed to work with a pull parser, where each | |||
| section of the manifest is used in sequence. The expected workflow | section of the manifest is used in sequence. The expected workflow | |||
| for a device installing an update can be broken down into 5 steps: | for a device installing an update can be broken down into 5 steps: | |||
| 1. Verify the signature of the manifest | 1. Verify the signature of the manifest | |||
| 2. Verify the applicability of the manifest | 2. Verify the applicability of the manifest | |||
| 3. Resolve dependencies | 3. Resolve dependencies | |||
| skipping to change at page 6, line 42 ¶ | skipping to change at page 6, line 15 ¶ | |||
| 1. Verify image(s) | 1. Verify image(s) | |||
| 2. Load image(s) | 2. Load image(s) | |||
| 3. Run image(s) | 3. Run image(s) | |||
| When multiple manifests are used for an update, each manifest's steps | When multiple manifests are used for an update, each manifest's steps | |||
| occur in a lockstep fashion; all manifests have dependency resolution | occur in a lockstep fashion; all manifests have dependency resolution | |||
| performed before any manifest performs a payload fetch, etc. | performed before any manifest performs a payload fetch, etc. | |||
| 6. SUIT manifest goals | 5. SUIT manifest goals | |||
| The manifest described in this document is intended to simplify the | The manifest described in this document is intended to meet several | |||
| construction of constrained device firmware update solutions. It is | goals, as described below. | |||
| also intended to allow update authors to describe complex update | ||||
| processes for complex devices. | ||||
| Manifests implemented as descriptive documents require changes to the | 1. Meet the requirements defined in [Information]. | |||
| parser and the information model whenever a new feature is added. | ||||
| This is particularly accentuated when the parser is a fixed-function | ||||
| minimal parser (or a pull parser) such as the type that is typically | ||||
| used in a bootloader or in a constrained client. The issue is not as | ||||
| significant in devices that can use general purpose parsers. | ||||
| The manifest detailed in this document aims to address these and more | 2. Simple to parse on a constrained node | |||
| problems by changing the processing model from a piece of software | ||||
| that loads a manifest, interprets the data, then performs some | 3. Simple to process on a constrained node | |||
| actions, into a model in which the software performs exactly the | ||||
| operations stated in the manifest, in order. This allows the | 4. Compact encoding | |||
| manifest to encode data in a way that matches precisely with what the | ||||
| parser expects. It also makes inflexible code, like a bootloader, | 5. Comprehensible by an intermediate system | |||
| more flexible in what it can do; because the manifest defines part of | ||||
| the "program," the manifest's execution defines part of the behaviour | 6. Expressive enough to enable advanced use cases on advanced nodes | |||
| of the system. Further detail on this approach is covered in | ||||
| [Behaviour] | 7. Extensible | |||
| The SUIT manifest can be used for a variety of purposes throughout | The SUIT manifest can be used for a variety of purposes throughout | |||
| its lifecycle. The manifest allows: | its lifecycle. The manifest allows: | |||
| 1. the Firmware Author to reason about releasing a firmware. | 1. the Firmware Author to reason about releasing a firmware. | |||
| 2. the Network Operator to reason about compatibility of a firmware. | 2. the Network Operator to reason about compatibility of a firmware. | |||
| 3. the Device Operator to reason about the impact of a firmware. | 3. the Device Operator to reason about the impact of a firmware. | |||
| skipping to change at page 7, line 41 ¶ | skipping to change at page 7, line 7 ¶ | |||
| 5. the Plant Manager to reason about timing and acceptance of | 5. the Plant Manager to reason about timing and acceptance of | |||
| firmware updates. | firmware updates. | |||
| 6. the device to reason about the authority & authenticity of a | 6. the device to reason about the authority & authenticity of a | |||
| firmware prior to installation. | firmware prior to installation. | |||
| 7. the device to reason about the applicability of a firmware. | 7. the device to reason about the applicability of a firmware. | |||
| 8. the device to reason about the installation of a firmware. | 8. the device to reason about the installation of a firmware. | |||
| 9. the device to reason about the authenticity of a firmware at | 9. the device to reason about the authenticity & encoding of a | |||
| boot. | firmware at boot. | |||
| Each of these uses happens at a different stage of the manifest | Each of these uses happens at a different stage of the manifest | |||
| lifecycle, so each has different requirements. | lifecycle, so each has different requirements. | |||
| To verify authenticity at boot time, only the smallest portion of the | 6. SUIT manifest design overview | |||
| manifest is required. This core part of the manifest describes only | ||||
| the fully installed firmware and any of its dependencies. | ||||
| 7. SUIT manifest design overview | ||||
| In order to provide flexible behaviour to constrained devices, while | In order to provide flexible behaviour to constrained devices, while | |||
| still allowing more powerful devices to use their full capabilities, | still allowing more powerful devices to use their full capabilities, | |||
| the SUIT manifest takes a new approach, encoding the required | the SUIT manifest encodes the required behaviour of a Recipient | |||
| behaviour of a Recipient device, instead of just presenting the | device. Behaviour is encoded as a specialised byte code, contained | |||
| information used to determine that behaviour. This gives benefits | in a CBOR list. This promotes a flat encoding, which simplifies the | |||
| equivalent to those provided by a scripting language or byte code, | parser. The information encoded by this byte code closely matches | |||
| with two substantial differences. First, the language is extremely | the operations that a device will perform, which promotes ease of | |||
| high level, consisting of only the operations that a device may | processing. The core operations used by most update and trusted | |||
| perform during update and secure boot of a firmware image. The | execution operations are represented in the byte code. The byte code | |||
| language specifies behaviours in a linearised form, without branches | can be extended by registering new operations. | |||
| or loops. Conditional processing is supported, and parallel and out- | ||||
| The specialised byte code approach gives benefits equivalent to those | ||||
| provided by a scripting language or conventional byte code, with two | ||||
| substantial differences. First, the language is extremely high | ||||
| level, consisting of only the operations that a device may perform | ||||
| during update and trusted execution of a firmware image. Second, the | ||||
| language specifies behaviours in a linearised form, without reverse | ||||
| branches. Conditional processing is supported, and parallel and out- | ||||
| of-order processing may be performed by sufficiently capable devices. | of-order processing may be performed by sufficiently capable devices. | |||
| By structuring the data in this way, the manifest processor becomes a | By structuring the data in this way, the manifest processor becomes a | |||
| very simple engine that uses a pull parser to interpret the manifest. | very simple engine that uses a pull parser to interpret the manifest. | |||
| This pull parser invokes a series of command handlers that evaluate a | This pull parser invokes a series of command handlers that evaluate a | |||
| Condition or execute a Directive. Most data is structured in a | Condition or execute a Directive. Most data is structured in a | |||
| highly regular pattern, which simplifies the parser. | highly regular pattern, which simplifies the parser. | |||
| The results of this allow a Recipient with minimal functionality to | The results of this allow a Recipient to implement a very small | |||
| perform complex updates with reduced overhead. Conditional execution | parser for constrained applications. If needed, such a parser also | |||
| of commands allows a simple device to perform important decisions at | allows the Recipient to perform complex updates with reduced | |||
| validation-time, such as which differential update to download for a | overhead. Conditional execution of commands allows a simple device | |||
| given current version, or which hash to check, based on the | to perform important decisions at validation-time. | |||
| installation address. | ||||
| Dependency handling is vastly simplified as well. Dependencies | Dependency handling is vastly simplified as well. Dependencies | |||
| function like subroutines of the language. When a manifest has a | function like subroutines of the language. When a manifest has a | |||
| dependency, it can invoke that dependency's commands and modify their | dependency, it can invoke that dependency's commands and modify their | |||
| behaviour by setting parameters. Because some parameters come with | behaviour by setting parameters. Because some parameters come with | |||
| security implications, the dependencies also have a mechanism to | security implications, the dependencies also have a mechanism to | |||
| reject modifications to parameters on a fine-grained level. | reject modifications to parameters on a fine-grained level. | |||
| Developing a robust permissions system works in this model too. The | Developing a robust permissions system works in this model too. The | |||
| Recipient can use a simple ACL that is a table of Identities and | Recipient can use a simple ACL that is a table of Identities and | |||
| Component Identifier permissions to ensure that only manifests | Component Identifier permissions to ensure that only manifests | |||
| authenticated by the appropriate identity have access to define a | authenticated by the appropriate identity have access to operate on a | |||
| component. | component. | |||
| Capability reporting is similarly simplified. A Recipient can report | Capability reporting is similarly simplified. A Recipient can report | |||
| the Commands and Parameters that it supports. This is sufficiently | the Commands, Parameters, Algorithms, and Component Identifiers that | |||
| precise for a manifest author to create a manifest that the Recipient | it supports. This is sufficiently precise for a manifest author to | |||
| can accept. | create a manifest that the Recipient can accept. | |||
| The simplicity of design in the Recipient due to all of these | The simplicity of design in the Recipient due to all of these | |||
| benefits allows even a highly constrained platform to use advanced | benefits allows even a highly constrained platform to use advanced | |||
| update capabilities. | update capabilities. | |||
| 7.1. Severable Elements | 6.1. Manifest Design Evaluation | |||
| To evaluate this design, it is compared to the goals stated above. | ||||
| Goal evaluation: | ||||
| 1. Each command and condition is anchored to a manifest information | ||||
| element in [Information] | ||||
| 2. The use of a byte code encourages flat encoding and reduces | ||||
| nesting depth. This promotes a simple encoding. | ||||
| 3. The encoded information closely matches the operations that a | ||||
| device will perform, making the format easy to process. | ||||
| 4. Encoding efficiency exceeds 50% when compared to raw data. | ||||
| 5. Tooling will be required to reason about the manifest. | ||||
| 6. The core operations used by most update and trusted execution | ||||
| operations are represented in the byte code. The use cases | ||||
| listed in [Information] are enabled. | ||||
| 7. Registration of new standard byte code identifiers enables | ||||
| extension in a comprehensible way. | ||||
| The manifest described by this document meets the stated goals. | ||||
| Meeting goal 5-comprehensible by intermediate systems-will require | ||||
| additional tooling or a division of metadata. | ||||
| 6.2. Severable Elements | ||||
| Because the manifest can be used by different actors at different | Because the manifest can be used by different actors at different | |||
| times, some parts of the manifest can be removed without affecting | times, some parts of the manifest can be removed without affecting | |||
| later stages of the lifecycle. This is called "Severing." Severing | later stages of the lifecycle. This is called "Severing." Severing | |||
| of information is achieved by separating that information from the | of information is achieved by separating that information from the | |||
| signed container so that removing it does not affect the signature. | signed container so that removing it does not affect the signature. | |||
| This means that ensuring authenticity of severable parts of the | This means that ensuring authenticity of severable parts of the | |||
| manifest is a requirement for the signed portion of the manifest. | manifest is a requirement for the signed portion of the manifest. | |||
| Severing some parts makes it possible to discard parts of the | Severing some parts makes it possible to discard parts of the | |||
| manifest that are no longer necessary. This is important because it | manifest that are no longer necessary. This is important because it | |||
| skipping to change at page 9, line 33 ¶ | skipping to change at page 9, line 29 ¶ | |||
| Elements are made severable by removing them from the manifest, | Elements are made severable by removing them from the manifest, | |||
| encoding them in a bstr, and placing a SUIT_Digest of the bstr in the | encoding them in a bstr, and placing a SUIT_Digest of the bstr in the | |||
| manifest so that they can still be authenticated. The SUIT_Digest | manifest so that they can still be authenticated. The SUIT_Digest | |||
| typically consumes 4 bytes more than the size of the raw digest, | typically consumes 4 bytes more than the size of the raw digest, | |||
| therefore elements smaller than (Digest Bits)/8 + 4 SHOULD never be | therefore elements smaller than (Digest Bits)/8 + 4 SHOULD never be | |||
| severable. Elements larger than (Digest Bits)/8 + 4 MAY be | severable. Elements larger than (Digest Bits)/8 + 4 MAY be | |||
| severable, while elements that are much larger than (Digest Bits)/8 + | severable, while elements that are much larger than (Digest Bits)/8 + | |||
| 4 SHOULD be severable. | 4 SHOULD be severable. | |||
| 7.2. Conventions | 6.3. Conventions | |||
| The map indices in this encoding are reset to 1 for each map within | The map indices in this encoding are reset to 1 for each map within | |||
| the structure. This is to keep the indices as small as possible. | the structure. This is to keep the indices as small as possible. | |||
| The goal is to keep the index objects to single bytes (CBOR positive | The goal is to keep the index objects to single bytes (CBOR positive | |||
| integers 1-23). | integers 1-23). | |||
| Wherever enumerations are used, they are started at 1. This allows | Wherever enumerations are used, they are started at 1. This allows | |||
| detection of several common software errors that are caused by | detection of several common software errors that are caused by | |||
| uninitialised variables. Positive numbers in enumerations are | uninitialised variables. Positive numbers in enumerations are | |||
| reserved for IANA registration. Negative numbers are used to | reserved for IANA registration. Negative numbers are used to | |||
| identify application-specific implementations. | identify application-specific implementations. | |||
| CDDL names are hyphenated and CDDL structures follow the convention | CDDL names are hyphenated and CDDL structures follow the convention | |||
| adopted in COSE [RFC8152]: SUIT_Structure_Name. | adopted in COSE [RFC8152]: SUIT_Structure_Name. | |||
| 7.3. Payloads | 6.4. Payloads | |||
| Payloads can take many forms, for example, binary, hex, s-record, | Payloads can take many forms, for example, binary, hex, s-record, | |||
| elf, binary diff, PEM certificate, CBOR Web Token, serialised | elf, binary diff, PEM certificate, CBOR Web Token, serialised | |||
| configuration. These payloads fall into two broad categories: those | configuration. These payloads fall into two broad categories: those | |||
| that require installation-time unpacking and those that do not. | that require installation-time unpacking and those that do not. | |||
| Binary, PEM certificate, and CBOR Web Token do not require | Binary, PEM certificate, and CBOR Web Token do not require | |||
| installation-time unpacking. Hex, s-record, elf, and serialised | installation-time unpacking. Hex, s-record, and serialised | |||
| configuration require installation-time unpacking. | configuration require installation-time unpacking. Elf may or may | |||
| not require unpacking depending on the target. | ||||
| Some payloads cannot be directly converted to a writable binary | Some payloads cannot be directly converted to a writable binary | |||
| stream. Hex, s-record, and elf may contain gaps and they have no | stream. Hex, s-record, and elf may contain gaps and they have no | |||
| guarantee of monotonic increase of address, which makes pre- | guarantee of monotonic increase of address, which makes pre- | |||
| processing them into a binary stream difficult on constrained | processing them into a binary stream difficult on constrained | |||
| platforms. Serialised configuration may be unpacked into a | platforms. Serialised configuration may be unpacked into a | |||
| configuration database, which makes it impossible to preprocess into | configuration database, which makes it impossible to preprocess into | |||
| a binary stream, suitable for direct writing. | a binary stream, suitable for direct writing. | |||
| Where a specialised unpacking algorithm is needed, a digest is not | Where a specialised unpacking algorithm is needed, a digest is not | |||
| skipping to change at page 10, line 40 ¶ | skipping to change at page 10, line 32 ¶ | |||
| This presents two problems for the manifest: first, it must indicate | This presents two problems for the manifest: first, it must indicate | |||
| that a specialised installer is needed and, second, it cannot provide | that a specialised installer is needed and, second, it cannot provide | |||
| a hash of the payload that is checkable after installation. These | a hash of the payload that is checkable after installation. These | |||
| two problems are resolved in two ways: | two problems are resolved in two ways: | |||
| 1. Payloads that need a specialised installer must indicate this in | 1. Payloads that need a specialised installer must indicate this in | |||
| suit-payload-info-unpack. | suit-payload-info-unpack. | |||
| 2. Payloads that need specialised verification must indicate this in | 2. Payloads that need specialised verification must indicate this in | |||
| the SUIT_Payload section or SUIT_Parameter_Image_Digest by | the SUIT_Parameter_Image_Digest by indicating a SUIT_Digest | |||
| indicating a SUIT_Digest algorithm that correctly validates their | algorithm that correctly validates their information. | |||
| information. | ||||
| 8. Manifest Structure | 7. Manifest Structure | |||
| The manifest is divided into several sections in a hierarchy as | The manifest is divided into several sections in a hierarchy as | |||
| follows: | follows: | |||
| 1. The outer wrapper | 1. The outer wrapper | |||
| 1. The authentication wrapper | 1. The authentication wrapper | |||
| 2. The manifest | 2. The manifest | |||
| 1. Critical Information | 1. Critical Information | |||
| 2. List of dependencies | 2. Information shared by all command sequences | |||
| 3. List of payloads | 1. List of dependencies | |||
| 2. List of payloads | ||||
| 4. List of payloads in dependencies | 3. List of payloads in dependencies | |||
| 5. Common list of conditions, directives | 4. Common list of conditions, directives | |||
| 6. Dependency resolution Reference or list of conditions, | 3. Dependency resolution Reference or list of conditions, | |||
| directives | directives | |||
| 7. Payload fetch Reference or list of conditions, | 4. Payload fetch Reference or list of conditions, | |||
| directives | directives | |||
| 8. Installation Reference or list of conditions, directives | 5. Installation Reference or list of conditions, directives | |||
| 9. Verification conditions/directives | 6. Verification conditions/directives | |||
| 10. Load conditions/directives | 7. Load conditions/directives | |||
| 11. Run conditions/directives | 8. Run conditions/directives | |||
| 12. Text / Reference | 9. Text / Reference | |||
| 13. COSWID / Reference | 10. COSWID / Reference | |||
| 3. Dependency resolution conditions/directives | 3. Dependency resolution conditions/directives | |||
| 4. Payload fetch conditions/directives | 4. Payload fetch conditions/directives | |||
| 5. Installation conditions/directives | 5. Installation conditions/directives | |||
| 6. Text | 6. Text | |||
| 7. COSWID / Reference | 7. COSWID / Reference | |||
| 8. Intermediate Certificate(s) / CWTs | 8. Intermediate Certificate(s) / CWTs | |||
| 9. Small Payload(s) | 9. Inline Payload(s) | |||
| 8.1. Outer wrapper | 7.1. Outer wrapper | |||
| This object is a container for the other pieces of the manifest to | This object is a container for the other pieces of the manifest to | |||
| provide a common mechanism to find each of the parts. All elements | provide a common mechanism to find each of the parts. All elements | |||
| of the outer wrapper are contained in bstr objects. Wherever the | of the outer wrapper are contained in bstr objects. Wherever the | |||
| manifest references an object in the outer wrapper, the bstr is | manifest references an object in the outer wrapper, the bstr is | |||
| included in the digest calculation. | included in the digest calculation. | |||
| The CDDL that describes the wrapper is below | The CDDL that describes the wrapper is below | |||
| SUIT_Outer_Wrapper = { | SUIT_Outer_Wrapper = { | |||
| suit-authentication-wrapper => bstr .cbor | suit-authentication-wrapper => bstr .cbor | |||
| SUIT_Authentication_Wrapper / nil, | SUIT_Authentication_Wrapper / nil, | |||
| suit-manifest => bstr .cbor Manifest, | $SUIT_Manifest_Wrapped, | |||
| suit-dependency-resolution => bstr .cbor SUIT_Command_Sequence, | ? suit-dependency-resolution => bstr .cbor SUIT_Command_Sequence, | |||
| suit-payload-fetch => bstr .cbor SUIT_Command_Sequence, | ? suit-payload-fetch => bstr .cbor SUIT_Command_Sequence, | |||
| suit-install => bstr .cbor SUIT_Command_Sequence, | ? suit-install => bstr .cbor SUIT_Command_Sequence, | |||
| suit-text-external => bstr .cbor SUIT_Text_Info, | ? suit-text-external => bstr .cbor SUIT_Text_Info, | |||
| suit-coswid-external => bstr .cbor COSWID | ? suit-coswid-external => bstr .cbor COSWID | |||
| } | } | |||
| suit-authentication-wrapper = 1 | ||||
| suit-manifest = 2 | ||||
| suit-dependency-resolution = 7 | ||||
| suit-payload-fetch = 8 | ||||
| suit-install = 9 | ||||
| suit-text = 13 | ||||
| suit-coswid = 14 | ||||
| SUIT_Authentication_Wrapper = [ * (COSE_Mac_Tagged / COSE_Sign_Tagged / | SUIT_Authentication_Wrapper = [ + (COSE_Mac_Tagged / COSE_Sign_Tagged / | |||
| COSE_Mac0_Tagged / COSE_Sign1_Tagged)] | COSE_Mac0_Tagged / COSE_Sign1_Tagged)] | |||
| SUIT_Encryption_Wrapper = COSE_Encrypt_Tagged / COSE_Encrypt0_Tagged | ||||
| SUIT_Manifest_Wrapped //= (suit-manifest => bstr .cbor SUIT_Manifest) | ||||
| SUIT_Manifest_Wrapped //= ( | ||||
| suit-manifest-encryption-info => bstr .cbor SUIT_Encryption_Wrapper, | ||||
| suit-manifest-encrypted => bstr | ||||
| ) | ||||
| All elements of the outer wrapper must be wrapped in a bstr to | All elements of the outer wrapper must be wrapped in a bstr to | |||
| minimize the complexity of the code that evaluates the cryptographic | minimize the complexity of the code that evaluates the cryptographic | |||
| integrity of the element and to ensure correct serialisation for | integrity of the element and to ensure correct serialisation for | |||
| integrity and authenticity checks. | integrity and authenticity checks. | |||
| The suit-authentication-wrapper contains a list of 1 or more | The suit-authentication-wrapper contains a list of 1 or more | |||
| cryptographic authentication wrappers for the core part of the | cryptographic authentication wrappers for the core part of the | |||
| manifest. These are implemented as COSE_Mac_Tagged or | manifest. These are implemented as COSE_Mac_Tagged or | |||
| COSE_Sign_Tagged blocks. The Manifest is authenticated by these | COSE_Sign_Tagged blocks. The Manifest is authenticated by these | |||
| blocks in "detached payload" mode. The COSE_Mac_Tagged and | blocks in "detached payload" mode. The COSE_Mac_Tagged and | |||
| COSE_Sign_Tagged blocks are described in RFC 8152 [RFC8152] and are | COSE_Sign_Tagged blocks are described in RFC 8152 [RFC8152] and are | |||
| beyond the scope of this document. The suit-authentication-wrapper | beyond the scope of this document. The suit-authentication-wrapper | |||
| MUST come first in the SUIT_Outer_Wrapper, regardless of canonical | MUST come first in the SUIT_Outer_Wrapper, regardless of canonical | |||
| encoding of CBOR. All validators MUST reject any SUIT_Outer_Wrapper | encoding of CBOR. All validators MUST reject any SUIT_Outer_Wrapper | |||
| that begins with any element other than a suit-authentication- | that begins with any element other than a suit-authentication- | |||
| wrapper. | wrapper. | |||
| A manifest that has not had authentication information added MUST | A manifest that has not had authentication information added MUST | |||
| still contain the suit-authentication-wrapper element, but the | still contain the suit-authentication-wrapper element, but the | |||
| content MUST be null. | content MUST be nil. | |||
| suit-manifest contains a Manifest structure, which describes the | The outer wrapper MUST contain only one of | |||
| - a plaintext manifest: SUIT_Manifest | ||||
| - an encrypted manifest: both a SUIT_Encryption_Wrapper and the | ||||
| ciphertext of a manifest. | ||||
| When the outer wrapper contains SUIT_Encryption_Wrapper, the suit- | ||||
| authentication-wrapper MUST authenticate the plaintext of suit- | ||||
| manifest-encrypted. | ||||
| suit-manifest contains a SUIT_Manifest structure, which describes the | ||||
| payload(s) to be installed and any dependencies on other manifests. | payload(s) to be installed and any dependencies on other manifests. | |||
| suit-manifest-encryption-info contains a SUIT_Encryption_Wrapper, a | ||||
| COSE object that describes the information required to decrypt a | ||||
| ciphertext manifest. | ||||
| suit-manifest-encrypted contains a ciphertext manifest. | ||||
| Each of suit-dependency-resolution, suit-payload-fetch, and suit- | Each of suit-dependency-resolution, suit-payload-fetch, and suit- | |||
| payload-installation contain the severable contents of the | payload-installation contain the severable contents of the | |||
| identically named portions of the manifest, described in Section 8.2. | identically named portions of the manifest, described in Section 7.2. | |||
| suit-text contains all the human-readable information that describes | suit-text contains all the human-readable information that describes | |||
| any and all parts of the manifest, its payload(s) and its | any and all parts of the manifest, its payload(s) and its | |||
| resource(s). | resource(s). | |||
| suit-coswid contains a Concise Software Identifier. This may be | suit-coswid contains a Concise Software Identifier. This may be | |||
| discarded by the recipient if not needed. | discarded by the recipient if not needed. | |||
| 8.2. Manifest | 7.2. Manifest | |||
| The manifest describes the critical metadata for the referenced | The manifest describes the critical metadata for the referenced | |||
| payload(s). In addition, it contains: | payload(s). In addition, it contains: | |||
| 1. a version number for the manifest structure itself | 1. a version number for the manifest structure itself | |||
| 2. a sequence number | 2. a sequence number | |||
| 3. a list of dependencies | 3. a list of dependencies | |||
| skipping to change at page 14, line 8 ¶ | skipping to change at page 14, line 8 ¶ | |||
| 6. a reference for each of the severable blocks. | 6. a reference for each of the severable blocks. | |||
| 7. a list of actions that the recipient should perform. | 7. a list of actions that the recipient should perform. | |||
| The following CDDL fragment defines the manifest. | The following CDDL fragment defines the manifest. | |||
| SUIT_Manifest = { | SUIT_Manifest = { | |||
| suit-manifest-version => 1, | suit-manifest-version => 1, | |||
| suit-manifest-sequence-number => uint, | suit-manifest-sequence-number => uint, | |||
| ? suit-dependencies => [ + SUIT_Dependency ], | suit-common => bstr .cbor SUIT_Common, | |||
| ? suit-components => [ + SUIT_Component ], | ||||
| ? suit-dependency-components => [ + SUIT_Component_Reference ], | ||||
| ? suit-common => bstr .cbor SUIT_Command_Sequence, | ||||
| ? suit-dependency-resolution => Digest / bstr .cbor SUIT_Command_Sequence, | ? suit-dependency-resolution => Digest / bstr .cbor SUIT_Command_Sequence, | |||
| ? suit-payload-fetch => Digest / bstr .cbor SUIT_Command_Sequence, | ? suit-payload-fetch => Digest / bstr .cbor SUIT_Command_Sequence, | |||
| ? suit-install => Digest / bstr .cbor SUIT_Command_Sequence | ? suit-install => Digest / bstr .cbor SUIT_Command_Sequence | |||
| ? suit-validate => bstr .cbor SUIT_Command_Sequence | ? suit-validate => bstr .cbor SUIT_Command_Sequence | |||
| ? suit-load => bstr .cbor SUIT_Command_Sequence | ? suit-load => bstr .cbor SUIT_Command_Sequence | |||
| ? suit-run => bstr .cbor SUIT_Command_Sequence | ? suit-run => bstr .cbor SUIT_Command_Sequence | |||
| ? suit-text-info => Digest / bstr .cbor SUIT_Text_Map | ? suit-text-info => Digest / bstr .cbor SUIT_Text_Map | |||
| ? suit-coswid => Digest / bstr .cbor COSWID | ? suit-coswid => Digest / bstr .cbor COSWID | |||
| } | } | |||
| suit-manifest-version = 1 | SUIT_Common = { | |||
| suit-manifest-sequence-number = 2 | ? suit-dependencies => bstr .cbor [ + SUIT_Dependency ], | |||
| suit-dependencies = 3 | ? suit-components => bstr .cbor [ + SUIT_Component_Identifier ], | |||
| suit-components = 4 | ? suit-dependency-components => bstr .cbor [ + SUIT_Component_Reference ], | |||
| suit-dependency-components = 5 | ? suit-common-sequence => bstr .cbor SUIT_Command_Sequence, | |||
| suit-common = 6 | } | |||
| suit-dependency-resolution = 7 | ||||
| suit-payload-fetch = 8 | ||||
| suit-install = 9 | ||||
| suit-validate = 10 | ||||
| suit-load = 11 | ||||
| suit-run = 12 | ||||
| suit-text-info = 13 | ||||
| suit-coswid = 14 | ||||
| Several fields in the Manifest can be either a CBOR structure or a | Several fields in the Manifest can be either a CBOR structure or a | |||
| SUIT_Digest. In each of these cases, the SUIT_Digest provides for a | SUIT_Digest. In each of these cases, the SUIT_Digest provides for a | |||
| severable field. Severable fields are RECOMMENDED to implement. In | severable field. Severable fields are RECOMMENDED to implement. In | |||
| particular, text SHOULD be severable, since most useful text elements | particular, text SHOULD be severable, since most useful text elements | |||
| occupy more space than a SUIT_Digest, but are not needed by recipient | occupy more space than a SUIT_Digest, but are not needed by recipient | |||
| devices. Because SUIT_Digest is a CBOR Array and each severable | devices. Because SUIT_Digest is a CBOR Array and each severable | |||
| element is a CBOR bstr, it is straight-forward for a recipient to | element is a CBOR bstr, it is straight-forward for a recipient to | |||
| determine whether an element has been severed. | determine whether an element is been severable. The key used for a | |||
| severable element is the same in the SUIT_Manifest and in the | ||||
| SUIT_Outer_Wrapper so that a recipient can easily identify the | ||||
| correct data in the outer wrapper. | ||||
| The suit-manifest-version indicates the version of serialisation used | The suit-manifest-version indicates the version of serialisation used | |||
| to encode the manifest. Version 1 is the version described in this | to encode the manifest. Version 1 is the version described in this | |||
| document. suit-manifest-version is MANDATORY. | document. suit-manifest-version is REQUIRED. | |||
| The suit-manifest-sequence-number is a monotonically increasing anti- | The suit-manifest-sequence-number is a monotonically increasing anti- | |||
| rollback counter. It also helps devices to determine which in a set | rollback counter. It also helps devices to determine which in a set | |||
| of manifests is the "root" manifest in a given update. Each manifest | of manifests is the "root" manifest in a given update. Each manifest | |||
| MUST have a sequence number higher than each of its dependencies. | MUST have a sequence number higher than each of its dependencies. | |||
| Each recipient MUST reject any manifest that has a sequence number | Each recipient MUST reject any manifest that has a sequence number | |||
| lower than its current sequence number. It MAY be convenient to use | lower than its current sequence number. It MAY be convenient to use | |||
| a UTC timestamp in seconds as the sequence number. suit-manifest- | a UTC timestamp in seconds as the sequence number. suit-manifest- | |||
| sequence-number is MANDATORY. | sequence-number is REQUIRED. | |||
| suit-common encodes all the information that is shared between each | ||||
| of the command sequences, including: suit-dependencies, suit- | ||||
| components, suit-dependency-components, and suit-common-sequence. | ||||
| suit-common is REQUIRED to implement. | ||||
| suit-dependencies is a list of SUIT_Dependency blocks that specify | suit-dependencies is a list of SUIT_Dependency blocks that specify | |||
| manifests that must be present before the current manifest can be | manifests that must be present before the current manifest can be | |||
| processed. suit-dependencies is OPTIONAL. | processed. suit-dependencies is OPTIONAL to implement. | |||
| In order to distinguish between components that are affected by the | In order to distinguish between components that are affected by the | |||
| current manifest and components that are affected by a dependency, | current manifest and components that are affected by a dependency, | |||
| they are kept in separate lists. Components affected by the current | they are kept in separate lists. Components affected by the current | |||
| manifest include the digest and size of the result. Components | manifest only list the component identifier. Components affected by | |||
| affected by a manifest only include the component identifier and the | a dependency include the component identifier and the index of the | |||
| index of the manifest that fully defines the component. | dependency that defines the component. | |||
| suit-components is a list of SUIT_Component blocks that specify the | suit-components is a list of SUIT_Component blocks that specify the | |||
| vital information about the content a component identifier should | component identifiers that will be affected by the content of the | |||
| contain following the update. These are the component identifiers | current manifest. suit-components is OPTIONAL, but at least one | |||
| that will be affected by the content of the current manifest. suit- | manifest MUST contain a suit-components block. | |||
| components is OPTIONAL, but at least one manifest MUST contain a | ||||
| suit-components block. | ||||
| suit-dependency-components is a list of SUIT_Component_Reference | suit-dependency-components is a list of SUIT_Component_Reference | |||
| blocks that specify component identifiers that will be affected by | blocks that specify component identifiers that will be affected by | |||
| the content of a dependency of the current manifest. suit-dependency- | the content of a dependency of the current manifest. suit-dependency- | |||
| components is OPTIONAL. | components is OPTIONAL. | |||
| suit-common is a SUIT_Command_Sequence to execute prior to executing | suit-common-sequence is a SUIT_Command_Sequence to execute prior to | |||
| any other command sequence. Typical actions in suit-common include | executing any other command sequence. Typical actions in suit- | |||
| setting expected device identity and image digests when they are | common-sequence include setting expected device identity and image | |||
| conditional (see Section 11 for more information on conditional | digests when they are conditional (see Section 11 for more | |||
| sequences). suit-common is OPTIONAL. | information on conditional sequences). suit-common-sequence is | |||
| RECOMMENDED. | ||||
| suit-dependency-resolution is a SUIT_Command_Sequence to execute in | suit-dependency-resolution is a SUIT_Command_Sequence to execute in | |||
| order to perform dependency resolution. Typical actions include | order to perform dependency resolution. Typical actions include | |||
| configuring URIs of dependency manifests, fetching dependency | configuring URIs of dependency manifests, fetching dependency | |||
| manifests, and validating dependency manifests' contents. suit- | manifests, and validating dependency manifests' contents. suit- | |||
| dependency-resolution is MANDATORY when suit-dependencies is present. | dependency-resolution is REQUIRED when suit-dependencies is present. | |||
| suit-payload-fetch is a SUIT_Command_Sequence to execute in order to | suit-payload-fetch is a SUIT_Command_Sequence to execute in order to | |||
| obtain a payload. Some manifests may include these actions in the | obtain a payload. Some manifests may include these actions in the | |||
| suit-install section instead if they operate in a streaming | suit-install section instead if they operate in a streaming | |||
| installation mode. This is particularly relevant for constrained | installation mode. This is particularly relevant for constrained | |||
| devices without any temporary storage for staging the update. suit- | devices without any temporary storage for staging the update. suit- | |||
| payload-fetch is OPTIONAL. | payload-fetch is OPTIONAL. | |||
| suit-install is a SUIT_Command_Sequence to execute in order to | suit-install is a SUIT_Command_Sequence to execute in order to | |||
| install a payload. Typical actions include verifying a payload | install a payload. Typical actions include verifying a payload | |||
| stored in temporary storage, copying a staged payload from temporary | stored in temporary storage, copying a staged payload from temporary | |||
| storage, and unpacking a payload. suit-install is OPTIONAL. | storage, and unpacking a payload. suit-install is OPTIONAL. | |||
| suit-validate is a SUIT_Command_Sequence to execute in order to | suit-validate is a SUIT_Command_Sequence to execute in order to | |||
| validate that the result of applying the update is correct. Typical | validate that the result of applying the update is correct. Typical | |||
| actions involve image validation and manifest validation. suit- | actions involve image validation and manifest validation. suit- | |||
| validate is MANDATORY. If the manifest contains dependencies, one | validate is REQUIRED. If the manifest contains dependencies, one | |||
| process-dependency invocation per dependency or one process- | process-dependency invocation per dependency or one process- | |||
| dependency invocation targeting all dependencies SHOULD be present in | dependency invocation targeting all dependencies SHOULD be present in | |||
| validate. | validate. | |||
| suit-load is a SUIT_Command_Sequence to execute in order to prepare a | suit-load is a SUIT_Command_Sequence to execute in order to prepare a | |||
| payload for execution. Typical actions include copying an image from | payload for execution. Typical actions include copying an image from | |||
| permanent storage into RAM, optionally including actions such as | permanent storage into RAM, optionally including actions such as | |||
| decryption or decompression. suit-load is OPTIONAL. | decryption or decompression. suit-load is OPTIONAL. | |||
| suit-run is a SUIT_Command_Sequence to execute in order to run an | suit-run is a SUIT_Command_Sequence to execute in order to run an | |||
| skipping to change at page 16, line 37 ¶ | skipping to change at page 16, line 32 ¶ | |||
| suit-run is OPTIONAL. Only one manifest in an update may contain the | suit-run is OPTIONAL. Only one manifest in an update may contain the | |||
| "run" directive. | "run" directive. | |||
| suit-text-info is a digest that uniquely identifies the content of | suit-text-info is a digest that uniquely identifies the content of | |||
| the Text that is packaged in the OuterWrapper. text is OPTIONAL. | the Text that is packaged in the OuterWrapper. text is OPTIONAL. | |||
| suit-coswid is a digest that uniquely identifies the content of the | suit-coswid is a digest that uniquely identifies the content of the | |||
| concise-software-identifier that is packaged in the OuterWrapper. | concise-software-identifier that is packaged in the OuterWrapper. | |||
| coswid is OPTIONAL. | coswid is OPTIONAL. | |||
| 8.3. SUIT_Dependency | 7.3. SUIT_Dependency | |||
| SUIT_Dependency specifies a manifest that describes a dependency of | SUIT_Dependency specifies a manifest that describes a dependency of | |||
| the current manifest. | the current manifest. | |||
| The following CDDL describes the SUIT_Dependency structure. | The following CDDL describes the SUIT_Dependency structure. | |||
| SUIT_Dependency = { | SUIT_Dependency = { | |||
| suit-dependency-digest => SUIT_Digest, | suit-dependency-digest => SUIT_Digest, | |||
| suit-dependency-prefix => SUIT_Component_Identifier, | ? suit-dependency-prefix => SUIT_Component_Identifier, | |||
| } | } | |||
| The suit-dependency-digest specifies the dependency manifest uniquely | The suit-dependency-digest specifies the dependency manifest uniquely | |||
| by identifying a particular Manifest structure. The digest is | by identifying a particular Manifest structure. The digest is | |||
| calculated over the Manifest structure instead of the COSE | calculated over the Manifest structure instead of the COSE | |||
| Sig_structure or Mac_structure. This means that a digest may need to | Sig_structure or Mac_structure. This means that a digest may need to | |||
| be calculated more than once, however this is necessary to ensure | be calculated more than once, however this is necessary to ensure | |||
| that removing a signature from a manifest does not break dependencies | that removing a signature from a manifest does not break dependencies | |||
| due to missing 'body_protected' and 'body_signed' elements. This is | due to missing signature elements. This is also necessary to support | |||
| also necessary to support the trusted intermediary use case, where an | the trusted intermediary use case, where an intermediary re-signs the | |||
| intermediary re-signs the Manifest, removing the original signature, | Manifest, removing the original signature, potentially with a | |||
| potentially with a different algorithm, or trading COSE_Sign for | different algorithm, or trading COSE_Sign for COSE_Mac. | |||
| COSE_Mac. | ||||
| The suit-dependency-prefix element contains a | The suit-dependency-prefix element contains a | |||
| SUIT_Component_Identifier. This specifies the scope at which the | SUIT_Component_Identifier. This specifies the scope at which the | |||
| dependency operates. This allows the dependency to be forwarded on | dependency operates. This allows the dependency to be forwarded on | |||
| to a component that is capable of parsing its own manifests. It also | to a component that is capable of parsing its own manifests. It also | |||
| allows one manifest to be deployed to multiple dependent devices | allows one manifest to be deployed to multiple dependent devices | |||
| without those devices needing consistent component hierarchy. This | without those devices needing consistent component hierarchy. This | |||
| element is OPTIONAL. | element is OPTIONAL. | |||
| 8.4. SUIT_Component | 7.4. SUIT_Component_Reference | |||
| The SUIT_Component describes an image that is uniquely defined by the | ||||
| current manifest. It consists of three elemnts: the component | ||||
| identifier that represents a component that will be affected by this | ||||
| manifest. This excludes components that are affected by | ||||
| dependencies. The following CDDL describes the SUIT_Component. | ||||
| SUIT_Component = { | ||||
| suit-component-identifier => SUIT_Component_Identifier, | ||||
| ? suit-component-size => uint, | ||||
| ? suit-component-digest => Digest, | ||||
| } | ||||
| Because suit-component-size and suit-component-digest can be | ||||
| dependent on installation offset, they cannot be exclusively | ||||
| contained in SUIT_Component. However, since these are security | ||||
| critical parameters, these parameters are updated to match the | ||||
| contents of suit-components prior to processing suit-common. If | ||||
| absent, these are set to Zero and NULL, respectively. This enforces | ||||
| that the manifest defining a component is the only manifest that can | ||||
| describe its contents. | ||||
| 8.5. SUIT_Component_Reference | ||||
| The SUIT_Component_Reference describes an image that is defined by | The SUIT_Component_Reference describes an image that is defined by | |||
| another manifest. This is useful for overriding the behaviour of | another manifest. This is useful for overriding the behaviour of | |||
| another manifest, for example by directing the recipient to look at a | another manifest, for example by directing the recipient to look at a | |||
| different URI for the image or by changing the expected format, such | different URI for the image or by changing the expected format, such | |||
| as when a gateway performs decryption on behalf of a constrained | as when a gateway performs decryption on behalf of a constrained | |||
| device. The following CDDL describes the SUIT_Component_Reference. | device. The following CDDL describes the SUIT_Component_Reference. | |||
| SUIT_Component_Reference = { | SUIT_Component_Reference = { | |||
| suit-component-identifier => SUIT_Component_Identifier, | suit-component-identifier => SUIT_Component_Identifier, | |||
| suit-component-dependency-index => uint | suit-component-dependency-index => uint | |||
| } | } | |||
| 8.6. Manifest Parameters | 7.5. Manifest Parameters | |||
| Many conditions and directives require additional information. That | Many conditions and directives require additional information. That | |||
| information is contained within parameters that can be set in a | information is contained within parameters that can be set in a | |||
| consistent way. Parameters MUST only be: | consistent way. Parameters MUST only be: | |||
| 1. Integers | 1. Integers | |||
| 2. Byte strings | 2. Byte strings | |||
| 3. Booleans | 3. Booleans | |||
| This allows reduction of manifest size and replacement of parameters | This allows reduction of manifest size and replacement of parameters | |||
| from one manifest to the next. Byte strings MAY contain CBOR-encoded | from one manifest to the next. Byte strings MAY contain CBOR-encoded | |||
| objects. | objects. | |||
| The defined manifest parameters are described below. | The defined manifest parameters are described below. | |||
| +-------+-------+------+---------------+---------+------------------+ | +--------+-------+------+---------------+----------+----------------+ | |||
| | Param | CBOR | Defa | Scope | Name | Description | | | Parame | CBOR | Defa | Scope | Name | Description | | |||
| | eter | Type | ult | | | | | | ter | Type | ult | | | | | |||
| | Code | | | | | | | | Code | | | | | | | |||
| +-------+-------+------+---------------+---------+------------------+ | +--------+-------+------+---------------+----------+----------------+ | |||
| | 1 | boole | 1 | Global | Strict | Requires that | | | 1 | boole | True | Global | Strict | Requires that | | |||
| | | an | | | Order | the manifest is | | | | an | | | Order | the manifest | | |||
| | | | | | | processed in a | | | | | | | | is processed | | |||
| | | | | | | strictly linear | | | | | | | | in a strictly | | |||
| | | | | | | fashion. Set to | | | | | | | | linear | | |||
| | | | | | | 0 to enable | | | | | | | | fashion. Set | | |||
| | | | | | | parallel | | | | | | | | to 0 to enable | | |||
| | | | | | | handling of | | | | | | | | parallel | | |||
| | | | | | | manifest | | | | | | | | handling of | | |||
| | | | | | | directives. | | | | | | | | manifest | | |||
| | | | | | | | | | | | | | | directives. | | |||
| | 2 | boole | 0 | Global | Coerce | Coerces the | | | | | | | | | | |||
| | | an | | | Conditi | success code of | | | 2 | boole | Fals | Command | Coerce C | Coerces the | | |||
| | | | | | on | a command | | | | an | e | Segment | ondition | success code | | |||
| | | | | | Failure | segment to | | | | | | | Failure | of a command | | |||
| | | | | | | success even | | | | | | | | segment to | | |||
| | | | | | | when aborted due | | | | | | | | success even | | |||
| | | | | | | to a condition | | | | | | | | when aborted | | |||
| | | | | | | failure. | | | | | | | | due to a | | |||
| | | | | | | | | | | | | | | condition | | |||
| | 3 | bstr | nil | Component/Glo | Vendor | A RFC4122 UUID | | | | | | | | failure. | | |||
| | | | | bal | ID | representing the | | | | | | | | | | |||
| | | | | | | vendor of the | | | 3 | bstr | nil | Component/Glo | Vendor | A RFC4122 UUID | | |||
| | | | | | | device or | | | | | | bal | ID | representing | | |||
| | | | | | | component | | | | | | | | the vendor of | | |||
| | | | | | | | | | | | | | | the device or | | |||
| | 4 | bstr | nil | Component/Glo | Class | A RFC4122 UUID | | | | | | | | component | | |||
| | | | | bal | ID | representing the | | | | | | | | | | |||
| | | | | | | class of the | | | 4 | bstr | nil | Component/Glo | Class ID | A RFC4122 UUID | | |||
| | | | | | | device or | | | | | | bal | | representing | | |||
| | | | | | | component | | | | | | | | the class of | | |||
| | | | | | | | | | | | | | | the device or | | |||
| | 5 | bstr | nil | Component/Glo | Device | A RFC4122 UUID | | | | | | | | component | | |||
| | | | | bal | ID | representing the | | | | | | | | | | |||
| | | | | | | device or | | | 5 | bstr | nil | Component/Glo | Device | A RFC4122 UUID | | |||
| | | | | | | component | | | | | | bal | ID | representing | | |||
| | | | | | | | | | | | | | | the device or | | |||
| | 6 | bstr | nil | Component/Dep | URI | A CBOR encoded | | | | | | | | component | | |||
| | | | | endency | List | list of ranked | | | | | | | | | | |||
| | | | | | | URIs | | | 6 | bstr | nil | Component/Dep | URI | A URI from | | |||
| | | | | | | | | | | | | endency | | which to fetch | | |||
| | 7 | bstr | nil | Component/Dep | Encrypt | A COSE object | | | | | | | | a resource | | |||
| | | | | endency | ion | defining the | | | | | | | | | | |||
| | | | | | Info | encryption mode | | | 7 | bstr | nil | Component/Dep | Encrypti | A COSE object | | |||
| | | | | | | of the target | | | | | | endency | on Info | defining the | | |||
| | | | | | | | | | | | | | | encryption | | |||
| | 8 | bstr | nil | Component | Compres | A SUIT_Compressi | | | | | | | | mode of a | | |||
| | | | | | sion | on_Info object | | | | | | | | resource | | |||
| | | | | | Info | | | | | | | | | | | |||
| | | | | | | | | | 8 | bstr | nil | Component | Compress | A SUIT_Compres | | |||
| | 9 | bstr | nil | Component | Unpack | A | | | | | | | ion Info | sion_Info | | |||
| | | | | | Info | SUIT_Unpack_Info | | | | | | | | object | | |||
| | | | | | | object | | | | | | | | | | |||
| | | | | | | | | | 9 | bstr | nil | Component | Unpack | A SUIT_Unpack_ | | |||
| | 10 | int/b | nil | Component | Source | A SUIT_Component | | | | | | | Info | Info object | | |||
| | | str | | | Compone | _Identifier or | | | | | | | | | | |||
| | | | | | nt | Component Index | | | 10 | uint | nil | Component | Source C | A Component | | |||
| | | | | | | | | | | | | | omponent | Index | | |||
| | 11 | bstr | nil | Component/Dep | Image | A SUIT_Digest | | | | | | | | | | |||
| | | | | endency | Digest | | | | 11 | bstr | nil | Component/Dep | Image | A SUIT_Digest | | |||
| | | | | | | | | | | | | endency | Digest | | | |||
| | 12 | bstr | nil | Component/Dep | Image | Integer size | | | | | | | | | | |||
| | | | | endency | Size | | | | 12 | bstr | nil | Component/Dep | Image | Integer size | | |||
| | | | | | | | | | | | | endency | Size | | | |||
| | nint | int/b | nil | Custom | Custom | Application- | | | | | | | | | | |||
| | | str | | | Paramet | defined | | | 24 | bstr | nil | Component/Dep | URI List | A CBOR encoded | | |||
| | | | | | er | parameter | | | | | | endency | | list of ranked | | |||
| +-------+-------+------+---------------+---------+------------------+ | | | | | | | URIs | | |||
| Each parameter contains a Skip/Append flag. Append is an advanced | | | | | | | | | |||
| feature that is not available on highly constrained platforms. The | | 25 | boole | Fals | Component/Dep | URI List | A CBOR encoded | | |||
| mechanism for setting the Append flag is TBD. | | | an | e | endency | Append | list of ranked | | |||
| | | | | | | URIs | | ||||
| | | | | | | | | ||||
| | nint | int/b | nil | Custom | Custom P | Application- | | ||||
| | | str | | | arameter | defined | | ||||
| | | | | | | parameter | | ||||
| +--------+-------+------+---------------+----------+----------------+ | ||||
| CBOR-encoded object parameters are still wrapped in a bstr. This is | CBOR-encoded object parameters are still wrapped in a bstr. This is | |||
| because it allows a parser that is aggregating parameters to | because it allows a parser that is aggregating parameters to | |||
| reference the object with a single pointer and traverse it without | reference the object with a single pointer and traverse it without | |||
| understanding the contents. This is important for modularisation and | understanding the contents. This is important for modularisation and | |||
| division of responsibility within a pull parser. The same | division of responsibility within a pull parser. The same | |||
| consideration does not apply to Conditions and Directives because | consideration does not apply to Conditions and Directives because | |||
| those elements are invoked with their arguments immediately | those elements are invoked with their arguments immediately | |||
| 8.6.1. SUIT_Parameter_Strict_Order | 7.5.1. SUIT_Parameter_Strict_Order | |||
| The Strict Order Parameter allows a manifest to govern when | The Strict Order Parameter allows a manifest to govern when | |||
| directives can be executed out-of-order. This allows for systems | directives can be executed out-of-order. This allows for systems | |||
| that have a sensitivity to order of updates to choose the order in | that have a sensitivity to order of updates to choose the order in | |||
| which they are executed. It also allows for more advanced systems to | which they are executed. It also allows for more advanced systems to | |||
| parallelise their handling of updates. Strict Order defaults to | parallelise their handling of updates. Strict Order defaults to | |||
| True. It MAY be set to False when the order of operations does not | True. It MAY be set to False when the order of operations does not | |||
| matter. When arriving at the end of a command sequence, ALL commands | matter. When arriving at the end of a command sequence, ALL commands | |||
| MUST have completed, regardless of the state of | MUST have completed, regardless of the state of | |||
| SUIT_Parameter_Strict_Order. If SUIT_Parameter_Strict_Order is | SUIT_Parameter_Strict_Order. If SUIT_Parameter_Strict_Order is | |||
| returned to True, ALL preceding commands MUST complete before the | returned to True, ALL preceding commands MUST complete before the | |||
| next command is executed. | next command is executed. | |||
| 8.6.2. SUIT_Parameter_Coerce_Condition_Failure | 7.5.2. SUIT_Parameter_Coerce_Condition_Failure | |||
| When executing a command sequence inside SUIT_Run_Sequence and a | When executing a command sequence inside SUIT_Run_Sequence and a | |||
| condition failure occurs, the manifest processor aborts the sequence. | condition failure occurs, the manifest processor aborts the sequence. | |||
| If Coerce Condition Failure is True, it returns Success. Otherwise, | If Coerce Condition Failure is True, it returns Success. Otherwise, | |||
| it returns the original condition failure. | it returns the original condition failure. | |||
| SUIT_Parameter_Coerce_Condition_Failure is scoped to the enclosing | SUIT_Parameter_Coerce_Condition_Failure is scoped to the enclosing | |||
| SUIT_Directive_Run_Sequence. Its value is discarded when | SUIT_Directive_Run_Sequence. Its value is discarded when | |||
| SUIT_Directive_Run_Sequence terminates. | SUIT_Directive_Run_Sequence terminates. | |||
| 8.7. SUIT_Parameter_Encryption_Info | 7.6. SUIT_Parameter_Encryption_Info | |||
| Encryption Info defines the mechanism that Fetch or Copy should use | Encryption Info defines the mechanism that Fetch or Copy should use | |||
| to decrypt the data they transfer. SUIT_Parameter_Encryption_Info is | to decrypt the data they transfer. SUIT_Parameter_Encryption_Info is | |||
| encoded as a COSE_Encrypt_Tagged or a COSE_Encrypt0_Tagged, wrapped | encoded as a COSE_Encrypt_Tagged or a COSE_Encrypt0_Tagged, wrapped | |||
| in a bstr | in a bstr | |||
| 8.8. SUIT_Parameter_Compression_Info | 7.7. SUIT_Parameter_Compression_Info | |||
| Compression Info defines any information that is required for a | Compression Info defines any information that is required for a | |||
| device to perform decompression operations. Typically, this includes | device to perform decompression operations. Typically, this includes | |||
| the algorithm identifier. | the algorithm identifier. | |||
| SUIT_Parameter_Compression_Info is defined by the following CDDL: | SUIT_Parameter_Compression_Info is defined by the following CDDL: | |||
| SUIT_Compression_Info = { | SUIT_Compression_Info = { | |||
| suit-compression-algorithm => SUIT_Compression_Algorithms | suit-compression-algorithm => SUIT_Compression_Algorithms | |||
| ? suit-compression-parameters => bstr | ? suit-compression-parameters => bstr | |||
| } | } | |||
| suit-compression-algorithm = 1 | ||||
| suit-compression-parameters = 2 | ||||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_gzip | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_gzip | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_bzip2 | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_bzip2 | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_deflate | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_deflate | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_LZ4 | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_LZ4 | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_lzma | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_lzma | |||
| SUIT_Compression_Algorithm_gzip = 1 | 7.8. SUIT_Parameter_Unpack_Info | |||
| SUIT_Compression_Algorithm_bzip2 = 2 | ||||
| SUIT_Compression_Algorithm_deflate = 3 | ||||
| SUIT_Compression_Algorithm_lz4 = 4 | ||||
| SUIT_Compression_Algorithm_lzma = 7 | ||||
| 8.9. SUIT_Parameter_Unpack_Info | ||||
| SUIT_Unpack_Info defines the information required for a device to | SUIT_Unpack_Info defines the information required for a device to | |||
| interpret a packed format, such as elf, hex, or binary diff. | interpret a packed format, such as elf, hex, or binary diff. | |||
| SUIT_Unpack_Info is defined by the following CDDL: | SUIT_Unpack_Info is defined by the following CDDL: | |||
| SUIT_Unpack_Info = { | SUIT_Unpack_Info = { | |||
| suit-unpack-algorithm => SUIT_Unpack_Algorithms | suit-unpack-algorithm => SUIT_Unpack_Algorithms | |||
| ? suit-unpack-parameters => bstr | ? suit-unpack-parameters => bstr | |||
| } | } | |||
| suit-unpack-algorithm = 1 | ||||
| suit-unpack-parameters = 2 | ||||
| SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Delta | SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Delta | |||
| SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Hex | SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Hex | |||
| SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Elf | SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Elf | |||
| SUIT_Unpack_Algorithm_Delta = 1 | 7.9. SUIT_Parameters CDDL | |||
| SUIT_Unpack_Algorithm_Hex = 2 | ||||
| SUIT_Unpack_Algorithm_Elf = 3 | ||||
| 8.10. SUIT_Parameters CDDL | ||||
| The following CDDL describes all SUIT_Parameters. | The following CDDL describes all SUIT_Parameters. | |||
| SUIT_Parameters //= SUIT_Parameter_Strict_Order | SUIT_Parameters //= (suit-parameter-strict-order => bool) | |||
| SUIT_Parameters //= SUIT_Parameter_Coerce_Condition_Failure | SUIT_Parameters //= (suit-parameter-coerce-condition-failure => bool) | |||
| SUIT_Parameters //= SUIT_Parameter_Vendor_ID | SUIT_Parameters //= (suit-parameter-vendor-id => bstr) | |||
| SUIT_Parameters //= SUIT_Parameter_Class_ID | SUIT_Parameters //= (suit-parameter-class-id => bstr) | |||
| SUIT_Parameters //= SUIT_Parameter_Device_ID | SUIT_Parameters //= (suit-parameter-device-id => bstr) | |||
| SUIT_Parameters //= SUIT_Parameter_URI_List | SUIT_Parameters //= (suit-parameter-uri => bstr) | |||
| SUIT_Parameters //= SUIT_Parameter_Encryption_Info | SUIT_Parameters //= (suit-parameter-encryption-info => bstr .cbor SUIT_Encryption_Info) | |||
| SUIT_Parameters //= SUIT_Parameter_Compression_Info | SUIT_Parameters //= (suit-parameter-compression-info => bstr .cbor SUIT_Compression_Info) | |||
| SUIT_Parameters //= SUIT_Parameter_Unpack_Info | SUIT_Parameters //= (suit-parameter-unpack-info => bstr .cbor SUIT_Unpack_Info) | |||
| SUIT_Parameters //= SUIT_Parameter_Source_Component | SUIT_Parameters //= (suit-parameter-source-component => bstr .cbor SUIT_Component_Identifier) | |||
| SUIT_Parameters //= SUIT_Parameter_Image_Digest | SUIT_Parameters //= (suit-parameter-image-digest => bstr .cbor SUIT_Digest) | |||
| SUIT_Parameters //= SUIT_Parameter_Image_Size | SUIT_Parameters //= (suit-parameter-image-size => uint) | |||
| SUIT_Parameters //= SUIT_Parameter_Custom | SUIT_Parameters //= (suit-parameter-uri-list => bstr .cbor SUIT_URI_List) | |||
| SUIT_Parameters //= (suit-parameter_custom => int/bool/bstr) | ||||
| SUIT_Parameter_Strict_Order = (1 => bool) | ||||
| SUIT_Parameter_Coerce_Condition_Failure = (2 => bool) | ||||
| SUIT_Parameter_Vendor_ID = (3 => bstr) | ||||
| SUIT_Parameter_Class_ID = (4 => bstr) | ||||
| SUIT_Parameter_Device_ID = (5 => bstr) | ||||
| SUIT_Parameter_URI_List = (6 => bstr .cbor SUIT_URI_List) | ||||
| SUIT_Parameter_Encryption_Info = (7 => bstr .cbor SUIT_Encryption_Info) | ||||
| SUIT_Parameter_Compression_Info = (8 => bstr .cbor SUIT_Compression_Info) | ||||
| SUIT_Parameter_Unpack_Info = (9 => bstr .cbor SUIT_Unpack_Info) | ||||
| SUIT_Parameter_Source_Component = (10 => bstr .cbor SUIT_Component_Identifier) | ||||
| SUIT_Parameter_Image_Digest = (11 => bstr .cbor SUIT_Digest) | ||||
| SUIT_Parameter_Image_Size = (12 => uint) | ||||
| SUIT_Parameter_Custom = (nint => int/bool/bstr) | ||||
| SUIT_URI_List = [ + [priority: int, uri: tstr] ] | SUIT_URI_List = [ + [priority: int, uri: tstr] ] | |||
| SUIT_Encryption_Info= COSE_Encrypt_Tagged/COSE_Encrypt0_Tagged | SUIT_Encryption_Info= COSE_Encrypt_Tagged/COSE_Encrypt0_Tagged | |||
| SUIT_Compression_Info = { | SUIT_Compression_Info = { | |||
| suit-compression-algorithm => SUIT_Compression_Algorithms | suit-compression-algorithm => SUIT_Compression_Algorithms | |||
| ? suit-compression-parameters => bstr | ? suit-compression-parameters => bstr | |||
| } | } | |||
| suit-compression-algorithm = 1 | ||||
| suit-compression-parameters = 2 | ||||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_gzip | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_gzip | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_bzip2 | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_bzip2 | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_deflate | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_deflate | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_LZ4 | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_LZ4 | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_lzma | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_lzma | |||
| SUIT_Compression_Algorithm_gzip = 1 | ||||
| SUIT_Compression_Algorithm_bzip2 = 2 | ||||
| SUIT_Compression_Algorithm_deflate = 3 | ||||
| SUIT_Compression_Algorithm_lz4 = 4 | ||||
| SUIT_Compression_Algorithm_lzma = 7 | ||||
| SUIT_Unpack_Info = { | SUIT_Unpack_Info = { | |||
| suit-unpack-algorithm => SUIT_Unpack_Algorithms | suit-unpack-algorithm => SUIT_Unpack_Algorithms | |||
| ? suit-unpack-parameters => bstr | ? suit-unpack-parameters => bstr | |||
| } | } | |||
| suit-unpack-algorithm = 1 | ||||
| suit-unpack-parameters = 2 | ||||
| SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Delta | SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Delta | |||
| SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Hex | SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Hex | |||
| SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Elf | SUIT_Unpack_Algorithms //= SUIT_Unpack_Algorithm_Elf | |||
| SUIT_Unpack_Algorithm_Delta = 1 | 7.10. SUIT_Command_Sequence | |||
| SUIT_Unpack_Algorithm_Hex = 2 | ||||
| SUIT_Unpack_Algorithm_Elf = 3 | ||||
| 8.11. SUIT_Command_Sequence | ||||
| A SUIT_Command_Sequence defines a series of actions that the | A SUIT_Command_Sequence defines a series of actions that the | |||
| recipient MUST take to accomplish a particular goal. These goals are | recipient MUST take to accomplish a particular goal. These goals are | |||
| defined in the manifest and include: | defined in the manifest and include: | |||
| 1. Dependency Resolution | 1. Dependency Resolution | |||
| 2. Payload Fetch | 2. Payload Fetch | |||
| 3. Payload Installation | 3. Payload Installation | |||
| 4. Image Validation | 4. Image Validation | |||
| 5. Image Loading | 5. Image Loading | |||
| 6. Run or Boot | 6. Run or Boot | |||
| Each of these follows exactly the same structure to ensure that the | Each of these follows exactly the same structure to ensure that the | |||
| parser is as simple as possible. | parser is as simple as possible. | |||
| skipping to change at page 24, line 26 ¶ | skipping to change at page 23, line 47 ¶ | |||
| 1. A command code identifier | 1. A command code identifier | |||
| 2. An argument block | 2. An argument block | |||
| Argument blocks are defined for each type of command. | Argument blocks are defined for each type of command. | |||
| Many conditions and directives apply to a given component, and these | Many conditions and directives apply to a given component, and these | |||
| generally grouped together. Therefore, a special command to set the | generally grouped together. Therefore, a special command to set the | |||
| current component index is provided with a matching command to set | current component index is provided with a matching command to set | |||
| the current manifest index. This index is a numeric index into the | the current dependency index. This index is a numeric index into the | |||
| component ID tables defined at the beginning of the document. For | component ID tables defined at the beginning of the document. For | |||
| the purpose of setting the index, the two component ID tables are | the purpose of setting the index, the two component ID tables are | |||
| considered to be concatenated together. | considered to be concatenated together. | |||
| To facilitate optional conditions, a special directive is provided. | To facilitate optional conditions, a special directive is provided. | |||
| It runs a new list of conditions/directives that are contained as an | It runs several new lists of conditions/directives, one after | |||
| argument to the directive. It also contains a flag that indicates | another, that are contained as an argument to the directive. By | |||
| whether or not a failure of a condition should indicate a failure of | default, it assumes that a failure of a condition should not indicate | |||
| the update/boot. | a failure of the update/boot, but a parameter is provided to override | |||
| this behaviour. | ||||
| 8.12. SUIT_Condition | 7.11. SUIT_Condition | |||
| Conditions are used to define mandatory properties of a system in | Conditions are used to define mandatory properties of a system in | |||
| order for an update to be applied. They can be pre-conditions or | order for an update to be applied. They can be pre-conditions or | |||
| post-conditons of any directive or series of directives, depending on | post-conditons of any directive or series of directives, depending on | |||
| where they are placed in the list. Conditions include: | where they are placed in the list. Conditions include: | |||
| +----------------+-------------------+------------------------------+ | +----------------+-------------------+----------------------------+ | |||
| | Condition Code | Condition Name | Argument Type | | | Condition Code | Condition Name | Argument Type | | |||
| +----------------+-------------------+------------------------------+ | +----------------+-------------------+----------------------------+ | |||
| | 1 | Vendor Identifier | RFC4122 UUID wrapped in a | | | 1 | Vendor Identifier | nil | | |||
| | | | bstr | | | | | | | |||
| | | | | | | 2 | Class Identifier | nil | | |||
| | 2 | Class Identifier | RFC4122 UUID wrapped in a | | | | | | | |||
| | | | bstr | | | 3 | Image Match | nil | | |||
| | | | | | | | | | | |||
| | 3 | Device Identifier | RFC4122 UUID wrapped in a | | | 4 | Use Before | Unsigned Integer timestamp | | |||
| | | | bstr | | | | | | | |||
| | | | | | | 5 | Component Offset | Unsigned Integer | | |||
| | 4 | Image Match | SUIT_Digest | | | | | | | |||
| | | | | | | 24 | Device Identifier | nil | | |||
| | 5 | Image Not Match | SUIT_Digest | | | | | | | |||
| | | | | | | 25 | Image Not Match | nil | | |||
| | 6 | Use Before | Unsigned Integer timestamp | | | | | | | |||
| | | | | | | 26 | Minimum Battery | Unsigned Integer | | |||
| | 7 | Minimum Battery | Unsigned Integer | | | | | | | |||
| | | | | | | 27 | Update Authorised | Integer | | |||
| | 8 | Update Authorised | Integer | | | | | | | |||
| | | | | | | 28 | Version | List of Integers | | |||
| | 9 | Version | List of Integers | | | | | | | |||
| | | | | | | nint | Custom Condition | bstr | | |||
| | 10 | Component Offset | Unsigned Integer | | +----------------+-------------------+----------------------------+ | |||
| | | | | | ||||
| | nint | Custom Condition | bstr | | ||||
| +----------------+-------------------+------------------------------+ | ||||
| Each condition MUST report a success code on completion. If a | Each condition MUST report a success code on completion. If a | |||
| condition reports failure, then the current sequence of commands MUST | condition reports failure, then the current sequence of commands MUST | |||
| terminate. If a recipient encounters an unknown Condition Code, it | terminate. If a recipient encounters an unknown Condition Code, it | |||
| MUST report a failure. | MUST report a failure. | |||
| Positive Condition numbers are reserved for IANA registration. | Positive Condition numbers are reserved for IANA registration. | |||
| Negative numbers are reserved for proprietary, application-specific | Negative numbers are reserved for proprietary, application-specific | |||
| directives. | directives. | |||
| 8.12.1. ID Conditions | 7.11.1. Identifier Conditions | |||
| There are three identifier-based conditions: | There are three identifier-based conditions: suit-condition-vendor- | |||
| SUIT_Condition_Vendor_Identifier, SUIT_Condition_Class_Identifier, | identifier, suit-condition-class-identifier, and suit-condition- | |||
| and SUIT_Condition_Device_Identifier. Each of these conditions | device-identifier. Each of these conditions match a RFC 4122 | |||
| present a RFC 4122 [RFC4122] UUID that MUST be matched by the | [RFC4122] UUID that MUST have already been set as a parameter. The | |||
| installing device in order to consider the manifest valid. | installing device MUST match the specified UUID in order to consider | |||
| the manifest valid. These identifiers MAY be scoped by component. | ||||
| These conditions MAY be used with or without an argument. If an | The recipient uses the ID parameter that has already been set using | |||
| argument is supplied, then it must be the RFC 4122 [RFC4122] UUID | the Set Parameters directive. If no ID has been set, this condition | |||
| that must be matched for the condition to succeed. If no argument is | fails. suit-condition-class-identifier and suit-condition-vendor- | |||
| supplied, then the recipient uses the ID parameter that has already | identifier are REQUIRED to implement. suit-condition-device- | |||
| been set using the Set Parameters directive. If no ID has been set, | identifier is OPTIONAL to implement. | |||
| this condition fails. SUIT_Condition_Class_Identifier and | ||||
| SUIT_Condition_Vendor_Identifier are MANDATORY to implement. | ||||
| SUIT_Condition_Device_Identifier is OPTIONAL to implement. | ||||
| 8.12.2. SUIT_Condition_Image_Match | 7.11.2. suit-condition-image-match | |||
| Verify that the current component matches the supplied digest. If no | Verify that the current component matches the digest parameter for | |||
| digest is specified, then the digest is verified against the digest | the current component. The digest is verified against the digest | |||
| specified in the Components list. If no digest is specified and the | specified in the Component's parameters list. If no digest is | |||
| component is not present in the Components list, the condition fails. | specified, the condition fails. suit-condition-image-match is | |||
| SUIT_Condition_Image_Match is MANDATORY to implement. | REQUIRED to implement. | |||
| 8.12.3. SUIT_Condition_Image_Not_Match | 7.11.3. suit-condition-image-not-match | |||
| Verify that the current component does not match the supplied digest. | Verify that the current component does not match the supplied digest. | |||
| If no digest is specified, then the digest is compared against the | If no digest is specified, then the digest is compared against the | |||
| digest specified in the Components list. If no digest is specified | digest specified in the Components list. If no digest is specified | |||
| and the component is not present in the Components list, the | and the component is not present in the Components list, the | |||
| condition fails. SUIT_Condition_Image_Not_Match is OPTIONAL to | condition fails. suit-condition-image-not-match is OPTIONAL to | |||
| implement. | implement. | |||
| 8.12.4. SUIT_Condition_Use_Before | 7.11.4. suit-condition-use-before | |||
| Verify that the current time is BEFORE the specified time. | Verify that the current time is BEFORE the specified time. suit- | |||
| SUIT_Condition_Use_Before is used to specify the last time at which | condition-use-before is used to specify the last time at which an | |||
| an update should be installed. One argument is required, encoded as | update should be installed. One argument is required, encoded as a | |||
| a POSIX timestamp, that is seconds after 1970-01-01 00:00:00. | POSIX timestamp, that is seconds after 1970-01-01 00:00:00. | |||
| Timestamp conditions MUST be evaluated in 64 bits, regardless of | Timestamp conditions MUST be evaluated in 64 bits, regardless of | |||
| encoded CBOR size. SUIT_Condition_Use_Before is OPTIONAL to | encoded CBOR size. suit-condition-use-before is OPTIONAL to | |||
| implement. | implement. | |||
| 8.12.5. SUIT_Condition_Minimum_Battery | 7.11.5. suit-condition-minimum-battery | |||
| SUIT_Condition_Minimum_Battery provides a mechanism to test a | suit-condition-minimum-battery provides a mechanism to test a | |||
| device's battery level before installing an update. This condition | device's battery level before installing an update. This condition | |||
| is for use in primary-cell applications, where the battery is only | is for use in primary-cell applications, where the battery is only | |||
| ever discharged. For batteries that are charged, | ever discharged. For batteries that are charged, suit-directive-wait | |||
| SUIT_Directive_Wait_Event is more appropriate, since it defines a | is more appropriate, since it defines a "wait" until the battery | |||
| "wait" until the battery level is sufficient to install the update. | level is sufficient to install the update. suit-condition-minimum- | |||
| SUIT_Condition_Minimum_Battery is specified in mWh. | battery is specified in mWh. suit-condition-minimum-battery is | |||
| SUIT_Condition_Minimum_Battery is OPTIONAL to implement. | OPTIONAL to implement. | |||
| 8.12.6. SUIT_Condition_Update_Authorised | 7.11.6. suit-condition-update-authorised | |||
| Request Authorisation from the application and fail if not | Request Authorisation from the application and fail if not | |||
| authorised. This can allow a user to decline an update. Argument is | authorised. This can allow a user to decline an update. Argument is | |||
| an integer priority level. Priorities are application defined. | an integer priority level. Priorities are application defined. suit- | |||
| SUIT_Condition_Update_Authorised is OPTIONAL to implement. | condition-update-authorised is OPTIONAL to implement. | |||
| 8.12.7. SUIT_Condition_Version | 7.11.7. suit-condition-version | |||
| SUIT_Condition_Version allows comparing versions of firmware. | suit-condition-version allows comparing versions of firmware. | |||
| Verifying image digests is preferred to version checks because | Verifying image digests is preferred to version checks because | |||
| digests are more precise. The image can be compared as: | digests are more precise. The image can be compared as: | |||
| - Greater | - Greater | |||
| - Greater or Equal | - Greater or Equal | |||
| - Equal | - Equal | |||
| - Lesser or Equal | - Lesser or Equal | |||
| - Lesser | - Lesser | |||
| Versions are encoded as a CBOR list of integers. Comparisons are | Versions are encoded as a CBOR list of integers. Comparisons are | |||
| done on each integer in sequence. | done on each integer in sequence. Comparison stops after all | |||
| integers in the list defined by the manifest have been consumed OR | ||||
| after a non-equal match has occured. For example, if the manifest | ||||
| defines a comparison, "Equal [1]", then this will match all version | ||||
| sequences starting with 1. If a manifest defines both "Greater or | ||||
| Equal [1,0]" and "Lesser [1,10]", then it will match versions 1.0.x | ||||
| up to, but not including 1.10. | ||||
| The following CDDL describes SUIT_Condition_Version_Argument | The following CDDL describes SUIT_Condition_Version_Argument | |||
| SUIT_Condition_Version_Argument = [ | SUIT_Condition_Version_Argument = [ | |||
| suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Types, | suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Types, | |||
| suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Value | suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Value | |||
| ] | ] | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Greater | SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Greater | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Greater_Equal | SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Greater_Equal | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Equal | SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Equal | |||
| skipping to change at page 27, line 51 ¶ | skipping to change at page 27, line 23 ¶ | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Lesser | SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Lesser | |||
| SUIT_Condition_Version_Comparison_Greater = 1 | SUIT_Condition_Version_Comparison_Greater = 1 | |||
| SUIT_Condition_Version_Comparison_Greater_Equal = 2 | SUIT_Condition_Version_Comparison_Greater_Equal = 2 | |||
| SUIT_Condition_Version_Comparison_Equal = 3 | SUIT_Condition_Version_Comparison_Equal = 3 | |||
| SUIT_Condition_Version_Comparison_Lesser_Equal = 4 | SUIT_Condition_Version_Comparison_Lesser_Equal = 4 | |||
| SUIT_Condition_Version_Comparison_Lesser = 5 | SUIT_Condition_Version_Comparison_Lesser = 5 | |||
| SUIT_Condition_Version_Comparison_Value = [+int] | SUIT_Condition_Version_Comparison_Value = [+int] | |||
| While the exact encoding of versions is application-defined, semantic | While the exact encoding of versions is application-defined, semantic | |||
| versions map directly: | versions map conveniently. For example, | |||
| - 1.2.3 = [1,2,3] | - 1.2.3 = [1,2,3] | |||
| - 1.2-rc3 = [1,2,-1,3] | - 1.2-rc3 = [1,2,-1,3] | |||
| - 1.2-beta = [1,2,-2] | - 1.2-beta = [1,2,-2] | |||
| - 1.2-alpha = [1,2,-3] | - 1.2-alpha = [1,2,-3] | |||
| - 1.2-alpha4 = [1,2,-3,4] | - 1.2-alpha4 = [1,2,-3,4] | |||
| SUIT_Condition_Version is OPTIONAL to implement. | suit-condition-version is OPTIONAL to implement. | |||
| 8.12.8. SUIT_Condition_Custom | 7.11.8. SUIT_Condition_Custom | |||
| SUIT_Condition_Custom describes any proprietary, application specific | SUIT_Condition_Custom describes any proprietary, application specific | |||
| condition. This is encoded as a negative integer, chosen by the | condition. This is encoded as a negative integer, chosen by the | |||
| firmware developer, and a bstr that encodes the parameters passed to | firmware developer, and a bstr that encodes the parameters passed to | |||
| the system that evaluates the condition matching that integer. | the system that evaluates the condition matching that integer. | |||
| SUIT_Condition_Custom is OPTIONAL to implement. | SUIT_Condition_Custom is OPTIONAL to implement. | |||
| 8.12.9. Identifiers | 7.11.9. Identifiers | |||
| Many conditions use identifiers to determine whether a manifest | Many conditions use identifiers to determine whether a manifest | |||
| matches a given recipient or not. These identifiers are defined to | matches a given recipient or not. These identifiers are defined to | |||
| be RFC 4122 [RFC4122] UUIDs. These UUIDs are explicitly NOT human- | be RFC 4122 [RFC4122] UUIDs. These UUIDs are explicitly NOT human- | |||
| readable. They are for machine-based matching only. | readable. They are for machine-based matching only. | |||
| A device may match any number of UUIDs for vendor or class | A device may match any number of UUIDs for vendor or class | |||
| identifier. This may be relevant to physical or software modules. | identifier. This may be relevant to physical or software modules. | |||
| For example, a device that has an OS and one or more applications | For example, a device that has an OS and one or more applications | |||
| might list one Vendor ID for the OS and one or more additional Vendor | might list one Vendor ID for the OS and one or more additional Vendor | |||
| skipping to change at page 29, line 4 ¶ | skipping to change at page 28, line 26 ¶ | |||
| This same device has three software modules: 1. An operating system | This same device has three software modules: 1. An operating system | |||
| 2. A WiFi module interface driver 3. An application | 2. A WiFi module interface driver 3. An application | |||
| Suppose that the WiFi module's firmware has a proprietary update | Suppose that the WiFi module's firmware has a proprietary update | |||
| mechanism and doesn't support manifest processing. This device can | mechanism and doesn't support manifest processing. This device can | |||
| report four class IDs: | report four class IDs: | |||
| 1. hardware model/revision | 1. hardware model/revision | |||
| 2. OS | 2. OS | |||
| 3. WiFi module model/revision | 3. WiFi module model/revision | |||
| 4. Application | 4. Application | |||
| This allows the OS, WiFi module, and application to be updated | This allows the OS, WiFi module, and application to be updated | |||
| independently. To combat possible incompatibilities, the OS class ID | independently. To combat possible incompatibilities, the OS class ID | |||
| can be changed each time the OS has a change to its API. | can be changed each time the OS has a change to its API. | |||
| This approach allows a vendor to target, for example, all devices | This approach allows a vendor to target, for example, all devices | |||
| with a particular WiFi module with an update, which is a very | with a particular WiFi module with an update, which is a very | |||
| powerful mechanism, particularly when used for security updates. | powerful mechanism, particularly when used for security updates. | |||
| 8.12.9.1. Creating UUIDs: | 7.11.9.1. Creating UUIDs: | |||
| UUIDs MUST be created according to RFC 4122 [RFC4122]. UUIDs SHOULD | UUIDs MUST be created according to RFC 4122 [RFC4122]. UUIDs SHOULD | |||
| use versions 3, 4, or 5, as described in RFC4122. Versions 1 and 2 | use versions 3, 4, or 5, as described in RFC4122. Versions 1 and 2 | |||
| do not provide a tangible benefit over version 4 for this | do not provide a tangible benefit over version 4 for this | |||
| application. | application. | |||
| The RECOMMENDED method to create a vendor ID is: Vendor ID = | The RECOMMENDED method to create a vendor ID is: Vendor ID = | |||
| UUID5(DNS_PREFIX, vendor domain name) | UUID5(DNS_PREFIX, vendor domain name) | |||
| The RECOMMENDED method to create a class ID is: Class ID = | The RECOMMENDED method to create a class ID is: Class ID = | |||
| skipping to change at page 29, line 28 ¶ | skipping to change at page 29, line 4 ¶ | |||
| UUIDs MUST be created according to RFC 4122 [RFC4122]. UUIDs SHOULD | UUIDs MUST be created according to RFC 4122 [RFC4122]. UUIDs SHOULD | |||
| use versions 3, 4, or 5, as described in RFC4122. Versions 1 and 2 | use versions 3, 4, or 5, as described in RFC4122. Versions 1 and 2 | |||
| do not provide a tangible benefit over version 4 for this | do not provide a tangible benefit over version 4 for this | |||
| application. | application. | |||
| The RECOMMENDED method to create a vendor ID is: Vendor ID = | The RECOMMENDED method to create a vendor ID is: Vendor ID = | |||
| UUID5(DNS_PREFIX, vendor domain name) | UUID5(DNS_PREFIX, vendor domain name) | |||
| The RECOMMENDED method to create a class ID is: Class ID = | The RECOMMENDED method to create a class ID is: Class ID = | |||
| UUID5(Vendor ID, Class-Specific-Information) | UUID5(Vendor ID, Class-Specific-Information) | |||
| Class-specific information is composed of a variety of data, for | Class-specific information is composed of a variety of data, for | |||
| example: | example: | |||
| - Model number | - Model number | |||
| - Hardware revision | - Hardware revision | |||
| - Bootloader version (for immutable bootloaders) | - Bootloader version (for immutable bootloaders) | |||
| 8.12.10. SUIT_Condition CDDL | 7.11.10. SUIT_Condition CDDL | |||
| The following CDDL describes SUIT_Condition: | The following CDDL describes SUIT_Condition: | |||
| SUIT_Condition //= (nint => bstr) | SUIT_Condition //= (suit-condition-vendor-identifier, nil) | |||
| SUIT_Condition //= SUIT_Condition_Vendor_Identifier | SUIT_Condition //= (suit-condition-class-identifier, nil) | |||
| SUIT_Condition //= SUIT_Condition_Class_Identifier | SUIT_Condition //= (suit-condition-device-identifier, nil) | |||
| SUIT_Condition //= SUIT_Condition_Device_Identifier | SUIT_Condition //= (suit-condition-image-match, nil) | |||
| SUIT_Condition //= SUIT_Condition_Image_Match | SUIT_Condition //= (suit-condition-image-not-match, nil) | |||
| SUIT_Condition //= SUIT_Condition_Image_Not_Match | SUIT_Condition //= (suit-condition-use-before, uint) | |||
| SUIT_Condition //= SUIT_Condition_Use_Before | SUIT_Condition //= (suit-condition-minimum-battery, uint) | |||
| SUIT_Condition //= SUIT_Condition_Minimum_Battery | SUIT_Condition //= (suit-condition-update-authorised, int) | |||
| SUIT_Condition //= SUIT_Condition_Update_Authorised | SUIT_Condition //= (suit-condition-version, SUIT_Condition_Version_Argument) | |||
| SUIT_Condition //= SUIT_Condition_Version | SUIT_Condition //= (suit-condition-component-offset, uint) | |||
| SUIT_Condition //= SUIT_Condition_Component_Offset | SUIT_Condition //= (suit-condition-custom, bstr) | |||
| SUIT_Condition //= SUIT_Condition_Custom | ||||
| SUIT_Condition_Vendor_Identifier = (1 => bstr .size 16) | ||||
| SUIT_Condition_Class_Identifier = (2 => bstr .size 16) | ||||
| SUIT_Condition_Device_Identifier = (3 => bstr .size 16) | ||||
| SUIT_Condition_Image_Match = (4 => SUIT_Digest) | ||||
| SUIT_Condition_Image_Not_Match = (5 => SUIT_Digest) | ||||
| SUIT_Condition_Use_Before = (6 => uint) | ||||
| SUIT_Condition_Minimum_Battery = (7 => uint) | ||||
| SUIT_Condition_Update_Authorised = (8 => int) | ||||
| SUIT_Condition_Version = (9 => SUIT_Condition_Version_Argument) | ||||
| SUIT_Condition_Component_Offset = (10 => uint) | ||||
| SUIT_Condition_Custom = (nint => bstr) | ||||
| SUIT_Condition_Version_Argument = [ | SUIT_Condition_Version_Argument = [ | |||
| suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Types, | suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Types, | |||
| suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Value | suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Value | |||
| ] | ] | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Greater | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-greater | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Greater_Equal | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-greater-equal | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Equal | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-equal | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Lesser_Equal | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-lesser-equal | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Lesser | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-lesser | |||
| SUIT_Condition_Version_Comparison_Greater = 1 | ||||
| SUIT_Condition_Version_Comparison_Greater_Equal = 2 | ||||
| SUIT_Condition_Version_Comparison_Equal = 3 | ||||
| SUIT_Condition_Version_Comparison_Lesser_Equal = 4 | ||||
| SUIT_Condition_Version_Comparison_Lesser = 5 | ||||
| SUIT_Condition_Version_Comparison_Value = [+int] | SUIT_Condition_Version_Comparison_Value = [+int] | |||
| 8.13. SUIT_Directive | 7.12. SUIT_Directive | |||
| Directives are used to define the behaviour of the recipient. | Directives are used to define the behaviour of the recipient. | |||
| Directives include: | Directives include: | |||
| +----------------+--------------------------+ | +----------------+----------------------+ | |||
| | Directive Code | Directive Name | | | Directive Code | Directive Name | | |||
| +----------------+--------------------------+ | +----------------+----------------------+ | |||
| | 11 | Set Component Index | | | 12 | Set Component Index | | |||
| | | | | | | | | |||
| | 12 | Set Manifest Index | | | 13 | Set Dependency Index | | |||
| | | | | | | | | |||
| | 13 | Run Sequence | | | 14 | Abort | | |||
| | | | | | | | | |||
| | 14 | Run Sequence Conditional | | | 15 | Try Each | | |||
| | | | | | | | | |||
| | 15 | Process Dependency | | | 16 | Reserved | | |||
| | | | | | | | | |||
| | 16 | Set Parameters | | | 17 | Reserved | | |||
| | | | | | | | | |||
| | 17 | Reserved | | | 18 | Process Dependency | | |||
| | | | | | | | | |||
| | 18 | Reserved | | | 19 | Set Parameters | | |||
| | | | | | | | | |||
| | 19 | Override Parameters | | | 20 | Override Parameters | | |||
| | | | | | | | | |||
| | 20 | Fetch | | | 21 | Fetch | | |||
| | | | | | | | | |||
| | 21 | Copy | | | 22 | Copy | | |||
| | | | | | | | | |||
| | 22 | Run | | | 23 | Run | | |||
| | | | | | | | | |||
| | 23 | Wait | | | 29 | Wait | | |||
| +----------------+--------------------------+ | | | | | |||
| | 30 | Run Sequence | | ||||
| | | | | ||||
| | 31 | Run with Arguments | | ||||
| | | | | ||||
| | 32 | Swap | | ||||
| +----------------+----------------------+ | ||||
| When a Recipient executes a Directive, it MUST report a success code. | When a Recipient executes a Directive, it MUST report a success code. | |||
| If the Directive reports failure, then the current Command Sequence | If the Directive reports failure, then the current Command Sequence | |||
| MUST terminate. | MUST terminate. | |||
| 8.13.1. SUIT_Directive_Set_Component_Index | 7.12.1. suit-directive-set-component-index | |||
| Set Component Index defines the component to which successive | Set Component Index defines the component to which successive | |||
| directives and conditions will apply. The supplied argument MUST be | directives and conditions will apply. The supplied argument MUST be | |||
| either a boolean or an unsigned integer index into the concatenation | either a boolean or an unsigned integer index into the concatenation | |||
| of suit-components and suit-dependency-components. If the following | of suit-components and suit-dependency-components. If the following | |||
| directives apply to ALL components, then the boolean value "True" is | directives apply to ALL components, then the boolean value "True" is | |||
| used instead of an index. True does not apply to dependency | used instead of an index. True does not apply to dependency | |||
| components. If the following directives apply to NO components, then | components. If the following directives apply to NO components, then | |||
| the boolean value "False" is used. When | the boolean value "False" is used. When suit-directive-set- | |||
| SUIT_Directive_Set_Manifest_Index is used, | dependency-index is used, suit-directive-set-component-index = False | |||
| SUIT_Directive_Set_Component_Index = False is implied. When | is implied. When suit-directive-set-component-index is used, suit- | |||
| SUIT_Directive_Set_Component_Index is used, | directive-set-dependency-index = False is implied. | |||
| SUIT_Directive_Set_Manifest_Index = False is implied. | ||||
| The following CDDL describes the argument to | The following CDDL describes the argument to suit-directive-set- | |||
| SUIT_Directive_Set_Component_Index. | component-index. | |||
| SUIT_Directive_Set_Component_Index_Argument = uint/bool | SUIT_Directive_Set_Component_Index_Argument = uint/bool | |||
| 8.13.2. SUIT_Directive_Set_Manifest_Index | 7.12.2. suit-directive-set-dependency-index | |||
| Set Manifest Index defines the manifest to which successive | Set Dependency Index defines the manifest to which successive | |||
| directives and conditions will apply. The supplied argument MUST be | directives and conditions will apply. The supplied argument MUST be | |||
| either a boolean or an unsigned integer index into the dependencies. | either a boolean or an unsigned integer index into the dependencies. | |||
| If the following directives apply to ALL dependencies, then the | If the following directives apply to ALL dependencies, then the | |||
| boolean value "True" is used instead of an index. If the following | boolean value "True" is used instead of an index. If the following | |||
| directives apply to NO dependencies, then the boolean value "False" | directives apply to NO dependencies, then the boolean value "False" | |||
| is used. When SUIT_Directive_Set_Component_Index is used, | is used. When suit-directive-set-component-index is used, suit- | |||
| SUIT_Directive_Set_Manifest_Index = False is implied. When | directive-set-dependency-index = False is implied. When suit- | |||
| SUIT_Directive_Set_Manifest_Index is used, | directive-set-dependency-index is used, suit-directive-set-component- | |||
| SUIT_Directive_Set_Component_Index = False is implied. | index = False is implied. | |||
| Typical operations that require SUIT_Directive_Set_Manifest_Index | Typical operations that require suit-directive-set-dependency-index | |||
| include setting a source URI, invoking "Fetch," or invoking "Process | include setting a source URI, invoking "Fetch," or invoking "Process | |||
| Dependency" for an individual dependency. | Dependency" for an individual dependency. | |||
| The following CDDL describes the argument to | The following CDDL describes the argument to suit-directive-set- | |||
| SUIT_Directive_Set_Manifest_Index. | dependency-index. | |||
| SUIT_Directive_Set_Manifest_Index_Argument = uint/bool | SUIT_Directive_Set_Manifest_Index_Argument = uint/bool | |||
| 8.13.3. SUIT_Directive_Run_Sequence | 7.12.3. suit-directive-abort | |||
| Unconditionally fail. This operation is typically used in | ||||
| conjunction with suit-directive-try-each. | ||||
| 7.12.4. suit-directive-run-sequence | ||||
| To enable conditional commands, and to allow several strictly ordered | To enable conditional commands, and to allow several strictly ordered | |||
| sequences to be executed out-of-order, SUIT_Run_Sequence allows the | sequences to be executed out-of-order, suit-directive-run-sequence | |||
| manifest processor to execute its argument as a | allows the manifest processor to execute its argument as a | |||
| SUIT_Command_Sequence. The argument must be wrapped in a bstr. | SUIT_Command_Sequence. The argument must be wrapped in a bstr. | |||
| When a sequence is executed, any failure of a condition causes | When a sequence is executed, any failure of a condition causes | |||
| immediate termination of the sequence. | immediate termination of the sequence. | |||
| The following CDDL describes the SUIT_Run_Sequence argument. | The following CDDL describes the SUIT_Run_Sequence argument. | |||
| SUIT_Directive_Run_Sequence_Argument = bstr .cbor SUIT_Command_Sequence | SUIT_Directive_Run_Sequence_Argument = bstr .cbor SUIT_Command_Sequence | |||
| When SUIT_Directive_Run_Sequence completes, it forwards the last | When suit-directive-run-sequence completes, it forwards the last | |||
| status code that occurred in the sequence. If the Coerce on | status code that occurred in the sequence. If the Coerce on | |||
| Condition Failure parameter is true, then SUIT_Directive_Run_Sequence | Condition Failure parameter is true, then suit-directive-run-sequence | |||
| only fails when a directive in the argument sequence fails. | only fails when a directive in the argument sequence fails. | |||
| SUIT_Parameter_Coerce_Condition_Failure defaults to False when | SUIT_Parameter_Coerce_Condition_Failure defaults to False when suit- | |||
| SUIT_Directive_Run_Sequence begins. Its value is discarded when | directive-run-sequence begins. Its value is discarded when suit- | |||
| SUIT_Directive_Run_Sequence terminates. | directive-run-sequence terminates. | |||
| 8.13.4. SUIT_Directive_Run_Sequence_Conditional | 7.12.5. suit-directive-try-each | |||
| This command is exactly the same as SUIT_Directive_Run_Sequence, | This command runs several suit-directive-run-sequence one after | |||
| except that it initialises Coerce on Condition Failure to True. | another, in a strict order. Use this command to implement a "try/ | |||
| catch-try/catch" sequence. Manifest processors MAY implement this | ||||
| command. | ||||
| SUIT_Parameter_Coerce_Condition_Failure defaults to True when | SUIT_Parameter_Coerce_Condition_Failure is initialised to True at the | |||
| SUIT_Directive_Run_Sequence_Conditional begins. Its value is | beginning of each sequence. If one sequence aborts due to a | |||
| discarded when SUIT_Directive_Run_Sequence_Conditional terminates. | condition failure, the next is started. If no sequence completes | |||
| without condition failure, then suit-directive-try-each returns an | ||||
| error. If a particular application calls for all sequences to fail | ||||
| and still continue, then an empty sequence (nil) can be added to the | ||||
| Try Each Argument. | ||||
| 8.13.5. SUIT_Directive_Process_Dependency | The following CDDL describes the SUIT_Try_Each argument. | |||
| SUIT_Directive_Try_Each_Argument = [ | ||||
| + bstr .cbor SUIT_Command_Sequence, | ||||
| nil / bstr .cbor SUIT_Command_Sequence | ||||
| ] | ||||
| 7.12.6. suit-directive-process-dependency | ||||
| Execute the commands in the common section of the current dependency, | Execute the commands in the common section of the current dependency, | |||
| followed by the commands in the equivalent section of the current | followed by the commands in the equivalent section of the current | |||
| dependency. For example, if the current section is "fetch payload," | dependency. For example, if the current section is "fetch payload," | |||
| this will execute "common" in the current dependency, then "fetch | this will execute "common" in the current dependency, then "fetch | |||
| payload" in the current dependency. Once this is complete, the | payload" in the current dependency. Once this is complete, the | |||
| command following SUIT_Directive_Process_Dependency will be | command following suit-directive-process-dependency will be | |||
| processed. | processed. | |||
| If the current dependency is False, this directive has no effect. If | If the current dependency is False, this directive has no effect. If | |||
| the current dependency is True, then this directive applies to all | the current dependency is True, then this directive applies to all | |||
| dependencies. If the current section is "common," this directive | dependencies. If the current section is "common," this directive | |||
| MUST have no effect. | MUST have no effect. | |||
| When SUIT_Process_Dependency completes, it forwards the last status | When SUIT_Process_Dependency completes, it forwards the last status | |||
| code that occurred in the dependency. | code that occurred in the dependency. | |||
| The argument to SUIT_Directive_Process_Dependency is defined in the | The argument to suit-directive-process-dependency is defined in the | |||
| following CDDL. | following CDDL. | |||
| SUIT_Directive_Process_Dependency_Argument = nil | SUIT_Directive_Process_Dependency_Argument = nil | |||
| 8.13.6. SUIT_Directive_Set_Parameters | 7.12.7. suit-directive-set-parameters | |||
| SUIT_Directive_Set_Parameters allows the manifest to configure | suit-directive-set-parameters allows the manifest to configure | |||
| behaviour of future directives by changing parameters that are read | behaviour of future directives by changing parameters that are read | |||
| by those directives. When dependencies are used, | by those directives. When dependencies are used, suit-directive-set- | |||
| SUIT_Directive_Set_Parameters also allows a manifest to modify the | parameters also allows a manifest to modify the behaviour of its | |||
| behaviour of its dependencies. | dependencies. | |||
| Available parameters are defined in Section 8.6. | Available parameters are defined in Section 7.5. | |||
| If a parameter is already set, SUIT_Directive_Set_Parameters will | If a parameter is already set, suit-directive-set-parameters will | |||
| skip setting the parameter to its argument. This provides the core | skip setting the parameter to its argument. This provides the core | |||
| of the override mechanism, allowing dependent manifests to change the | of the override mechanism, allowing dependent manifests to change the | |||
| behaviour of a manifest. | behaviour of a manifest. | |||
| The argument to SUIT_Directive_Set_Parameters is defined in the | The argument to suit-directive-set-parameters is defined in the | |||
| following CDDL. | following CDDL. | |||
| SUIT_Directive_Set_Parameters_Argument = {+ SUIT_Parameters} | SUIT_Directive_Set_Parameters_Argument = {+ SUIT_Parameters} | |||
| N.B.: A directive code is reserved for an optimisation: a way to set | N.B.: A directive code is reserved for an optimisation: a way to set | |||
| a parameter to the contents of another parameter, optionally with | a parameter to the contents of another parameter, optionally with | |||
| another component ID. | another component ID. | |||
| 8.13.7. SUIT_Directive_Set_Parameter_State_Append | 7.12.8. suit-directive-override-parameters | |||
| This command is reserved for future use. It will provide a mechanism | ||||
| to override the "set if unset" logic of SUIT_Directive_Set_Parameters | ||||
| on a per-parameter basis. This will allow certain parameters to be | ||||
| treated as lists, rather than fixed values. This enables a feature | ||||
| for an advanced device to fail over from URIs defined in one manifest | ||||
| to those defined in another. | ||||
| 8.13.8. SUIT_Directive_Override_Parameters | ||||
| SUIT_Directive_Override_Parameters replaces any listed parameters | suit-directive-override-parameters replaces any listed parameters | |||
| that are already set with the values that are provided in its | that are already set with the values that are provided in its | |||
| argument. This allows a manifest to prevent replacement of critical | argument. This allows a manifest to prevent replacement of critical | |||
| parameters. | parameters. | |||
| Available parameters are defined in Section 8.6. | Available parameters are defined in Section 7.5. | |||
| The argument to SUIT_Directive_Override_Parameters is defined in the | The argument to suit-directive-override-parameters is defined in the | |||
| following CDDL. | following CDDL. | |||
| SUIT_Directive_Override_Parameters_Argument = {+ SUIT_Parameters} | SUIT_Directive_Override_Parameters_Argument = {+ SUIT_Parameters} | |||
| 8.13.9. SUIT_Directive_Fetch | 7.12.9. suit-directive-fetch | |||
| SUIT_Directive_Fetch instructs the manifest processor to obtain one | suit-directive-fetch instructs the manifest processor to obtain one | |||
| or more manifests or payloads, as specified by the manifest index and | or more manifests or payloads, as specified by the manifest index and | |||
| component index, respectively. | component index, respectively. | |||
| SUIT_Directive_Fetch can target one or more manifests and one or more | suit-directive-fetch can target one or more manifests and one or more | |||
| payloads. SUIT_Directive_Fetch retrieves each component and each | payloads. suit-directive-fetch retrieves each component and each | |||
| manifest listed in component-index and manifest-index, respectively. | manifest listed in component-index and manifest-index, respectively. | |||
| If component-index or manifest-index is True, instead of an integer, | If component-index or manifest-index is True, instead of an integer, | |||
| then all current manifest components/manifests are fetched. The | then all current manifest components/manifests are fetched. The | |||
| current manifest's dependent-components are not automatically | current manifest's dependent-components are not automatically | |||
| fetched. In order to pre-fetch these, they MUST be specified in a | fetched. In order to pre-fetch these, they MUST be specified in a | |||
| component-index integer. | component-index integer. | |||
| SUIT_Directive_Fetch typically takes no arguments unless one is | suit-directive-fetch typically takes no arguments unless one is | |||
| needed to modify fetch behaviour. If an argument is needed, it must | needed to modify fetch behaviour. If an argument is needed, it must | |||
| be wrapped in a bstr. | be wrapped in a bstr. | |||
| SUIT_Directive_Fetch reads the URI List parameter to find the source | suit-directive-fetch reads the URI or URI List parameter to find the | |||
| of the fetch it performs. | source of the fetch it performs. | |||
| The behaviour of SUIT_Directive_Fetch can be modified by setting one | The behaviour of suit-directive-fetch can be modified by setting one | |||
| or more of SUIT_Parameter_Encryption_Info, | or more of SUIT_Parameter_Encryption_Info, | |||
| SUIT_Parameter_Compression_Info, SUIT_Parameter_Unpack_Info. These | SUIT_Parameter_Compression_Info, SUIT_Parameter_Unpack_Info. These | |||
| three parameters each activate and configure a processing step that | three parameters each activate and configure a processing step that | |||
| can be applied to the data that is transferred during | can be applied to the data that is transferred during suit-directive- | |||
| SUIT_Directive_Fetch. | fetch. | |||
| The argument to SUIT_Directive_Fetch is defined in the following | The argument to suit-directive-fetch is defined in the following | |||
| CDDL. | CDDL. | |||
| SUIT_Directive_Fetch_Argument = nil/bstr | SUIT_Directive_Fetch_Argument = nil/bstr | |||
| 8.13.10. SUIT_Directive_Copy | 7.12.10. suit-directive-copy | |||
| SUIT_Directive_Copy instructs the manifest processor to obtain one or | suit-directive-copy instructs the manifest processor to obtain one or | |||
| more payloads, as specified by the component index. | more payloads, as specified by the component index. suit-directive- | |||
| SUIT_Directive_Copy retrieves each component listed in component- | copy retrieves each component listed in component-index, | |||
| index, respectively. If component-index is True, instead of an | respectively. If component-index is True, instead of an integer, | |||
| integer, then all current manifest components are copied. The | then all current manifest components are copied. The current | |||
| current manifest's dependent-components are not automatically copied. | manifest's dependent-components are not automatically copied. In | |||
| In order to copy these, they MUST be specified in a component-index | order to copy these, they MUST be specified in a component-index | |||
| integer. | integer. | |||
| The behaviour of SUIT_Directive_Copy can be modified by setting one | The behaviour of suit-directive-copy can be modified by setting one | |||
| or more of SUIT_Parameter_Encryption_Info, | or more of SUIT_Parameter_Encryption_Info, | |||
| SUIT_Parameter_Compression_Info, SUIT_Parameter_Unpack_Info. These | SUIT_Parameter_Compression_Info, SUIT_Parameter_Unpack_Info. These | |||
| three parameters each activate and configure a processing step that | three parameters each activate and configure a processing step that | |||
| can be applied to the data that is transferred during | can be applied to the data that is transferred during suit-directive- | |||
| SUIT_Directive_Copy. | copy. | |||
| *N.B.* Fetch and Copy are very similar. Merging them into one | *N.B.* Fetch and Copy are very similar. Merging them into one | |||
| command may be appropriate. | command may be appropriate. | |||
| SUIT_Directive_Copy reads its source from | suit-directive-copy reads its source from | |||
| SUIT_Parameter_Source_Component. | SUIT_Parameter_Source_Component. | |||
| The argument to SUIT_Directive_Copy is defined in the following CDDL. | The argument to suit-directive-copy is defined in the following CDDL. | |||
| SUIT_Directive_Copy_Argument = nil | SUIT_Directive_Copy_Argument = nil | |||
| 8.13.11. SUIT_Directive_Run | 7.12.11. suit-directive-swap | |||
| SUIT_Directive_Run directs the manifest processor to transfer | suit-directive-swap instructs the manifest processor to move the | |||
| source to the destination and the destination to the source | ||||
| simultaneously. Swap has nearly identical semantics to suit- | ||||
| directive-copy except that suit-directive-swap replaces the source | ||||
| with the current contents of the destination in an application- | ||||
| defined way. If SUIT_Parameter_Compression_Info or | ||||
| SUIT_Parameter_Encryption_Info are present, they must be handled in a | ||||
| symmetric way, so that the source is decompressed into the | ||||
| destination and the destination is compressed into the source. The | ||||
| source is decrypted into the destination and the destination is | ||||
| encrypted into the source. suit-directive-swap is OPTIONAL to | ||||
| implement. | ||||
| 7.12.12. suit-directive-run | ||||
| suit-directive-run directs the manifest processor to transfer | ||||
| execution to the current Component Index. When this is invoked, the | execution to the current Component Index. When this is invoked, the | |||
| manifest processor MAY be unloaded and execution continues in the | manifest processor MAY be unloaded and execution continues in the | |||
| Component Index. Arguments provided to Run are forwarded to the | Component Index. Arguments provided to Run are forwarded to the | |||
| executable code located in Component Index, in an application- | executable code located in Component Index, in an application- | |||
| specific way. For example, this could form the Linux Kernel Command | specific way. For example, this could form the Linux Kernel Command | |||
| Line if booting a linux device. | Line if booting a linux device. | |||
| If the executable code at Component Index is constructed in such a | If the executable code at Component Index is constructed in such a | |||
| way that it does not unload the manifest processor, then the manifest | way that it does not unload the manifest processor, then the manifest | |||
| processor may resume execution after the executable completes. This | processor may resume execution after the executable completes. This | |||
| allows the manifest processor to invoke suitable helpers and to | allows the manifest processor to invoke suitable helpers and to | |||
| verify them with image conditions. | verify them with image conditions. | |||
| The argument to SUIT_Directive_Run is defined in the following CDDL. | The argument to suit-directive-run is defined in the following CDDL. | |||
| SUIT_Directive_Run_Argument = nil/bstr | SUIT_Directive_Run_Argument = nil/bstr | |||
| 8.13.12. SUIT_Directive_Wait | 7.12.13. suit-directive-wait | |||
| SUIT_Directive_Wait directs the manifest processor to pause until a | suit-directive-wait directs the manifest processor to pause until a | |||
| specified event occurs. Some possible events include: | specified event occurs. Some possible events include: | |||
| 1. Authorisation | 1. Authorisation | |||
| 2. External Power | 2. External Power | |||
| 3. Network availability | 3. Network availability | |||
| 4. Other Device Firmware Version | 4. Other Device Firmware Version | |||
| 5. Time | 5. Time | |||
| 6. Time of Day | 6. Time of Day | |||
| 7. Day of Week | 7. Day of Week | |||
| The following CDDL defines the encoding of these events. | The following CDDL defines the encoding of these events. | |||
| SUIT_Directive_Wait_Argument = { | SUIT_Wait_Events //= (suit-wait-event-authorisation => int) | |||
| SUIT_Wait_Events | SUIT_Wait_Events //= (suit-wait-event-power => int) | |||
| } | SUIT_Wait_Events //= (suit-wait-event-network => int) | |||
| SUIT_Wait_Events //= (1 => SUIT_Wait_Event_Argument_Authorisation) | SUIT_Wait_Events //= (suit-wait-event-other-device-version | |||
| SUIT_Wait_Events //= (2 => SUIT_Wait_Event_Argument_Power) | => SUIT_Wait_Event_Argument_Other_Device_Version) | |||
| SUIT_Wait_Events //= (3 => SUIT_Wait_Event_Argument_Network) | SUIT_Wait_Events //= (suit-wait-event-time => uint); Timestamp | |||
| SUIT_Wait_Events //= (4 => SUIT_Wait_Event_Argument_Other_Device_Version) | SUIT_Wait_Events //= (suit-wait-event-time-of-day | |||
| SUIT_Wait_Events //= (5 => SUIT_Wait_Event_Argument_Time) | => uint); Time of Day (seconds since 00:00:00) | |||
| SUIT_Wait_Events //= (6 => SUIT_Wait_Event_Argument_Time_Of_Day) | SUIT_Wait_Events //= (suit-wait-event-day-of-week | |||
| SUIT_Wait_Events //= (7 => SUIT_Wait_Event_Argument_Day_Of_Week) | => uint); Days since Sunday | |||
| SUIT_Wait_Event_Argument_Authorisation = int ; priority | SUIT_Wait_Event_Argument_Authorisation = int ; priority | |||
| SUIT_Wait_Event_Argument_Power = int ; Power Level | SUIT_Wait_Event_Argument_Power = int ; Power Level | |||
| SUIT_Wait_Event_Argument_Network = int ; Network State | SUIT_Wait_Event_Argument_Network = int ; Network State | |||
| SUIT_Wait_Event_Argument_Other_Device_Version = [ | SUIT_Wait_Event_Argument_Other_Device_Version = [ | |||
| other-device: bstr, | other-device: bstr, | |||
| other-device-version: [+int] | other-device-version: [+int] | |||
| ] | ] | |||
| SUIT_Wait_Event_Argument_Time = uint ; Timestamp | SUIT_Wait_Event_Argument_Time = uint ; Timestamp | |||
| SUIT_Wait_Event_Argument_Time_Of_Day = uint ; Time of Day (seconds since 00:00:00) | SUIT_Wait_Event_Argument_Time_Of_Day = uint ; Time of Day (seconds since 00:00:00) | |||
| SUIT_Wait_Event_Argument_Day_Of_Week = uint ; Days since Sunday | SUIT_Wait_Event_Argument_Day_Of_Week = uint ; Days since Sunday | |||
| 7.12.14. SUIT_Directive CDDL | ||||
| 8.13.13. SUIT_Directive CDDL | ||||
| The following CDDL describes SUIT_Directive: | The following CDDL describes SUIT_Directive: | |||
| SUIT_Directive //= SUIT_Directive_Set_Component_Index | SUIT_Directive //= (suit-directive-set-component-index, uint/bool) | |||
| SUIT_Directive //= SUIT_Directive_Set_Manifest_Index | SUIT_Directive //= (suit-directive-set-dependency-index, uint/bool) | |||
| SUIT_Directive //= SUIT_Directive_Run_Sequence | SUIT_Directive //= (suit-directive-run-sequence, | |||
| SUIT_Directive //= SUIT_Directive_Run_Sequence_Conditional | bstr .cbor SUIT_Command_Sequence) | |||
| SUIT_Directive //= SUIT_Directive_Process_Dependency | SUIT_Directive //= (suit-directive-try-each, | |||
| SUIT_Directive //= SUIT_Directive_Set_Parameters | SUIT_Directive_Try_Each_Argument) | |||
| SUIT_Directive //= SUIT_Directive_Override_Parameters | SUIT_Directive //= (suit-directive-process-dependency, nil) | |||
| SUIT_Directive //= SUIT_Directive_Fetch | SUIT_Directive //= (suit-directive-set-parameters, | |||
| SUIT_Directive //= SUIT_Directive_Copy | {+ SUIT_Parameters}) | |||
| SUIT_Directive //= SUIT_Directive_Run | SUIT_Directive //= (suit-directive-override-parameters, | |||
| SUIT_Directive //= SUIT_Directive_Wait | {+ SUIT_Parameters}) | |||
| SUIT_Directive //= (suit-directive-fetch, nil) | ||||
| SUIT_Directive //= (suit-directive-copy, nil) | ||||
| SUIT_Directive //= (suit-directive-run, nil) | ||||
| SUIT_Directive //= (suit-directive-wait, | ||||
| { + SUIT_Wait_Events }) | ||||
| SUIT_Directive //= (suit-directive-run-with-arguments, bstr) | ||||
| SUIT_Directive_Set_Component_Index = (11 => uint/bool) | SUIT_Directive_Try_Each_Argument = [ | |||
| SUIT_Directive_Set_Manifest_Index = (12 => uint/bool) | + bstr .cbor SUIT_Command_Sequence, | |||
| SUIT_Directive_Run_Sequence = (13 => bstr .cbor SUIT_Command_Sequence) | nil / bstr .cbor SUIT_Command_Sequence | |||
| SUIT_Directive_Run_Sequence_Conditional = (14 => bstr .cbor SUIT_Command_Sequence) | ] | |||
| SUIT_Directive_Process_Dependency = (15 => nil) | ||||
| SUIT_Directive_Set_Parameters = (16 => {+ SUIT_Parameters}) | ||||
| SUIT_Directive_Override_Parameters = (19 => {+ SUIT_Parameters}) | ||||
| SUIT_Directive_Fetch = (20 => nil/bstr) | ||||
| SUIT_Directive_Copy = (21 => nil/bstr) | ||||
| SUIT_Directive_Run = (22 => nil/bstr) | ||||
| SUIT_Directive_Wait = (23 => { + SUIT_Wait_Events }) | ||||
| SUIT_Wait_Events //= (1 => SUIT_Wait_Event_Argument_Authorisation) | SUIT_Wait_Events //= (suit-wait-event-authorisation => int) | |||
| SUIT_Wait_Events //= (2 => SUIT_Wait_Event_Argument_Power) | SUIT_Wait_Events //= (suit-wait-event-power => int) | |||
| SUIT_Wait_Events //= (3 => SUIT_Wait_Event_Argument_Network) | SUIT_Wait_Events //= (suit-wait-event-network => int) | |||
| SUIT_Wait_Events //= (4 => SUIT_Wait_Event_Argument_Other_Device_Version) | SUIT_Wait_Events //= (suit-wait-event-other-device-version | |||
| SUIT_Wait_Events //= (5 => SUIT_Wait_Event_Argument_Time) | => SUIT_Wait_Event_Argument_Other_Device_Version) | |||
| SUIT_Wait_Events //= (6 => SUIT_Wait_Event_Argument_Time_Of_Day) | SUIT_Wait_Events //= (suit-wait-event-time => uint); Timestamp | |||
| SUIT_Wait_Events //= (7 => SUIT_Wait_Event_Argument_Day_Of_Week) | SUIT_Wait_Events //= (suit-wait-event-time-of-day | |||
| => uint); Time of Day (seconds since 00:00:00) | ||||
| SUIT_Wait_Events //= (suit-wait-event-day-of-week | ||||
| => uint); Days since Sunday | ||||
| SUIT_Wait_Event_Argument_Authorisation = int ; priority | SUIT_Wait_Event_Argument_Authorisation = int ; priority | |||
| SUIT_Wait_Event_Argument_Power = int ; Power Level | SUIT_Wait_Event_Argument_Power = int ; Power Level | |||
| SUIT_Wait_Event_Argument_Network = int ; Network State | SUIT_Wait_Event_Argument_Network = int ; Network State | |||
| SUIT_Wait_Event_Argument_Other_Device_Version = [ | SUIT_Wait_Event_Argument_Other_Device_Version = [ | |||
| other-device: bstr, | other-device: bstr, | |||
| other-device-version: [+int] | other-device-version: [+int] | |||
| ] | ] | |||
| SUIT_Wait_Event_Argument_Time = uint ; Timestamp | SUIT_Wait_Event_Argument_Time = uint ; Timestamp | |||
| SUIT_Wait_Event_Argument_Time_Of_Day = uint ; Time of Day (seconds since 00:00:00) | SUIT_Wait_Event_Argument_Time_Of_Day = uint ; Time of Day (seconds since 00:00:00) | |||
| SUIT_Wait_Event_Argument_Day_Of_Week = uint ; Days since Sunday | SUIT_Wait_Event_Argument_Day_Of_Week = uint ; Days since Sunday | |||
| 9. Dependency processing | 8. Dependency processing | |||
| Dependencies need careful handling on constrained systems. A | Dependencies need careful handling on constrained systems. A | |||
| dependency tree that is too deep can cause recursive handling to | dependency tree that is too deep can cause recursive handling to | |||
| overflow stack space. Systems that parse all dependencies into an | overflow stack space. Systems that parse all dependencies into an | |||
| object tree can easily fill up available memory. Too many | object tree can easily fill up available memory. Too many | |||
| dependencies can overrun available storage space. | dependencies can overrun available storage space. | |||
| The dependency handling system in this document is designed to | The dependency handling system in this document is designed to | |||
| address as many of these problems as possible. | address as many of these problems as possible. | |||
| skipping to change at page 39, line 46 ¶ | skipping to change at page 39, line 46 ¶ | |||
| Advanced devices may make use of the Strict Order parameter and | Advanced devices may make use of the Strict Order parameter and | |||
| enable parallel processing of some segments, or it may reorder some | enable parallel processing of some segments, or it may reorder some | |||
| segments. To perform parallel processing, once the Strict Order | segments. To perform parallel processing, once the Strict Order | |||
| parameter is set to False, the device may fork a process for each | parameter is set to False, the device may fork a process for each | |||
| command until the Strict Order parameter is returned to True or the | command until the Strict Order parameter is returned to True or the | |||
| command sequence ends. Then, it joins all forked processes before | command sequence ends. Then, it joins all forked processes before | |||
| continuing processing of commands. To perform out-of-order | continuing processing of commands. To perform out-of-order | |||
| processing, a similar approach is used, except the device consumes | processing, a similar approach is used, except the device consumes | |||
| all commands after the Strict Order parameter is set to False, then | all commands after the Strict Order parameter is set to False, then | |||
| it sorts these commands into its prefered order, invokes them all, | it sorts these commands into its preferred order, invokes them all, | |||
| then continues processing. | then continues processing. | |||
| 10. Access Control Lists | 9. Access Control Lists | |||
| To manage permissions in the manifest, there are three models that | To manage permissions in the manifest, there are three models that | |||
| can be used. | can be used. | |||
| First, the simplest model requires that all manifests are | First, the simplest model requires that all manifests are | |||
| authenticated by a single trusted key. This mode has the advantage | authenticated by a single trusted key. This mode has the advantage | |||
| that only a root manifest needs to be authenticated, since all of its | that only a root manifest needs to be authenticated, since all of its | |||
| dependencies have digests included in the root manifest. | dependencies have digests included in the root manifest. | |||
| This simplest model can be extended by adding key delegation without | This simplest model can be extended by adding key delegation without | |||
| skipping to change at page 40, line 30 ¶ | skipping to change at page 40, line 30 ¶ | |||
| grants access rights for specific component IDs or component ID | grants access rights for specific component IDs or component ID | |||
| prefixes to the listed identities or identity groups. Any identity | prefixes to the listed identities or identity groups. Any identity | |||
| may verify an image digest, but fetching into or fetching from a | may verify an image digest, but fetching into or fetching from a | |||
| component ID requires approval from the ACL. | component ID requires approval from the ACL. | |||
| A third model allows a device to provide even more fine-grained | A third model allows a device to provide even more fine-grained | |||
| controls: The ACL lists the component ID or component ID prefix that | controls: The ACL lists the component ID or component ID prefix that | |||
| an identity may use, and also lists the commands that the identity | an identity may use, and also lists the commands that the identity | |||
| may use in combination with that component ID. | may use in combination with that component ID. | |||
| 10. SUIT digest container | ||||
| RFC 8152 [RFC8152] provides containers for signature, MAC, and | ||||
| encryption, but no basic digest container. The container needed for | ||||
| a digest requires a type identifier and a container for the raw | ||||
| digest data. Some forms of digest may require additional parameters. | ||||
| These can be added following the digest. This structure is described | ||||
| by the following CDDL. | ||||
| The algorithms listed are sufficient for verifying integrity of | ||||
| Firmware Updates as of this writing, however this may change over | ||||
| time. | ||||
| SUIT_Digest = [ | ||||
| suit-digest-algorithm-id : $suit-digest-algorithm-ids, | ||||
| suit-digest-bytes : bytes, | ||||
| ? suit-digest-parameters : any | ||||
| ] | ||||
| digest-algorithm-ids /= algorithm-id-sha224 | ||||
| digest-algorithm-ids /= algorithm-id-sha256 | ||||
| digest-algorithm-ids /= algorithm-id-sha384 | ||||
| digest-algorithm-ids /= algorithm-id-sha512 | ||||
| digest-algorithm-ids /= algorithm-id-sha3-224 | ||||
| digest-algorithm-ids /= algorithm-id-sha3-256 | ||||
| digest-algorithm-ids /= algorithm-id-sha3-384 | ||||
| digest-algorithm-ids /= algorithm-id-sha3-512 | ||||
| algorithm-id-sha224 = 1 | ||||
| algorithm-id-sha256 = 2 | ||||
| algorithm-id-sha384 = 3 | ||||
| algorithm-id-sha512 = 4 | ||||
| algorithm-id-sha3-224 = 5 | ||||
| algorithm-id-sha3-256 = 6 | ||||
| algorithm-id-sha3-384 = 7 | ||||
| algorithm-id-sha3-512 = 8 | ||||
| 11. Creating conditional sequences | 11. Creating conditional sequences | |||
| For some use cases, it is important to provide a sequence that can | For some use cases, it is important to provide a sequence that can | |||
| fail without terminating an update. For example, a dual-image XIP | fail without terminating an update. For example, a dual-image XIP | |||
| MCU may require an update that can be placed at one of two offsets. | MCU may require an update that can be placed at one of two offsets. | |||
| This has two implications, first, the digest of each offset will be | This has two implications, first, the digest of each offset will be | |||
| different. Second, the image fetched for each offset will have a | different. Second, the image fetched for each offset will have a | |||
| different URI. Conditional sequences allow this to be resolved in a | different URI. Conditional sequences allow this to be resolved in a | |||
| simple way. | simple way. | |||
| The following JSON representation of a manifest demonstrates how this | The following JSON representation of a manifest demonstrates how this | |||
| would be represented. It assumes that the bootloader and manifest | would be represented. It assumes that the bootloader and manifest | |||
| processor take care of A/B switching and that the manifest is not | processor take care of A/B switching and that the manifest is not | |||
| aware of this distinction. | aware of this distinction. | |||
| { | { | |||
| "structure-version" : 1, | "structure-version" : 1, | |||
| "sequence-number" : 7, | "sequence-number" : 7, | |||
| "components" : [ | "common" :{ | |||
| { | "components" : [ | |||
| "component-identifier" : [0], | [b'0'] | |||
| "component-size" : [32567], | ], | |||
| }, | "common-sequence" : [ | |||
| ], | { | |||
| "common" : [ | "directive-set-var" : { | |||
| "set-component-index" : 0, | "size": 32567 | |||
| "do-sequence" : [ | }, | |||
| "condition-component-offset" : "<offset A>", | }, | |||
| "set-parameters": { | { | |||
| "component-digest" : "<SHA256 A>" | "try-each" : [ | |||
| } | [ | |||
| ], | {"condition-component-offset" : "<offset A>"}, | |||
| "do-sequence" : [ | { | |||
| "condition-component-offset" : "<offset B>", | "directive-set-var": { | |||
| "set-parameters": { | "digest" : "<SHA256 A>" | |||
| "component-digest" : "<SHA256 A>" | } | |||
| } | } | |||
| ] | ], | |||
| ], | [ | |||
| "fetch" : [ | {"condition-component-offset" : "<offset B>"}, | |||
| "set-component-index" : 0, | { | |||
| "do-sequence" : [ | "directive-set-var": { | |||
| "condition-component-offset" : "<offset A>", | "digest" : "<SHA256 B>" | |||
| "set-parameters": { | } | |||
| "uri-list" : [[0, "<uri-A>"]] | } | |||
| } | ], | |||
| ], | [{ "abort" : null }] | |||
| "do-sequence" : [ | ] | |||
| "condition-component-offset" : "<offset B>", | } | |||
| "set-parameters": { | ] | |||
| "uri-list" : [[0, "<uri-B>"]] | } | |||
| } | "fetch" : [ | |||
| ], | { | |||
| "fetch" : null | "try-each" : [ | |||
| ] | [ | |||
| } | {"condition-component-offset" : "<offset A>"}, | |||
| { | ||||
| "directive-set-var": { | ||||
| "uri" : "<URI A>" | ||||
| } | ||||
| } | ||||
| ], | ||||
| [ | ||||
| {"condition-component-offset" : "<offset B>"}, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "uri" : "<URI B>" | ||||
| } | ||||
| } | ||||
| ], | ||||
| [{ "directive-abort" : null }] | ||||
| ] | ||||
| }, | ||||
| "fetch" : null | ||||
| ] | ||||
| } | ||||
| 12. Full CDDL | 12. Full CDDL | |||
| In order to create a valid SUIT Manifest document the structure of | In order to create a valid SUIT Manifest document the structure of | |||
| the corresponding CBOR message MUST adhere to the following CDDL data | the corresponding CBOR message MUST adhere to the following CDDL data | |||
| definition. | definition. | |||
| SUIT_Outer_Wrapper = { | SUIT_Outer_Wrapper = { | |||
| suit-authentication-wrapper => bstr .cbor SUIT_Authentication_Wrapper / nil, | suit-authentication-wrapper => bstr .cbor SUIT_Authentication_Wrapper / nil, | |||
| suit-manifest => bstr .cbor SUIT_Manifest, | $$SUIT_Manifest_Wrapped, | |||
| suit-dependency-resolution => bstr .cbor SUIT_Command_Sequence, | suit-dependency-resolution => bstr .cbor SUIT_Command_Sequence, | |||
| suit-payload-fetch => bstr .cbor SUIT_Command_Sequence, | suit-payload-fetch => bstr .cbor SUIT_Command_Sequence, | |||
| suit-install => bstr .cbor SUIT_Command_Sequence, | suit-install => bstr .cbor SUIT_Command_Sequence, | |||
| suit-text => bstr .cbor SUIT_Text_Map, | suit-text => bstr .cbor SUIT_Text_Map, | |||
| suit-coswid => bstr .cbor concise-software-identity | suit-coswid => bstr .cbor concise-software-identity | |||
| } | } | |||
| suit-authentication-wrapper = 1 | ||||
| suit-manifest = 2 | ||||
| suit-dependency-resolution = 7 | ||||
| suit-payload-fetch = 8 | ||||
| suit-install = 9 | ||||
| suit-text = 13 | ||||
| suit-coswid = 14 | ||||
| SUIT_Authentication_Wrapper = [ * ( | SUIT_Authentication_Wrapper = [ + ( | |||
| COSE_Mac_Tagged / | COSE_Mac_Tagged / | |||
| COSE_Sign_Tagged / | COSE_Sign_Tagged / | |||
| COSE_Mac0_Tagged / | COSE_Mac0_Tagged / | |||
| COSE_Sign1_Tagged)] | COSE_Sign1_Tagged) | |||
| ] | ||||
| SUIT_Encryption_Wrapper = COSE_Encrypt_Tagged / COSE_Encrypt0_Tagged | ||||
| $$SUIT_Manifest_Wrapped //= (suit-manifest => bstr .cbor SUIT_Manifest) | ||||
| $$SUIT_Manifest_Wrapped //= ( | ||||
| suit-manifest-encryption-info => bstr .cbor SUIT_Encryption_Wrapper, | ||||
| suit-manifest-encrypted => bstr | ||||
| ) | ||||
| COSE_Mac_Tagged = any | COSE_Mac_Tagged = any | |||
| COSE_Sign_Tagged = any | COSE_Sign_Tagged = any | |||
| COSE_Mac0_Tagged = any | COSE_Mac0_Tagged = any | |||
| COSE_Sign1_Tagged = any | COSE_Sign1_Tagged = any | |||
| COSE_Encrypt_Tagged = any | COSE_Encrypt_Tagged = any | |||
| COSE_Encrypt0_Tagged = any | COSE_Encrypt0_Tagged = any | |||
| SUIT_Digest = [ | SUIT_Digest = [ | |||
| suit-digest-algorithm-id : $suit-digest-algorithm-ids, | suit-digest-algorithm-id : $suit-digest-algorithm-ids, | |||
| skipping to change at page 42, line 40 ¶ | skipping to change at page 44, line 4 ¶ | |||
| COSE_Mac0_Tagged = any | COSE_Mac0_Tagged = any | |||
| COSE_Sign1_Tagged = any | COSE_Sign1_Tagged = any | |||
| COSE_Encrypt_Tagged = any | COSE_Encrypt_Tagged = any | |||
| COSE_Encrypt0_Tagged = any | COSE_Encrypt0_Tagged = any | |||
| SUIT_Digest = [ | SUIT_Digest = [ | |||
| suit-digest-algorithm-id : $suit-digest-algorithm-ids, | suit-digest-algorithm-id : $suit-digest-algorithm-ids, | |||
| suit-digest-bytes : bytes, | suit-digest-bytes : bytes, | |||
| ? suit-digest-parameters : any | ? suit-digest-parameters : any | |||
| ] | ] | |||
| ; Named Information Hash Algorithm Identifiers | ; Named Information Hash Algorithm Identifiers | |||
| suit-digest-algorithm-ids /= algorithm-id-sha224 | ||||
| suit-digest-algorithm-ids /= algorithm-id-sha256 | suit-digest-algorithm-ids /= algorithm-id-sha256 | |||
| suit-digest-algorithm-ids /= algorithm-id-sha256-128 | ||||
| suit-digest-algorithm-ids /= algorithm-id-sha256-120 | ||||
| suit-digest-algorithm-ids /= algorithm-id-sha256-96 | ||||
| suit-digest-algorithm-ids /= algorithm-id-sha256-64 | ||||
| suit-digest-algorithm-ids /= algorithm-id-sha256-32 | ||||
| suit-digest-algorithm-ids /= algorithm-id-sha384 | suit-digest-algorithm-ids /= algorithm-id-sha384 | |||
| suit-digest-algorithm-ids /= algorithm-id-sha512 | suit-digest-algorithm-ids /= algorithm-id-sha512 | |||
| suit-digest-algorithm-ids /= algorithm-id-sha3-224 | suit-digest-algorithm-ids /= algorithm-id-sha3-224 | |||
| suit-digest-algorithm-ids /= algorithm-id-sha3-256 | suit-digest-algorithm-ids /= algorithm-id-sha3-256 | |||
| suit-digest-algorithm-ids /= algorithm-id-sha3-384 | suit-digest-algorithm-ids /= algorithm-id-sha3-384 | |||
| suit-digest-algorithm-ids /= algorithm-id-sha3-512 | suit-digest-algorithm-ids /= algorithm-id-sha3-512 | |||
| SUIT_Manifest = { | SUIT_Manifest = { | |||
| suit-manifest-version => 1, | suit-manifest-version => 1, | |||
| suit-manifest-sequence-number => uint, | suit-manifest-sequence-number => uint, | |||
| ? suit-dependencies => [ + SUIT_Dependency ], | ? suit-common => bstr .cbor SUIT_Common, | |||
| ? suit-components => [ + SUIT_Component ], | ||||
| ? suit-dependency-components => [ + SUIT_Component_Reference ], | ||||
| ? suit-common => bstr .cbor SUIT_Command_Sequence, | ||||
| ? suit-dependency-resolution => SUIT_Digest / bstr .cbor SUIT_Command_Sequence, | ? suit-dependency-resolution => SUIT_Digest / bstr .cbor SUIT_Command_Sequence, | |||
| ? suit-payload-fetch => SUIT_Digest / bstr .cbor SUIT_Command_Sequence, | ? suit-payload-fetch => SUIT_Digest / bstr .cbor SUIT_Command_Sequence, | |||
| ? suit-install => SUIT_Digest / bstr .cbor SUIT_Command_Sequence | ? suit-install => SUIT_Digest / bstr .cbor SUIT_Command_Sequence | |||
| ? suit-validate => bstr .cbor SUIT_Command_Sequence | ? suit-validate => bstr .cbor SUIT_Command_Sequence | |||
| ? suit-load => bstr .cbor SUIT_Command_Sequence | ? suit-load => bstr .cbor SUIT_Command_Sequence | |||
| ? suit-run => bstr .cbor SUIT_Command_Sequence | ? suit-run => bstr .cbor SUIT_Command_Sequence | |||
| ? suit-text-info => SUIT_Digest / bstr .cbor SUIT_Text_Map | ? suit-text => SUIT_Digest / bstr .cbor SUIT_Text_Map | |||
| ? suit-coswid => SUIT_Digest / bstr .cbor concise-software-identity | ? suit-coswid => SUIT_Digest / bstr .cbor concise-software-identity | |||
| } | } | |||
| suit-manifest-version = 1 | SUIT_Common = { | |||
| suit-manifest-sequence-number = 2 | ? suit-dependencies => bstr .cbor SUIT_Dependencies, | |||
| suit-dependencies = 3 | ? suit-components => bstr .cbor SUIT_Components, | |||
| suit-components = 4 | ? suit-dependency-components => bstr .cbor SUIT_Component_References, | |||
| suit-dependency-components = 5 | ? suit-common-sequence => bstr .cbor SUIT_Command_Sequence, | |||
| suit-common = 6 | } | |||
| suit-dependency-resolution = 7 | ||||
| suit-payload-fetch = 8 | SUIT_Dependencies = [ + SUIT_Dependency ] | |||
| suit-install = 9 | SUIT_Components = [ + SUIT_Component_Identifier ] | |||
| suit-validate = 10 | SUIT_Component_References = [ + SUIT_Component_Reference ] | |||
| suit-load = 11 | ||||
| suit-run = 12 | ||||
| suit-text-info = 13 | ||||
| suit-coswid = 14 | ||||
| concise-software-identity = any | concise-software-identity = any | |||
| SUIT_Dependency = { | SUIT_Dependency = { | |||
| suit-dependency-digest => SUIT_Digest, | suit-dependency-digest => SUIT_Digest, | |||
| suit-dependency-prefix => SUIT_Component_Identifier, | suit-dependency-prefix => SUIT_Component_Identifier, | |||
| } | } | |||
| suit-dependency-digest = 1 | ||||
| suit-dependency-prefix = 2 | ||||
| SUIT_Component_Identifier = [* bstr] | SUIT_Component_Identifier = [* bstr] | |||
| SUIT_Component = { | ||||
| suit-component-identifier => SUIT_Component_Identifier, | ||||
| ? suit-component-size => uint, | ||||
| ? suit-component-digest => SUIT_Digest, | ||||
| } | ||||
| suit-component-identifier = 1 | ||||
| suit-component-size = 2 | ||||
| suit-component-digest = 3 | ||||
| SUIT_Component_Reference = { | SUIT_Component_Reference = { | |||
| suit-component-identifier => SUIT_Component_Identifier, | suit-component-identifier => SUIT_Component_Identifier, | |||
| suit-component-dependency-index => uint | suit-component-dependency-index => uint | |||
| } | ||||
| suit-component-dependency-index = 2 | ||||
| SUIT_Command_Sequence = [ + { SUIT_Condition // SUIT_Directive // SUIT_Command_Custom} ] | } | |||
| SUIT_Command_Custom = (nint => bstr) | SUIT_Command_Sequence = [ + (SUIT_Condition // SUIT_Directive // SUIT_Command_Custom) ] | |||
| SUIT_Condition //= (SUIT_Condition_Vendor_Identifier => RFC4122_UUID) ; SUIT_Condition_Vendor_Identifier | SUIT_Command_Custom = (nint, bstr) | |||
| SUIT_Condition //= (2 => RFC4122_UUID) ; SUIT_Condition_Class_Identifier | SUIT_Condition //= (suit-condition-vendor-identifier, nil) | |||
| SUIT_Condition //= (3 => RFC4122_UUID) ; SUIT_Condition_Device_Identifier | SUIT_Condition //= (suit-condition-class-identifier, nil) | |||
| SUIT_Condition //= (4 => SUIT_Digest) ; SUIT_Condition_Image_Match | SUIT_Condition //= (suit-condition-device-identifier, nil) | |||
| SUIT_Condition //= (5 => SUIT_Digest) ; SUIT_Condition_Image_Not_Match | SUIT_Condition //= (suit-condition-image-match, nil) | |||
| SUIT_Condition //= (6 => uint) ; SUIT_Condition_Use_Before | SUIT_Condition //= (suit-condition-image-not-match, nil) | |||
| SUIT_Condition //= (7 => uint) ; SUIT_Condition_Minimum_Battery | SUIT_Condition //= (suit-condition-use-before, uint) | |||
| SUIT_Condition //= (8 => int) ; SUIT_Condition_Update_Authorised | SUIT_Condition //= (suit-condition-minimum-battery, uint) | |||
| SUIT_Condition //= (9 => SUIT_Condition_Version_Argument) ; SUIT_Condition_Version | SUIT_Condition //= (suit-condition-update-authorised, int) | |||
| SUIT_Condition //= (10 => uint) ; SUIT_Condition_Component_Offset | SUIT_Condition //= (suit-condition-version, SUIT_Condition_Version_Argument) | |||
| SUIT_Condition //= (nint => bstr) ; SUIT_Condition_Custom | SUIT_Condition //= (suit-condition-component-offset, uint) | |||
| SUIT_Condition //= (suit-condition-custom, bstr) | ||||
| SUIT_Condition_Vendor_Identifier = 1 | ||||
| RFC4122_UUID = bstr .size 16 | RFC4122_UUID = bstr .size 16 | |||
| SUIT_Condition_Version_Argument = [ | SUIT_Condition_Version_Argument = [ | |||
| suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Types, | suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Types, | |||
| suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Value | suit-condition-version-comparison: SUIT_Condition_Version_Comparison_Value | |||
| ] | ] | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Greater | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-greater | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Greater_Equal | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-greater-equal | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Equal | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-equal | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Lesser_Equal | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-lesser-equal | |||
| SUIT_Condition_Version_Comparison_Types /= SUIT_Condition_Version_Comparison_Lesser | SUIT_Condition_Version_Comparison_Types /= suit-condition-version-comparison-lesser | |||
| SUIT_Condition_Version_Comparison_Greater = 1 | suit-condition-version-comparison-greater = 1 | |||
| SUIT_Condition_Version_Comparison_Greater_Equal = 2 | suit-condition-version-comparison-greater-equal = 2 | |||
| SUIT_Condition_Version_Comparison_Equal = 3 | suit-condition-version-comparison-equal = 3 | |||
| SUIT_Condition_Version_Comparison_Lesser_Equal = 4 | suit-condition-version-comparison-lesser-equal = 4 | |||
| SUIT_Condition_Version_Comparison_Lesser = 5 | suit-condition-version-comparison-lesser = 5 | |||
| SUIT_Condition_Version_Comparison_Value = [+int] | SUIT_Condition_Version_Comparison_Value = [+int] | |||
| SUIT_Directive //= (11 => uint/bool) ; SUIT_Directive_Set_Component_Index | SUIT_Directive //= (suit-directive-set-component-index, uint/bool) | |||
| SUIT_Directive //= (12 => uint/bool) ; SUIT_Directive_Set_Manifest_Index | SUIT_Directive //= (suit-directive-set-dependency-index, uint/bool) | |||
| SUIT_Directive //= (13 => bstr .cbor SUIT_Command_Sequence) ; SUIT_Directive_Run_Sequence | SUIT_Directive //= (suit-directive-run-sequence, bstr .cbor SUIT_Command_Sequence) | |||
| SUIT_Directive //= (14 => bstr .cbor SUIT_Command_Sequence) ; SUIT_Directive_Run_Sequence_Conditional | SUIT_Directive //= (suit-directive-try-each, SUIT_Directive_Try_Each_Argument) | |||
| SUIT_Directive //= (15 => nil) ; SUIT_Directive_Process_Dependency | SUIT_Directive //= (suit-directive-process-dependency, nil) | |||
| SUIT_Directive //= (16 => {+ SUIT_Parameters}) ; SUIT_Directive_Set_Parameters | SUIT_Directive //= (suit-directive-set-parameters, {+ SUIT_Parameters}) | |||
| SUIT_Directive //= (19 => {+ SUIT_Parameters}) ; SUIT_Directive_Override_Parameters | SUIT_Directive //= (suit-directive-override-parameters, {+ SUIT_Parameters}) | |||
| SUIT_Directive //= (20 => nil/bstr) ; SUIT_Directive_Fetch | SUIT_Directive //= (suit-directive-fetch, nil) | |||
| SUIT_Directive //= (21 => nil/bstr) ; SUIT_Directive_Copy | SUIT_Directive //= (suit-directive-copy, nil) | |||
| SUIT_Directive //= (22 => nil/bstr) ; SUIT_Directive_Run | SUIT_Directive //= (suit-directive-swap, nil) | |||
| SUIT_Directive //= (23 => { + SUIT_Wait_Events }) ; SUIT_Directive_Wait | SUIT_Directive //= (suit-directive-run, nil) | |||
| SUIT_Directive //= (suit-directive-wait, { + SUIT_Wait_Events }) | ||||
| SUIT_Directive //= (suit-directive-run-with-arguments, bstr) | ||||
| SUIT_Wait_Events //= (1 => SUIT_Wait_Event_Argument_Authorisation) | SUIT_Directive_Try_Each_Argument = [ | |||
| SUIT_Wait_Events //= (2 => SUIT_Wait_Event_Argument_Power) | + bstr .cbor SUIT_Command_Sequence, | |||
| SUIT_Wait_Events //= (3 => SUIT_Wait_Event_Argument_Network) | nil / bstr .cbor SUIT_Command_Sequence | |||
| SUIT_Wait_Events //= (4 => SUIT_Wait_Event_Argument_Other_Device_Version) | ] | |||
| SUIT_Wait_Events //= (5 => SUIT_Wait_Event_Argument_Time) | ||||
| SUIT_Wait_Events //= (6 => SUIT_Wait_Event_Argument_Time_Of_Day) | SUIT_Wait_Events //= (suit-wait-event-authorisation => int) | |||
| SUIT_Wait_Events //= (7 => SUIT_Wait_Event_Argument_Day_Of_Week) | SUIT_Wait_Events //= (suit-wait-event-power => int) | |||
| SUIT_Wait_Events //= (suit-wait-event-network => int) | ||||
| SUIT_Wait_Events //= (suit-wait-event-other-device-version | ||||
| => SUIT_Wait_Event_Argument_Other_Device_Version) | ||||
| SUIT_Wait_Events //= (suit-wait-event-time => uint); Timestamp | ||||
| SUIT_Wait_Events //= (suit-wait-event-time-of-day | ||||
| => uint); Time of Day (seconds since 00:00:00) | ||||
| SUIT_Wait_Events //= (suit-wait-event-day-of-week | ||||
| => uint); Days since Sunday | ||||
| SUIT_Wait_Event_Argument_Authorisation = int ; priority | SUIT_Wait_Event_Argument_Authorisation = int ; priority | |||
| SUIT_Wait_Event_Argument_Power = int ; Power Level | SUIT_Wait_Event_Argument_Power = int ; Power Level | |||
| SUIT_Wait_Event_Argument_Network = int ; Network State | SUIT_Wait_Event_Argument_Network = int ; Network State | |||
| SUIT_Wait_Event_Argument_Other_Device_Version = [ | SUIT_Wait_Event_Argument_Other_Device_Version = [ | |||
| other-device: bstr, | other-device: bstr, | |||
| other-device-version: [+int] | other-device-version: [+int] | |||
| ] | ] | |||
| SUIT_Wait_Event_Argument_Time = uint ; Timestamp | SUIT_Wait_Event_Argument_Time = uint ; Timestamp | |||
| SUIT_Wait_Event_Argument_Time_Of_Day = uint ; Time of Day (seconds since 00:00:00) | SUIT_Wait_Event_Argument_Time_Of_Day = uint ; Time of Day (seconds since 00:00:00) | |||
| SUIT_Wait_Event_Argument_Day_Of_Week = uint ; Days since Sunday | SUIT_Wait_Event_Argument_Day_Of_Week = uint ; Days since Sunday | |||
| SUIT_Parameters //= (1 => bool) ; SUIT_Parameter_Strict_Order | SUIT_Parameters //= (suit-parameter-strict-order => bool) | |||
| SUIT_Parameters //= (2 => bool) ; SUIT_Parameter_Coerce_Condition_Failure | SUIT_Parameters //= (suit-parameter-coerce-condition-failure => bool) | |||
| SUIT_Parameters //= (3 => bstr) ; SUIT_Parameter_Vendor_ID | SUIT_Parameters //= (suit-parameter-vendor-id => bstr) | |||
| SUIT_Parameters //= (4 => bstr) ; SUIT_Parameter_Class_ID | SUIT_Parameters //= (suit-parameter-class-id => bstr) | |||
| SUIT_Parameters //= (5 => bstr) ; SUIT_Parameter_Device_ID | SUIT_Parameters //= (suit-parameter-device-id => bstr) | |||
| SUIT_Parameters //= (6 => bstr .cbor SUIT_URI_List) ; SUIT_Parameter_URI_List | SUIT_Parameters //= (suit-parameter-uri => bstr) | |||
| SUIT_Parameters //= (7 => bstr .cbor SUIT_Encryption_Info) ; SUIT_Parameter_Encryption_Info | SUIT_Parameters //= (suit-parameter-encryption-info => bstr .cbor SUIT_Encryption_Info) | |||
| SUIT_Parameters //= (8 => bstr .cbor SUIT_Compression_Info) ; SUIT_Parameter_Compression_Info | SUIT_Parameters //= (suit-parameter-compression-info => bstr .cbor SUIT_Compression_Info) | |||
| SUIT_Parameters //= (9 => bstr .cbor SUIT_Unpack_Info) ; SUIT_Parameter_Unpack_Info | SUIT_Parameters //= (suit-parameter-unpack-info => bstr .cbor SUIT_Unpack_Info) | |||
| SUIT_Parameters //= (10 => bstr .cbor SUIT_Component_Identifier) ; SUIT_Parameter_Source_Component | SUIT_Parameters //= (suit-parameter-source-component => bstr .cbor SUIT_Component_Identifier) | |||
| SUIT_Parameters //= (11 => bstr .cbor SUIT_Digest) ; SUIT_Parameter_Image_Digest | SUIT_Parameters //= (suit-parameter-image-digest => bstr .cbor SUIT_Digest) | |||
| SUIT_Parameters //= (12 => uint) ; SUIT_Parameter_Image_Size | SUIT_Parameters //= (suit-parameter-image-size => uint) | |||
| SUIT_Parameters //= (nint => int/bool/bstr) ; SUIT_Parameter_Custom | SUIT_Parameters //= (suit-parameter-uri-list => bstr .cbor SUIT_Component_URI_List) | |||
| SUIT_Parameters //= (suit-parameter-custom => int/bool/bstr) | ||||
| SUIT_URI_List = [ + [priority: int, uri: tstr] ] | SUIT_Component_URI_List = [ + [priority: int, uri: tstr] ] | |||
| SUIT_Priority_Parameter_List = [ + [priority: int, parameters: { + SUIT_Parameters }] ] | ||||
| SUIT_Encryption_Info = COSE_Encrypt_Tagged/COSE_Encrypt0_Tagged | SUIT_Encryption_Info = COSE_Encrypt_Tagged/COSE_Encrypt0_Tagged | |||
| SUIT_Compression_Info = { | SUIT_Compression_Info = { | |||
| suit-compression-algorithm => SUIT_Compression_Algorithms | suit-compression-algorithm => SUIT_Compression_Algorithms | |||
| ? suit-compression-parameters => bstr | ? suit-compression-parameters => bstr | |||
| } | } | |||
| suit-compression-algorithm = 1 | ||||
| suit-compression-parameters = 2 | ||||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_gzip | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_gzip | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_bzip2 | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_bzip2 | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_lz4 | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_lz4 | |||
| SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_lzma | SUIT_Compression_Algorithms /= SUIT_Compression_Algorithm_lzma | |||
| SUIT_Compression_Algorithm_gzip = 1 | SUIT_Compression_Algorithm_gzip = 1 | |||
| SUIT_Compression_Algorithm_bzip2 = 2 | SUIT_Compression_Algorithm_bzip2 = 2 | |||
| SUIT_Compression_Algorithm_deflate = 3 | SUIT_Compression_Algorithm_deflate = 3 | |||
| SUIT_Compression_Algorithm_lz4 = 4 | SUIT_Compression_Algorithm_lz4 = 4 | |||
| SUIT_Compression_Algorithm_lzma = 7 | SUIT_Compression_Algorithm_lzma = 7 | |||
| SUIT_Unpack_Info = { | SUIT_Unpack_Info = { | |||
| suit-unpack-algorithm => SUIT_Unpack_Algorithms | suit-unpack-algorithm => SUIT_Unpack_Algorithms | |||
| ? suit-unpack-parameters => bstr | ? suit-unpack-parameters => bstr | |||
| } | } | |||
| suit-unpack-algorithm = 1 | ||||
| suit-unpack-parameters = 2 | ||||
| SUIT_Unpack_Algorithms /= SUIT_Unpack_Algorithm_Delta | SUIT_Unpack_Algorithms /= SUIT_Unpack_Algorithm_Delta | |||
| SUIT_Unpack_Algorithms /= SUIT_Unpack_Algorithm_Hex | SUIT_Unpack_Algorithms /= SUIT_Unpack_Algorithm_Hex | |||
| SUIT_Unpack_Algorithms /= SUIT_Unpack_Algorithm_Elf | SUIT_Unpack_Algorithms /= SUIT_Unpack_Algorithm_Elf | |||
| SUIT_Unpack_Algorithm_Delta = 1 | SUIT_Unpack_Algorithm_Delta = 1 | |||
| SUIT_Unpack_Algorithm_Hex = 2 | SUIT_Unpack_Algorithm_Hex = 2 | |||
| SUIT_Unpack_Algorithm_Elf = 3 | SUIT_Unpack_Algorithm_Elf = 3 | |||
| SUIT_Text_Map = {int => tstr} | SUIT_Text_Map = {int => tstr} | |||
| suit-authentication-wrapper = 1 | ||||
| suit-manifest = 2 | ||||
| suit-manifest-encryption-info = 3 | ||||
| suit-manifest-encrypted = 4 | ||||
| suit-manifest-version = 1 | ||||
| suit-manifest-sequence-number = 2 | ||||
| suit-common = 3 | ||||
| suit-dependency-resolution = 7 | ||||
| suit-payload-fetch = 8 | ||||
| suit-install = 9 | ||||
| suit-validate = 10 | ||||
| suit-load = 11 | ||||
| suit-run = 12 | ||||
| suit-text = 13 | ||||
| suit-coswid = 14 | ||||
| suit-dependencies = 1 | ||||
| suit-components = 2 | ||||
| suit-dependency-components = 3 | ||||
| suit-common-sequence = 4 | ||||
| suit-dependency-digest = 1 | ||||
| suit-dependency-prefix = 2 | ||||
| suit-component-identifier = 1 | ||||
| suit-component-dependency-index = 2 | ||||
| suit-command-custom = nint | ||||
| suit-condition-vendor-identifier = 1 | ||||
| suit-condition-class-identifier = 2 | ||||
| suit-condition-image-match = 3 | ||||
| suit-condition-use-before = 4 | ||||
| suit-condition-component-offset = 5 | ||||
| suit-condition-custom = 6 | ||||
| suit-condition-device-identifier = 24 | ||||
| suit-condition-image-not-match = 25 | ||||
| suit-condition-minimum-battery = 26 | ||||
| suit-condition-update-authorised = 27 | ||||
| suit-condition-version = 28 | ||||
| suit-directive-set-component-index = 12 | ||||
| suit-directive-set-dependency-index = 13 | ||||
| suit-directive-abort = 14 | ||||
| suit-directive-try-each = 15 | ||||
| suit-directive-do-each = 16 ; TBD | ||||
| suit-directive-map-filter = 17 ; TBD | ||||
| suit-directive-process-dependency = 18 | ||||
| suit-directive-set-parameters = 19 | ||||
| suit-directive-override-parameters = 20 | ||||
| suit-directive-fetch = 21 | ||||
| suit-directive-copy = 22 | ||||
| suit-directive-run = 23 | ||||
| suit-directive-wait = 29 | ||||
| suit-directive-run-sequence = 30 | ||||
| suit-directive-run-with-arguments = 31 | ||||
| suit-directive-swap = 32 | ||||
| suit-wait-event-argument-authorisation = 1 | ||||
| suit-wait-event-power = 2 | ||||
| suit-wait-event-network = 3 | ||||
| suit-wait-event-other-device-version = 4 | ||||
| suit-wait-event-time = 5 | ||||
| suit-wait-event-time-of-day = 6 | ||||
| suit-wait-event-day-of-week = 7 | ||||
| suit-wait-event-authorisation = 8 | ||||
| suit-parameter-strict-order = 1 | ||||
| suit-parameter-coerce-condition-failure = 2 | ||||
| suit-parameter-vendor-id = 3 | ||||
| suit-parameter-class-id = 4 | ||||
| suit-parameter-device-id = 5 | ||||
| suit-parameter-uri = 6 | ||||
| suit-parameter-encryption-info = 7 | ||||
| suit-parameter-compression-info = 8 | ||||
| suit-parameter-unpack-info = 9 | ||||
| suit-parameter-source-component = 10 | ||||
| suit-parameter-image-digest = 11 | ||||
| suit-parameter-image-size = 12 | ||||
| suit-parameter-uri-list = 24 | ||||
| suit-parameter-uri-list-append = 25 | ||||
| suit-parameter-prioritised-parameters = 26 | ||||
| suit-parameter-custom = nint | ||||
| suit-compression-algorithm = 1 | ||||
| suit-compression-parameters = 2 | ||||
| suit-unpack-algorithm = 1 | ||||
| suit-unpack-parameters = 2 | ||||
| 13. Examples | 13. Examples | |||
| The following examples demonstrate a small subset of the | The following examples demonstrate a small subset of the | |||
| functionality of the manifest. However, despite this, even a simple | functionality of the manifest. However, despite this, even a simple | |||
| manifest processor can execute most of these manifests. | manifest processor can execute most of these manifests. | |||
| None of these examples include authentication. This is provided via | None of these examples include authentication. This is provided via | |||
| RFC 8152 [RFC8152], and is omitted for clarity. | RFC 8152 [RFC8152], and is omitted for clarity. | |||
| 13.1. Example 0: | 13.1. Example 0: | |||
| Secure boot only. | Secure boot only. | |||
| The following JSON shows the intended behaviour of the manifest. | The following JSON shows the intended behaviour of the manifest. | |||
| { | { | |||
| "structure-version": 1, | "structure-version": 1, | |||
| "sequence-number": 1, | "sequence-number": 1, | |||
| "components": [ | ||||
| { | ||||
| "id": ["Flash",78848], | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| ], | ||||
| "run-image": [ | "run-image": [ | |||
| {"directive-set-component": 0}, | { "directive-set-component": 0 }, | |||
| {"condition-image": null}, | { "condition-image": null }, | |||
| {"directive-run": null} | { "directive-run": null } | |||
| ] | ], | |||
| "common": { | ||||
| "common-sequence": [ | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| } | ||||
| ], | ||||
| "components": [ | ||||
| [ | ||||
| "Flash", | ||||
| 78848 | ||||
| ] | ||||
| ] | ||||
| } | ||||
| } | } | |||
| Converted into the SUIT manifest, this produces: | Converted into the SUIT manifest, this produces: | |||
| { | { | |||
| / auth object / 1 : None | / auth object / 1 : h'd28443a10126a1044874657374206b6579f658405e5f' | |||
| / manifest / 2 : h'a4010102010481a3018245466c61736843003401021987' | h'b84f9e9729a4d74096ad485921e842b4e320cc3fa177' | |||
| h'd0038201582000112233445566778899aabbccddeeff0123456789abcdef' | h'8c2807377e1969e42449b3261109d273df4b3ceb9a61' | |||
| h'fedcba98765432100c4a83a10b00a104f6a116f6' \ | h'06a46f0a7938de9a8441ab515b82463b39ee', | |||
| / manifest / 2 : h'a40101020103583ea2024c818245466c6173684300340104' | ||||
| h'582c8213a20b8202582000112233445566778899aabbccdd' | ||||
| h'eeff0123456789abcdeffedcba98765432100c1987d00c47' | ||||
| h'860c0003f617f6' \ | ||||
| { | { | |||
| / structure-version / 1 : 1 | / structure-version / 1 : 1, | |||
| / sequence-number / 2 : 1 | / sequence-number / 2 : 1, | |||
| / components / 4 : [ | / common / 3 : h'a2024c818245466c6173684300340104582c8213a20b82' | |||
| { | h'02582000112233445566778899aabbccddeeff01234567' | |||
| / component-identifier / 1 : [h'466c617368', h'003401'], | h'89abcdeffedcba98765432100c1987d0' \ { | |||
| / component-size / 3 : 34768 | / components / 2 : h'818245466c61736843003401' \ | |||
| / component-digest / 2 : [ | [ | |||
| / sha-256 / 1, | [h'466c617368', h'003401'], | |||
| h'00112233445566778899aabbccddeeff0123456789abcdef' | ], | |||
| h'fedcba9876543210'], | / common-sequence / 4 : h'8213a20b820258200011223344556677' | |||
| } | h'8899aabbccddeeff0123456789abcdef' | |||
| ], | h'fedcba98765432100c1987d0' \ [ | |||
| / run-image / 12 : [ | / set-vars / 19, { | |||
| {/ set-component-index / 11 : 0} | / digest / 11 : [ 2, | |||
| {/ condition-image / 4 : None} | h'00112233445566778899aabbccddeeff0123456789ab' | |||
| {/ run / 22 : None} | h'cdeffedcba9876543210' ], | |||
| / size / 12 : 34768, | ||||
| }, | ||||
| ], | ||||
| }, | ||||
| / run-image / 12 : h'860c0003f617f6' \ [ | ||||
| / set-component-index / 12, 0, | ||||
| / condition-image / 3, None, | ||||
| / run / 23, None, | ||||
| ], | ], | |||
| } | } | |||
| } | } | |||
| Total size of outer wrapper without COSE authentication object: 79 | Total size of outer wrapper without COSE authentication object: 85 | |||
| Outer: | Outer: | |||
| a201f6025849a4010102010481a3018245466c61736843003401021987d00382015820 | a201f602584fa40101020103583ea2024c818245466c6173684300340104582c8213a20b | |||
| 00112233445566778899aabbccddeeff0123456789abcdeffedcba98765432100c4a83 | 8202582000112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210 | |||
| a10b00a104f6a116f6 | 0c1987d00c47860c0003f617f6 | |||
| Total size of outer wrapper with COSE authentication object: 170 | ||||
| Signed Outer: | ||||
| a2015854d28443a10126a1044874657374206b6579f658405e5fb84f9e9729a4d74096ad | ||||
| 485921e842b4e320cc3fa1778c2807377e1969e42449b3261109d273df4b3ceb9a6106a4 | ||||
| 6f0a7938de9a8441ab515b82463b39ee02584fa40101020103583ea2024c818245466c61 | ||||
| 73684300340104582c8213a20b8202582000112233445566778899aabbccddeeff012345 | ||||
| 6789abcdeffedcba98765432100c1987d00c47860c0003f617f6 | ||||
| 13.2. Example 1: | 13.2. Example 1: | |||
| Simultaneous download and installation of payload. | Simultaneous download and installation of payload. | |||
| The following JSON shows the intended behaviour of the manifest. | The following JSON shows the intended behaviour of the manifest. | |||
| { | { | |||
| "structure-version": 1, | "structure-version": 1, | |||
| "sequence-number": 2, | "sequence-number": 2, | |||
| "components": [ | "apply-image": [ | |||
| { "directive-set-component": 0 }, | ||||
| { | { | |||
| "id": ["Flash",78848], | "directive-set-var": { | |||
| "digest": "00112233445566778899aabbccddeeff" | "uri": "http://example.com/file.bin" | |||
| "0123456789abcdeffedcba9876543210", | } | |||
| "size": 34768 | }, | |||
| } | { "directive-fetch": null } | |||
| ], | ], | |||
| "apply-image": [ | "common": { | |||
| {"directive-set-component": 0}, | "common-sequence": [ | |||
| {"directive-set-var": { | { | |||
| "uris": [[ 0, "http://example.com/file.bin"]] | "directive-set-var": { | |||
| }}, | "digest": "00112233445566778899aabbccddeeff" | |||
| {"directive-fetch": null} | "0123456789abcdeffedcba9876543210", | |||
| ] | "size": 34768 | |||
| } | ||||
| } | ||||
| ], | ||||
| "components": [ | ||||
| [ | ||||
| "Flash", | ||||
| 78848 | ||||
| ] | ||||
| ] | ||||
| } | ||||
| } | } | |||
| Converted into the SUIT manifest, this produces: | Converted into the SUIT manifest, this produces: | |||
| { | { | |||
| / auth object / 1 : None | / auth object / 1 : h'd28443a10126a1044874657374206b6579f658403d4e' | |||
| / manifest / 2 : h'a4010102020481a3018245466c61736843003401021987' | h'9ff1ca8803a81ae1e2b13df28c527a4d6975e860035e' | |||
| h'd0038201582000112233445566778899aabbccddeeff0123456789abcdef' | h'e9a88576b5e6f2bf12f33017e88157bcff58d712e7f8' | |||
| h'fedcba987654321009582d83a10b00a110a1065820818200781b68747470' | h'010821ae0f82f78eb681b61697345e655cf4', | |||
| h'3a2f2f6578616d706c652e636f6d2f66696c652e62696ea114f6' \ | / manifest / 2 : h'a40101020203583ea2024c818245466c6173684300340104' | |||
| h'582c8213a20b8202582000112233445566778899aabbccdd' | ||||
| h'eeff0123456789abcdeffedcba98765432100c1987d00958' | ||||
| h'25860c0013a106781b687474703a2f2f6578616d706c652e' | ||||
| h'636f6d2f66696c652e62696e15f6' \ | ||||
| { | { | |||
| / structure-version / 1 : 1 | / structure-version / 1 : 1, | |||
| / sequence-number / 2 : 2 | / sequence-number / 2 : 2, | |||
| / components / 4 : [ | / common / 3 : h'a2024c818245466c6173684300340104582c8213a20b82' | |||
| { | h'02582000112233445566778899aabbccddeeff01234567' | |||
| / component-identifier / 1 : [h'466c617368', h'003401'], | h'89abcdeffedcba98765432100c1987d0' \ { | |||
| / component-size / 3 : 34768 | / components / 2 : h'818245466c61736843003401' \ | |||
| / component-digest / 2 : [ | [ | |||
| / sha-256 / 1, | [h'466c617368', h'003401'], | |||
| h'00112233445566778899aabbccddeeff' | ], | |||
| h'0123456789abcdeffedcba9876543210' | / common-sequence / 4 : h'8213a20b820258200011223344556677' | |||
| ], | h'8899aabbccddeeff0123456789abcdef' | |||
| } | h'fedcba98765432100c1987d0' \ [ | |||
| ], | / set-vars / 19, { | |||
| / apply-image / 9 : [ | / digest / 11 : [ 2, | |||
| {/ set-component-index / 11 : 0} | h'00112233445566778899aabbccddeeff0123456789ab' | |||
| {/ set-vars / 16 : { | h'cdeffedcba9876543210' ], | |||
| / uris / 6 : h'818200781b687474703a2f2f6578616d706c' | / size / 12 : 34768, | |||
| h'652e636f6d2f66696c652e62696e' / | }, | |||
| [[0, 'http://example.com/file.bin']] / | ], | |||
| }}, | }, | |||
| {/ fetch / 20 : None} | / apply-image / 9 : h'860c0013a106781b687474703a2f2f6578616d70' | |||
| h'6c652e636f6d2f66696c652e62696e15f6' \ [ | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / uri / 6 : http://example.com/file.bin, | ||||
| }, | ||||
| / fetch / 21, None, | ||||
| ], | ], | |||
| } | } | |||
| } | } | |||
| Total size of outer wrapper without COSE authentication object: 115 | Total size of outer wrapper without COSE authentication object: 116 | |||
| Outer: | Outer: | |||
| a201f602586da4010102020481a3018245466c61736843003401021987d00382015820 | a201f602586ea40101020203583ea2024c818245466c6173684300340104582c8213a20b | |||
| 00112233445566778899aabbccddeeff0123456789abcdeffedcba987654321009582d | 8202582000112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210 | |||
| 83a10b00a110a1065820818200781b687474703a2f2f6578616d706c652e636f6d2f66 | 0c1987d0095825860c0013a106781b687474703a2f2f6578616d706c652e636f6d2f6669 | |||
| 696c652e62696ea114f6 | 6c652e62696e15f6 | |||
| Total size of outer wrapper with COSE authentication object: 201 | ||||
| Signed Outer: | ||||
| a2015854d28443a10126a1044874657374206b6579f658403d4e9ff1ca8803a81ae1e2b1 | ||||
| 3df28c527a4d6975e860035ee9a88576b5e6f2bf12f33017e88157bcff58d712e7f80108 | ||||
| 21ae0f82f78eb681b61697345e655cf402586ea40101020203583ea2024c818245466c61 | ||||
| 73684300340104582c8213a20b8202582000112233445566778899aabbccddeeff012345 | ||||
| 6789abcdeffedcba98765432100c1987d0095825860c0013a106781b687474703a2f2f65 | ||||
| 78616d706c652e636f6d2f66696c652e62696e15f6 | ||||
| 13.3. Example 2: | 13.3. Example 2: | |||
| Compatibility test, simultaneous download and installation, and | Compatibility test, simultaneous download and installation, and | |||
| secure boot. | secure boot. | |||
| The following JSON shows the intended behaviour of the manifest. | The following JSON shows the intended behaviour of the manifest. | |||
| { | { | |||
| "structure-version": 1, | "structure-version": 1, | |||
| "sequence-number": 3, | "sequence-number": 3, | |||
| "components": [ | "common": { | |||
| { | "common-sequence": [ | |||
| "id": [ | { | |||
| "directive-set-var": { | ||||
| "vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe", | ||||
| "class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45", | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| }, | ||||
| { "condition-vendor-id": null }, | ||||
| { "condition-class-id": null } | ||||
| ], | ||||
| "components": [ | ||||
| [ | ||||
| "Flash", | "Flash", | |||
| 78848 | 78848 | |||
| ], | ] | |||
| "digest": "00112233445566778899aabbccddeeff" | ] | |||
| "0123456789abcdeffedcba9876543210", | }, | |||
| "size": 34768 | ||||
| } | ||||
| ], | ||||
| "common": [ | ||||
| {"condition-vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe"}, | ||||
| {"condition-class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45"} | ||||
| ], | ||||
| "apply-image": [ | "apply-image": [ | |||
| {"directive-set-component": 0}, | { "directive-set-component": 0 }, | |||
| {"directive-set-var": { | { | |||
| "uris": [[ 0, "http://example.com/file.bin" ]] | "directive-set-var": { | |||
| }}, | "uri": "http://example.com/file.bin" | |||
| {"directive-fetch": null} | } | |||
| }, | ||||
| { "directive-fetch": null } | ||||
| ], | ], | |||
| "run-image": [ | "run-image": [ | |||
| {"directive-set-component": 0}, | { "directive-set-component": 0 }, | |||
| {"condition-image": null}, | { "condition-image": null }, | |||
| {"directive-run": null} | { "directive-run": null } | |||
| ] | ] | |||
| } | } | |||
| Converted into the SUIT manifest, this produces: | Converted into the SUIT manifest, this produces: | |||
| { | { | |||
| / auth object / 1 : None | / auth object / 1 : h'd28443a10126a1044874657374206b6579f65840e637' | |||
| / manifest / 2 : h'a6010102030481a3018245466c61736843003401021987' | h'5a57596cb4a35a90a30b4099bccf7e2352a9829bf7bb' | |||
| h'd0038201582000112233445566778899aabbccddeeff0123456789abcdef' | h'1b56cfc0e713955be4fd360e366c94e32dfc344695b1' | |||
| h'fedcba987654321006582782a10150fa6b4a53d5ad5fdfbe9de663e4d41f' | h'20b2c59732b2e3f079fc2693c5a459d9ce44', | |||
| h'fea102501492af1425695e48bf429b2d51f2ab4509582d83a10b00a110a1' | / manifest / 2 : h'a501010203035866a2024c818245466c6173684300340104' | |||
| h'065820818200781b687474703a2f2f6578616d706c652e636f6d2f66696c' | h'58548613a40350fa6b4a53d5ad5fdfbe9de663e4d41ffe04' | |||
| h'652e62696ea114f60c4a83a10b00a104f6a116f6' \ | h'501492af1425695e48bf429b2d51f2ab450b820258200011' | |||
| h'2233445566778899aabbccddeeff0123456789abcdeffedc' | ||||
| h'ba98765432100c1987d001f602f6095825860c0013a10678' | ||||
| h'1b687474703a2f2f6578616d706c652e636f6d2f66696c65' | ||||
| h'2e62696e15f60c47860c0003f617f6' \ | ||||
| { | { | |||
| / structure-version / 1 : 1 | / structure-version / 1 : 1, | |||
| / sequence-number / 2 : 3 | / sequence-number / 2 : 3, | |||
| / components / 4 : [ | / common / 3 : h'a2024c818245466c617368430034010458548613a40350' | |||
| { | h'fa6b4a53d5ad5fdfbe9de663e4d41ffe04501492af1425' | |||
| / component-identifier / 1 : [h'466c617368', h'003401'], | h'695e48bf429b2d51f2ab450b8202582000112233445566' | |||
| / component-size / 3 : 34768 | h'778899aabbccddeeff0123456789abcdeffedcba987654' | |||
| / component-digest / 2 : [ | h'32100c1987d001f602f6' \ { | |||
| / sha-256 / 1, | / components / 2 : h'818245466c61736843003401' \ | |||
| h'00112233445566778899aabbccddeeff' | [ | |||
| h'0123456789abcdeffedcba9876543210' | [h'466c617368', h'003401'], | |||
| ], | ], | |||
| } | / common-sequence / 4 : h'8613a40350fa6b4a53d5ad5fdfbe9de6' | |||
| ], | h'63e4d41ffe04501492af1425695e48bf' | |||
| / common / 6 : [ | h'429b2d51f2ab450b8202582000112233' | |||
| {/ vendor-id / 1 : h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' \ | h'445566778899aabbccddeeff01234567' | |||
| fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe}, | h'89abcdeffedcba98765432100c1987d0' | |||
| {/ class-id / 2 : h'1492af1425695e48bf429b2d51f2ab45' \ | h'01f602f6' \ [ | |||
| 1492af14-2569-5e48-bf42-9b2d51f2ab45} | / set-vars / 19, { | |||
| ], | / vendor-id / 3 : h'fa6b4a53d5ad5fdfbe9de663e4d41f' | |||
| / apply-image / 9 : [ | h'fe', | |||
| {/ set-component-index / 11 : 0} | / class-id / 4 : h'1492af1425695e48bf429b2d51f2ab45', | |||
| {/ set-vars / 16 : { | / digest / 11 : [ 2, | |||
| / uris / 6 : h'818200781b687474703a2f2f6578616d706c65' | h'00112233445566778899aabbccddeeff0123456789ab' | |||
| h'2e636f6d2f66696c652e62696e' / | h'cdeffedcba9876543210' ], | |||
| [[0, 'http://example.com/file.bin']] / | / size / 12 : 34768, | |||
| }}, | }, | |||
| {/ fetch / 20 : None} | / condition-vendor-id / 1, None, | |||
| / condition-class-id / 2, None, | ||||
| ], | ||||
| }, | ||||
| / apply-image / 9 : h'860c0013a106781b687474703a2f2f6578616d70' | ||||
| h'6c652e636f6d2f66696c652e62696e15f6' \ [ | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / uri / 6 : http://example.com/file.bin, | ||||
| }, | ||||
| / fetch / 21, None, | ||||
| ], | ], | |||
| / run-image / 12 : [ | / run-image / 12 : h'860c0003f617f6' \ [ | |||
| {/ set-component-index / 11 : 0} | / set-component-index / 12, 0, | |||
| {/ condition-image / 4 : None} | / condition-image / 3, None, | |||
| {/ run / 22 : None} | / run / 23, None, | |||
| ], | ], | |||
| } | } | |||
| } | } | |||
| Total size of outer wrapper without COSE authentication object: 169 | Total size of outer wrapper without COSE authentication object: 165 | |||
| Outer: | Outer: | |||
| a201f60258a3a6010102030481a3018245466c61736843003401021987d00382015820 | a201f602589fa501010203035866a2024c818245466c617368430034010458548613a403 | |||
| 00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210065827 | 50fa6b4a53d5ad5fdfbe9de663e4d41ffe04501492af1425695e48bf429b2d51f2ab450b | |||
| 82a10150fa6b4a53d5ad5fdfbe9de663e4d41ffea102501492af1425695e48bf429b2d | 8202582000112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210 | |||
| 51f2ab4509582d83a10b00a110a1065820818200781b687474703a2f2f6578616d706c | 0c1987d001f602f6095825860c0013a106781b687474703a2f2f6578616d706c652e636f | |||
| 652e636f6d2f66696c652e62696ea114f60c4a83a10b00a104f6a116f6 | 6d2f66696c652e62696e15f60c47860c0003f617f6 | |||
| Total size of outer wrapper with COSE authentication object: 250 | ||||
| Signed Outer: | ||||
| a2015854d28443a10126a1044874657374206b6579f65840e6375a57596cb4a35a90a30b | ||||
| 4099bccf7e2352a9829bf7bb1b56cfc0e713955be4fd360e366c94e32dfc344695b120b2 | ||||
| c59732b2e3f079fc2693c5a459d9ce4402589fa501010203035866a2024c818245466c61 | ||||
| 7368430034010458548613a40350fa6b4a53d5ad5fdfbe9de663e4d41ffe04501492af14 | ||||
| 25695e48bf429b2d51f2ab450b8202582000112233445566778899aabbccddeeff012345 | ||||
| 6789abcdeffedcba98765432100c1987d001f602f6095825860c0013a106781b68747470 | ||||
| 3a2f2f6578616d706c652e636f6d2f66696c652e62696e15f60c47860c0003f617f6 | ||||
| 13.4. Example 3: | 13.4. Example 3: | |||
| Compatibility test, simultaneous download and installation, load from | Compatibility test, simultaneous download and installation, load from | |||
| external storage, and secure boot. | external storage, and secure boot. | |||
| The following JSON shows the intended behaviour of the manifest. | The following JSON shows the intended behaviour of the manifest. | |||
| { | { | |||
| "structure-version": 1, | "structure-version": 1, | |||
| "sequence-number": 4, | "sequence-number": 4, | |||
| "components": [ | "common": { | |||
| "common-sequence": [ | ||||
| { | ||||
| "directive-set-var": { | ||||
| "vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe", | ||||
| "class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45" | ||||
| } | ||||
| }, | ||||
| { "directive-set-component": 0 }, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| }, | ||||
| { "directive-set-component": 1 }, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| }, | ||||
| { "condition-vendor-id": null }, | ||||
| { "condition-class-id": null } | ||||
| ], | ||||
| "components": [ | ||||
| [ | ||||
| "Flash", | ||||
| 78848 | ||||
| ], | ||||
| [ | ||||
| "RAM", | ||||
| 1024 | ||||
| ] | ||||
| ] | ||||
| }, | ||||
| "apply-image": [ | ||||
| { "directive-set-component": 0 }, | ||||
| { | { | |||
| "id": ["Flash",78848], | "directive-set-var": { | |||
| "digest": "00112233445566778899aabbccddeeff" | "uri": "http://example.com/file.bin" | |||
| "0123456789abcdeffedcba9876543210", | } | |||
| "size": 34768 | ||||
| }, | }, | |||
| { | { "directive-fetch": null } | |||
| "id": ["RAM",1024], | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| ], | ||||
| "common": [ | ||||
| {"condition-vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe"}, | ||||
| {"condition-class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45"} | ||||
| ], | ||||
| "apply-image": [ | ||||
| {"directive-set-component": 0}, | ||||
| {"directive-set-var": { | ||||
| "uris": [[0, "http://example.com/file.bin"]] | ||||
| }}, | ||||
| {"directive-fetch": null} | ||||
| ], | ], | |||
| "run-image": [ | "run-image": [ | |||
| {"directive-set-component": 0}, | { "directive-set-component": 0 }, | |||
| {"condition-image": null}, | { "condition-image": null }, | |||
| {"directive-set-component": 1}, | { "directive-set-component": 1 }, | |||
| {"directive-set-var": { | { | |||
| "source-index": 0 | "directive-set-var": { | |||
| }}, | "source-index": 0 | |||
| {"directive-fetch": null}, | } | |||
| {"condition-image": null}, | }, | |||
| {"directive-run": null} | { "directive-fetch": null }, | |||
| { "condition-image": null }, | ||||
| { "directive-run": null } | ||||
| ] | ] | |||
| } | } | |||
| Converted into the SUIT manifest, this produces: | Converted into the SUIT manifest, this produces: | |||
| { | { | |||
| / auth object / 1 : None | / auth object / 1 : h'd28443a10126a1044874657374206b6579f65840ef4b' | |||
| / manifest / 2 : h'a6010102040482a3018245466c61736843003401021987' | h'399c55131a51bebafb46da6e6b79c59417fdefea7b87' | |||
| h'd0038201582000112233445566778899aabbccddeeff0123456789abcdef' | h'e4234bf8f978094e3092c8506d8a912fbacaec5ba365' | |||
| h'fedcba9876543210a301824352414d420004021987d00382015820001122' | h'24ae0e4bb1aa14197e4d0afe10ba47e29e5a', | |||
| h'33445566778899aabbccddeeff0123456789abcdeffedcba987654321006' | / manifest / 2 : h'a50101020403589fa20254828245466c6173684300340182' | |||
| h'582782a10150fa6b4a53d5ad5fdfbe9de663e4d41ffea102501492af1425' | h'4352414d4200040458858e13a20350fa6b4a53d5ad5fdfbe' | |||
| h'695e48bf429b2d51f2ab4509582d83a10b00a110a1065820818200781b68' | h'9de663e4d41ffe04501492af1425695e48bf429b2d51f2ab' | |||
| h'7474703a2f2f6578616d706c652e636f6d2f66696c652e62696ea114f60c' | h'450c0013a20b8202582000112233445566778899aabbccdd' | |||
| h'581887a10b00a104f6a10b01a110a10a00a114f6a104f6a116f6' \ | h'eeff0123456789abcdeffedcba98765432100c1987d00c01' | |||
| h'13a20b8202582000112233445566778899aabbccddeeff01' | ||||
| h'23456789abcdeffedcba98765432100c1987d001f602f609' | ||||
| h'5825860c0013a106781b687474703a2f2f6578616d706c65' | ||||
| h'2e636f6d2f66696c652e62696e15f60c518e0c0003f60c01' | ||||
| h'13a10a0015f603f617f6' \ | ||||
| { | { | |||
| / structure-version / 1 : 1 | / structure-version / 1 : 1, | |||
| / sequence-number / 2 : 4 | / sequence-number / 2 : 4, | |||
| / components / 4 : [ | / common / 3 : h'a20254828245466c61736843003401824352414d420004' | |||
| { | h'0458858e13a20350fa6b4a53d5ad5fdfbe9de663e4d41f' | |||
| / component-identifier / 1 : [h'466c617368', h'003401'], | h'fe04501492af1425695e48bf429b2d51f2ab450c0013a2' | |||
| / component-size / 3 : 34768 | h'0b8202582000112233445566778899aabbccddeeff0123' | |||
| / component-digest / 2 : [ | h'456789abcdeffedcba98765432100c1987d00c0113a20b' | |||
| / sha-256 / 1, | h'8202582000112233445566778899aabbccddeeff012345' | |||
| h'00112233445566778899aabbccddeeff' | h'6789abcdeffedcba98765432100c1987d001f602f6' \ { | |||
| h'0123456789abcdeffedcba9876543210' | / components / 2 : h'828245466c61736843003401824352414d4200' | |||
| ], | h'04' \ | |||
| [ | ||||
| [h'466c617368', h'003401'], | ||||
| [h'52414d', h'0004'], | ||||
| ], | ||||
| / common-sequence / 4 : h'8e13a20350fa6b4a53d5ad5fdfbe9de6' | ||||
| h'63e4d41ffe04501492af1425695e48bf' | ||||
| h'429b2d51f2ab450c0013a20b82025820' | ||||
| h'00112233445566778899aabbccddeeff' | ||||
| h'0123456789abcdeffedcba9876543210' | ||||
| h'0c1987d00c0113a20b82025820001122' | ||||
| h'33445566778899aabbccddeeff012345' | ||||
| h'6789abcdeffedcba98765432100c1987' | ||||
| h'd001f602f6' \ [ | ||||
| / set-vars / 19, { | ||||
| / vendor-id / 3 : h'fa6b4a53d5ad5fdfbe9de663e4d41f' | ||||
| h'fe', | ||||
| / class-id / 4 : h'1492af1425695e48bf429b2d51f2ab45', | ||||
| }, | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / digest / 11 : [ 2, | ||||
| h'00112233445566778899aabbccddeeff0123456789ab' | ||||
| h'cdeffedcba9876543210' ], | ||||
| / size / 12 : 34768, | ||||
| }, | ||||
| / set-component-index / 12, 1, | ||||
| / set-vars / 19, { | ||||
| / digest / 11 : [ 2, | ||||
| h'00112233445566778899aabbccddeeff0123456789ab' | ||||
| h'cdeffedcba9876543210' ], | ||||
| / size / 12 : 34768, | ||||
| }, | ||||
| / condition-vendor-id / 1, None, | ||||
| / condition-class-id / 2, None, | ||||
| ], | ||||
| }, | ||||
| / apply-image / 9 : h'860c0013a106781b687474703a2f2f6578616d70' | ||||
| h'6c652e636f6d2f66696c652e62696e15f6' \ [ | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / uri / 6 : http://example.com/file.bin, | ||||
| }, | }, | |||
| { | / fetch / 21, None, | |||
| / component-identifier / 1 : [h'52414d', h'0004'], | ||||
| / component-size / 3 : 34768 | ||||
| / component-digest / 2 : [ | ||||
| / sha-256 / 1, | ||||
| h'00112233445566778899aabbccddeeff' | ||||
| h'0123456789abcdeffedcba9876543210' | ||||
| ], | ||||
| } | ||||
| ], | ||||
| / common / 6 : [ | ||||
| {/ vendor-id / 1 : h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' \ | ||||
| fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe} | ||||
| {/ class-id / 2 : h'1492af1425695e48bf429b2d51f2ab45' \ | ||||
| 1492af14-2569-5e48-bf42-9b2d51f2ab45} | ||||
| ], | ||||
| / apply-image / 9 : [ | ||||
| {/ set-component-index / 11 : 0} | ||||
| {/ set-vars / 16 : { | ||||
| / uris / 6 : h'818200781b687474703a2f2f6578616d706c65' | ||||
| h'2e636f6d2f66696c652e62696e' / | ||||
| [[0, 'http://example.com/file.bin']] / | ||||
| }}, | ||||
| {/ fetch / 20 : None} | ||||
| ], | ], | |||
| / run-image / 12 : [ | / run-image / 12 : h'8e0c0003f60c0113a10a0015f603f617f6' \ [ | |||
| {/ set-component-index / 11 : 0} | / set-component-index / 12, 0, | |||
| {/ condition-image / 4 : None} | / condition-image / 3, None, | |||
| {/ set-component-index / 11 : 1} | / set-component-index / 12, 1, | |||
| {/ set-vars / 16 : { | / set-vars / 19, { | |||
| / source-component / 10 : 0 | / source-component / 10 : 0, | |||
| }}, | }, | |||
| {/ fetch / 20 : None} | / fetch / 21, None, | |||
| {/ condition-image / 4 : None} | / condition-image / 3, None, | |||
| {/ run / 22 : None} | / run / 23, None, | |||
| ], | ], | |||
| } | } | |||
| } | } | |||
| Total size of outer wrapper without COSE authentication object: 235 | Total size of outer wrapper without COSE authentication object: 232 | |||
| Outer: | Outer: | |||
| a201f60258e5a6010102040482a3018245466c61736843003401021987d00382015820 | a201f60258e2a50101020403589fa20254828245466c61736843003401824352414d4200 | |||
| 00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210a30182 | 040458858e13a20350fa6b4a53d5ad5fdfbe9de663e4d41ffe04501492af1425695e48bf | |||
| 4352414d420004021987d0038201582000112233445566778899aabbccddeeff012345 | 429b2d51f2ab450c0013a20b8202582000112233445566778899aabbccddeeff01234567 | |||
| 6789abcdeffedcba987654321006582782a10150fa6b4a53d5ad5fdfbe9de663e4d41f | 89abcdeffedcba98765432100c1987d00c0113a20b8202582000112233445566778899aa | |||
| fea102501492af1425695e48bf429b2d51f2ab4509582d83a10b00a110a10658208182 | bbccddeeff0123456789abcdeffedcba98765432100c1987d001f602f6095825860c0013 | |||
| 00781b687474703a2f2f6578616d706c652e636f6d2f66696c652e62696ea114f60c58 | a106781b687474703a2f2f6578616d706c652e636f6d2f66696c652e62696e15f60c518e | |||
| 1887a10b00a104f6a10b01a110a10a00a114f6a104f6a116f6 | 0c0003f60c0113a10a0015f603f617f6 | |||
| Total size of outer wrapper with COSE authentication object: 317 | ||||
| Signed Outer: | ||||
| a2015854d28443a10126a1044874657374206b6579f65840ef4b399c55131a51bebafb46 | ||||
| da6e6b79c59417fdefea7b87e4234bf8f978094e3092c8506d8a912fbacaec5ba36524ae | ||||
| 0e4bb1aa14197e4d0afe10ba47e29e5a0258e2a50101020403589fa20254828245466c61 | ||||
| 736843003401824352414d4200040458858e13a20350fa6b4a53d5ad5fdfbe9de663e4d4 | ||||
| 1ffe04501492af1425695e48bf429b2d51f2ab450c0013a20b8202582000112233445566 | ||||
| 778899aabbccddeeff0123456789abcdeffedcba98765432100c1987d00c0113a20b8202 | ||||
| 582000112233445566778899aabbccddeeff0123456789abcdeffedcba98765432100c19 | ||||
| 87d001f602f6095825860c0013a106781b687474703a2f2f6578616d706c652e636f6d2f | ||||
| 66696c652e62696e15f60c518e0c0003f60c0113a10a0015f603f617f6 | ||||
| 13.5. Example 4: | 13.5. Example 4: | |||
| Compatibility test, simultaneous download and installation, load and | Compatibility test, simultaneous download and installation, load and | |||
| decompress from external storage, and secure boot. | decompress from external storage, and secure boot. | |||
| The following JSON shows the intended behaviour of the manifest. | The following JSON shows the intended behaviour of the manifest. | |||
| { | { | |||
| "structure-version": 1, | "structure-version": 1, | |||
| "sequence-number": 5, | "sequence-number": 5, | |||
| "components": [ | "common": { | |||
| "common-sequence": [ | ||||
| { | ||||
| "directive-set-var": { | ||||
| "vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe", | ||||
| "class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45" | ||||
| } | ||||
| }, | ||||
| { "directive-set-component": 0 }, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| }, | ||||
| { "directive-set-component": 1 }, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "0123456789abcdeffedcba9876543210" | ||||
| "00112233445566778899aabbccddeeff", | ||||
| "size": 34768 | ||||
| } | ||||
| }, | ||||
| { "condition-vendor-id": null }, | ||||
| { "condition-class-id": null } | ||||
| ], | ||||
| "components": [ | ||||
| [ | ||||
| "Flash", | ||||
| 78848 | ||||
| ], | ||||
| [ | ||||
| "RAM", | ||||
| 1024 | ||||
| ] | ||||
| ] | ||||
| }, | ||||
| "apply-image": [ | ||||
| { "directive-set-component": 0 }, | ||||
| { | { | |||
| "id": ["Flash",78848], | "directive-set-var": { | |||
| "digest": "00112233445566778899aabbccddeeff" | "uri": "http://example.com/file.bin" | |||
| "0123456789abcdeffedcba9876543210", | } | |||
| "size": 34768 | ||||
| }, | }, | |||
| { | { "directive-fetch": null } | |||
| "id": ["RAM",1024], | ||||
| "digest": "0123456789abcdeffedcba9876543210" | ||||
| "00112233445566778899aabbccddeeff", | ||||
| "size": 34768 | ||||
| } | ||||
| ], | ||||
| "common": [ | ||||
| {"condition-vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe"}, | ||||
| {"condition-class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45"} | ||||
| ], | ||||
| "apply-image": [ | ||||
| {"directive-set-component": 0}, | ||||
| {"directive-set-var": { | ||||
| "uris": [[ 0, "http://example.com/file.bin" ]] | ||||
| }}, | ||||
| {"directive-fetch": null} | ||||
| ], | ], | |||
| "load-image": [ | "load-image": [ | |||
| {"directive-set-component": 0}, | { "directive-set-component": 0 }, | |||
| {"condition-image": null}, | { "condition-image": null }, | |||
| {"directive-set-component": 1}, | { "directive-set-component": 1 }, | |||
| {"directive-set-var": { | { | |||
| "source-index": 0, | "directive-set-var": { | |||
| "compression-info": { | "source-index": 0, | |||
| "algorithm": "gzip" | "compression-info": { | |||
| "algorithm": "gzip" | ||||
| } | ||||
| } | } | |||
| }}, | }, | |||
| {"directive-copy": null} | { "directive-copy": null } | |||
| ], | ], | |||
| "run-image": [ | "run-image": [ | |||
| {"condition-image": null}, | { "condition-image": null }, | |||
| {"directive-run": null} | { "directive-run": null } | |||
| ] | ] | |||
| } | } | |||
| Converted into the SUIT manifest, this produces: | Converted into the SUIT manifest, this produces: | |||
| { | { | |||
| / auth object / 1 : None | / auth object / 1 : h'd28443a10126a1044874657374206b6579f65840e90d' | |||
| / manifest / 2 : h'a7010102050482a3018245466c61736843003401021987' | h'ab6e502bad8132adf86b4d78defaebac64fa6c6b2882' | |||
| h'd0038201582000112233445566778899aabbccddeeff0123456789abcdef' | h'd12b36f492b14ce75819ed3524de4d66ddfd5e1d80a5' | |||
| h'fedcba9876543210a301824352414d420004021987d00382015820012345' | h'984004c1ac9b003b2da32589583a93c541dd', | |||
| h'6789abcdeffedcba987654321000112233445566778899aabbccddeeff06' | / manifest / 2 : h'a60101020503589fa20254828245466c6173684300340182' | |||
| h'582782a10150fa6b4a53d5ad5fdfbe9de663e4d41ffea102501492af1425' | h'4352414d4200040458858e13a20350fa6b4a53d5ad5fdfbe' | |||
| h'695e48bf429b2d51f2ab4509582d83a10b00a110a1065820818200781b68' | h'9de663e4d41ffe04501492af1425695e48bf429b2d51f2ab' | |||
| h'7474703a2f2f6578616d706c652e636f6d2f66696c652e62696ea114f60b' | h'450c0013a20b8202582000112233445566778899aabbccdd' | |||
| h'5585a10b00a104f6a10b01a110a20841f60a00a115f60c4782a104f6a116' | h'eeff0123456789abcdeffedcba98765432100c1987d00c01' | |||
| h'f6' \ | h'13a20b820258200123456789abcdeffedcba987654321000' | |||
| h'112233445566778899aabbccddeeff0c1987d001f602f609' | ||||
| h'5825860c0013a106781b687474703a2f2f6578616d706c65' | ||||
| h'2e636f6d2f66696c652e62696e15f60b528a0c0003f60c01' | ||||
| h'13a20843a101010a0016f60c458403f617f6' \ | ||||
| { | { | |||
| / structure-version / 1 : 1 | / structure-version / 1 : 1, | |||
| / sequence-number / 2 : 5 | / sequence-number / 2 : 5, | |||
| / components / 4 : [ | / common / 3 : h'a20254828245466c61736843003401824352414d420004' | |||
| { | h'0458858e13a20350fa6b4a53d5ad5fdfbe9de663e4d41f' | |||
| / component-identifier / 1 : [h'466c617368', h'003401'], | h'fe04501492af1425695e48bf429b2d51f2ab450c0013a2' | |||
| / component-size / 3 : 34768 | h'0b8202582000112233445566778899aabbccddeeff0123' | |||
| / component-digest / 2 : [ | h'456789abcdeffedcba98765432100c1987d00c0113a20b' | |||
| / sha-256 / 1, | h'820258200123456789abcdeffedcba9876543210001122' | |||
| h'00112233445566778899aabbccddeeff' | h'33445566778899aabbccddeeff0c1987d001f602f6' \ { | |||
| h'0123456789abcdeffedcba9876543210' | / components / 2 : h'828245466c61736843003401824352414d4200' | |||
| ], | h'04' \ | |||
| }, | [ | |||
| { | [h'466c617368', h'003401'], | |||
| / component-identifier / 1 : [h'52414d', h'0004'], | [h'52414d', h'0004'], | |||
| / component-size / 3 : 34768 | ], | |||
| / component-digest / 2 : [ | / common-sequence / 4 : h'8e13a20350fa6b4a53d5ad5fdfbe9de6' | |||
| / sha-256 / 1, | h'63e4d41ffe04501492af1425695e48bf' | |||
| h'0123456789abcdeffedcba9876543210' | h'429b2d51f2ab450c0013a20b82025820' | |||
| h'00112233445566778899aabbccddeeff' | h'00112233445566778899aabbccddeeff' | |||
| ], | h'0123456789abcdeffedcba9876543210' | |||
| } | h'0c1987d00c0113a20b82025820012345' | |||
| ], | h'6789abcdeffedcba9876543210001122' | |||
| / common / 6 : [ | h'33445566778899aabbccddeeff0c1987' | |||
| {/ vendor-id / 1 : h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' \ | h'd001f602f6' \ [ | |||
| fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe}, | / set-vars / 19, { | |||
| {/ class-id / 2 : h'1492af1425695e48bf429b2d51f2ab45' \ | / vendor-id / 3 : h'fa6b4a53d5ad5fdfbe9de663e4d41f' | |||
| 1492af14-2569-5e48-bf42-9b2d51f2ab45} | h'fe', | |||
| ], | ||||
| / apply-image / 9 : [ | ||||
| {/ set-component-index / 11 : 0} | ||||
| {/ set-vars / 16 : { | ||||
| / uris / 6 : h'818200781b687474703a2f2f6578616d706c65' | ||||
| h'2e636f6d2f66696c652e62696e' / | ||||
| [[0, 'http://example.com/file.bin']] / | ||||
| }}, | ||||
| {/ fetch / 20 : None} | ||||
| / class-id / 4 : h'1492af1425695e48bf429b2d51f2ab45', | ||||
| }, | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / digest / 11 : [ 2, | ||||
| h'00112233445566778899aabbccddeeff0123456789ab' | ||||
| h'cdeffedcba9876543210' ] | ||||
| / size / 12 : 34768 | ||||
| }, | ||||
| / set-component-index / 12, 1, | ||||
| / set-vars / 19, { | ||||
| / digest / 11 : [ 2, | ||||
| h'0123456789abcdeffedcba9876543210001122334455' | ||||
| h'66778899aabbccddeeff' ], | ||||
| / size / 12 : 34768, | ||||
| }, | ||||
| / condition-vendor-id / 1, None, | ||||
| / condition-class-id / 2, None, | ||||
| ], | ||||
| }, | ||||
| / apply-image / 9 : h'860c0013a106781b687474703a2f2f6578616d70' | ||||
| h'6c652e636f6d2f66696c652e62696e15f6' \ [ | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / uri / 6 : http://example.com/file.bin, | ||||
| }, | ||||
| / fetch / 21, None, | ||||
| ], | ], | |||
| / load-image / 11 : [ | / load-image / 11 : h'8a0c0003f60c0113a20843a101010a0016f6' \ [ | |||
| {/ set-component-index / 11 : 0} | / set-component-index / 12, 0, | |||
| {/ condition-image / 4 : None} | / condition-image / 3, None, | |||
| {/ set-component-index / 11 : 1} | / set-component-index / 12, 1, | |||
| {/ set-vars / 16 : { | / set-vars / 19, { | |||
| / unknown / 8 : b'\xf6' | / compression-info / 8 : h'a10101', | |||
| / source-component / 10 : 0 | / source-component / 10 : 0, | |||
| }}, | }, | |||
| {/ copy / 21 : None} | / copy / 22, None, | |||
| ], | ], | |||
| / run-image / 12 : [ | / run-image / 12 : h'8403f617f6' \ [ | |||
| {/ condition-image / 4 : None} | / condition-image / 3, None, | |||
| {/ run / 22 : None} | / run / 23, None, | |||
| ], | ], | |||
| } | } | |||
| } | } | |||
| Total size of outer wrapper without COSE authentication object: 240 | Total size of outer wrapper without COSE authentication object: 240 | |||
| Outer: | Outer: | |||
| a201f60258eaa7010102050482a3018245466c61736843003401021987d00382015820 | a201f60258eaa60101020503589fa20254828245466c61736843003401824352414d4200 | |||
| 00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210a30182 | 040458858e13a20350fa6b4a53d5ad5fdfbe9de663e4d41ffe04501492af1425695e48bf | |||
| 4352414d420004021987d003820158200123456789abcdeffedcba9876543210001122 | 429b2d51f2ab450c0013a20b8202582000112233445566778899aabbccddeeff01234567 | |||
| 33445566778899aabbccddeeff06582782a10150fa6b4a53d5ad5fdfbe9de663e4d41f | 89abcdeffedcba98765432100c1987d00c0113a20b820258200123456789abcdeffedcba | |||
| fea102501492af1425695e48bf429b2d51f2ab4509582d83a10b00a110a10658208182 | 987654321000112233445566778899aabbccddeeff0c1987d001f602f6095825860c0013 | |||
| 00781b687474703a2f2f6578616d706c652e636f6d2f66696c652e62696ea114f60b55 | a106781b687474703a2f2f6578616d706c652e636f6d2f66696c652e62696e15f60b528a | |||
| 85a10b00a104f6a10b01a110a20841f60a00a115f60c4782a104f6a116f6 | 0c0003f60c0113a20843a101010a0016f60c458403f617f6 | |||
| Total size of outer wrapper with COSE authentication object: 325 | ||||
| Signed Outer: | ||||
| a2015854d28443a10126a1044874657374206b6579f65840e90dab6e502bad8132adf86b | ||||
| 4d78defaebac64fa6c6b2882d12b36f492b14ce75819ed3524de4d66ddfd5e1d80a59840 | ||||
| 04c1ac9b003b2da32589583a93c541dd0258eaa60101020503589fa20254828245466c61 | ||||
| 736843003401824352414d4200040458858e13a20350fa6b4a53d5ad5fdfbe9de663e4d4 | ||||
| 1ffe04501492af1425695e48bf429b2d51f2ab450c0013a20b8202582000112233445566 | ||||
| 778899aabbccddeeff0123456789abcdeffedcba98765432100c1987d00c0113a20b8202 | ||||
| 58200123456789abcdeffedcba987654321000112233445566778899aabbccddeeff0c19 | ||||
| 87d001f602f6095825860c0013a106781b687474703a2f2f6578616d706c652e636f6d2f | ||||
| 66696c652e62696e15f60b528a0c0003f60c0113a20843a101010a0016f60c458403f617 | ||||
| f6 | ||||
| 13.6. Example 5: | 13.6. Example 5: | |||
| Compatibility test, download, installation, and secure boot. | Compatibility test, download, installation, and secure boot. | |||
| The following JSON shows the intended behaviour of the manifest. | The following JSON shows the intended behaviour of the manifest. | |||
| { | { | |||
| "structure-version": 1, | "structure-version": 1, | |||
| "sequence-number": 6, | "sequence-number": 6, | |||
| "components": [ | "common": { | |||
| "common-sequence": [ | ||||
| { | ||||
| "directive-set-var": { | ||||
| "vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe", | ||||
| "class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45" | ||||
| } | ||||
| }, | ||||
| { "directive-set-component": 0 }, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| }, | ||||
| { "directive-set-component": 1 }, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "0123456789abcdeffedcba9876543210" | ||||
| "00112233445566778899aabbccddeeff", | ||||
| "size": 34768 | ||||
| } | ||||
| }, | ||||
| { "condition-vendor-id": null }, | ||||
| { "condition-class-id": null } | ||||
| ], | ||||
| "components": [ | ||||
| [ | ||||
| "ext-Flash", | ||||
| 78848 | ||||
| ], | ||||
| [ | ||||
| "Flash", | ||||
| 1024 | ||||
| ] | ||||
| ] | ||||
| }, | ||||
| "apply-image": [ | ||||
| { "directive-set-component": 0 }, | ||||
| { | { | |||
| "id": [ "ext-Flash", 78848 ], | "directive-set-var": { | |||
| "digest": "00112233445566778899aabbccddeeff" | "uri": "http://example.com/file.bin" | |||
| "0123456789abcdeffedcba9876543210", | } | |||
| "size": 34768 | ||||
| }, | }, | |||
| { | { "directive-fetch": null } | |||
| "id": ["Flash",1024], | ||||
| "digest": "0123456789abcdeffedcba9876543210" | ||||
| "00112233445566778899aabbccddeeff", | ||||
| "size": 34768 | ||||
| } | ||||
| ], | ||||
| "common": [ | ||||
| {"condition-vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe"}, | ||||
| {"condition-class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45"} | ||||
| ], | ||||
| "apply-image": [ | ||||
| {"directive-set-component": 0}, | ||||
| {"directive-set-var": { | ||||
| "uris": [[0, "http://example.com/file.bin"]] | ||||
| }}, | ||||
| {"directive-fetch": null} | ||||
| ], | ], | |||
| "load-image": [ | "load-image": [ | |||
| {"directive-run-conditional": [ | { "directive-set-component": 1 }, | |||
| {"directive-set-component": 1}, | { "condition-not-image": null }, | |||
| {"condition-not-image": null}, | { "directive-set-component": 0 }, | |||
| {"directive-set-component": 0}, | { "condition-image": null }, | |||
| {"condition-image": null}, | { "directive-set-component": 1 }, | |||
| {"directive-set-component": 1}, | { | |||
| {"directive-set-var": { | "directive-set-var": { | |||
| "source-index": 0 | "source-index": 0 | |||
| }}, | } | |||
| {"directive-fetch": null} | }, | |||
| ]} | { "directive-fetch": null } | |||
| ], | ], | |||
| "run-image": [ | "run-image": [ | |||
| {"directive-set-component": 1}, | { "directive-set-component": 1 }, | |||
| {"condition-image": null}, | { "condition-image": null }, | |||
| {"directive-run": null} | { "directive-run": null } | |||
| ] | ] | |||
| } | } | |||
| Converted into the SUIT manifest, this produces: | ||||
| { | Converted into the SUIT manifest, this produces: | |||
| / auth object / 1 : None | ||||
| / manifest / 2 : h'a7010102060482a30182496578742d466c617368430034' | ||||
| h'01021987d0038201582000112233445566778899aabbccddeeff01234567' | ||||
| h'89abcdeffedcba9876543210a3018245466c617368420004021987d00382' | ||||
| h'0158200123456789abcdeffedcba987654321000112233445566778899aa' | ||||
| h'bbccddeeff06582782a10150fa6b4a53d5ad5fdfbe9de663e4d41ffea102' | ||||
| h'501492af1425695e48bf429b2d51f2ab4509582d83a10b00a110a1065820' | ||||
| h'818200781b687474703a2f2f6578616d706c652e636f6d2f66696c652e62' | ||||
| h'696ea114f60b581d81a10e581887a10b01a105f6a10b00a104f6a10b01a1' | ||||
| h'10a10a00a114f60c4a83a10b01a104f6a116f6' \ | ||||
| { | ||||
| / structure-version / 1 : 1 | ||||
| / sequence-number / 2 : 6 | ||||
| / components / 4 : [ | ||||
| { | ||||
| / component-identifier / 1 : [ | ||||
| h'6578742d466c617368', | ||||
| h'003401' | ||||
| ], | ||||
| / component-size / 3 : 34768 | ||||
| / component-digest / 2 : [ | ||||
| / sha-256 / 1, | ||||
| h'00112233445566778899aabbccddeeff' | ||||
| h'0123456789abcdeffedcba9876543210' | ||||
| ], | ||||
| } | ||||
| { | ||||
| / component-identifier / 1 : [h'466c617368', h'0004'], | ||||
| / component-size / 3 : 34768 | ||||
| / component-digest / 2 : [ | ||||
| / sha-256 / 1, | ||||
| h'0123456789abcdeffedcba9876543210' | ||||
| h'00112233445566778899aabbccddeeff' | ||||
| ], | ||||
| } | ||||
| ], | ||||
| / common / 6 : [ | ||||
| {/ vendor-id / 1 : h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' \ | ||||
| fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe} | ||||
| {/ class-id / 2 : h'1492af1425695e48bf429b2d51f2ab45' \ | ||||
| 1492af14-2569-5e48-bf42-9b2d51f2ab45} | ||||
| ], | ||||
| / apply-image / 9 : [ | ||||
| {/ set-component-index / 11 : 0} | ||||
| {/ set-vars / 16 : { | ||||
| / uris / 6 : h'818200781b687474703a2f2f6578616d706c65' | ||||
| h'2e636f6d2f66696c652e62696e' / | ||||
| [[0, 'http://example.com/file.bin']] / | ||||
| }}, | ||||
| {/ fetch / 20 : None} | ||||
| ], | ||||
| / load-image / 11 : [ | ||||
| / conditional-sequence / 14 : [ | ||||
| {/ set-component-index / 11 : 1} | ||||
| {/ condition-not-image / 5 : None} | ||||
| {/ set-component-index / 11 : 0} | ||||
| {/ condition-image / 4 : None} | ||||
| {/ set-component-index / 11 : 1} | ||||
| {/ set-vars / 16 : { | ||||
| / source-component / 10 : 0 | ||||
| }}, | ||||
| {/ fetch / 20 : None} | ||||
| ], | ||||
| ], | ||||
| / run-image / 12 : [ | ||||
| {/ set-component-index / 11 : 1} | ||||
| {/ condition-image / 4 : None} | ||||
| {/ run / 22 : None} | ||||
| ], | ||||
| } | ||||
| } | ||||
| Total size of outer wrapper without COSE authentication object: 258 | { | |||
| / auth object / 1 : h'd28443a10126a1044874657374206b6579f658402282' | ||||
| h'c1e7770b1806afb0cf78e74003af39166b9db14b0a7c' | ||||
| h'172d18598c8be16e3cec48770fb8471675a5b3bab05a' | ||||
| h'22e370a03320a7346f252f9629c3417ed153', | ||||
| / manifest / 2 : h'a6010102060358a2a202578282467b1b4595ab2143003401' | ||||
| h'8245466c6173684200040458858e13a20350fa6b4a53d5ad' | ||||
| h'5fdfbe9de663e4d41ffe04501492af1425695e48bf429b2d' | ||||
| h'51f2ab450c0013a20b8202582000112233445566778899aa' | ||||
| h'bbccddeeff0123456789abcdeffedcba98765432100c1987' | ||||
| h'd00c0113a20b820258200123456789abcdeffedcba987654' | ||||
| h'321000112233445566778899aabbccddeeff0c1987d001f6' | ||||
| h'02f6095825860c0013a106781b687474703a2f2f6578616d' | ||||
| h'706c652e636f6d2f66696c652e62696e15f60b528e0c0118' | ||||
| h'19f60c0003f60c0113a10a0015f60c47860c0103f617f6' \ | ||||
| { | ||||
| / structure-version / 1 : 1, | ||||
| / sequence-number / 2 : 6, | ||||
| / common / 3 : h'a202578282467b1b4595ab21430034018245466c617368' | ||||
| h'4200040458858e13a20350fa6b4a53d5ad5fdfbe9de663' | ||||
| h'e4d41ffe04501492af1425695e48bf429b2d51f2ab450c' | ||||
| h'0013a20b8202582000112233445566778899aabbccddee' | ||||
| h'ff0123456789abcdeffedcba98765432100c1987d00c01' | ||||
| h'13a20b820258200123456789abcdeffedcba9876543210' | ||||
| h'00112233445566778899aabbccddeeff0c1987d001f602' | ||||
| h'f6' \ { | ||||
| / components / 2 : h'8282467b1b4595ab21430034018245466c6173' | ||||
| h'68420004' \ | ||||
| [ | ||||
| [h'7b1b4595ab21', h'003401'], | ||||
| [h'466c617368', h'0004'], | ||||
| ], | ||||
| / common-sequence / 4 : h'8e13a20350fa6b4a53d5ad5fdfbe9de6' | ||||
| h'63e4d41ffe04501492af1425695e48bf' | ||||
| h'429b2d51f2ab450c0013a20b82025820' | ||||
| h'00112233445566778899aabbccddeeff' | ||||
| h'0123456789abcdeffedcba9876543210' | ||||
| h'0c1987d00c0113a20b82025820012345' | ||||
| h'6789abcdeffedcba9876543210001122' | ||||
| h'33445566778899aabbccddeeff0c1987' | ||||
| h'd001f602f6' \ [ | ||||
| / set-vars / 19, { | ||||
| / vendor-id / 3 : h'fa6b4a53d5ad5fdfbe9de663e4d41f' | ||||
| h'fe', | ||||
| / class-id / 4 : h'1492af1425695e48bf429b2d51f2ab45', | ||||
| }, | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / digest / 11 : [ 2, | ||||
| h'00112233445566778899aabbccddeeff0123456789ab' | ||||
| h'cdeffedcba9876543210' ], | ||||
| / size / 12 : 34768, | ||||
| }, | ||||
| / set-component-index / 12, 1, | ||||
| / set-vars / 19, { | ||||
| / digest / 11 : [ 2, | ||||
| h'0123456789abcdeffedcba9876543210001122334455' | ||||
| h'66778899aabbccddeeff' ], | ||||
| / size / 12 : 34768, | ||||
| }, | ||||
| / condition-vendor-id / 1, None, | ||||
| / condition-class-id / 2, None, | ||||
| ], | ||||
| }, | ||||
| / apply-image / 9 : h'860c0013a106781b687474703a2f2f6578616d70' | ||||
| h'6c652e636f6d2f66696c652e62696e15f6' \ [ | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / uri / 6 : http://example.com/file.bin, | ||||
| }, | ||||
| / fetch / 21, None, | ||||
| ], | ||||
| / load-image / 11 : h'8e0c011819f60c0003f60c0113a10a0015f6' \ [ | ||||
| / set-component-index / 12, 1, | ||||
| / condition-not-image / 25, None, | ||||
| / set-component-index / 12, 0, | ||||
| / condition-image / 3, None, | ||||
| / set-component-index / 12, 1, | ||||
| / set-vars / 19, { | ||||
| / source-component / 10 : 0, | ||||
| }, | ||||
| / fetch / 21, None, | ||||
| ], | ||||
| / run-image / 12 : h'860c0103f617f6' \ [ | ||||
| / set-component-index / 12, 1, | ||||
| / condition-image / 3, None, | ||||
| / run / 23, None, | ||||
| ], | ||||
| } | ||||
| } | ||||
| Total size of outer wrapper without COSE authentication object: 245 | ||||
| Outer: | Outer: | |||
| a201f60258fca7010102060482a30182496578742d466c61736843003401021987d003 | a201f60258efa6010102060358a2a202578282467b1b4595ab21430034018245466c6173 | |||
| 8201582000112233445566778899aabbccddeeff0123456789abcdeffedcba98765432 | 684200040458858e13a20350fa6b4a53d5ad5fdfbe9de663e4d41ffe04501492af142569 | |||
| 10a3018245466c617368420004021987d003820158200123456789abcdeffedcba9876 | 5e48bf429b2d51f2ab450c0013a20b8202582000112233445566778899aabbccddeeff01 | |||
| 54321000112233445566778899aabbccddeeff06582782a10150fa6b4a53d5ad5fdfbe | 23456789abcdeffedcba98765432100c1987d00c0113a20b820258200123456789abcdef | |||
| 9de663e4d41ffea102501492af1425695e48bf429b2d51f2ab4509582d83a10b00a110 | fedcba987654321000112233445566778899aabbccddeeff0c1987d001f602f609582586 | |||
| a1065820818200781b687474703a2f2f6578616d706c652e636f6d2f66696c652e6269 | 0c0013a106781b687474703a2f2f6578616d706c652e636f6d2f66696c652e62696e15f6 | |||
| 6ea114f60b581d81a10e581887a10b01a105f6a10b00a104f6a10b01a110a10a00a114 | 0b528e0c011819f60c0003f60c0113a10a0015f60c47860c0103f617f6 | |||
| f60c4a83a10b01a104f6a116f6 | ||||
| Total size of outer wrapper with COSE authentication object: 330 | ||||
| Signed Outer: | ||||
| a2015854d28443a10126a1044874657374206b6579f658402282c1e7770b1806afb0cf78 | ||||
| e74003af39166b9db14b0a7c172d18598c8be16e3cec48770fb8471675a5b3bab05a22e3 | ||||
| 70a03320a7346f252f9629c3417ed1530258efa6010102060358a2a202578282467b1b45 | ||||
| 95ab21430034018245466c6173684200040458858e13a20350fa6b4a53d5ad5fdfbe9de6 | ||||
| 63e4d41ffe04501492af1425695e48bf429b2d51f2ab450c0013a20b8202582000112233 | ||||
| 445566778899aabbccddeeff0123456789abcdeffedcba98765432100c1987d00c0113a2 | ||||
| 0b820258200123456789abcdeffedcba987654321000112233445566778899aabbccddee | ||||
| ff0c1987d001f602f6095825860c0013a106781b687474703a2f2f6578616d706c652e63 | ||||
| 6f6d2f66696c652e62696e15f60b528e0c011819f60c0003f60c0113a10a0015f60c4786 | ||||
| 0c0103f617f6 | ||||
| 13.7. Example 6: | 13.7. Example 6: | |||
| Compatibility test, 2 images, simultaneous download and installation, | Compatibility test, 2 images, simultaneous download and installation, | |||
| and secure boot. | and secure boot. | |||
| The following JSON shows the intended behaviour of the manifest. | The following JSON shows the intended behaviour of the manifest. | |||
| { | { | |||
| "structure-version": 1, | "structure-version": 1, | |||
| "sequence-number": 7, | "sequence-number": 7, | |||
| "components": [ | "common": { | |||
| "common-sequence": [ | ||||
| { | ||||
| "directive-set-var": { | ||||
| "vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe", | ||||
| "class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45" | ||||
| } | ||||
| }, | ||||
| { "directive-set-component": 0 }, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "00112233445566778899aabbccddeeff" | ||||
| "0123456789abcdeffedcba9876543210", | ||||
| "size": 34768 | ||||
| } | ||||
| }, | ||||
| { "directive-set-component": 1 }, | ||||
| { | ||||
| "directive-set-var": { | ||||
| "digest": "0123456789abcdeffedcba9876543210" | ||||
| "00112233445566778899aabbccddeeff", | ||||
| "size": 76834 | ||||
| } | ||||
| }, | ||||
| { "condition-vendor-id": null }, | ||||
| { "condition-class-id": null } | ||||
| ], | ||||
| "components": [ | ||||
| [ | ||||
| "Flash", | ||||
| 78848 | ||||
| ], | ||||
| [ | ||||
| "Flash", | ||||
| 132096 | ||||
| ] | ||||
| ] | ||||
| }, | ||||
| "apply-image": [ | ||||
| { "directive-set-component": 0 }, | ||||
| { | { | |||
| "id": ["Flash",78848], | "directive-set-var": { | |||
| "digest": "00112233445566778899aabbccddeeff" | "uri": "http://example.com/file1.bin" | |||
| "0123456789abcdeffedcba9876543210", | } | |||
| "size": 34768 | ||||
| }, | }, | |||
| { "directive-set-component": 1 }, | ||||
| { | { | |||
| "id": ["Flash",132096], | "directive-set-var": { | |||
| "digest": "0123456789abcdeffedcba9876543210" | "uri": "http://example.com/file2.bin" | |||
| "00112233445566778899aabbccddeeff", | } | |||
| "size": 76834 | }, | |||
| } | { "directive-set-component": true }, | |||
| ], | { "directive-fetch": null } | |||
| "common": [ | ||||
| {"condition-vendor-id": "fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe"}, | ||||
| {"condition-class-id": "1492af14-2569-5e48-bf42-9b2d51f2ab45"} | ||||
| ], | ||||
| "apply-image": [ | ||||
| {"directive-set-component": 0}, | ||||
| {"directive-set-var": { | ||||
| "uris": [[ 0, "http://example.com/file1.bin" ]] | ||||
| }}, | ||||
| {"directive-set-component": 1}, | ||||
| {"directive-set-var": { | ||||
| "uris": [[ 0, "http://example.com/file2.bin" ]] | ||||
| }}, | ||||
| {"directive-set-component": true}, | ||||
| {"directive-fetch": null} | ||||
| ], | ], | |||
| "run-image": [ | "run-image": [ | |||
| {"directive-set-component": true}, | { "directive-set-component": true }, | |||
| {"condition-image": null}, | { "condition-image": null }, | |||
| {"directive-set-component": 0}, | { "directive-set-component": 0 }, | |||
| {"directive-run": null} | { "directive-run": null } | |||
| ] | ] | |||
| } | } | |||
| Converted into the SUIT manifest, this produces: | Converted into the SUIT manifest, this produces: | |||
| { | { | |||
| / auth object / 1 : None | / auth object / 1 : h'd28443a10126a1044874657374206b6579f65840d00c' | |||
| / manifest / 2 : h'a6010102070482a3018245466c61736843003401021987' | h'd62be643247904621f2956b11b97fcbcd22f87701dd9' | |||
| h'd0038201582000112233445566778899aabbccddeeff0123456789abcdef' | h'008e949f8c801f55d7095b545d6db0060bd47c5f78ee' | |||
| h'fedcba9876543210a3018245466c61736843000402021a00012c22038201' | h'5cb1fea17c875a36a599aec4e8b876cfdae7', | |||
| h'58200123456789abcdeffedcba987654321000112233445566778899aabb' | / manifest / 2 : h'a5010102070358a4a20257828245466c6173684300340182' | |||
| h'ccddeeff06582782a10150fa6b4a53d5ad5fdfbe9de663e4d41ffea10250' | h'45466c617368430004020458878e13a20350fa6b4a53d5ad' | |||
| h'1492af1425695e48bf429b2d51f2ab4509585b86a10b00a110a106582181' | h'5fdfbe9de663e4d41ffe04501492af1425695e48bf429b2d' | |||
| h'8200781c687474703a2f2f6578616d706c652e636f6d2f66696c65312e62' | h'51f2ab450c0013a20b8202582000112233445566778899aa' | |||
| h'696ea10b01a110a1065821818200781c687474703a2f2f6578616d706c65' | h'bbccddeeff0123456789abcdeffedcba98765432100c1987' | |||
| h'2e636f6d2f66696c65322e62696ea10bf5a114f60c4d84a10bf5a104f6a1' | h'd00c0113a20b820258200123456789abcdeffedcba987654' | |||
| h'0b00a116f6' \ | h'321000112233445566778899aabbccddeeff0c1a00012c22' | |||
| h'01f602f609584b8c0c0013a106781c687474703a2f2f6578' | ||||
| h'616d706c652e636f6d2f66696c65312e62696e0c0113a106' | ||||
| h'781c687474703a2f2f6578616d706c652e636f6d2f66696c' | ||||
| h'65322e62696e0cf515f60c49880cf503f60c0017f6' \ | ||||
| { | { | |||
| / structure-version / 1 : 1 | / structure-version / 1 : 1, | |||
| / sequence-number / 2 : 7 | / sequence-number / 2 : 7, | |||
| / components / 4 : [ | / common / 3 : h'a20257828245466c617368430034018245466c61736843' | |||
| { | h'0004020458878e13a20350fa6b4a53d5ad5fdfbe9de663' | |||
| / component-identifier / 1 : [h'466c617368', h'003401'], | h'e4d41ffe04501492af1425695e48bf429b2d51f2ab450c' | |||
| / component-size / 3 : 34768 | h'0013a20b8202582000112233445566778899aabbccddee' | |||
| / component-digest / 2 : [ | h'ff0123456789abcdeffedcba98765432100c1987d00c01' | |||
| / sha-256 / 1, | h'13a20b820258200123456789abcdeffedcba9876543210' | |||
| h'00112233445566778899aabbccddeeff' | h'00112233445566778899aabbccddeeff0c1a00012c2201' | |||
| h'0123456789abcdeffedcba9876543210' | h'f602f6' \ { | |||
| ], | / components / 2 : h'828245466c617368430034018245466c617368' | |||
| } | h'43000402' \ | |||
| { | [ | |||
| / component-identifier / 1 : [h'466c617368', h'000402'], | [h'466c617368', h'003401'], | |||
| / component-size / 3 : 76834 | [h'466c617368', h'000402'], | |||
| / component-digest / 2 : [ | ], | |||
| / sha-256 / 1, | / common-sequence / 4 : h'8e13a20350fa6b4a53d5ad5fdfbe9de6' | |||
| h'0123456789abcdeffedcba9876543210' | h'63e4d41ffe04501492af1425695e48bf' | |||
| h'00112233445566778899aabbccddeeff' | h'429b2d51f2ab450c0013a20b82025820' | |||
| ], | h'00112233445566778899aabbccddeeff' | |||
| } | h'0123456789abcdeffedcba9876543210' | |||
| ], | h'0c1987d00c0113a20b82025820012345' | |||
| / common / 6 : [ | h'6789abcdeffedcba9876543210001122' | |||
| {/ vendor-id / 1 : h'fa6b4a53d5ad5fdfbe9de663e4d41ffe' \ | h'33445566778899aabbccddeeff0c1a00' | |||
| fa6b4a53-d5ad-5fdf-be9d-e663e4d41ffe} | h'012c2201f602f6' \ [ | |||
| {/ class-id / 2 : h'1492af1425695e48bf429b2d51f2ab45' \ | / set-vars / 19, { | |||
| 1492af14-2569-5e48-bf42-9b2d51f2ab45} | / vendor-id / 3 : h'fa6b4a53d5ad5fdfbe9de663e4d41f' | |||
| ], | h'fe', | |||
| / apply-image / 9 : [ | / class-id / 4 : h'1492af1425695e48bf429b2d51f2ab45', | |||
| {/ set-component-index / 11 : 0} | }, | |||
| {/ set-vars / 16 : { | / set-component-index / 12, 0, | |||
| / uris / 6 : h'818200781c687474703a2f2f6578616d706c' | / set-vars / 19, { | |||
| h'652e636f6d2f66696c65312e62696e' / | / digest / 11 : [ 2, | |||
| [[0, 'http://example.com/file1.bin']] / | h'00112233445566778899aabbccddeeff0123456789ab' | |||
| }}, | h'cdeffedcba9876543210' ], | |||
| {/ set-component-index / 11 : 1} | / size / 12 : 34768, | |||
| {/ set-vars / 16 : { | }, | |||
| / uris / 6 : h'818200781c687474703a2f2f6578616d706c | / set-component-index / 12, 1, | |||
| h'652e636f6d2f66696c65322e62696e' / | / set-vars / 19, { | |||
| [[0, 'http://example.com/file2.bin']] / | / digest / 11 : [ 2, | |||
| h'0123456789abcdeffedcba9876543210001122334455' | ||||
| }}, | h'66778899aabbccddeeff' ], | |||
| {/ set-component-index / 11 : True} | / size / 12 : 76834, | |||
| {/ fetch / 20 : None} | }, | |||
| / condition-vendor-id / 1, None, | ||||
| / condition-class-id / 2, None, | ||||
| ], | ||||
| }, | ||||
| / apply-image / 9 : h'8c0c0013a106781c687474703a2f2f6578616d70' | ||||
| h'6c652e636f6d2f66696c65312e62696e0c0113a1' | ||||
| h'06781c687474703a2f2f6578616d706c652e636f' | ||||
| h'6d2f66696c65322e62696e0cf515f6' \ [ | ||||
| / set-component-index / 12, 0, | ||||
| / set-vars / 19, { | ||||
| / uri / 6 : http://example.com/file1.bin | ||||
| }, | ||||
| / set-component-index / 12, 1, | ||||
| / set-vars / 19, { | ||||
| / uri / 6 : http://example.com/file2.bin | ||||
| }, | ||||
| / set-component-index / 12, True, | ||||
| / fetch / 21, None, | ||||
| ], | ], | |||
| / run-image / 12 : [ | / run-image / 12 : h'880cf503f60c0017f6' \ [ | |||
| {/ set-component-index / 11 : True} | / set-component-index / 12, True, | |||
| {/ condition-image / 4 : None} | / condition-image / 3, None, | |||
| {/ set-component-index / 11 : 0} | / set-component-index / 12, 0, | |||
| {/ run / 22 : None} | / run / 23, None, | |||
| ], | ], | |||
| } | } | |||
| } | } | |||
| Total size of outer wrapper without COSE authentication object: 275 | Total size of outer wrapper without COSE authentication object: 268 | |||
| Outer: | Outer: | |||
| a201f60259010ca6010102070482a3018245466c61736843003401021987d003820158 | a201f602590105a5010102070358a4a20257828245466c617368430034018245466c6173 | |||
| 2000112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210a301 | 68430004020458878e13a20350fa6b4a53d5ad5fdfbe9de663e4d41ffe04501492af1425 | |||
| 8245466c61736843000402021a00012c2203820158200123456789abcdeffedcba9876 | 695e48bf429b2d51f2ab450c0013a20b8202582000112233445566778899aabbccddeeff | |||
| 54321000112233445566778899aabbccddeeff06582782a10150fa6b4a53d5ad5fdfbe | 0123456789abcdeffedcba98765432100c1987d00c0113a20b820258200123456789abcd | |||
| 9de663e4d41ffea102501492af1425695e48bf429b2d51f2ab4509585b86a10b00a110 | effedcba987654321000112233445566778899aabbccddeeff0c1a00012c2201f602f609 | |||
| a1065821818200781c687474703a2f2f6578616d706c652e636f6d2f66696c65312e62 | 584b8c0c0013a106781c687474703a2f2f6578616d706c652e636f6d2f66696c65312e62 | |||
| 696ea10b01a110a1065821818200781c687474703a2f2f6578616d706c652e636f6d2f | 696e0c0113a106781c687474703a2f2f6578616d706c652e636f6d2f66696c65322e6269 | |||
| 66696c65322e62696ea10bf5a114f60c4d84a10bf5a104f6a10b00a116f6 | 6e0cf515f60c49880cf503f60c0017f6 | |||
| Total size of outer wrapper with COSE authentication object: 353 | ||||
| Signed Outer: | ||||
| a2015854d28443a10126a1044874657374206b6579f65840d00cd62be643247904621f29 | ||||
| 56b11b97fcbcd22f87701dd9008e949f8c801f55d7095b545d6db0060bd47c5f78ee5cb1 | ||||
| fea17c875a36a599aec4e8b876cfdae702590105a5010102070358a4a20257828245466c | ||||
| 617368430034018245466c617368430004020458878e13a20350fa6b4a53d5ad5fdfbe9d | ||||
| e663e4d41ffe04501492af1425695e48bf429b2d51f2ab450c0013a20b82025820001122 | ||||
| 33445566778899aabbccddeeff0123456789abcdeffedcba98765432100c1987d00c0113 | ||||
| a20b820258200123456789abcdeffedcba987654321000112233445566778899aabbccdd | ||||
| eeff0c1a00012c2201f602f609584b8c0c0013a106781c687474703a2f2f6578616d706c | ||||
| 652e636f6d2f66696c65312e62696e0c0113a106781c687474703a2f2f6578616d706c65 | ||||
| 2e636f6d2f66696c65322e62696e0cf515f60c49880cf503f60c0017f6 | ||||
| 14. IANA Considerations | 14. IANA Considerations | |||
| Several registries will be required for: | Several registries will be required for: | |||
| - standard Commands | - standard Commands | |||
| - standard Parameters | - standard Parameters | |||
| - standard Algorithm identifiers | - standard Algorithm identifiers | |||
| skipping to change at page 67, line 31 ¶ | skipping to change at page 75, line 31 ¶ | |||
| May 2017, <https://www.rfc-editor.org/info/rfc8174>. | May 2017, <https://www.rfc-editor.org/info/rfc8174>. | |||
| 18.2. Informative References | 18.2. Informative References | |||
| [Architecture] | [Architecture] | |||
| Moran, B., "A Firmware Update Architecture for Internet of | Moran, B., "A Firmware Update Architecture for Internet of | |||
| Things Devices", January 2019, | Things Devices", January 2019, | |||
| <https://tools.ietf.org/html/draft-ietf-suit-architecture- | <https://tools.ietf.org/html/draft-ietf-suit-architecture- | |||
| 02>. | 02>. | |||
| [Behaviour] | ||||
| Moran, B., "An Information Model for Behavioural | ||||
| Description of Firmware Update and Related Operations", | ||||
| March 2019, <https://datatracker.ietf.org/doc/draft-moran- | ||||
| suit-behavioural-manifest/>. | ||||
| [Information] | [Information] | |||
| Moran, B., "Firmware Updates for Internet of Things | Moran, B., "Firmware Updates for Internet of Things | |||
| Devices - An Information Model for Manifests", January | Devices - An Information Model for Manifests", January | |||
| 2019, <https://tools.ietf.org/html/draft-ietf-suit- | 2019, <https://tools.ietf.org/html/draft-ietf-suit- | |||
| information-model-02>. | information-model-02>. | |||
| [RFC6920] Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B., | [RFC6920] Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B., | |||
| Keranen, A., and P. Hallam-Baker, "Naming Things with | Keranen, A., and P. Hallam-Baker, "Naming Things with | |||
| Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013, | Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013, | |||
| <https://www.rfc-editor.org/info/rfc6920>. | <https://www.rfc-editor.org/info/rfc6920>. | |||
| End of changes. 264 change blocks. | ||||
| 1396 lines changed or deleted | 1832 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||