<?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-11" 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+51NgmplduzVlS4kTx9t0V7Gd1tM4zljOdDpt
xgORkIQNRbAgaUdN0ufo5T7GXm9fbL8DgCQkUrKTbTuzHo8tEQcHB9/5P1IY
hkEhi0QcsjOexrxQehEWKjydZ4mYi7Rgw2SqtCxm85xNlGbDspgpnTMQswsR
yUyCKGdqwkZqUtxwLdirDHyEoS5mgp2mhdCpKIjmcibTac7mPJUTkRd5wMdj
La5x+OUpG706vfSOC2IVpXwOyWLNJ0UoRTEJ81IW4byQYb8fRDgFxItDlhdx
EOBofshGIiqxfxHcKP1mqlWZHRrGwRuxwKP4sJYnPCa2QSAzfcgKXebFYG/v
8d4gCCKV5iLNy/yQpSoI8gKXveKJSiHLQuRBJg8DxvQkEnFeLBL3lLFCRd5L
mcaApnqQK11oMcnr94v50ttCy6gmjtScsK9XZZrItDlGvC3CROZFCCZjlYAs
VJ9/gRUgNudZBow9Oa4ScS2I6AEwMtqD9CHW6EemWHjaY2dK89Q9s6A/1QL2
kC6tKD2F5n7mhVTpIRvqOXsu57IQsVsXcy6TQza2W3tz2tojvf1jSis93Gvl
6N9+7bGL3/6dpmQXBY+XRPjt18W1JDtrEyxL8gKKlRF0P5fQXVxGMONlkZTh
1NOqZrRWpGGPXeblGz5XhVoSZ/hGat5aW5bkPBNpNJMZ+0vjD5cimqUqUVMp
8h026j3vLcvGiW+vqPh6ggWp0nNwvhZkcBfPjg76+4Pq5aNHB+7l4z08hdHk
wr1/sP8Y7wsdjSM8OQ2Pe57zON87hOWnE5//Mt1E6jmJH+JCepGZ6xHR8MUw
PDofnRyaS7jY8dnR0/MLdj7+p4gKNpJTAtmEiJN6M9uiXdufmW21HeKHgsUh
G+wNBpYj11MBT5gVRZYf7u7e3Nz0JE95D0Dv8jwHc+Mbu3Rf86f3dlbMkyAI
w5DxMTyJR3BrhJqc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