<?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.2.11 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC7049 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7049.xml">
<!ENTITY RFC7925 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7925.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY I-D.raza-ace-cbor-certificates SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.raza-ace-cbor-certificates.xml">
<!ENTITY I-D.ietf-cbor-sequence SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-cbor-sequence.xml">
<!ENTITY I-D.ietf-cose-x509 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-cose-x509.xml">
<!ENTITY RFC8610 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8610.xml">
<!ENTITY RFC7228 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7228.xml">
<!ENTITY I-D.ietf-emu-eaptlscert SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-emu-eaptlscert.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-mattsson-cose-cbor-cert-compress-00" category="std" updates="draft-ietf-cose-x509">

  <front>
    <title abbrev="CBOR Certificate Compression for COSE">CBOR Object Signing and Encryption (COSE): Headers for Carrying CBOR Compressed Certificates</title>

    <author initials="J." surname="Preuss Mattsson" fullname="John Preuss Mattsson">
      <organization>Ericsson AB</organization>
      <address>
        <email>john.mattsson@ericsson.com</email>
      </address>
    </author>
    <author initials="G." surname="Selander" fullname="Göran Selander">
      <organization>Ericsson AB</organization>
      <address>
        <email>goran.selander@ericsson.com</email>
      </address>
    </author>
    <author initials="S." surname="Raza" fullname="Shahid Raza">
      <organization>RISE AB</organization>
      <address>
        <email>shahid.raza@ri.se</email>
      </address>
    </author>
    <author initials="J." surname="Höglund" fullname="Joel Höglund">
      <organization>RISE AB</organization>
      <address>
        <email>joel.hoglund@ri.se</email>
      </address>
    </author>
    <author initials="M." surname="Furuhed" fullname="Martin Furuhed">
      <organization>Nexus Group</organization>
      <address>
        <email>martin.furuhed@nexusgroup.com</email>
      </address>
    </author>

    <date year="2020" month="March" day="09"/>

    
    
    

    <abstract>


<t>Certificate chains often take up the majority of the bytes transmitted in COSE message that carry certificates. Large messages can cause problems, particularly in constrained IoT environments. RFC 7925 defines a certificate profile for constrained IoT. General purpose compression algorithms can in many cases not compress RFC 7925 profiled certificates at all. By using the fact that the certificates are profiled, the CBOR certificate compression algorithms can in many cases compress RFC 7925 profiled certificates with over 50%. This document specifies the CBOR certificate compression algorithm for use with COSE.</t>



    </abstract>


  </front>

  <middle>


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

<t><xref target="I-D.ietf-cose-x509"/> provides attributes that refer to or contain X.509 certificates. X.509 certificates  often take up the majority of the bytes transmitted in COSE messages that carry certificates. Large messages negatively affect latency, but can also result in that the security protocol cannot be completed <xref target="I-D.ietf-emu-eaptlscert"/>.</t>

<t>Large messages is particularly a problem for constrained IoT environments <xref target="RFC7228"/> <xref target="I-D.ietf-lake-reqs"/>. <xref target="RFC7925"/> defines a X.509 certificate profile for constrained IoT. The certificate profile in <xref target="RFC7925"/> is defined for TLS/DTLS 1.2 but works well also for COSE and other protocols. For such RFC 7925 profiled IoT certificates, general purpose compression algorithms can in many cases only provide negliable or no compression at all. <xref target="I-D.raza-ace-cbor-certificates"/> therefore defines a CBOR <xref target="RFC7049"/> compression algorithm for RFC 7925 profiled certificates. The algorithm works for all RFC 7925 profiled certificates and provide significant reduction in size, in many cases over 50%.</t>

<t>This document specifies the CBOR certificate compression algorithm <xref target="I-D.raza-ace-cbor-certificates"/> for use with COSE.</t>

</section>
<section anchor="notational-conventions" title="Notational Conventions">

<t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>

</section>
<section anchor="cbor-certificate-compression-algorithm" title="CBOR Certificate Compression Algorithm">

<t>This document specifies the CBOR certificate compression algorithm specified in Section 3 of <xref target="I-D.raza-ace-cbor-certificates"/> for use with COSE.</t>

<t>The CBOR Certificate compression algorithm takes as input an RFC 7925 profiled X.509 certificate. The output of the CBOR compression algorithm is a CBOR Sequence <xref target="I-D.ietf-cbor-sequence"/>, i.e. a sequence of concatenated CBOR encoded CBOR data items <xref target="RFC7049"/>. Compressed certificates can be analysed with any CBOR decoder and be validated against the CDDL specification defined in Section 3 of <xref target="I-D.raza-ace-cbor-certificates"/>.</t>

<t>The algorithm works for all RFC 7925 profiled certificates and provide significant reduction in size, in many cases over 50%. An example compression of a RFC 7925 profiled certificate is given below. See Appendix A of <xref target="I-D.raza-ace-cbor-certificates"/> for details.</t>

<figure><artwork><![CDATA[
+------------------+--------------+------------+--------------------+
|                  |   RFC 7925   |    zlib    |  CBOR Certificate  |
+------------------+---------------------------+--------------------+
| Certificate Size |     314      |     295    |         136        |
+------------------+--------------+------------+--------------------+
]]></artwork></figure>

<t>The header attributes defined in this document are:</t>

<t><list style="hanging">
  <t hangText='CBORchain:'>
  This header attribute contains an ordered array of certicates similar to x5chain <xref target="I-D.ietf-cose-x509"/>. The difference being that all the included certificates are CBOR certificates <xref target="I-D.raza-ace-cbor-certificates"/> instead of DER encoded X.509 certificates.</t>
</list></t>

<figure><artwork><![CDATA[
+-----------+-------+----------------+---------------------+
| Name      | Label | Value Type     | Description         |
+===========+=======+================+=====================+
| CBORchain | TBD1  | COSE_CBOR_Cert | An ordered chain of |
|           |       |                | CBOR certificates   |
+-----------+-------+----------------+---------------------+
]]></artwork></figure>

<t>Below is an equivalent CDDL <xref target="RFC8610"></xref> description of the text above.</t>

<figure><artwork><![CDATA[
COSE_CBOR_Cert = bstr / [ 2*certs: bstr ]
]]></artwork></figure>

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

<t>The security considerations in <xref target="I-D.ietf-cose-x509"/> and <xref target="I-D.raza-ace-cbor-certificates"/> apply.</t>

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

<t>This document registers the COSE Header items in Table 1 in the “COSE Header Parameters” registry under the “CBOR Object Signing and Encryption (COSE)” heading. For each item, the ‘Reference’ field points to this document.</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>

&RFC2119;
&RFC7049;
&RFC7925;
&RFC8174;
&I-D.raza-ace-cbor-certificates;
&I-D.ietf-cbor-sequence;
&I-D.ietf-cose-x509;


    </references>

    <references title='Informative References'>

&RFC8610;
&RFC7228;
&I-D.ietf-emu-eaptlscert;
&I-D.ietf-lake-reqs;


    </references>


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

<t>The authors want to thank TBD for their valuable comments and feedback.</t>

</section>


  </back>

<!-- ##markdown-source:
H4sIAPd/Zl4AA8VYbW/bOBL+rl8xcHHYl8baxG12WwMF6thpm0VeerF7uMNi
saClsc1GJlWSSuK2uZ+1f2D/2M2Qki3ZTuouCpw+2JJmyBk+M/NwqHa7HTnp
MuxCq390cQkX4/eYOBjKqZJqCkKlcKwSs8id1Aq+718Mj3/owhsUKR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