<?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.26 (Ruby 3.0.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-15" 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="May" day="26"/>

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

    <abstract>


<t>This document specifies cryptographic algorithm profiles to be used with the Software Updates for Internet of Things (suit) manifest.
These profiles define 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 specification 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.</t>

<t>For more details about the constrained node use case, see <xref target="aes-ctr-payloads"/>. 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>A note regarding the use of HSS-LMS: 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 specification 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.</t>
</list></t>

<t>See <xref target="I-D.ietf-suit-firmware-encryption"/> for additional background information.</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='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'>




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


<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:
H4sIAAAAAAAAA9Vb627bSJb+z6coJMCunRYVW4lz8XZ6V7GdjjFxbETONho9
gVEiS1KNSRaHFzuaJP0c83MeY39vv9h+51TxJlG2k51uYIwgllinTp37rWjf
971CF5HaFycyCWVhsqVfGP84TiMVq6QQ42huMl0s4lzMTCbGZbEwWS4ALN6p
QKcaQLkwMzExs+JaZkq8T4FHMXSxUOI4KVSWqIJgzhc6mecilomeqbzIPTmd
ZuoKh58fi8n74/PWcV5ogkTGoCzM5KzwtSpmfl7qwo8L7e/ueQFOAfByX+RF
6Hk4Wu6LiQpK7F961ya7nGemTPcZsXeplngU7tf0+IeE1vN0mu2LIivzYrSz
83xn5HmBSXKV5GW+LxLjeXkBZi9kZBLQslS5l+p9T4hsFqgwL5aReypEYYLW
R52EEE31IDdZkalZXn9fxp2vRaaDGjgwMcm+XtVJpJ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