<?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.6.31 (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-13" 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="March" day="17"/>

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

    <abstract>


<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>


<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 in COSE (<xref target="RFC9459"/>), which is Deprecated. 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 prefered 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>

</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-es256-ecdh-a128ctr"><name>Current Constrained Asymmetric MTI Profile 1: suit-sha256-es256-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>ES256</c>
      <c>-7</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>EDDSA</c>
      <c>-8</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-es256-ecdh-a128gcm"><name>Current AEAD Asymmetric MTI Profile 1: suit-sha256-es256-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>ES256</c>
      <c>-7</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-eddsa-ecdh-chacha-poly"><name>Current AEAD Asymmetric MTI Profile 2: suit-sha256-eddsa-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>EDDSA</c>
      <c>-8</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>This draft does not specify a particular set of HSS-LMS parameters. Deep trees are RECOMMENDED due to key lifetimes in IoT devices.</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-es256-ecdh-a128ctr.</t>

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

<t>Payload encryption is predominantly to protect user data, such as personalisation data, in transit (<xref target="RFC8890"/>). It can also serve to protect Intellectual Property in transit.</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 Alforithm 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-es256-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-es256-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-es256-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-es256-ecdh-a128gcm"/></c>
      <c>suit-sha256-eddsa-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-eddsa-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>

</section>


  </middle>

  <back>


    <references title='Normative References'>



<reference anchor='RFC8152'>
  <front>
    <title>CBOR Object Signing and Encryption (COSE)</title>
    <author fullname='J. Schaad' initials='J.' surname='Schaad'/>
    <date month='July' year='2017'/>
    <abstract>
      <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need for the ability to have basic security services defined 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>
    </abstract>
  </front>
  <seriesInfo name='RFC' value='8152'/>
  <seriesInfo name='DOI' value='10.17487/RFC8152'/>
</reference>

<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'>




<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='29' month='January' 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-23'/>
   
</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>


<reference anchor='RFC8890'>
  <front>
    <title>The Internet is for End Users</title>
    <author fullname='M. Nottingham' initials='M.' surname='Nottingham'/>
    <date month='August' year='2020'/>
    <abstract>
      <t>This document explains why the IAB believes that, when there is a conflict between the interests of end users of the Internet and other parties, IETF decisions should favor end users. It also explores how the IETF can more effectively achieve this.</t>
    </abstract>
  </front>
  <seriesInfo name='RFC' value='8890'/>
  <seriesInfo name='DOI' value='10.17487/RFC8890'/>
</reference>




    </references>


<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:
H4sIAAAAAAAAA9Vb63LbRpb+j6foiqt2JUegJdqyZW2cXVpSEtVYlsuUK5XK
uFRNoEn2CEBjcJHMsZ3nmJ/7GPt78mLzndMNoEmCkpydpGpUKotEnz597reG
wzAMKl0l6lCcySyWlSkWYWXC0zRPVKqySoySmSl0NU9LMTWFGNXV3BSlALB4
qyKdawCVwkzF2EyrG1ko8S4HHsX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