<?xml version="1.0" encoding="utf-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.5.6 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC8949 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8949.xml">
<!ENTITY I-D.ietf-cose-rfc8152bis-struct SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-cose-rfc8152bis-struct.xml">
<!ENTITY RFC7228 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7228.xml">
<!ENTITY RFC8392 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8392.xml">
<!ENTITY RFC8613 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8613.xml">
<!ENTITY I-D.ietf-ace-oauth-authz SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ace-oauth-authz.xml">
<!ENTITY I-D.ietf-lake-reqs SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-lake-reqs.xml">
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc tocdepth="2"?>

<rfc ipr="trust200902" docName="draft-selander-cose-kid-int-01" category="std">

  <front>
    <title abbrev="Integer value key identifer">Integer value for the CBOR Object Signing and Encryption (COSE) key identifier</title>

    <author initials="G." surname="Selander" fullname="Göran Selander">
      <organization abbrev="Ericsson">Ericsson AB</organization>
      <address>
        <postal>
          <street>SE-164 80 Stockholm</street>
          <country>Sweden</country>
        </postal>
        <email>goran.selander@ericsson.com</email>
      </address>
    </author>
    <author initials="J" surname="Preuß Mattsson" fullname="John Preuß Mattsson">
      <organization abbrev="Ericsson">Ericsson AB</organization>
      <address>
        <postal>
          <street>SE-164 80 Stockholm</street>
          <country>Sweden</country>
        </postal>
        <email>john.mattsson@ericsson.com</email>
      </address>
    </author>

    <date year="2022" month="March" day="19"/>

    
    
    

    <abstract>


<t>This document extends the CBOR Object Signing and Encryption (COSE) parameter <spanx style="verb">kid</spanx> to CBOR integer values.</t>



    </abstract>


  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t>Many Internet of Things (IoT) deployments require technologies which are highly performant in constrained environments <xref target="RFC7228"/>. The connectivity for these settings may exhibit extremely restricted bandwidth constraints, for which byte level optimizations are motivated, see <xref target="I-D.ietf-lake-reqs"/>.</t>

<t>The use of CBOR <xref target="RFC8949"/> enables a compact encoding of protected data as  COSE objects <xref target="I-D.ietf-cose-rfc8152bis-struct"/>, which is a basic building block in various IoT security settings such as CWT <xref target="RFC8392"/>,  OSCORE <xref target="RFC8613"/>, and ACE-OAuth <xref target="I-D.ietf-ace-oauth-authz"/>. COSE defines the key identifier parameter <spanx style="verb">kid</spanx> used to identify keys used in the COSE object.</t>

<t>The value of the <spanx style="verb">kid</spanx> parameter is specified to be encoded as a CBOR byte string, which (with the exception of the empty string) requires at least two bytes on the wire. For comparison, CBOR encoding of small integers (-24, …, 23) need only one byte on the wire. Since many IoT deployments may use local identifiers for which a few unique identifiers are sufficient, the use of CBOR integers as key identifiers would reduce the overhead due to transport of COSE objects.</t>

<t>This specification amends this limitation by extending the COSE parameter <spanx style="verb">kid</spanx> to allow CBOR integer values. <spanx style="verb">kid</spanx> is used in different instances, which all need to be extended to CBOR int encoding:</t>

<t><list style="symbols">
  <t>The <spanx style="verb">kid</spanx> COSE header parameter, see <xref target="kid-header-param"/>.</t>
  <t>The <spanx style="verb">kid</spanx> COSE Key Common Parameter, see <xref target="kid-key-common-param"/>.</t>
  <t>The <spanx style="verb">kid</spanx> CWT Confirmation Method, see <xref target="kid-cwt-conf-meth"/>.</t>
</list></t>

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

<t>There are no additional security considerations compared to key identifiers to being byte strings.</t>

</section>
<section anchor="iana" title="IANA Considerations">

<section anchor="kid-header-param" title="COSE Header Parameters Registry">

<t>IANA has extended the Value Type of <spanx style="verb">kid</spanx> in the “COSE Header Parameters” registry under the group name “CBOR Object Signing and Encryption (COSE)” to also allow the Value Type int. The resulting Value Type is bstr / int. The Value Registry for this item is empty and omitted from the table below.</t>

<figure><artwork><![CDATA[
+------+-------+------------+----------------+
| Name | Label | Value Type | Description    |
+------+-------+------------+----------------+
| kid  |   4   | bstr / int | Key identifier |
+------+-------+------------+----------------+
]]></artwork></figure>

</section>
<section anchor="kid-key-common-param" title="COSE Key Common Parameters Registry">

<t>IANA has extended the Value Type of <spanx style="verb">kid</spanx> in the “COSE Key Common Parameters” registry under the group name “CBOR Object Signing and Encryption (COSE)” to also allow the Value Type int. The resulting Value Type is bstr / int. The Value Registry for this item is empty and omitted from the table below.</t>

<figure><artwork><![CDATA[
+------+-------+------------+---------------------------+
| Name | Label | Value Type | Description               |
+------+-------+------------+---------------------------+
| kid  |   2   | bstr / int | Key identification value  |
|      |       |            | - match to kid in message |
+------+-------+------------+---------------------------+
]]></artwork></figure>

</section>
<section anchor="kid-cwt-conf-meth" title="CWT Confirmation Methods">

<t>IANA has extended the Value Type of <spanx style="verb">kid</spanx> in the “CWT Confirmation Methods” registry under the group name “CBOR Web Token (CWT) Claims” to also allow the Value Type int. The resulting Value Type is bstr / int. The Value Registry for this item is empty and omitted from the table below.</t>

<figure><artwork><![CDATA[
+------+-------+------------+---------------------------+
| Name | Label | Value Type | Description               |
+------+-------+------------+---------------------------+
| kid  |   3   | bstr / int | Key identification value  |
|      |       |            | - match to kid in message |
+------+-------+------------+---------------------------+
]]></artwork></figure>

</section>
</section>


  </middle>

  <back>

    <references title='Normative References'>

&RFC8949;
&I-D.ietf-cose-rfc8152bis-struct;


    </references>

    <references title='Informative References'>

&RFC7228;
&RFC8392;
&RFC8613;
&I-D.ietf-ace-oauth-authz;
&I-D.ietf-lake-reqs;


    </references>


<section numbered="no" anchor="acknowledgments" title="Acknowledgments">

</section>


  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