<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc2246 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2246.xml">
<!ENTITY rfc4346 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4346.xml">
<!ENTITY rfc4309 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4309.xml">
<!ENTITY rfc6066 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6066.xml">
<!ENTITY rfc5288 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5288.xml">
<!ENTITY rfc5246 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY rfc5116 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5116.xml">
<!ENTITY rfc5430 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5430.xml">
<!ENTITY rfc4492 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4492.xml">
<!ENTITY rfc5639 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5639.xml">
<!ENTITY rfc6090 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6090.xml">
<!ENTITY rfc6347 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6347.xml">
<!ENTITY rfc6655 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6655.xml">
]>
<?rfc rfcedstyle="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc number="7251" category="info" consensus="yes" submissionType="IETF"
     ipr="trust200902">
  <front>
    <title abbrev="AES-CCM ECC TLS">AES-CCM Elliptic Curve Cryptography (ECC)
    Cipher Suites for TLS</title>

    <author fullname="David McGrew" initials="D" surname="McGrew">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>13600 Dulles Technology Drive</street>

          <city>Herndon</city>

          <code>20171</code>

          <region>VA</region>

          <country>USA</country>
        </postal>

        <email>mcgrew@cisco.com</email>
      </address>
    </author>

    <author fullname="Daniel V. Bailey" initials="D" surname="Bailey">
      <organization>Ruhr-University Bochum</organization>

      <address>
        <postal>
          <street>Universitatsstr. 150</street>

          <city>44801 Bochum</city>

          <country>Germany</country>
        </postal>

        <email>danbailey@sth.rub.de</email>
      </address>
    </author>

    <author fullname="Matthew Campagna" initials="M." surname="Campagna">
      <organization>Certicom Corp.</organization>

      <address>
        <postal>
          <street>5520 Explorer Drive #400</street>

          <city>Mississauga</city>

          <region>Ontario</region>

          <code>L4W 5L1</code>

          <country>Canada</country>
        </postal>

        <email>mcampagna@gmail.com</email>
      </address>
    </author>

    <author fullname="Robert Dugal" initials="R." surname="Dugal">
      <organization>Certicom Corp.</organization>

      <address>
        <postal>
          <street>4701 Tahoe Blvd., Building A</street>

          <city>Mississauga</city>

          <region>Ontario</region>

          <code>L4W 0B5</code>

          <country>Canada</country>
        </postal>

        <email>rdugal@certicom.com</email>
      </address>
    </author>

    <date month="May" year="2014"/>

    <area>Security Area</area>

    <workgroup>TLS Working Group</workgroup>

<!-- [rfced] Please insert any keywords (beyond those that appear in 
the title) for use on http://www.rfc-editor.org/search.
-->

<keyword>example</keyword>


    <abstract>
      <t>This memo describes the use of the Advanced Encryption
      Standard (AES) in the Counter and CBC-MAC Mode (CCM) of
      operation within Transport Layer Security (TLS) to provide
      confidentiality and data-origin authentication. The AES-CCM
      algorithm is amenable to compact implementations, making it
      suitable for constrained environments, while at the same time
      providing a high level of security. The cipher suites defined in
      this document use Elliptic Curve Cryptography (ECC) and are
      advantageous in networks with limited bandwidth.</t>
    </abstract>
  </front>

<!-- [rfced] This document uses both forms of this term
(as does RFC 6655). May this be made consistent throughout?
If so, how?

cipher suite vs. ciphersuite
-->

  <middle>
    <section title="Introduction">


<t> This document describes the use of Advanced Encryption Standard (AES)
     <xref target="AES"/> in Counter with CBC-MAC Mode (CCM) <xref
     target="CCM"/> in several TLS
  cipher suites.  AES-CCM provides both authentication and
  confidentiality (encryption and decryption) and uses as its only primitive
  the AES encrypt block cipher operation.

      This makes it amenable to compact implementations, which are advantageous in
      constrained environments. Of course, adoption outside of constrained
      environments is necessary to enable interoperability, such as that
      between web clients and embedded servers, or between embedded clients
      and web servers. The use of AES-CCM has been specified for the IPsec
      Encapsulating Security Payload (ESP)
      <xref target="RFC4309"/> and 802.15.4 wireless networks <xref
      target="IEEE802154"/>.</t>

      <t>Authenticated encryption, in addition to providing confidentiality
      for the plaintext that is encrypted, provides a way to check its
      integrity and authenticity. Authenticated Encryption with Associated
      Data, or AEAD <xref target="RFC5116"/>, adds the ability to check the
      integrity and authenticity of some associated data that is not
      encrypted. This memo utilizes the AEAD facility within TLS 1.2 <xref
      target="RFC5246"/> and the AES-CCM-based AEAD algorithms defined in
      <xref target="RFC5116"/> and <xref target="RFC6655"/>.
All of these
      algorithms use AES-CCM; some have shorter authentication tags and are
      therefore more suitable for use across networks in which bandwidth is
      constrained and message sizes may be small.</t>

      <t>The cipher suites defined in this document use Ephemeral Elliptic
      Curve Diffie-Hellman (ECDHE) as their key establishment mechanism; these
      cipher suites can be used with DTLS <xref target="RFC6347"/>.</t>

      <section title="Conventions Used in This Document">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119"/>.</t>
      </section>
    </section>

    <section anchor="suites" title="ECC-Based AES-CCM Cipher Suites">
      <t>The cipher suites defined in this document are based on the AES-CCM
      Authenticated Encryption with Associated Data (AEAD) algorithms
      AEAD_AES_128_CCM and AEAD_AES_256_CCM described in <xref
      target="RFC5116"/>. The following cipher suites are defined:</t>

      <t><list style="hanging">
          <t>
CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CCM = {0xC0,0xAC}
<vspace/> 
CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CCM = {0xC0,0xAD}
<vspace/>
CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = {0xC0,0xAE}
<vspace/>
CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 = {0xC0,0xAF}
<vspace/>
</t>
        </list></t>

      <t>These cipher suites make use of the AEAD capability in TLS 1.2 <xref
      target="RFC5246"/>. Note that each of these AEAD algorithms uses
      AES-CCM. Cipher suites ending with "8" use eight-octet authentication
      tags; the other cipher suites have 16-octet authentication tags.</t>

      <t>The HMAC truncation option described in Section 7 of <xref
      target="RFC6066"/> (which negotiates the "truncated_hmac" TLS extension)
      does not have an effect on the cipher suites defined in this note,
      because they do not use HMAC to protect TLS records.</t>

      <t>The "nonce" input to the AEAD algorithm is as defined in <xref
      target="RFC6655"/>.
      </t>

      <t>In DTLS, the 64-bit seq_num field is the 16-bit DTLS epoch field
      concatenated with the 48-bit sequence_number field. The epoch and
      sequence_number appear in the DTLS record layer.</t>

      <t>This construction allows the internal counter to be 32 bits long,
      which is a convenient size for use with CCM.</t>

      <t>These cipher suites make use of the default TLS 1.2 Pseudorandom
      Function (PRF), which uses HMAC with the SHA-256 hash function.</t>

      <t>The ECDHE_ECDSA key exchange is performed as defined in <xref
      target="RFC4492"/>, with the following additional stipulations:</t>

      <t><list style="symbols">

	  <t>
	    Curves with a cofactor equal to one SHOULD be used; this simplifies 
	    their use.  
	  </t>

          <t>The uncompressed point format MUST be supported. Other point
          formats MAY be used.</t>

          <t>The client SHOULD offer the elliptic_curves extension, and the
          server SHOULD expect to receive it.</t>

          <t>The client MAY offer the ec_point_formats extension, but the
          server need not expect to receive it.</t>

          <t>Fundamental ECC algorithms <xref target="RFC6090"/> MAY be used as an implementation
          method.</t>

          <t>
	    If the server uses a certificate, then the requirements in RFC
	    4492 apply: "The server's certificate MUST contain an
	    ECDSA-capable public key
     and be signed with ECDSA."  Guidance on acceptable choices of hashes
     and curves that can be used with each cipher suite is detailed in <xref target="reqts"/>.  The Signature Algorithms extension (Section
     7.4.1.4.1 of <xref target="RFC5246"/>) SHOULD be used to indicate support of
     those signature and hash algorithms.  If a client certificate is
     used, the same criteria SHOULD apply to it.
	   </t>

        </list></t>

      <t>Implementations of these cipher suites will interoperate with <xref
      target="RFC4492"/> but can be more compact than a full implementation
      of that RFC.</t>

      <section anchor="newaead" title="AEAD Algorithms">
        <t>The following AEAD algorithms are used: </t>

        <t><list style="hanging">
            <t>AEAD_AES_128_CCM is used in the
            TLS_ECDHE_ECDSA_WITH_AES_128_CCM cipher suite,</t>

            <t><vspace/> AEAD_AES_256_CCM is used in the
            TLS_ECDHE_ECDSA_WITH_AES_256_CCM cipher suite,<vspace/></t>

            <t><vspace/> AEAD_AES_128_CCM_8 is used in the
            TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 cipher suite, and<vspace/></t>

            <t><vspace/> AEAD_AES_256_CCM_8 is used in the
            TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 cipher suite.<vspace/></t>
          </list>
	</t>
      </section>

      <section anchor="reqts" title="Requirements on Curves and Hashes">

   <t>
     Implementations SHOULD select elliptic curves and hash functions
     so that AES-128 is used with a curve and a hash function
     supporting a 128-bit security level, and AES-256 is used with a
     curve and a hash function supporting a 192-bit or 256-bit
     security level.  More detailed guidance on cryptographic
     parameter selection is given in <xref target="SP800-57"/> (see
     especially Tables 2 and 3).
   </t>

   <t>
     <xref target="rec"/> describes suitable curves and hash functions
     that are widely available.  
   </t>

      </section>
    </section>

    <section title="TLS Versions">
      <t>These cipher suites make use of the authenticated encryption with
      additional data defined in TLS 1.2 <xref target="RFC5288"/>. They MUST
      NOT be negotiated in older versions of TLS. Clients MUST NOT offer these
      cipher suites if they do not offer TLS 1.2 or later. Servers that
      select an earlier version of TLS MUST NOT select one of these cipher
      suites. Earlier versions do not have support for AEAD; for instance, the
      TLSCiphertext structure does not have the "aead" option in TLS 1.1.
      Because TLS has no way for the client to indicate that it supports TLS
      1.2 but not earlier versions, a non-compliant server might potentially negotiate
      TLS 1.1 or earlier and select one of the cipher suites in this document.
      Clients MUST check the TLS version and generate a fatal
      "illegal_parameter" alert if they detect an incorrect version.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>
	IANA has assigned the values for the cipher suites
	defined in <xref target="suites"/> from the "TLS 
	Cipher Suite Registry".  The
	DTLS-OK column has been marked as "Y" for each of these
	algorithms.
      </t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <section title="Perfect Forward Secrecy">
        <t>The perfect forward secrecy properties of ephemeral Diffie-Hellman
        cipher suites are discussed in the security analysis of <xref
        target="RFC5246"/>. This analysis applies to the ECDHE
        cipher suites.</t>
      </section>

      <section title="Counter Reuse">
        <t>AES-CCM security requires that the counter never be reused. 
  The IV construction in <xref target="suites"/> is designed to prevent counter reuse.
	</t>
      </section>

      <section title="Hardware Security Modules">
	<t>
	  A cipher suite can be implemented in such a way that the
	  secret keys and private keys are stored inside a Hardware
	  Security Module (HSM), and the cryptographic operations
	  involving those keys are performed by the HSM on data
	  provided by an application interacting with the HSM through
	  an interface such as that defined by the Cryptographic Token
	  Interface Standard <xref target="PKCS11"/>.  When an AEAD
	  cipher suite, such as those in this note, are implemented in
	  this way, 
	  special handling of the nonce is required.
	  This is because the "salt" part of the nonce is set to the
	  client_write_IV or server_write_IV, which is a function of
	  the TLS master secret.
	</t>
	<t>
	  Another potential issue with the Cryptographic Token
	  Interface Standard is that the use of the DecryptUpdate
	  function is not possible with the CCM decrypt operation or
	  the decrypt operation of any other authenticated encryption
	  method.  This is because the DecryptUpdate requires that
	  post-decryption plaintext be returned before the
	  authentication check is completed.
	</t>
      </section>

    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>This document borrows heavily from <xref
      target="RFC5288"/>. Thanks are due to Robert Cragie for his
      great help in making this work complete, correct, and useful,
      and to Peter Dettman for his review.  Thanks also to Mike
      StJohns for pointing out the HSM issues.
      </t>

      <t>This document is motivated by the considerations raised in the Zigbee
      Smart Energy 2.0 working group.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      &rfc6090;
      &rfc5639;

      &rfc6347;

      &rfc6655;

      &rfc4492;

      &rfc2119;

      &rfc6066;

      &rfc5288;

      &rfc5116;

      &rfc5246;

      <reference anchor="CCM">
        <front>
          <title>Recommendation for Block Cipher Modes of Operation: The CCM
          Mode for Authentication and Confidentiality</title>

          <author>
            <organization>National Institute of Standards and
            Technology</organization>
          </author>

          <date month="May" year="2004"/>
        </front>

        <seriesInfo name="SP" value="800-38C"/>
      </reference>

      <reference anchor="SP800-57">
        <front>
          <title>Recommendation for Key Management - Part 1: General
          (Revision 3)
</title>

          <author>
            <organization>National Institute of Standards and
            Technology</organization>
          </author>

          <date month="July" year="2012"/>
        </front>

        <seriesInfo name="SP" value="800-57 Part 1"/>
      </reference>

      <reference anchor="AES">
        <front>
          <title>Specification for the Advanced Encryption Standard
          (AES)</title>

          <author>
            <organization>National Institute of Standards and
            Technology</organization>
          </author>

          <date month="November" year="2001"/>
        </front>

        <seriesInfo name="FIPS" value="197"/>
      </reference>
    </references>

    <references title="Informative References">
      &rfc4309;

      <reference anchor="IEEE802154">
        <front>
          <title>Wireless Personal Area Networks</title>

          <author>
            <organization>IEEE</organization>
          </author>

          <date year="2006"/>
        </front>

        <seriesInfo name="IEEE Standard" value="802.15.4-2006"/>
      </reference>


      <reference anchor="PKCS11">
        <front>
          <title>PKCS #11: Cryptographic Token Interface Standard version 2.20</title>

          <author>
            <organization>
	    RSA Laboratories 
	    </organization>
          </author>

          <date year="2004"/>
        </front>

        <seriesInfo name="Public Key Cryptography Standards" value="PKCS#11-v2.20"/>
      </reference>

    </references>


    <section anchor="rec" title="Recommended Curves and Algorithms">
      <t>
	This memo does not mandate any particular elliptic curves or
	cryptographic algorithms, for the sake of flexibility.
	However, since the main motivation for the AES-CCM-ECC
	cipher suites is their suitability for constrained
	environments, it is valuable to identify a particular suitable
	set of curves and algorithms.  
      </t>
      <t>
	This appendix identifies a set of elliptic curves and
	cryptographic algorithms that meet the requirements of this
	note and that are widely supported and believed to be secure.
      </t>

      <t> The curves and hash algorithms recommended for each cipher suite are:
      </t>
      <t>
	<list style="hanging">
	  <t> An implementation that includes either
	  TLS_ECDHE_ECDSA_WITH_AES_128_CCM or
	  TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 SHOULD support the
	  secp256r1 curve and the SHA-256 hash function.
	  </t>
	  <t>
	    An implementation that includes either
	    TLS_ECDHE_ECDSA_WITH_AES_256_CCM or
	    TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 SHOULD support the
	    secp384r1 curve and the SHA-384 hash function, and MAY
	    support the secp521r1 curve and the SHA-512 hash function.
	  </t>
	</list>
      </t>

      <t>
	More information about the secp256r1, secp384r1, and secp521r1 curves
	is available in Appendix A of <xref target="RFC4492"/>.
      </t>

      <t>
	It is not necessary to implement the above curves and hash
	functions in order to conform to this specification.  Other
	elliptic curves, such as the Brainpool curves <xref
	target="RFC5639"/>, for example, meet the criteria laid out in
	this memo.
      </t>

    </section>
	  

  </back>
</rfc>
