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


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

]>

<?rfc rfcedstyle="yes"?>
<?rfc tocindent="yes"?>
<?rfc strict="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc text-list-symbols="-o*+"?>
<?rfc docmapping="yes"?>
<?rfc toc_levels="4"?>

<rfc ipr="trust200902" docName="draft-ietf-suit-mti-14" category="std" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="MTI SUIT Algorithms">Mandatory-to-Implement Algorithms for Authors and Recipients of Software Update for the Internet of Things manifests</title>

    <author initials="B." surname="Moran" fullname="Brendan Moran">
      <organization>Arm Limited</organization>
      <address>
        <email>brendan.moran.ietf@gmail.com</email>
      </address>
    </author>
    <author initials="Ø." surname="Rønningstad" fullname="Øyvind Rønningstad">
      <organization>Nordic Semiconductor</organization>
      <address>
        <email>oyvind.ronningstad@gmail.com</email>
      </address>
    </author>
    <author initials="A." surname="Tsukamoto" fullname="Akira Tsukamoto">
      <organization>Openchip &amp; Software Technologies, S.L.</organization>
      <address>
        <email>akira.tsukamoto@gmail.com</email>
      </address>
    </author>

    <date year="2025" month="April" day="30"/>

    <area>Security</area>
    <workgroup>SUIT</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<?line 60?>

<t>This document specifies cryptographic algorithm profiles to be used with the SUIT manifest (see draft-ietf-suit-manifest).  These are the mandatory-to-implement algorithms to ensure interoperability.</t>



    </abstract>



  </front>

  <middle>


<?line 64?>

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

<t>This document specifies algorithm profiles for SUIT manifest parsers and authors to ensure better interoperability. These profiles apply specifically to a constrained node software update use case. Mandatory algorithms may change over time due to an evolving threat landscape. Algorithms are grouped into algorithm profiles to account for this. Profiles may be deprecated over time. SUIT will define five choices of Mandatory To Implement (MTI) profile specifically for constrained node software update. These profiles are:</t>

<t><list style="symbols">
  <t>One Symmetric MTI profile</t>
  <t>Two "Current" Constrained Asymmetric MTI profiles</t>
  <t>Two "Current" AEAD Asymmetric MTI profiles</t>
  <t>One "Future" Constrained Asymmetric MTI profile</t>
</list></t>

<t>At least one MTI algorithm in each category MUST be FIPS qualified.</t>

<t>Because SUIT presents an asymmetric communication profile, where manifest authors have unlimited resources and manifest recipients have constrained resources, the requirements for Recipients and Authors are different.</t>

<t>Recipients MAY choose which MTI profile they wish to implement. It is RECOMMENDED that they implement the "Future" Asymmetric MTI profile. Recipients MAY implement any number of other profiles. Recipients MAY choose not to implement an encryption algorithm if encrypted payloads will never be used.</t>

<t>Authors MUST implement all MTI profiles. Authors MAY implement any number of other profiles.</t>

<t>This draft 'makes use of AES-CTR with a digest algorithm in COSE as specified in (<xref target="RFC9459"/>). AES-CTR is used because it enables out-of-order reception and decryption of blocks, which is necessary for some constrained node use cases. Out-of-order reception with on-the-fly decryption is not available in the preferred encryption algorithms.
Authenticated Encryption with Additional Data (AEAD) is preferred over un-authenticated encryption and an AEAD profile SHOULD be selected wherever possible. See Security Considerations in this draft (<xref target="aes-ctr-payloads"/>) and in <xref target="RFC9459"/> (Section 8) for additional details on the considerations for the use of AES-CTR.</t>

<t>Other use-cases of the SUIT Manifest (<xref target="I-D.ietf-suit-manifest"/>) MAY define their own MTI algorithms.</t>

</section>
<section anchor="algorithms"><name>Algorithms</name>

<t>The algorithms that form a part of the profiles defined in this document are grouped into:</t>

<t><list style="symbols">
  <t>Digest Algorithms</t>
  <t>Authentication Algorithms</t>
  <t>Key Exchange Algorithms (OPTIONAL)</t>
  <t>Encryption Algorithms (OPTIONAL)</t>
</list></t>

<t>Algorithm profiles are defined using COSE algorithm identifiers (see <xref target="IANA-COSE"/>).</t>

</section>
<section anchor="profiles"><name>Profiles</name>

<t>Recognized profiles are defined below.</t>

<section anchor="suit-sha256-hmac-a128kw-a128ctr"><name> Symmetric MTI profile: suit-sha256-hmac-a128kw-a128ctr</name>

<texttable>
      <ttcol align='left'>Algorithm Type</ttcol>
      <ttcol align='left'>Algorithm</ttcol>
      <ttcol align='left'>COSE Key</ttcol>
      <c>Digest</c>
      <c>SHA-256</c>
      <c>-16</c>
      <c>Authentication</c>
      <c>HMAC-256</c>
      <c>5</c>
      <c>Key Exchange</c>
      <c>A128KW Key Wrap</c>
      <c>-3</c>
      <c>Encryption</c>
      <c>A128CTR</c>
      <c>-65534</c>
</texttable>

</section>
<section anchor="suit-sha256-esp256-ecdh-a128ctr"><name>Current Constrained Asymmetric MTI Profile 1: suit-sha256-esp256-ecdh-a128ctr</name>

<texttable>
      <ttcol align='left'>Algorithm Type</ttcol>
      <ttcol align='left'>Algorithm</ttcol>
      <ttcol align='left'>COSE Key</ttcol>
      <c>Digest</c>
      <c>SHA-256</c>
      <c>-16</c>
      <c>Authentication</c>
      <c>ESP256</c>
      <c>-9</c>
      <c>Key Exchange</c>
      <c>ECDH-ES + A128KW</c>
      <c>-29</c>
      <c>Encryption</c>
      <c>A128CTR</c>
      <c>-65534</c>
</texttable>

</section>
<section anchor="suit-sha256-eddsa-ecdh-a128ctr"><name>Current Constrained Asymmetric MTI Profile 2: suit-sha256-eddsa-ecdh-a128ctr</name>

<texttable>
      <ttcol align='left'>Algorithm Type</ttcol>
      <ttcol align='left'>Algorithm</ttcol>
      <ttcol align='left'>COSE Key</ttcol>
      <c>Digest</c>
      <c>SHA-256</c>
      <c>-16</c>
      <c>Authentication</c>
      <c>Ed25519</c>
      <c>-50</c>
      <c>Key Exchange</c>
      <c>ECDH-ES + A128KW</c>
      <c>-29</c>
      <c>Encryption</c>
      <c>A128CTR</c>
      <c>-65534</c>
</texttable>

</section>
<section anchor="suit-sha256-esp256-ecdh-a128gcm"><name>Current AEAD Asymmetric MTI Profile 1: suit-sha256-esp256-ecdh-a128gcm</name>

<texttable>
      <ttcol align='left'>Algorithm Type</ttcol>
      <ttcol align='left'>Algorithm</ttcol>
      <ttcol align='left'>COSE Key</ttcol>
      <c>Digest</c>
      <c>SHA-256</c>
      <c>-16</c>
      <c>Authentication</c>
      <c>ESP256</c>
      <c>-9</c>
      <c>Key Exchange</c>
      <c>ECDH-ES + A128KW</c>
      <c>-29</c>
      <c>Encryption</c>
      <c>A128GCM</c>
      <c>1</c>
</texttable>

</section>
<section anchor="suit-sha256-ed25519-ecdh-chacha-poly"><name>Current AEAD Asymmetric MTI Profile 2: suit-sha256-ed25519-ecdh-chacha-poly</name>

<texttable>
      <ttcol align='left'>Algorithm Type</ttcol>
      <ttcol align='left'>Algorithm</ttcol>
      <ttcol align='left'>COSE Key</ttcol>
      <c>Digest</c>
      <c>SHA-256</c>
      <c>-16</c>
      <c>Authentication</c>
      <c>Ed25519</c>
      <c>-50</c>
      <c>Key Exchange</c>
      <c>ECDH-ES + A128KW</c>
      <c>-29</c>
      <c>Encryption</c>
      <c>ChaCha20/Poly1305</c>
      <c>24</c>
</texttable>

</section>
<section anchor="suit-sha256-hsslms-a256kw-a256ctr"><name>Future Constrained Asymmetric MTI Profile 1: suit-sha256-hsslms-a256kw-a256ctr</name>

<texttable>
      <ttcol align='left'>Algorithm Type</ttcol>
      <ttcol align='left'>Algorithm</ttcol>
      <ttcol align='left'>COSE Key</ttcol>
      <c>Digest</c>
      <c>SHA-256</c>
      <c>-16</c>
      <c>Authentication</c>
      <c>HSS-LMS</c>
      <c>-46</c>
      <c>Key Exchange</c>
      <c>A256KW</c>
      <c>-5</c>
      <c>Encryption</c>
      <c>A256CTR</c>
      <c>-65532</c>
</texttable>

<t>The decision as to how deep the tree is, is a decision that affects authoring tools only (see <xref target="RFC8778"/>).
Verification is not affected by the choice of the "W" parameter, but the size of the signature is affected.
In order to support long lifetimes needed by IoT device, deep trees are RECOMMENDED.</t>

</section>
</section>
<section anchor="reporting-profiles"><name>Reporting Profiles</name>

<t>When using Manifest Recipients Response communication, particularly data structures that are designed for reporting of update capabilities, status, progress, or success, the same profile as the is used on the SUIT manifest SHOULD be used. There are cases where this is not possible, such as suit-sha256-hsslms-a256kw-a256ctr. In this case, the closest equivalent profile SHOULD be used, for example suit-sha256-esp256-ecdh-a128ctr.</t>

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

<t>Payload encryption is often used to protect Intellectual Property (IP) and Personally Identifying Information (PII) in transit. The primary function of payload in SUIT is to act as a defense against passive IP and PII snooping. By encrypting payloads, confidential IP and PII can be protected during distribution. However, payload encryption of firmware or software updates of a commodity device is not a cybersecurity defense against targetted attacks on that device.</t>

<section anchor="payload-encryption-as-a-cybersecurity-defense"><name>Payload encryption as a cybersecurity defense</name>

<t>To define the purpose of payload encryption as a defensive cybersecurity tool, it is important to define the capabilities of modern threat actors. A variety of capabilities are possible:</t>

<t><list style="symbols">
  <t>find bugs by binary code inspection</t>
  <t>send unexpected data to communication interfaces, looking for unexpected behavior</t>
  <t>use fault injection to bypass or manipulate code</t>
  <t>use communication attacks or fault injection along with gadgets found in the code</t>
</list></t>

<t>Given this range of capabilities, it is important to understand which capabilities are impacted by firmware encryption. Threat actors who find bugs by manual inspection or use gadgets found in the code will need to first extract the code from the target. In the IoT context, it is expected that most threat actors will start with sample devices and physical access to test attacks.</t>

<t>Due to these factors, payload encryption serves to limit the pool of attackers to those who have the technical capability to extract code from physical devices and those who perform code-free attacks.</t>

</section>
<section anchor="aes-ctr-payloads"><name>Use of AES-CTR in payload encryption</name>

<t>AES-CTR mode with a digest is specified, see <xref target="RFC9459"/>. All of the AES-CTR security considerations in <xref target="RFC9459"/> apply. A non-AEAD encryption mode is specified in this draft due to the following mitigating circumstances:</t>

<t><list style="symbols">
  <t>Out-of-order decryption must be supported. Therefore, we must use a stream cipher that supports random access.</t>
  <t>Chosen plaintext attacks are extremely difficult to achieve, since the payloads are typically constructed in a relatively secure environment--the developer's computer or build infrastructure--and should be signed in an air-gapped or similarly protected environment. In short, the plaintext is authenticated prior to encryption.</t>
  <t>Content Encryption Keys must be used to encrypt only once. See <xref target="I-D.ietf-suit-firmware-encryption"/>.</t>
</list></t>

<t>As a result of these mitigating circumstances, AES-CTR is an acceptable cipher for typical software/firmware delivery scenarios.</t>

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

<t>IANA is requested to create a page for COSE Algorithm Profiles within
the category for Software Update for the Internet of Things (SUIT)</t>

<t>IANA is also requested to create a registry for COSE Algorithm Profiles
within this page. The initial content of the registry is:</t>

<texttable>
      <ttcol align='left'>Profile</ttcol>
      <ttcol align='left'>Status</ttcol>
      <ttcol align='left'>Digest</ttcol>
      <ttcol align='left'>Auth</ttcol>
      <ttcol align='left'>Key Exchange</ttcol>
      <ttcol align='left'>Encryption</ttcol>
      <ttcol align='left'>Descriptor Array</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>suit-sha256-hmac-a128kw-a128ctr</c>
      <c>MANDATORY</c>
      <c>-16</c>
      <c>5</c>
      <c>-3</c>
      <c>-65534</c>
      <c>[-16,   5,  -3, -65534]</c>
      <c><xref target="suit-sha256-hmac-a128kw-a128ctr"/></c>
      <c>suit-sha256-esp256-ecdh-a128ctr</c>
      <c>MANDATORY</c>
      <c>-16</c>
      <c>-7</c>
      <c>-29</c>
      <c>-65534</c>
      <c>[-16,  -7, -29, -65534]</c>
      <c><xref target="suit-sha256-esp256-ecdh-a128ctr"/></c>
      <c>suit-sha256-eddsa-ecdh-a128ctr</c>
      <c>MANDATORY</c>
      <c>-16</c>
      <c>-8</c>
      <c>-29</c>
      <c>-65534</c>
      <c>[-16,  -8, -29, -65534]</c>
      <c><xref target="suit-sha256-eddsa-ecdh-a128ctr"/></c>
      <c>suit-sha256-esp256-ecdh-a128gcm</c>
      <c>MANDATORY</c>
      <c>-16</c>
      <c>-7</c>
      <c>-29</c>
      <c>1</c>
      <c>[-16,  -7, -29,      1]</c>
      <c><xref target="suit-sha256-esp256-ecdh-a128gcm"/></c>
      <c>suit-sha256-ed25519-ecdh-chacha-poly</c>
      <c>MANDATORY</c>
      <c>-16</c>
      <c>-8</c>
      <c>-29</c>
      <c>24</c>
      <c>[-16,  -8, -29,     24]</c>
      <c><xref target="suit-sha256-ed25519-ecdh-chacha-poly"/></c>
      <c>suit-sha256-hsslms-a256kw-a256ctr</c>
      <c>MANDATORY</c>
      <c>-16</c>
      <c>-46</c>
      <c>-5</c>
      <c>-65532</c>
      <c>[-16, -46,  -5, -65532]</c>
      <c><xref target="suit-sha256-hsslms-a256kw-a256ctr"/></c>
</texttable>

<t>New entries to this registry require Standards Action.</t>

<t>A recipient device that claims conformance to this document will have implemented at least one of the above algorithms.</t>

<t>As time progresses, if entries are removed from mandatory status, they will become SHOULD, MAY and then possibly NOT RECOMMENDED for new implementation.  However, as it may be impossible to update the SUIT manifest processor in the field, support for all relevant algorithms will almost always be required by authoring tools.</t>

<t>When new algorithms are added by subsequent documents, the device and authoring tools will then claim conformance to those new documents.</t>

</section>


  </middle>

  <back>


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

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



<reference anchor="RFC8778">
  <front>
    <title>Use of the HSS/LMS Hash-Based Signature Algorithm with CBOR Object Signing and Encryption (COSE)</title>
    <author fullname="R. Housley" initials="R." surname="Housley"/>
    <date month="April" year="2020"/>
    <abstract>
      <t>This document specifies the conventions for using the Hierarchical Signature System (HSS) / Leighton-Micali Signature (LMS) hash-based signature algorithm with the CBOR Object Signing and Encryption (COSE) syntax. The HSS/LMS algorithm is one form of hash-based digital signature; it is described in RFC 8554.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="8778"/>
  <seriesInfo name="DOI" value="10.17487/RFC8778"/>
</reference>
<reference anchor="RFC9052">
  <front>
    <title>CBOR Object Signing and Encryption (COSE): Structures and Process</title>
    <author fullname="J. Schaad" initials="J." surname="Schaad"/>
    <date month="August" year="2022"/>
    <abstract>
      <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need to be able to define basic security services for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. This specification additionally describes how to represent cryptographic keys using CBOR.</t>
      <t>This document, along with RFC 9053, obsoletes RFC 8152.</t>
    </abstract>
  </front>
  <seriesInfo name="STD" value="96"/>
  <seriesInfo name="RFC" value="9052"/>
  <seriesInfo name="DOI" value="10.17487/RFC9052"/>
</reference>
<reference anchor="RFC9459">
  <front>
    <title>CBOR Object Signing and Encryption (COSE): AES-CTR and AES-CBC</title>
    <author fullname="R. Housley" initials="R." surname="Housley"/>
    <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
    <date month="September" year="2023"/>
    <abstract>
      <t>The Concise Binary Object Representation (CBOR) data format is designed for small code size and small message size. CBOR Object Signing and Encryption (COSE) is specified in RFC 9052 to provide basic security services using the CBOR data format. This document specifies the conventions for using AES-CTR and AES-CBC as content encryption algorithms with COSE.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9459"/>
  <seriesInfo name="DOI" value="10.17487/RFC9459"/>
</reference>

<reference anchor="I-D.ietf-suit-manifest">
   <front>
      <title>A Concise Binary Object Representation (CBOR)-based Serialization Format for the Software Updates for Internet of Things (SUIT) Manifest</title>
      <author fullname="Brendan Moran" initials="B." surname="Moran">
         <organization>Arm Limited</organization>
      </author>
      <author fullname="Hannes Tschofenig" initials="H." surname="Tschofenig">
         </author>
      <author fullname="Henk Birkholz" initials="H." surname="Birkholz">
         <organization>Fraunhofer SIT</organization>
      </author>
      <author fullname="Koen Zandberg" initials="K." surname="Zandberg">
         <organization>Inria</organization>
      </author>
      <author fullname="Øyvind Rønningstad" initials="O." surname="Rønningstad">
         <organization>Nordic Semiconductor</organization>
      </author>
      <date day="24" month="February" year="2025"/>
      <abstract>
	 <t>   This specification describes the format of a manifest.  A manifest is
   a bundle of metadata about code/data obtained by a recipient (chiefly
   the firmware for an Internet of Things (IoT) device), where to find
   the code/data, the devices to which it applies, and cryptographic
   information protecting the manifest.  Software updates and Trusted
   Invocation both tend to use sequences of common operations, so the
   manifest encodes those sequences of operations, rather than declaring
   the metadata.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-suit-manifest-33"/>
   
</reference>



    </references>

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




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

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-suit-firmware-encryption-24"/>
   
</reference>

<reference anchor="IANA-COSE" target="https://www.iana.org/assignments/cose/cose.xhtml">
  <front>
    <title>CBOR Object Signing and Encryption (COSE)</title>
    <author >
      <organization></organization>
    </author>
    <date year="2022"/>
  </front>
</reference>


    </references>

</references>


<?line 219?>

<section anchor="full-cddl"><name>A. Full CDDL</name>

<t>The following CDDL creates a subset of COSE for use with SUIT. Both tagged and untagged messages are defined. SUIT only uses tagged COSE messages, but untagged messages are also defined for use in protocols that share a ciphersuite with SUIT.</t>

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

<figure><sourcecode type="CDDL"><![CDATA[
SUIT_COSE_tool_tweak /= suit-sha256-hmac-a128kw-a128ctr
SUIT_COSE_tool_tweak /= suit-sha256-es256-ecdh-a128ctr
SUIT_COSE_tool_tweak /= suit-sha256-eddsa-ecdh-a128ctr
SUIT_COSE_tool_tweak /= suit-sha256-es256-ecdh-a128gcm
SUIT_COSE_tool_tweak /= suit-sha256-eddsa-ecdh-chacha-poly
SUIT_COSE_tool_tweak /= suit-sha256-hsslms-a256kw-a256ctr
SUIT_COSE_tool_tweak /= SUIT_COSE_Profiles

SUIT_COSE_Profiles /= SUIT_COSE_Profile_HMAC_A128KW_A128CTR
SUIT_COSE_Profiles /= SUIT_COSE_Profile_ES256_ECDH_A128CTR
SUIT_COSE_Profiles /= SUIT_COSE_Profile_EDDSA_ECDH_A128CTR
SUIT_COSE_Profiles /= SUIT_COSE_Profile_ES256_ECDH_A128GCM
SUIT_COSE_Profiles /= SUIT_COSE_Profile_EDDSA_ECDH_CHACHA20_POLY1304
SUIT_COSE_Profiles /= SUIT_COSE_Profile_HSSLMS_A256KW_A256CTR

suit-sha256-hmac-a128kw-a128ctr    = [-16, 5, -3, -65534]
suit-sha256-es256-ecdh-a128ctr     = [-16, -7, -29, -65534]
suit-sha256-eddsa-ecdh-a128ctr     = [-16, -8, -29, -65534]
suit-sha256-es256-ecdh-a128gcm     = [-16, -7, -29, 1]
suit-sha256-eddsa-ecdh-chacha-poly = [-16, -8, -29, 24]
suit-sha256-hsslms-a256kw-a256ctr  = [-16, -46, -5, -65532]

SUIT_COSE_Profile_HMAC_A128KW_A128CTR =
    SUIT_COSE_Profile<5,-65534> .and COSE_Messages
SUIT_COSE_Profile_ES256_ECDH_A128CTR =
    SUIT_COSE_Profile<-7,-65534> .and COSE_Messages
SUIT_COSE_Profile_EDDSA_ECDH_A128CTR =
    SUIT_COSE_Profile<-8,-65534> .and COSE_Messages
SUIT_COSE_Profile_ES256_ECDH_A128GCM =
    SUIT_COSE_Profile<-7,1> .and COSE_Messages
SUIT_COSE_Profile_EDDSA_ECDH_CHACHA20_POLY1304 =
    SUIT_COSE_Profile<-8,24> .and COSE_Messages
SUIT_COSE_Profile_HSSLMS_A256KW_A256CTR =
    SUIT_COSE_Profile<-46,-65532> .and COSE_Messages

SUIT_COSE_Profile<authid, encid> = SUIT_COSE_Messages<authid,encid>

SUIT_COSE_Messages<authid, encid> =
    SUIT_COSE_Untagged_Message<authid, encid> /
    SUIT_COSE_Tagged_Message<authid, encid> 
      
SUIT_COSE_Untagged_Message<authid, encid> = SUIT_COSE_Sign<authid> /
    SUIT_COSE_Sign1<authid> / SUIT_COSE_Encrypt<encid> / 
    SUIT_COSE_Encrypt0<encid> / SUIT_COSE_Mac<authid> /
    SUIT_COSE_Mac0<authid> 

SUIT_COSE_Tagged_Message<authid, encid> =
    SUIT_COSE_Sign_Tagged<authid> / SUIT_COSE_Sign1_Tagged<authid> /
    SUIT_COSE_Encrypt_Tagged<encid> / SUIT_COSE_Encrypt0_Tagged<encid> /
    SUIT_COSE_Mac_Tagged<authid> / SUIT_COSE_Mac0_Tagged<authid>

; Note: This is not the same definition as is used in COSE.
; It restricts a COSE header definition further without
; repeating the COSE definition. It should be merged
; with COSE by using the CDDL .and operator.
SUIT_COSE_Profile_Headers<algid> = (
    protected : bstr .cbor SUIT_COSE_alg_map<algid>,
    unprotected : SUIT_COSE_header_map
)
SUIT_COSE_alg_map<algid> = {
    1 => algid,
    * int => any
}

SUIT_COSE_header_map = {
    * int => any
}

SUIT_COSE_Sign_Tagged<authid> = #6.98(SUIT_COSE_Sign<authid>)


SUIT_COSE_Sign<authid> = [
    SUIT_COSE_Profile_Headers<authid>,
    payload : bstr / nil,
    signatures : [+ SUIT_COSE_Signature<authid>]
]


SUIT_COSE_Signature<authid> =  [
    SUIT_COSE_Profile_Headers<authid>,      
    signature : bstr
]


SUIT_COSE_Sign1_Tagged<authid> = #6.18(SUIT_COSE_Sign1<authid>)


SUIT_COSE_Sign1<authid> = [
    SUIT_COSE_Profile_Headers<authid>,
    payload : bstr / nil,
    signature : bstr
]


SUIT_COSE_Encrypt_Tagged<encid> = #6.96(SUIT_COSE_Encrypt<encid>)


SUIT_COSE_Encrypt<encid> = [
    SUIT_COSE_Profile_Headers<encid>,
    ciphertext : bstr / nil,
    recipients : [+SUIT_COSE_recipient<encid>]
]


SUIT_COSE_recipient<encid> = [    
    SUIT_COSE_Profile_Headers<encid>,
    ciphertext : bstr / nil,
    ? recipients : [+SUIT_COSE_recipient<encid>]
]


SUIT_COSE_Encrypt0_Tagged<encid> = #6.16(SUIT_COSE_Encrypt0<encid>)


SUIT_COSE_Encrypt0<encid> = [
    SUIT_COSE_Profile_Headers<encid>,
    ciphertext : bstr / nil,
]


SUIT_COSE_Mac_Tagged<authid> = #6.97(SUIT_COSE_Mac<authid>)


SUIT_COSE_Mac<authid> = [
   SUIT_COSE_Profile_Headers<authid>,      
   payload : bstr / nil,
   tag : bstr,
   recipients :[+SUIT_COSE_recipient<authid>]
]


SUIT_COSE_Mac0_Tagged<authid> = #6.17(SUIT_COSE_Mac0<authid>)


SUIT_COSE_Mac0<authid> = [
   SUIT_COSE_Profile_Headers<authid>,      
   payload : bstr / nil,
   tag : bstr,
]
]]></sourcecode></figure>

</section>


  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA9Vb627cOJb+r6cgEmDH7rYqdiXOxdvp3Yrt7hgTx0bK2Uaj
JzBYEquKE0nU6GKnJkk/x/zcx9jf2y+23zmkbiWV7WSnGxgjiKtE8vDwXL9z
KPu+7xW6iNSBOJVJKAuTrfzC+CdxGqlYJYWYRAuT6WIZ52JuMjEpi6XJcoHJ
4o0KdKoxKRdmLqZmXlzLTIm3Kegonl0slThJCpUlqqA5F0udLHIRy0TPVV7k
npzNMnWFzS9OxPTtyUVrOy80QSJjcBZmcl74WhVzPy914ceF9vceeQF2weTV
gciL0POwtTwQUxWUWL/yrk32fpGZMj1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