1 \section{Cipher suites}
3 Cipher suites are a combination of algorithms to provide for
4 Confidentiality, Integrity and Authenticity
5 \footnote{\url{http://en.wikipedia.org/wiki/Information\_security}} of
6 communication. For example: sending encrypted data over the wire does not
7 ensure that the data can not be modified (message integrity), similarly
8 encrypted data can be sent from an adversary. It is therefore paramount to
9 prove that data has been sent from the desired source (message authenticity).
10 This concept is known as authenticated encryption
11 \footnote{\url{http://en.wikipedia.org/wiki/Authenticated\_encryption}}
12 \footnote{\url{http://www.cs.jhu.edu/~astubble/dss/ae.pdf}}.
14 \subsection{Forward Secrecy}
15 Forward Secrecy or Perfect Forward Secrecy is a property of a cipher suite
16 that ensures confidentiality even if the server key has been compromised.
17 Thus if traffic has been recorded it can not be decrypted even if an adversary
18 has got hold of the decryption key
19 \footnote{\url{http://en.wikipedia.org/wiki/Forward\_secrecy}}
20 \footnote{\url{https://www.eff.org/deeplinks/2013/08/pushing-perfect-forward-secrecy-important-web-privacy-protection}}.
22 \subsection{Recommended cipher suites}
24 In principle, system administrators who want to improve their servers need to
25 make a hard decision between locking out some users while keeping very high
26 cipher suite security levels or supporting as many users as possible while
27 lowering some settings. \url{https://www.ssllabs.com/} gives administrators a
28 tool to test out different settings. The authors used ssllabs.com to arrive at
29 a set of cipher suites which we will recommend throught this document.
30 \textbf{Caution: these settings can only represent a subjective choice of the
31 authors at the time of this writing. It might be a wise choice to select your
32 own cipher suites based on the instructions in section
33 \ref{section:ChosingYourOwnCipherSuites}}.
36 \subsubsection{Configuration A: strong ciphers, fewer clients}
38 At the time of this writing, we recommend the following set of strong cipher
39 suites which may be useful in an environment where you do not depend on many,
40 diverse external clients and where compatibility is not an issue. An example
41 of such an environment might be machine 2 machine communications or corporate
42 environments where you can define the software which must be used.
45 We arrived at this set of cipher suites by selecting
49 \item Perfect forward secrecy / ephemeral Diffie Hellman
50 \item strong Hashes (SHA-2)
51 \item GCM as chaining mode if possible
54 This results in the string:
56 \begin{lstlisting}[breaklines]
57 'EECDH+aRSA+AES256:EDH+aRSA+AES256:!SSLv3'
60 %$\implies$ resolves to
63 %openssl ciphers -V $string
69 \begin{tabular}{| l | l | l | l | l| l | l |}
71 ID & OpenSSL name & Version & KeyEx & Auth & Cipher & Hash \\ \hline
72 0xC030 & ECDHE-RSA-AES256-GCM-SHA384 & TLSv1.2 & ECDH & RSA &AESGCM(256) & AEAD \\ \hline
73 0xC028 & ECDHE-RSA-AES256-SHA384 & TLSv1.2 & ECDH & RSA &AES(256) & SHA384 \\ \hline
74 0x009F & DHE-RSA-AES256-GCM-SHA384 & TLSv1.2 & DH & RSA &AESGCM(256) & AEAD \\ \hline
75 0x006B & DHE-RSA-AES256-SHA256 & TLSv1.2 & DH & RSA &AES(256) & SHA256 \\ \hline
80 \textbf{Compatibility}
82 Only clients which support TLS1.2 are covered by these cipher suites (Chrome 30,
83 Win 7 and Win 8.1 crypto stack, Opera 17, OpenSSL $\ge$ 1.0.1e, Safari 6 / iOS
84 6.0.1, Safari 7 / OS X 10.9).
88 \subsubsection{Configuration B: weaker ciphers, many clients}
90 In this section we propose a slighly "weaker" set of cipher suites. There are
91 some known weaknesses of for example SHA-1 which is included in this this set.
92 However, the advantage of this set of cipher suites is its wider compatibility
96 \textbf{In the following document, all further examples in this paper will use Configuration B}.
99 We arrived at this set of cipher suites by selecting
102 \item TLS 1.2, TLS 1.1, TLS 1.0
106 This results in the string:
108 \begin{lstlisting}[breaklines]
109 'EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EDH+CAMELLIA256:EECDH:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!AES128:!CAMELLIA128:!ECDSA:AES256-SHA'
115 \begin{tabular}{| l | l | l | l | l| l | l |}
117 ID & OpenSSL name & Version & KeyEx & Auth & Cipher & Hash \\ \hline
118 0xC030 & ECDHE-RSA-AES256-GCM-SHA384 & TLSv1.2 & ECDH & RSA &AESGCM(256) & AEAD \\ \hline
119 0xC028 & ECDHE-RSA-AES256-SHA384 & TLSv1.2 & ECDH & RSA &AES(256) & SHA384 \\ \hline
120 0x009F & DHE-RSA-AES256-GCM-SHA384 & TLSv1.2 & DH & RSA &AESGCM(256) & AEAD \\ \hline
121 0x006B & DHE-RSA-AES256-SHA256 & TLSv1.2 & DH & RSA &AES(256) & SHA256 \\ \hline
122 0x0088 & DHE-RSA-CAMELLIA256-SHA & SSLv3 & DH & RSA &Camellia(256)& SHA1 \\ \hline
123 0xC014 & ECDHE-RSA-AES256-SHA & SSLv3 & ECDH & RSA &AES(256) & SHA1 \\ \hline
124 0x0039 & DHE-RSA-AES256-SHA & SSLv3 & DH & RSA &AES(256) & SHA1 \\ \hline
125 0x0035 & AES256-SHA & SSLv3 & RSA & RSA &AES(256) & SHA1 \\ \hline
130 \textbf{Compatibility}
132 Note that these cipher suites will not work with anything using Windows XP's
133 crypto stack (IE, Outlook), Java 6, Java 7 and Android 2.3. Java 7 could be
134 made compatible by installing the "Java Cryptography Extension (JCE) Unlimited
135 Strength Jurisdiction Policy Files"
136 (JCE) \footnote{\url{http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html}}.
137 We could not verify yet if installing JCE also fixes the Java 7
138 DH-parameter length limitation (1024 bit).
142 For a detailed explanation of the cipher suites chosen, please see
143 \ref{section:ChosingYourOwnCipherSuites}. In short, finding the perfect cipher
144 string is impossible and must be a tradeoff. On the one hand
145 there are mandatory and optional ciphers defined in a few RFCs, on the other hand
146 there are clients and servers only implementing subsets of the specification.
148 Straight forward, we wanted strong ciphers, forward secrecy
149 \footnote{\url{http://nmav.gnutls.org/2011/12/price-to-pay-for-perfect-forward.html}}
150 and the most clients we could get while still having a cipher string that can be
151 used on older servers too (think OpenSSL 0.9.8). This cipher string is meant to be used
152 by copy and paste and needs to just work.
155 \item TLS1.2 is preferred over TLSv1.0/SSLv3 (while still providing a useable cipher
157 \item AES256 and CAMELLIA256 count as strong ciphers at the moment; preferrably in
159 \todo{add a reference here please}
160 \todo{Adi: add 128bit ciphers too} \\
161 \todo{Team: discuss ordering of keys (256 $\rightarrow$ 128 or vice versa?)}
162 \item DHE or ECDHE for forward secrecy
163 \item RSA as this will fit most of todays setup
164 \item AES256-SHA as a last ressort (with this cipher at the end, even systems with
165 very old versions of openssl like 0.9.8 will just work. Just forward secrecy
166 will not be used. On systems that do not support elliptic curves, that cipher
167 offers support for the Microsoft crypto libraries that only support ECDHE.
169 \todo{Adi: review "justification" when next section is written}
174 \subsection{Chosing your own cipher suites}
175 \label{section:ChosingYourOwnCipherSuites}
176 \todo{ Adi... you want to describe how to make your own selection of cipher suites here. The text below was simply the old text, still left here for reference.}
178 %%% NOTE: we do not need to list this all here, can move to an appendix
179 %At the time of this writing, SSL is defined in RFCs:
182 %\item RFC2246 - TLS1.0
184 %\item RFC4132 - Camelia
185 %\item RFC4162 - SEED
187 %\item RFC4346 - TLS 1.1
189 %\item RFC4785 - PSK\_NULL
190 %\item RFC5246 - TLS 1.2
191 %\item RFC5288 - AES\_GCM
192 %\item RFC5289 - AES\_GCM\_SHA2\_ECC
193 %\item RFC5430 - Suite B
194 %\item RFC5487 - GCM\_PSK
195 %\item RFC5489 - ECDHE\_PSK
196 %\item RFC5932 - Camelia
197 %\item RFC6101 - SSL 3.0
198 %\item RFC6209 - ARIA
199 %\item RFC6367 - Camelia
200 %\item RFC6655 - AES\_CCM
201 %\item RFC7027 - Brainpool Curves
204 \subsubsection{Overview of SSL Server settings}
207 Most Server software (Webservers, Mail servers, etc.) can be configured to prefer certain cipher suites over others.
208 We followed the recommendations by Ivan Ristic's SSL/TLS Deployment Best Practices\footnote{\url{https://www.ssllabs.com/projects/best-practices/index.html}} document (see section 2.2 "Use Secure Protocols") and arrived at a list of recommended cipher suites for SSL enabled servers.
210 Following Ivan Ristic's adivce we arrived at a categorisation of cipher suites.
213 \begin{tabular}{| l | l | l | l | l|}
215 & Version & Key\_Exchange & Cipher & MAC \\ \hline
216 \cellcolor{green}prefer & TLS 1.2 & DHE\_DSS & AES\_256\_GCM & SHA384 \\ \hline
217 & & DHE\_RSA & AES\_256\_CCM & SHA256 \\ \hline
218 & & ECDHE\_ECDSA & AES\_256\_CBC & \\ \hline
219 & & ECDHE\_RSA & & \\ \hline
221 \cellcolor{orange}consider & TLS 1.1 & DH\_DSS & AES\_128\_GCM & SHA \\ \hline
222 & TLS 1.0 & DH\_RSA & AES\_128\_CCM & \\ \hline
223 & & ECDH\_ECDSA & AES\_128\_CBC & \\ \hline
224 & & ECDH\_RSA & CAMELLIA\_256\_CBC & \\ \hline
225 & & RSA & CAMELLIA\_128\_CBC & \\ \hline
228 & SSL 3.0 & NULL & NULL & NULL \\ \hline
229 & & DH\_anon & RC4\_128 & MD5 \\ \hline
230 & & ECDH\_anon & 3DES\_EDE\_CBC & \\ \hline
231 & & & DES\_CBC & \\ \hline
233 \cellcolor{blue}{\color{white}special }
234 & & PSK & CAMELLIA\_256\_GCM & \\ \hline
235 & & DHE\_PSK & CAMELLIA\_128\_GCM & \\ \hline
236 & & RSA\_PSK & ARIA\_256\_GCM & \\ \hline
237 & & ECDHE\_PSK & ARIA\_256\_CBC & \\ \hline
238 & & & ARIA\_128\_GCM & \\ \hline
239 & & & ARIA\_128\_CBC & \\ \hline
240 & & & SEED & \\ \hline
244 A remark on the ``consider'' section: the BSI (Federal office for information security, Germany) recommends in its technical report TR-02102-2\footnote{\url{https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR02102/BSI-TR-02102-2_pdf.html}} to \textbf{avoid} non-ephemeral\footnote{Ephemeral keys are session keys which are destroyed upon termination of the encrypted session. In TLS/SSL, they are realized by the DHE cipher suites. } keys for any communication which might contain personal or sensitive data. In this document, we follow BSI's advice and therefore only keep cipher suites containing (EC)DH\textbf{E} (ephemeral) variants. System administrators, who can not use forward secrecy can still use the cipher suites in the ``consider'' section. We however, do not recommend them in this document.
246 %% NOTE: s/forward secrecy/perfect forward secrecy???
248 Note that the entries marked as ``special'' are cipher suites which are not common to all clients (webbrowsers etc).
251 \subsubsection{Tested clients}
253 Next we tested the cipher suites above on the following clients:
255 %% NOTE: we need to test with more systems!!
257 \item Chrome 30.0.1599.101 Mac OS X 10.9
258 \item Safari 7.0 Mac OS X 10.9
259 \item Firefox 25.0 Mac OS X 10.9
260 \item Internet Explorer 10 Windows 7
261 \item Apple iOS 7.0.3
265 The result of testing the cipher suites with these clients gives us a preference order as shown in table \ref{table:prefOrderCipherSuites}.
266 Should a client not be able to use a specific cipher suite, it will fall back to the next possible entry as given by the ordering.
271 \begin{tabular}{|l|l|l|l|l|}
273 Pref & Cipher Suite & ID & Browser \\ \hline
274 1 & TLS\_DHE\_RSA\_WITH\_AES\_256\_GCM\_SHA384 & 0x009f & OpenSSL command line client \\ \hline
275 2 & TLS\_ECDHE\_ECDSA\_WITH\_AES\_256\_CBC\_SHA384 & 0xC024 & Safari \\ \hline
276 3 & TLS\_ECDHE\_RSA\_WITH\_AES\_256\_CBC\_SHA384 & 0xC028 & Safari \\ \hline
277 4 & TLS\_DHE\_RSA\_WITH\_AES\_256\_CBC\_SHA256 & 0x006B & Safari, Chrome \\ \hline
278 5 & TLS\_ECDHE\_ECDSA\_WITH\_AES\_256\_CBC\_SHA & 0xC00A & Safari, Chrome, Firefox, IE \\ \hline
279 6 & TLS\_ECDHE\_RSA\_WITH\_AES\_256\_CBC\_SHA & 0xC014 & Safari, Chrome, Firefox, IE \\ \hline
280 7 & TLS\_DHE\_RSA\_WITH\_AES\_256\_CBC\_SHA & 0x0039 & Safari, Chrome, Firefox \\ \hline
281 8 & TLS\_DHE\_DSS\_WITH\_AES\_256\_CBC\_SHA & 0x0038 & Firefox, IE \\ \hline
282 9 & TLS\_DHE\_RSA\_WITH\_CAMELLIA\_256\_CBC\_SHA & 0x0088 & Firefox \\ \hline
283 10 & TLS\_DHE\_DSS\_WITH\_CAMELLIA\_256\_CBC\_SHA & 0x0087 & Firefox \\ \hline
285 \caption{Preference order of cipher suites}
286 \label{table:prefOrderCipherSuites}
291 Table \ref{table:prefOrderOpenSSLNames} shows the same data again with specifying the corresponding OpenSSL name.
296 \begin{tabular}{|l|l|l|}
298 Cipher Suite & ID & OpenSSL Name \\ \hline
299 TLS\_DHE\_RSA\_WITH\_AES\_256\_GCM\_SHA384 & 0x009f & DHE-RSA-AES256-GCM-SHA384 \\ \hline
300 TLS\_ECDHE\_ECDSA\_WITH\_AES\_256\_CBC\_SHA384 & 0xC024 & ECDHE-ECDSA-AES256-SHA384 \\ \hline
301 TLS\_ECDHE\_RSA\_WITH\_AES\_256\_CBC\_SHA384 & 0xC028 & ECDHE-RSA-AES256-SHA384 \\ \hline
302 TLS\_DHE\_RSA\_WITH\_AES\_256\_CBC\_SHA256 & 0x006B & DHE-RSA-AES256-SHA256 \\ \hline
303 TLS\_ECDHE\_ECDSA\_WITH\_AES\_256\_CBC\_SHA & 0xC00A & ECDHE-ECDSA-AES256-SHA \\ \hline
304 TLS\_ECDHE\_RSA\_WITH\_AES\_256\_CBC\_SHA & 0xC014 & ECDHE-RSA-AES256-SHA \\ \hline
305 TLS\_DHE\_RSA\_WITH\_AES\_256\_CBC\_SHA & 0x0039 & DHE-RSA-AES256-SHA \\ \hline
306 TLS\_DHE\_DSS\_WITH\_AES\_256\_CBC\_SHA & 0x0038 & DHE-DSS-AES256-SHA \\ \hline
307 TLS\_DHE\_RSA\_WITH\_CAMELLIA\_256\_CBC\_SHA & 0x0088 & DHE-RSA-CAMELLIA256-SHA \\ \hline
308 TLS\_DHE\_DSS\_WITH\_CAMELLIA\_256\_CBC\_SHA & 0x0087 & DHE-DSS-CAMELLIA256-SHA \\ \hline
310 \caption{Preference order of cipher suites, with OpenSSL names}
311 \label{table:prefOrderOpenSSLNames}
315 Note: the tables \ref{table:prefOrderOpenSSLNames} and \ref{table:prefOrderCipherSuites} contain Elliptic curve key exchanges. There are currently strong doubts\footnote{\url{http://safecurves.cr.yp.to/rigid.html}} concerning ECC.
316 If unsure, remove the cipher suites starting with ECDHE in the table above.
319 Based on this ordering, we can now define the corresponding settings for servers. We will start with the most common web servers.