<?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-12" 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>Authenticated Encryption with Additional Data (AEAD) is preferred over un-authenticated encryption. Where possible an AEAD profile SHOULD be selected. Certain constrained IoT applications require on-the-fly decryption, which necessitates a non-AEAD encryption algorithm. If the application is not a constrained device, the two AEAD profiles are RECOMMENDED.</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-considerations"><name>Security Considerations</name>

<t>For the avoidance of doubt, there are scenarios where payload or manifest encryption are not required. In these scenarios, the encryption element of the selected profile is simply not used.</t>

<t>AES-CTR mode 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>On-the-fly decryption (without the whole payload) must be supported. Therefore, there is no difference between AEAD and plaintext hash verification.</t>
  <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 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>


    </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:
H4sIAAAAAAAAA9Va3XLbNha+51NgkpldOzVlS4kTx9t0V7GdxtM4zljOdDpt
xgORkIQNRbAgaUdN0ufo5T7GXm9fbL8DgCQkUraTbTqzHo8tEQcHB9/5P1IY
hkEhi0TssxOexrxQehEWKjyeZ4mYi7Rgw2SqtCxm85xNlGbDspgpnTMQszMR
yUyCKGdqwkZqUlxxLdjrDHyEoS5mgh2nhdCpKIjmfCbTac7mPJUTkRd5wMdj
LS5x+PkxG70+PveOC2IVpXwOyWLNJ0UoRTEJ81IW4byQYX8QRDgFxIt9lhdx
EOBovs9GIiqxfxFcKf12qlWZ7RvGwVuxwKN4v5YnPCS2QSAzvc8KXebFYGfn
8c4gCCKV5iLNy3yfpSoI8gKXveCJSiHLQuRBJvcDxvQkEnFeLBL3lLFCRd5L
mcaApnqQK11oMcnr94v50ttCy6gmjtScsK9XZZrItDlGvCvCROZFCCZjlYAs
VPe+wgoQm/MsA8aeHBeJuBRE9AAYGe1B+hBr9CNTLDztsROleeqeWdCfagF7
SJdWlJ5Cc7/wQqp0nw31nL2Qc1mI2K2LOZfJPhvbrb05be2R3v4xpZUe7rVy
9O+/9djZ7/9OU7KLgsdLIvz+2+JSkp21CZYleQnFygi6n0voLi4jmPGySMpw
6mlVM1or0rDHzvPyLZ+rQi2JM3wrNW+tLUtymok0msmM/aXxh3MRzVKVqKkU
+RYb9V70lmXjxLdXVHw9wYJU6Tk4XwoyuLNnB3v93UH18tGjPffy8Q6ewmhy
4d4/2H2M94WOxhGeHIeHPc95nO/tw/LTic9/mW4i9ZzED3EhvcjM9Yho+HIY
HpyOjvbNJVzsuHPw9PSMnY7/KaKCjeSUQDYh4qjezDZo1+Yds622Q/xQsNhn
g53BwHLkeirgCbOiyPL97e2rq6ue5CnvAehtnudgbnxjm+5r/vTezYp5EgRh
GDI+hifxCG6NUJOTQ5QmiuUZYtUECmBG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