<?xml version="1.0" encoding="UTF-8"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc tocindent="no"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc5246 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY rfc5288 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5288.xml">
<!ENTITY I-D.popov-tls-prohibiting-rc4 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.popov-tls-prohibiting-rc4.xml">
<!ENTITY rfc5116 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5116.xml">
<!ENTITY rfc6460 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6460.xml">
<!ENTITY rfc6982 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6982.xml">
]>

<rfc docName="draft-sheffer-tls-bcp-00" ipr="trust200902" category="bcp">

<front>
<title abbrev="TLS Recommendations">Recommendations for Secure Use of TLS and DTLS</title>

<author initials="Y." surname="Sheffer" fullname="Yaron Sheffer">
<organization abbrev="Porticor">Porticor</organization>
<address>
<postal>
<street>29 HaHarash St.</street>
<city>Hod HaSharon</city>
<code>4501303</code>
<country>Israel</country>
</postal>
<email>yaronf.ietf@gmail.com</email>
</address>
</author>

<date month="September" year="2013"/>

<abstract>

<t>Over the last few years there have been several serious attacks on TLS, including attacks on its
most commonly used ciphers and modes of operation. This document offers recommendations on securely
using the TLS and DTLS protocols, given existing standards and implementations.</t>

</abstract>
</front>

<middle>

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

<t>Over the last few years there have been several major attacks on TLS <xref target="RFC5246"/>,
including attacks on its most commonly used ciphers and modes of operation. Details are given in 
<xref target="sec_Attacks"/>, but suffice it to say that both AES-CBC and RC4, which together make
up for most current usage, have been seriously attacked in the context of TLS.</t>

<t>Given these issues, there is need for IETF guidance on how TLS can be used securely. Unlike most
IETF documents, this is guidance for deployers rather than for implementers. In fact the
recommendations below call for the use of widely implemented algorithms, which are not seeing
widespread use today.</t>

<t>This recommendation applies to both TLS and DTLS. TLS 1.3, when it is standardized and deployed
in the field, should resolve the current vulnerabilities while providing significantly better
functionality, and will very likely obsolete the current document.</t> <section title="Conventions
used in this document" anchor="d1e371">

<t>[[Are we normative? This section might go away.]]</t>

<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 title="Attacks on TLS" anchor="sec_Attacks">

<t>This section lists the attacks that motivated the current recommendation. This is not intended
to be an extensive survey of TLS's security.</t>

<t>While there are widely deployed mitigations for some of the attacks listed below, we believe
that their root causes necessitate a more systemic solution.</t> <section title="BEAST"
anchor="d1e403">

<t>The BEAST attack <xref target="BEAST"/> uses issues with the TLS 1.0 implementation of CBC (that
is, predictable IV) to decrypt parts of a packet, and specifically shows how this can be used to
decrypt HTTP cookies when run over TLS.</t>

</section>

<section title="Lucky Thirteen" anchor="d1e418">

<t>A consequence of the MAC-then-encrypt design is the existence of padding oracle attacks <xref
target="Padding-Oracle"/>. A recent incarnation of these attacks is the Lucky Thirteen attack <xref
target="CBC-Attack"/>, a timing side-channel attack that allows the attacker to decrypt arbitrary
ciphertext.</t>

</section>

<section title="Attacks on RC4" anchor="d1e439">

<t>The RC4 algorithm <xref target="RC4"/> has been used with TLS (and previously, SSL) for many
years. Attacks have also been known for a long time, e.g. <xref target="RC4-Attack-FMS"/>. But
recent attacks <xref target="RC4-Attack"/> have weakened this algorithm even more. See <xref
target="I-D.popov-tls-prohibiting-rc4"/> for more details.</t>

</section>

<section title="Compression Attacks: CRIME and BREACH" anchor="d1e473">

<t>The CRIME attack <xref target="CRIME"/> allows an active attacker to decrypt cyphertext
(specifically, cookies) when TLS is used with protocol-level compression. The attack is a
consequence of the TLS MAC-then-encrypt approach.</t>

<t>The BREACH attack <xref target="BREACH"/> makes similar use of HTTP-level compression which is
much more prevalent than compression at the TLS level, to decrypt secret data passed in the HTTP
response.</t>

<t>While the former attack can be mitigated by disabling TLS compression, we are not aware of
mitigations at the protocol level to the latter attack, and so application-level mitigations are
needed. For example, implementations of HTTP that use CSRF tokens will need to randomize them even
when the recommendations of the current document are adopted.</t>

<t>[[Is it possible to affect some length hiding using TLS 1.2 as specified today, i.e. without
draft-pironti-tls-length-hiding-01, and using available APIs?]]</t>

</section>

</section>

<section title="Selection Criteria" anchor="d1e503">

<t>Given the above attacks, we are proposing that deployers opt for a specific ciphersuite when
negotiating TLS. We have used the following criteria when framing our recommendations:</t>

<t><list style="symbols">

<t>The ciphersuite must be secure in default use, and should not require any additional security
measures beyond those defined in the standard.</t>

<t>The ciphersuite must be widely implemented, i.e. available in a large percentage of popular
cryptographic libraries.</t>

<t>The ciphersuite must have undergone a significant amount of analysis, and the algorithm and mode
of operation must both be standardized by relevant organizations.</t>

<t>We prefer ciphersuites that provide client-side privacy and perfect forward secrecy, i.e. those
that use ephemeral Diffie-Hellman.</t>

<t>When there are multiple key sizes available, we have chosen the current industry standard, 128
bits of strength. Of course deployers are free to opt for a stronger ciphersuite.</t>

</list></t>

</section>

<section title="Recommendations" anchor="d1e528">

<t>Based on the criteria above, we recommend using as a preferred ciphersuite the following:</t>

<t><list style="symbols">

<t>TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 <xref target="RFC5288"/></t>

</list></t>

<t>It is noted that the above ciphersuite is an authenticated encryption (AEAD) algorithm <xref
target="RFC5116"/>, and therefore requires the use of TLS 1.2.</t>

<section title="Details" anchor="d1e556">

<t>We recommend that clients include this cipher suite as the first proposal to any server, unless
they have prior knowledge that the server cannot respond to a TLS 1.2 client_hello message.</t>

<t>We recommend that servers prefer this ciphersuite (or a similar but stronger one) whenever it is
proposed, even if it is not the first proposal.</t>

<t>Note that other profiles of TLS 1.2 exist that use different ciphersuites. For example, <xref
target="RFC6460"/> defines a profile that uses the TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 ciphersuites.</t>

</section>
</section>

<section title="Implementation Status" anchor="d1e577">

<t>Since this document does not propose a new protocol or a new ciphersuite, we do not provide a
full implementation status, as per <xref target="RFC6982"/>. However it is useful to list some known
existing implementations of the recommended ciphersuite(s).</t>

<texttable>
<ttcol align="center">
Category</ttcol>
<ttcol align="center">
Software</ttcol>
<ttcol align="center">
As Of Version</ttcol>
<ttcol align="center">
Comment</ttcol>
<c>
Library</c>
<c>
OpenSSL</c>
<c>
1.0.1</c>
<c>
</c>
<c>
</c>
<c>
GnuTLS</c>
<c>
</c>
<c>
</c>
<c>
</c>
<c>
NSS</c>
<c>
3.11.1</c>
<c>
</c>
<c>
Browser</c>
<c>
Internet Explorer</c>
<c>
IE8 on Windows 7</c>
<c>
</c>
<c>
</c>
<c>
Firefox</c>
<c>
</c>
<c>
TBD</c>
<c>
</c>
<c>
Chrome</c>
<c>
</c>
<c>
TBD</c>
<c>
</c>
<c>
Safari</c>
<c>
</c>
<c>
TBD</c>
<c>
Web server</c>
<c>
Apache (mod_gnutls)</c>
<c>
??</c>
<c>
</c>
<c>
</c>
<c>
Apache (mod_ssl)</c>
<c>
??</c>
<c>
</c>
<c>
</c>
<c>
Nginx</c>
<c>
1.0.9, 1.1.6</c>
<c>
With a recent version of OpenSSL</c>
</texttable>
</section>

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

<section title="AES-GCM" anchor="d1e835">

<t>Please refer to <xref target="RFC5246"/>, Sec. 11 for general security considerations when using
TLS 1.2, and to <xref target="RFC5288"/>, Sec. 6 for security considerations that apply specifically
to AES-GCM when used with TLS.</t>

</section>

<section title="Downgrade Attacks" anchor="d1e857">

<t>[[Do we need to disallow some protocol variants, e.g. SSL 3.0, so that there are no downgrade
attacks possible?]]</t>

</section>

</section>

<section title="IANA Considerations" anchor="sec_IANA_Considerations">
<t>This document requires no IANA actions.</t>
</section>

</middle>

<back>

<references title="Normative References">&rfc2119;
&rfc5246;
&rfc5288;
</references>

<references title="Informative References">&I-D.popov-tls-prohibiting-rc4;
&rfc5116;
&rfc6460;
&rfc6982;

<reference anchor="CBC-Attack"><front><title>Lucky Thirteen: Breaking the TLS and DTLS Record Protocols</title><author initials="N.J." surname="AlFardan" fullname="Nadhem J. AlFardan"/><author initials="K." surname="Paterson" fullname="K. Paterson"/><date year="2013"/></front><seriesInfo name="IEEE Symposium on Security and Privacy" value=""/></reference>

<reference anchor="BEAST" target="http://packetstormsecurity.com/files/105499/Browser-Exploit-Against-SSL-TLS.html"><front><title>Browser Exploit Against SSL/TLS</title><author initials="J." surname="Rizzo" fullname="Juliano Rizzo"/><author initials="T." surname="Duong" fullname="Thai Duong"/><date year="2011"/></front></reference>

<reference anchor="CRIME"><front><title>The CRIME Attack</title><author initials="J." surname="Rizzo" fullname="Juliano Rizzo"/><author initials="T." surname="Duong" fullname="Thai Duong"/><date year="2012"/></front><seriesInfo name="EKOparty Security Conference" value="2012"/></reference>

<reference anchor="BREACH" target="http://breachattack.com/"><front><title>The BREACH Attack</title><author initials="A." surname="Prado" fullname="Angelo Prado"/><author initials="N." surname="Harris" fullname="Neal Harris"/><author initials="Y." surname="Gluck" fullname="Yoel Gluck"/><date year="2013"/></front></reference>

<reference anchor="RC4"><front><title>Applied Cryptography: Protocols, Algorithms, and Source Code in C, 2nd Ed.</title><author initials="B." surname="Schneier" fullname="Bruce Schneier"/><date year="1996"/></front></reference>

<reference anchor="RC4-Attack-FMS"><front><title>Weaknesses in the Key Scheduling Algorithm of RC4</title><author initials="S." surname="Fluhrer" fullname="Scott Fluhrer"/><author initials="I." surname="Mantin" fullname="Itsik Mantin"/><author initials="A." surname="Shamir" fullname="Adi Shamir"/><date year="2001"/></front><seriesInfo name="Selected Areas in Cryptography" value=""/></reference>

<reference anchor="RC4-Attack"><front><title>Full Plaintext Recovery Attack on Broadcast RC4</title><author initials="T." surname="ISOBE" fullname="Takanori ISOBE"/><author initials="T." surname="OHIGASHI" fullname="Toshihiro OHIGASHI"/><author initials="Y." surname="WATANABE" fullname="Yuhei WATANABE"/><author initials="M." surname="MORII" fullname="Masakatu MORII"/><date year="2013"/></front><seriesInfo name="International Workshop on Fast Software Encryption" value=""/></reference>

<reference anchor="Padding-Oracle" target="http://www.iacr.org/cryptodb/archive/2002/EUROCRYPT/2850/2850.pdf"><front><title>"Security Flaws Induced by CBC Padding Applications to SSL, IPSEC, WTLS...</title><author initials="S." surname="Vaudenay" fullname="Serge Vaudenay"/><date year="2002"/></front><seriesInfo name="EUROCRYPT" value="2002"/></reference>

</references>

<section title="Appendix: Change Log" anchor="d1e999">

<t>Note to RFC Editor: please remove this section before publication.</t>

<section title="-00" anchor="d1e1008">

<t><list style="symbols">

<t>Initial version.</t>

</list></t>

</section>

</section>

</back>
</rfc>
