<?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 RFC2404 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2404.xml">
<!ENTITY RFC2405 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2405.xml">
<!ENTITY RFC2410 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2410.xml">
<!ENTITY RFC2451 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2451.xml">
<!ENTITY RFC3566 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3566.xml">
<!ENTITY RFC3602 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3602.xml">
<!ENTITY RFC3686 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3686.xml">
<!ENTITY RFC4106 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4106.xml">
<!ENTITY RFC4301 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4301.xml">
<!ENTITY RFC4302 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4302.xml">
<!ENTITY RFC4303 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4303.xml">
<!ENTITY RFC4309 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4309.xml">
<!ENTITY RFC4543 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4543.xml">
<!ENTITY RFC4835 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4835.xml">
<!ENTITY RFC4949 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4949.xml">
<!ENTITY RFC5116 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5116.xml">
<!ENTITY RFC6151 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6151.xml">
<!ENTITY RFC6379 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6379.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="no"?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-ietf-ipsecme-esp-ah-reqts-10"
	obsoletes="4835"
	ipr="trust200902">
<front>

<title abbrev="Requirements for ESP and AH">Cryptographic
Algorithm Implementation Requirements and Usage Guidance for Encapsulating
Security Payload (ESP) and Authentication Header (AH)</title>

<author fullname="David McGrew" initials="D." surname="McGrew">
<organization>Cisco Systems</organization>
<address>
<email>mcgrew@cisco.com</email>
</address>
</author>

<author fullname="Paul Hoffman" initials="P." surname="Hoffman">
<organization>VPN Consortium</organization>
<address>
<email>paul.hoffman@vpnc.org</email>
</address>
</author>

<date/>

<abstract>

<t>This Internet Draft is a standards track proposal to update
the Cryptographic Algorithm Implementation Requirements for ESP
and AH; it also adds usage guidance to help in the selection of
these algorithms.</t>

<t>The Encapsulating Security Payload (ESP) and Authentication Header
(AH) protocols make use of various cryptographic algorithms to provide
confidentiality and/or data origin authentication to protected data
communications in the IP Security (IPsec) architecture. To ensure
interoperability between disparate implementations, the IPsec standard
specifies a set of mandatory-to- implement algorithms. This document
specifies the current set of mandatory-to-implement algorithms for ESP
and AH, specifies algorithms that should be implemented because they may
be promoted to mandatory at some future time, and also recommends
against the implementation of some obsolete algorithms. Usage guidance
is also provided to help the user of ESP and AH best achieve their
security goals through appropriate choices of cryptographic algorithms.</t>

<t>This document obsoletes RFC 4835.</t>

</abstract>

</front>

<middle>

<section title="Introduction">

<t>The Encapsulating Security Payload (ESP) <xref target="RFC4303"/> and
the Authentication Header (AH) <xref target="RFC4302"/> are the
mechanisms for applying cryptographic protection to data being sent over
an IPsec Security Association (SA) <xref target="RFC4301"/>.</t>

<t>To ensure interoperability between disparate implementations, it is
necessary to specify a set of mandatory-to-implement algorithms. This
ensures that there is at least one algorithm that all implementations
will have in common. This document specifies the current set of
mandatory-to-implement algorithms for ESP and AH, specifies algorithms
that should be implemented because they may be promoted to mandatory at
some future time, and also recommends against the implementation of some
obsolete algorithms. Usage guidance is also provided to help the user of
ESP and AH best achieve their security goals through appropriate choices
of mechanisms.</t>

<t>The nature of cryptography is that new algorithms surface
continuously and existing algorithms are continuously attacked. An
algorithm believed to be strong today may be demonstrated to be weak
tomorrow. Given this, the choice of mandatory-to-implement algorithm
should be conservative so as to minimize the likelihood of it being
compromised quickly. Thought should also be given to performance
considerations as many uses of IPsec will be in environments where
performance is a concern.</t>

<t>The ESP and AH mandatory-to-implement algorithm(s) may need to change
over time to adapt to new developments in cryptography. For this reason,
the specification of the mandatory-to-implement algorithms is not
included in the main IPsec, ESP, or AH specifications, but is instead
placed in this document. Ideally, the mandatory-to-implement algorithm
of tomorrow should already be available in most implementations of IPsec
by the time it is made mandatory. To facilitate this, this document
identifies such algorithms, as they are known today. There is no
guarantee that the algorithms that we believe today may be mandatory in
the future will in fact become so. All algorithms known today are
subject to cryptographic attack and may be broken in the future.</t>

<section title="Requirements Language">

<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 <xref
target="RFC2119"/>.</t>

<t>Following <xref target="RFC4835"/>, we define some additional key
words:</t>

<t><list style="hanging">

<t hangText="MUST-"> This term means the same as MUST. However, we
expect that at some point in the future this algorithm will no
longer be a MUST.</t>

<t hangText="SHOULD+"> This term means the same as SHOULD.
However, it is likely that an algorithm marked as SHOULD+ will be
promoted at some future time to be a MUST.</t>

</list></t>

</section>

</section>

<section title="Implementation Requirements">

<t>This section specifies the cryptographic algorithms that MUST be
implemented, and provides guidance about ones that SHOULD or SHOULD NOT
be implemented.</t>

<t>In the following sections, all AES modes are for 128-bit AES. 192-bit and 256-bit AES
MAY be supported for those modes, but the requirements here are for 128-bit AES.</t>

<section title="ESP Authenticated Encryption (Combined Mode Algorithms)" anchor="AEAD">

<t>ESP combined mode algorithms provide both confidentiality and
authentication services; in cryptographic terms, these are
authenticated encryption algorithms <xref target="RFC5116"/>.
Authenticated encryption transforms are listed in the ESP encryption
transforms IANA registry.</t>

<figure><artwork>
Requirement    Authenticated Encryption Algorithm
-----------    ----------------------------------
SHOULD+        AES-GCM with a 16 octet ICV [RFC4106]
MAY            AES-CCM [RFC4309]
</artwork></figure>

</section>

<section title="ESP Encryption Algorithms" anchor="EncAlg">

<figure><artwork>
Requirement    Encryption Algorithm
-----------    --------------------------
MUST           NULL [RFC2410] 
MUST           AES-CBC [RFC3602]
MAY            AES-CTR [RFC3686]
MAY            TripleDES-CBC [RFC2451]
MUST NOT       DES-CBC [RFC2405]
</artwork></figure>

</section>

<section title="ESP Authentication Algorithms">

<figure><artwork>
Requirement    Authentication Algorithm (notes)
-----------    -----------------------------
MUST           HMAC-SHA1-96 [RFC2404]
SHOULD+        AES-GMAC with AES-128 [RFC4543]
SHOULD         AES-XCBC-MAC-96 [RFC3566]
MAY            NULL [RFC4303]
</artwork></figure>

<t>Note that the requirement level for NULL authentication depends on the type of encryption
used. When using authenticated encryption from <xref target="AEAD"/>, the requirement for NULL encryption 
is the same as the requirement for the authenticated encryption itself. When using the encryption
from <xref target="EncAlg"/>, the requirement for NULL encryption is truly "MAY"; see
<xref target="UsageGuidance"/> for more detail.</t>

</section>

<section title="AH Authentication Algorithms">

<t>The requirements for AH are the same as for ESP Authentication
Algorithms, except that NULL authentication is inapplicable.</t>

</section>

<section title="Summary of Changes from RFC 4835">
<t>The following is a summary of the changes from RFC 4835.</t>
<figure><artwork>
Old            New
Requirement    Requirement      Algorithm (notes)
----           -----------      -----------------
MAY            SHOULD+          AES-GCM with a 16 octet ICV [RFC4106]
MAY            SHOULD+          AES-GMAC with AES-128 [RFC4543]
MUST-          MAY              TripleDES-CBC [RFC2451]
SHOULD NOT     MUST NOT         DES-CBC [RFC2405]
SHOULD+        SHOULD           AES-XCBC-MAC-96 [RFC3566] 
SHOULD         MAY              AES-CTR [RFC3686]
</artwork></figure>

</section>

</section>

<section title="Usage Guidance" anchor="UsageGuidance">

<t>Since ESP and AH can be used in several different ways, this document
provides guidance on the best way to utilize these mechanisms.</t>

<t>ESP can provide confidentiality, data origin authentication, or the
combination of both of those security services. AH provides only data
origin authentication. Background information on those security services
is available <xref target="RFC4949"/>. In the following, we shorten
"data origin authentication" to "authentication".</t>

<t>Providing both confidentiality and authentication offers the best security. If
confidentiality is not needed, providing authentication can still be useful.
Confidentiality without authentication is not effective <xref
target="DP07"/> and therefore SHOULD NOT be used. We describe each of these cases
in more detail below.</t>

<t>To provide both confidentiality and authentication, an authenticated
encryption transform from <xref target="AEAD"/> SHOULD be used in ESP, in conjunction with NULL
authentication. Alternatively, an ESP encryption transform and ESP
authentication transform MAY be used together. It is NOT
RECOMMENDED to use ESP with NULL authentication in conjunction with AH;
some configurations of this combination of services have been shown to
be insecure <xref target="PD10"/>.</t>

<t>To provide authentication without confidentiality, an authentication
transform MUST be used in either ESP or AH.
The IPsec community generally prefers ESP with NULL encryption over AH.
AH is still required in some protocols and operational environments when
there are security-sensitive options in the IP header, such as source routing headers;
ESP inherently cannot protect those IP options.
It is not possible to
provide effective confidentiality without authentication, because the
lack of authentication undermines the trustworthiness of encryption <xref
target="B96"/><xref target="V02"/>. Therefore, an encryption transform MUST NOT be
used with a NULL authentication transform (unless the encryption
transform is an authenticated encryption transform from <xref target="AEAD"/>).</t>

<t>Triple-DES SHOULD NOT be used in any scenario in which
multiple gigabytes of data will be encrypted with a single
key.  As a 64-bit block cipher, it leaks information about
plaintexts above that "birthday bound" <xref target="M13"/>.
Triple-DES CBC is listed as a MAY implement for the sake of
backwards compatibility, but its use is discouraged.</t>

</section>

<section title="Rationale">

<t>This section explains the principles behind the implementation
requirements described above.</t>


<t>The algorithms listed as "MAY implement" are not meant to be
endorsed over other non-standard alternatives.  All of the
algorithms that appeared in <xref target="RFC4835"/> are
included in this document, for the sake of continuity.  In some
cases, these algorithms have moved from being "SHOULD implement"
to "MAY implement" algorithms.</t>

<section title="Authenticated Encryption">

<t>This document encourages the use of authenticated encryption algorithms
because they can provide significant efficiency and throughput
advantages, and the tight binding between authentication and
encryption can be a security advantage <xref target="RFC5116"/>.</t>

<t> AES-GCM <xref target="RFC4106"/> brings significant performance benefits <xref
target="KKGEGD"/>, has been incorporated into IPsec recommendations
<xref target="RFC6379"/> and has emerged as the preferred
authenticated encryption method in IPsec and other standards.</t>

</section>

<section anchor="TripleDES" title="Encryption Transforms">

<t>Since ESP encryption is optional, support for the "NULL" algorithm
is required to maintain consistency with the way services are
negotiated. Note that while authentication and encryption can each be
"NULL", they MUST NOT both be "NULL" <xref target="RFC4301"/> <xref
target="H10"/>.</t>

<t>AES Counter Mode (AES-CTR) is an efficient encryption method, but
it provides no authentication capability. The AES-GCM authenticated
encryption method has all of the advantages of AES-CTR, while also
providing authentication. Thus this document moves AES-CTR from a SHOULD
to a MAY.</t>

<t>The Triple Data Encryption Standard (TDES) is obsolete
because of its small block size; as with all 64-bit block
ciphers, it SHOULD NOT be used to encrypt more than one
gigabyte of data with a single key <xref target="M13"/>.  Its
key size is smaller than that of the Advanced Encryption
Standard (AES), while at the same time its performance and
efficiency is worse.  Thus, its use in new implementations is
discouraged.</t>

<t>The Data Encryption Standard (DES) is obsolete because of its small
key size and small block size. There have been publicly demonstrated
and open-design special-purpose cracking hardware. Therefore, its use
is has been changed to MUST NOT in this document.</t>

</section>

<section title="Authentication Transforms">

<t>AES-GMAC provides good security along with performance advantages,
even over HMAC-MD5. In addition, it uses the same internal components
as AES-GCM and is easy to implement in a way that shares components
with that authenticated encryption algorithm.</t>

<t>The MD5 hash function has been found to not meet its goal of
collision resistance; it is so weak that its use in digital signatures
is highly discouraged <xref target="RFC6151"/>. There have been
theoretical results against HMAC-MD5, but that message authentication
code does not seem to have a practical vulnerability. Thus, it may not
be urgent to remove HMAC-MD5 from the existing protocols.</t>

<t>SHA-1 has been found to not meet its goal of collision resistance.
However, HMAC-SHA-1 does not rely on this property, and HMAC-SHA-1 is
believed to be secure.</t>

<t>The HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 are believed to
provide a good security margin, and they perform adequately on many
platforms. However, these algorithms are not recommended for implementation
in this document, because HMAC-SHA-1 support is widespread and its
security is good, AES-GMAC provides good security with better
performance, and Authenticated Encryption algorithms do not need any
authentication methods.</t>

<t>AES-XCBC has not seen widespread deployment, despite being
previously being recommended as a SHOULD+ in RFC 4835. Thus this draft
lists it only as a SHOULD.</t>

</section>

</section>

<section title="Algorithm Diversity">

<t>When the AES cipher was first adopted, it was decided to
continue encouraging the implementation of Triple-DES, in
order to provide algorithm diversity.  But the passage of time
has eroded the viability of Triple-DES as an alternative to
AES.  As it is a 64-bit block cipher, its security is
inadequate at high data rates (see <xref target="TripleDES"/>).
Its performance in software and FPGAs is considerably worse
than that of AES.  Since it would not be possible to use
Triple-DES as an alternative to AES in high data rate
environments, or in environments where its performance could
not keep up the requirements, the rationale of retaining Triple-DES
to provide algorithm diversity is disappearing.  (Of course,
this does not change the rationale of retaining Triple-DES
in IPsec implementations for backwards compatibility.)</t>

<t>Recent discussions in the IETF have started
considering how to make the selection of a
different cipher that could provide algorithm diversity in
IPsec and other IETF standards.  That work is expected
to take a long time and involve discussions among many
participants and organizations.</t>

<t>It is important to bear in mind that it is very highly
unlikely that an exploitable flaw will be found in AES (e.g.,
a flaw that required less than a terabyte of known plaintext,
when AES is used in a conventional mode of operation).  The
only reason that algorithm diversity deserves any
consideration is because the problems that would be caused if
such a flaw were found would be so large.</t>

</section>

<section anchor="Acknowledgements" title="Acknowledgements">

<t>Some of the wording herein was adapted from <xref target="RFC4835"/>,
the document that this one obsoletes. That RFC itself borrows from
earlier RFCs, notably RFC 4305 and 4307.
RFC 4835, RFC 4305, and RFC 4307 were authored by Vishwas Manral, Donald
Eastlake, and Jeffrey Schiller respectively.</t>

<t>Thanks are due to Wajdi Feghali, Brian Weis, Cheryl Madson, Dan Harkins, Paul Wouters, Ran Atkinson,
Scott Fluhrer, Tero Kivinen, and Valery Smyslov for insightful feedback on this draft.</t>

<t>[[[ This paragraph exists so that the nits checker doesn't barf. It is to be removed before this is
published as an RFC. <xref target='RFC2404'/> <xref target='RFC2405'/> <xref
target='RFC2410'/> <xref target='RFC2451'/> <xref target='RFC3566'/> <xref
target='RFC3602'/> <xref target='RFC3686'/> <xref target='RFC4309'/> <xref
target='RFC4543'/> ]]]</t>

</section>

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

<t>None.</t>

</section>

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

<t>The security of a system that uses cryptography depends on both the
strength of the cryptographic algorithms chosen and the strength of the
keys used with those algorithms. The security also depends on the
engineering and administration of the protocol used by the system to
ensure that there are no non-cryptographic ways to bypass the security
of the overall system.</t>

<t>This document concerns itself with the selection of cryptographic
algorithms for the use of ESP and AH, specifically with the selection of
mandatory-to-implement algorithms. The algorithms identified in this
document as "MUST implement" or "SHOULD implement" are not known to be
broken at the current time, and cryptographic research so far leads us
to believe that they will likely remain secure into the foreseeable
future. However, this is not necessarily forever. We would therefore
expect that new revisions of this document will be issued from time to
time that reflect the current best practice in this area.</t>

</section>

</middle>

<back>

<references title="Normative References">
  
&RFC2119;
&RFC4301;
&RFC4302;
&RFC4303;

</references>

<references title="Informative References">

&RFC2404;
&RFC2405;
&RFC2410;
&RFC2451;
&RFC3566;
&RFC3602;
&RFC3686;
&RFC4106;
&RFC4309;
&RFC4543;
&RFC4835;
&RFC4949;
&RFC5116;
&RFC6151;
&RFC6379;

<reference anchor="B96">
<front>
<title>Problem areas for the IP security protocols (Proceedings of
the Sixth Usenix Unix Security Symposium)</title>
<author fullname="" initials="S" surname="Bellovin">
<organization/>
</author>
<date year="1996"/>
</front>
</reference>

<reference anchor="DP07">
<front>
<title>Attacking the IPsec Standards in Encryption-only
Configurations (IEEE Symposium on Privacy and Security)</title>
<author initials="J." surname="Degabriele">
<organization/>
</author>
<author initials="K." surname="Paterson">
<organization>P</organization>
</author>
<date year="2007"/>
</front>
</reference>

<reference anchor="PD10">
<front>
<title>On the (in)security of IPsec in MAC-then-encrypt
configurations (ACM Conference on Computer and Communications
Security, ACM CCS)</title>
<author initials="K." surname="Paterson">
<organization>P</organization>
</author>
<author initials="J." surname="Degabriele">
<organization/>
</author>
<date year="2010"/>
</front>
</reference>

<reference anchor="V02">
<front>
<title>Security Flaws Induced by CBC Padding - Applications to SSL,
IPSEC, WTLS ... (EUROCRYPT)</title>
<author initials="S" surname="Vaudenay">
<organization>Va</organization>
</author>
<date year="2002"/>
</front>
</reference>

<reference anchor="M13">
<front>
<title>  
Impossible plaintext cryptanalysis and probable-plaintext collision attacks of 64-bit block cipher modes
</title>
<author initials="D" surname="McGrew">
<organization>Va</organization>
</author>
<date year="2012"/>
</front>
</reference>

<reference anchor="KKGEGD">
<front>
<title>Encrypting the Internet (SIGCOMM)</title>
<author initials="M" surname="Kounavis">
<organization/>
</author>
<author initials="X" surname="Kang">
<organization/>
</author>
<author initials="K" surname="Grewal">
<organization/>
</author>
<author initials="M" surname="Eszenyi">
<organization/>
</author>
<author initials="S" surname="Gueron">
<organization/>
</author>
<author initials="D" surname="Durham">
<organization/>
</author>
<date year="2010"/>
</front>
</reference>

<reference anchor="H10">
<front>
<title>Using Intel AES New Instructions and PCLMULQDQ to
Significantly Improve IPSec Performance on Linux </title>
<author initials="A" surname="Hoban">
<organization/>
</author>
<date year="2010"/>
</front>
</reference>

</references>

</back>
</rfc>
