<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openssl.org/index.php?action=history&amp;feed=atom&amp;title=FIPS_mode_and_TLS</id>
	<title>FIPS mode and TLS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openssl.org/index.php?action=history&amp;feed=atom&amp;title=FIPS_mode_and_TLS"/>
	<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=FIPS_mode_and_TLS&amp;action=history"/>
	<updated>2026-05-20T14:29:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=FIPS_mode_and_TLS&amp;diff=3229&amp;oldid=prev</id>
		<title>Matt: Added sentence about the new FIPS module</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=FIPS_mode_and_TLS&amp;diff=3229&amp;oldid=prev"/>
		<updated>2024-02-02T08:32:31Z</updated>

		<summary type="html">&lt;p&gt;Added sentence about the new FIPS module&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:32, 2 February 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This page discusses the use of FIPS with OpenSSL 1.0.x. It is NOT relevant to the FIPS provider in OpenSSL 3.0 or above.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The new SP800-131A and FIPS 186-4 restrictions on algorithms and key sizes complicate&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The new SP800-131A and FIPS 186-4 restrictions on algorithms and key sizes complicate&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;the use of ciphersuites for TLS considerably. This page is intended to answer the&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;the use of ciphersuites for TLS considerably. This page is intended to answer the&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=FIPS_mode_and_TLS&amp;diff=1565&amp;oldid=prev</id>
		<title>Jwalton: Added FIPS category.</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=FIPS_mode_and_TLS&amp;diff=1565&amp;oldid=prev"/>
		<updated>2014-03-12T11:37:59Z</updated>

		<summary type="html">&lt;p&gt;Added FIPS category.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:37, 12 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l407&quot; &gt;Line 407:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 407:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ciphersuites that use SHA1. Contrast that with using &amp;quot;!SHA&amp;quot; instead which permanently&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ciphersuites that use SHA1. Contrast that with using &amp;quot;!SHA&amp;quot; instead which permanently&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;removes SHA1 from the cipherstring.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;removes SHA1 from the cipherstring.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:FIPS 140]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jwalton</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=FIPS_mode_and_TLS&amp;diff=1471&amp;oldid=prev</id>
		<title>Stevem: First draft of large new page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=FIPS_mode_and_TLS&amp;diff=1471&amp;oldid=prev"/>
		<updated>2014-02-10T13:53:14Z</updated>

		<summary type="html">&lt;p&gt;First draft of large new page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The new SP800-131A and FIPS 186-4 restrictions on algorithms and key sizes complicate&lt;br /&gt;
the use of ciphersuites for TLS considerably. This page is intended to answer the&lt;br /&gt;
question &amp;quot;can I configure an OpenSSL cipherstring for TLS to comply with the new FIPS restrictions?&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
This discussion assumes use of a &amp;quot;FIPS capable&amp;quot; OpenSSL 1.0.1f or later.&lt;br /&gt;
&lt;br /&gt;
A new security framework in development for future versions will make enforcing these types&lt;br /&gt;
of restrictions easier and the algorithm restrictions are performed all in one place.&lt;br /&gt;
&lt;br /&gt;
== Quick Summary ==&lt;br /&gt;
&lt;br /&gt;
The preferred cipherstring for OpenSSL 1.0.1f+ for all versions of TLS subject to the new FIPS&lt;br /&gt;
restrictions is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	'TLSv1.2+FIPS:kRSA+FIPS:!eNULL:!aNULL'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, multiple caveats apply as discussed below.&lt;br /&gt;
&lt;br /&gt;
Workarounds for OpenSSL releases prior to 1.0.1f are discussed below.&lt;br /&gt;
&lt;br /&gt;
== Detailed discussion ==&lt;br /&gt;
&lt;br /&gt;
The general rule is you can't use SHA1 for digital signatures any more nor&lt;br /&gt;
a combination like MD5+SHA1. You *can* use SHA1 for HMAC so there's no need to&lt;br /&gt;
force the use of SHA256 HMAC ciphersuites.&lt;br /&gt;
&lt;br /&gt;
A cipherstring in OpenSSL also known as a &amp;quot;cipher list&amp;quot; &lt;br /&gt;
https://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS&lt;br /&gt;
A cipherstring in OpenSSL is a compact notation for a set of cryptographic algorithms&lt;br /&gt;
(public key, symmetric key, and digest algorithms) in order of preference.&lt;br /&gt;
&lt;br /&gt;
The cipherstring notation is discussed at https://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT&lt;br /&gt;
Briefly, a cipherstring is a series of elements each designating either a specific ciphersuite or a set of&lt;br /&gt;
ciphersuites. The &amp;quot;+&amp;quot; operator designates a logical and operation, so &amp;quot;element1+element1&amp;quot; represents that&lt;br /&gt;
set of ciphersuites containing the algorithms in both element1 and element2. The &amp;quot;!&amp;quot; operator permanently&lt;br /&gt;
all the algorithms in the following element.&lt;br /&gt;
&lt;br /&gt;
=== TLS 1.0 and 1.1 ===&lt;br /&gt;
&lt;br /&gt;
All TLS 1.0/1.1 authenticated PFS (Perfect Forward Secrecy) ciphersuites use SHA1 alone or MD5+SHA1. That&lt;br /&gt;
leaves only unauthenticated ones (which are vulnerable to MiTM so we discount&lt;br /&gt;
them) or those using static keys. Theoretically that would permit RSA, DH or&lt;br /&gt;
ECDH keys in certificates but in practice everyone uses RSA.&lt;br /&gt;
&lt;br /&gt;
The corresponding cipherstring is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl ciphers -v 'kRSA+FIPS:!TLSv1.2'&lt;br /&gt;
AES256-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA1&lt;br /&gt;
DES-CBC3-SHA            SSLv3 Kx=RSA      Au=RSA  Enc=3DES(168) Mac=SHA1&lt;br /&gt;
AES128-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
That cipherstring specifies three possible ciphersuites allowable in FIPS mode for TLS 1.0 and 1.1.&lt;br /&gt;
The RSA key in the certificate has to be of suitable size&lt;br /&gt;
(2048 bits minimum) as do all other keys in the chain and none of the CAs can&lt;br /&gt;
sign using SHA1. Also those kRSA ciphersuites are allowed for&lt;br /&gt;
server certificates only; client authentication is never allowed&lt;br /&gt;
with the new rules for TLS 1.0 and 1.1.&lt;br /&gt;
&lt;br /&gt;
In a real application when FIPS mode is enabled then only &lt;br /&gt;
FIPS ciphersuites are allowed no matter what you use in the string. So in FIPS mode&lt;br /&gt;
&amp;quot;kRSA:!TLSv1.2&amp;quot; will be functionally equivalent to &amp;quot;kRSA+FIPS!TLSv1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note the &amp;quot;TLSv1.2&amp;quot; string was only added to OpenSSL recently, as of OpenSSL 1.0.1f.&lt;br /&gt;
It designates the ciphers for TLSv1.2 subject to the FIPS 140-2 and FIPS 186-4&lt;br /&gt;
restrictions.&lt;br /&gt;
&lt;br /&gt;
Note the cipherstring 'FIPS:!TLSv1.2' would also allow fixed DH and fixed ECDH&lt;br /&gt;
certificates but those are not encountered in the wild.&lt;br /&gt;
The key exchange component &amp;quot;kRSA&amp;quot; specifies just those algorithms that support RSA key exchange.&lt;br /&gt;
&lt;br /&gt;
=== TLS 1.2 ===&lt;br /&gt;
&lt;br /&gt;
TLS 1.2 provides more options as the signature can use an algorithm other&lt;br /&gt;
than SHA1. &lt;br /&gt;
&amp;quot;kRSA+FIPS&amp;quot; specifies those ciphersuites that use RSA key exchange, including TLS v1.2, *and*&lt;br /&gt;
are allowed in FIPS mode, and including anonymous ones which may be undesirable:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl ciphers -v 'kRSA+FIPS'&lt;br /&gt;
AES256-GCM-SHA384       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(256) Mac=AEAD&lt;br /&gt;
AES256-SHA256           TLSv1.2 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA256&lt;br /&gt;
AES256-SHA              SSLv3 Kx=RSA        Au=RSA  Enc=AES(256)  Mac=SHA1&lt;br /&gt;
DES-CBC3-SHA            SSLv3 Kx=RSA        Au=RSA  Enc=3DES(168) Mac=SHA1&lt;br /&gt;
AES128-GCM-SHA256       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(128) Mac=AEAD&lt;br /&gt;
AES128-SHA256           TLSv1.2 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA256&lt;br /&gt;
AES128-SHA              SSLv3 Kx=RSA        Au=RSA  Enc=AES(128)  Mac=SHA1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The ephemeral key for the now permitted PFS keys must be at least 2048 bits (DH)&lt;br /&gt;
or 256 bits (ECDH) in size. Anything supporting ECDH will probably set P-256 as&lt;br /&gt;
a default so that should be OK (Apache does).&lt;br /&gt;
&lt;br /&gt;
There's a snag though. The ciphersuite ECDH-RSA-AES128-SHA can (outside FIPS) be&lt;br /&gt;
used for TLS 1.0 and later whereas in FIPS mode it can only be used for TLS v1.2. A&lt;br /&gt;
TLS client can't advertise ciphersuites in that way (i.e. you can use this for&lt;br /&gt;
TLS1.2 only and nothing earlier) so you're left with the situation where a FIPS&lt;br /&gt;
compliant client might say it wants ECDH-RSA-AES128-SHA&lt;br /&gt;
and TLS 1.2 and the server only supports TLS 1.0 so it will choke when it tries to&lt;br /&gt;
use the prohibited ciphersuite+version combination. Servers are fine because&lt;br /&gt;
they can theoretically select based on version (except in practice OpenSSL doesn't support that).&lt;br /&gt;
&lt;br /&gt;
If that wasn't enough there's another complication. For TLS v1.2 you have to&lt;br /&gt;
restrict the supported signature algorithms to exclude SHA1, allowing only&lt;br /&gt;
SHA256 and above. There is no way to do that in OpenSSL 1.0.1 clients.&lt;br /&gt;
Similarly the supported EC curves have to be restricted to exclude some which are&lt;br /&gt;
of insufficient field size.&lt;br /&gt;
&lt;br /&gt;
In summary: it's a bloody mess.&lt;br /&gt;
&lt;br /&gt;
The list of allowable ciphers for all versions of TLS, 1.0/1/1/1.2 is 'TLSv1.2:kRSA'&lt;br /&gt;
which includes those with no encryption or no authentication which are generally&lt;br /&gt;
undesirable and should be excluded.  In full with explicit &amp;quot;+FIPS&amp;quot; qualification that becomes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
'TLSv1.2+FIPS:kRSA+FIPS:!eNULL:!aNULL'&lt;br /&gt;
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH        Au=RSA  Enc=AESGCM(256) Mac=AEAD&lt;br /&gt;
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH      Au=ECDSA Enc=AESGCM(256) Mac=AEAD&lt;br /&gt;
ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH            Au=RSA  Enc=AES(256)  Mac=SHA384&lt;br /&gt;
ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH          Au=ECDSA Enc=AES(256)  Mac=SHA384&lt;br /&gt;
DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH            Au=DSS  Enc=AESGCM(256) Mac=AEAD&lt;br /&gt;
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH            Au=RSA  Enc=AESGCM(256) Mac=AEAD&lt;br /&gt;
DHE-RSA-AES256-SHA256   TLSv1.2 Kx=DH              Au=RSA  Enc=AES(256)  Mac=SHA256&lt;br /&gt;
DHE-DSS-AES256-SHA256   TLSv1.2 Kx=DH              Au=DSS  Enc=AES(256)  Mac=SHA256&lt;br /&gt;
ECDH-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/RSA     Au=ECDH Enc=AESGCM(256) Mac=AEAD&lt;br /&gt;
ECDH-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(256) Mac=AEAD&lt;br /&gt;
ECDH-RSA-AES256-SHA384  TLSv1.2 Kx=ECDH/RSA        Au=ECDH Enc=AES(256)  Mac=SHA384&lt;br /&gt;
ECDH-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH/ECDSA     Au=ECDH Enc=AES(256)  Mac=SHA384&lt;br /&gt;
AES256-GCM-SHA384       TLSv1.2 Kx=RSA             Au=RSA  Enc=AESGCM(256) Mac=AEAD&lt;br /&gt;
AES256-SHA256           TLSv1.2 Kx=RSA             Au=RSA  Enc=AES(256)  Mac=SHA256&lt;br /&gt;
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH        Au=RSA  Enc=AESGCM(128) Mac=AEAD&lt;br /&gt;
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH      Au=ECDSA Enc=AESGCM(128) Mac=AEAD&lt;br /&gt;
ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH            Au=RSA  Enc=AES(128)  Mac=SHA256&lt;br /&gt;
ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH          Au=ECDSA Enc=AES(128)  Mac=SHA256&lt;br /&gt;
DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH            Au=DSS  Enc=AESGCM(128) Mac=AEAD&lt;br /&gt;
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH            Au=RSA  Enc=AESGCM(128) Mac=AEAD&lt;br /&gt;
DHE-RSA-AES128-SHA256   TLSv1.2 Kx=DH              Au=RSA  Enc=AES(128)  Mac=SHA256&lt;br /&gt;
DHE-DSS-AES128-SHA256   TLSv1.2 Kx=DH              Au=DSS  Enc=AES(128)  Mac=SHA256&lt;br /&gt;
ECDH-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/RSA     Au=ECDH Enc=AESGCM(128) Mac=AEAD&lt;br /&gt;
ECDH-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(128) Mac=AEAD&lt;br /&gt;
ECDH-RSA-AES128-SHA256  TLSv1.2 Kx=ECDH/RSA        Au=ECDH Enc=AES(128)  Mac=SHA256&lt;br /&gt;
ECDH-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH/ECDSA     Au=ECDH Enc=AES(128)  Mac=SHA256&lt;br /&gt;
AES128-GCM-SHA256       TLSv1.2 Kx=RSA             Au=RSA  Enc=AESGCM(128) Mac=AEAD&lt;br /&gt;
AES128-SHA256           TLSv1.2 Kx=RSA             Au=RSA  Enc=AES(128)  Mac=SHA256&lt;br /&gt;
AES256-SHA              SSLv3 Kx=RSA               Au=RSA  Enc=AES(256)  Mac=SHA1&lt;br /&gt;
DES-CBC3-SHA            SSLv3 Kx=RSA               Au=RSA  Enc=3DES(168) Mac=SHA1&lt;br /&gt;
AES128-SHA              SSLv3 Kx=RSA               Au=RSA  Enc=AES(128)  Mac=SHA1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
What does this ciphersuite specification mean in practice?&lt;br /&gt;
&lt;br /&gt;
If the peer supports TLS v1.2 it will use a TLS v1.2 ciphersuite which is FIPS&lt;br /&gt;
186-4 compliant (with the curve and signature restrictions I mentioned) or&lt;br /&gt;
non-PFS RSA otherwise.&lt;br /&gt;
&lt;br /&gt;
If the peer only supports TLS 1.1 or 1.0 it will fall back to the non-PFS RSA&lt;br /&gt;
ciphersuites which again will be FIPS 186-4 compliant subject to the silly key&lt;br /&gt;
and certificate signing restrictions.&lt;br /&gt;
&lt;br /&gt;
The ciphersuite (for 1.0.1f+) of 'TLSv1.2+FIPS:kRSA+FIPS:!eNULL:!aNULL'&lt;br /&gt;
will satisfy FIPS 186-4 for any version of TLS 1.0/1.1/1.2 with caveats as noted.&lt;br /&gt;
&lt;br /&gt;
To specify a list of allowable ciphers for TLS 1.0/1.1 only append !TLSv1.2 which permanently deletes&lt;br /&gt;
those which are only usable for TLS v1.2, giving 'kRSA+FIPS:!TLSv1.2'.&lt;br /&gt;
&lt;br /&gt;
=== Cipherstrings ===&lt;br /&gt;
&lt;br /&gt;
Commentary on what the cipherstrings components mean and their relevance:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;TLSv1.2&amp;quot;: list of ciphersuites only allowed for TLS 1.2. This means if TLS 1.2&lt;br /&gt;
is negotiated they can be used and if not they won't. They also happen to be&lt;br /&gt;
permitted by FIPS 186-4 because TLS 1.2 can use signature algorithms stronger&lt;br /&gt;
that SHA1. That means that it is &amp;quot;safe&amp;quot; to include this in a cipher string&lt;br /&gt;
because (a) they are compliant with FIPS 186-4 in for TLS 1.2 and (b) they can&lt;br /&gt;
never be used for TLS 1.1 or 1.0.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;kRSA&amp;quot;: list of ciphersuites which support RSA key exchange. Because TLS 1.1 and&lt;br /&gt;
1.0 can only use SHA1+MD5 in signatures these are the only ones allowed because&lt;br /&gt;
they don't use signatures.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;FIPS&amp;quot;: list of ciphersuites allowed in FIPS mode excluding those offering no&lt;br /&gt;
encryption. This is for informational purposes only because if you *are* in FIPS&lt;br /&gt;
mode you can only use those ciphersuites anyway (but including the no encryption&lt;br /&gt;
ones).&lt;br /&gt;
&lt;br /&gt;
The lists above all include ciphersuites which you wouldn't normally use: no&lt;br /&gt;
encryption or no authentication. So those need to be disabled. This is done by&lt;br /&gt;
appending '!eNULL:!aNULL': this means &amp;quot;disable any ciphersuites present which&lt;br /&gt;
include no encryption or authentication&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So combining these we get the following cipher string in FIPS mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	'TLSv1.2:kRSA:!eNULL:!aNULL'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
which with the functionally redundant &amp;quot;+FIPS&amp;quot; qualifiers is equivant to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	'TLSv1.2+FIPS:kRSA+FIPS:!eNULL:!aNULL'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without the &amp;quot;+FIPS&amp;quot; qualifiers and outside FIPS mode you'll will see weak export grade&lt;br /&gt;
ciphersuites which would be disabled in FIPS mode. Those can be seen with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	openssl ciphers -v 'TLSv1.2:kRSA:!eNULL:!aNULL'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see the actual set of ciphersuites in FIPS mode, without the explicit &amp;quot;+FIPS&amp;quot; qualifiers,&lt;br /&gt;
do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	OPENSSL_FIPS=1 openssl ciphers -v 'TLSv1.2:kRSA:!eNULL:!aNULL'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So in summary &amp;quot;in FIPS mode use the cipherstring 'TLSv1.2:kRSA:!eNULL:!aNULL'&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note this important disclaimer though: This cipherstring *only* restricts the ciphersuites to those&lt;br /&gt;
not explicitly excluded by FIPS 186-4. There are other conditions which must be&lt;br /&gt;
enforced such as key size, permitted curves and permitted signature algorithms.&lt;br /&gt;
Just because a ciphersuite has been negotiated in this range does not guaranteed&lt;br /&gt;
compliance.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;FIPS capable&amp;quot; OpenSSL does not currently provide a means to automatically enforce the&lt;br /&gt;
new FIPS 186-4 restrictions.&lt;br /&gt;
&lt;br /&gt;
=== A quick overview of TLS ===&lt;br /&gt;
&lt;br /&gt;
The primary purpose of the handshake is to enable both peers to securely obtain&lt;br /&gt;
a shared secret value called the pre-master secret. They then use that to&lt;br /&gt;
generate session keys (encryption and MAC) which are used for the exchange of&lt;br /&gt;
actual application data. The handshake is the only place public key algorithms&lt;br /&gt;
are used.&lt;br /&gt;
&lt;br /&gt;
In the case of PFS ciphersuites both ends generate a temporary key (ECDH or DH)&lt;br /&gt;
and exchange the public bits with each other. They use the algorithm to generate&lt;br /&gt;
the shared DH/ECDH secret value which is used later on. The new FIPS restrictions interfere with&lt;br /&gt;
this because those keys have to be large enough. For ECDH an extension can be&lt;br /&gt;
used to ensure this. For DH you just have to hope the server has a big enough&lt;br /&gt;
key and abort if not.&lt;br /&gt;
&lt;br /&gt;
For anonymous algorithms that's all you get. They are vulnerable to man in the&lt;br /&gt;
middle (MitM) attacks and so are rarely used.&lt;br /&gt;
&lt;br /&gt;
In the real world algorithms include authentication. In those the server digitally&lt;br /&gt;
signs its ECDH or DH key using the key in its certificate. This is to ensure the&lt;br /&gt;
temporary ECDH or DH key can't be forged. It is that digital signature that is&lt;br /&gt;
important here and the one which the new FIPS restrictions disrupt.&lt;br /&gt;
&lt;br /&gt;
How that temporary key is signed depends on the cipher suite and the key in the&lt;br /&gt;
server's certificate. The whole process is called server authentication.&lt;br /&gt;
&lt;br /&gt;
In the case of TLS 1.0 and 1.1 that signature uses a MD5+SHA1 hybrid for RSA&lt;br /&gt;
keys and just SHA1 for DSA and ECDSA. That's why PFS is prohibited by the new FIPS&lt;br /&gt;
rules: there is no option but to use SHA1.&lt;br /&gt;
&lt;br /&gt;
In the case of TLS 1.2 any valid combination can be used and the MD5+SHA1 hybrid is no&lt;br /&gt;
longer present for RSA. RSA just uses the same signature format that&lt;br /&gt;
certificates use (PKCS#1).&lt;br /&gt;
&lt;br /&gt;
For TLS 1.2 the client sends the set of signature algorithms it supports in&lt;br /&gt;
preference order in the supported signature algorithms extensions. The server&lt;br /&gt;
then selects one and uses that for that signature. For new FIPS it would just&lt;br /&gt;
use SHA256 as a minimum or abort the connection if the client only supported&lt;br /&gt;
SHA1 (unlikely).&lt;br /&gt;
&lt;br /&gt;
Client authentication in TLS is a secondary concern. In this case the client&lt;br /&gt;
signs some data related to the handshake and sends the result back. The server&lt;br /&gt;
then checks that signature.&lt;br /&gt;
&lt;br /&gt;
As with server authentication TLS 1.1/1.0 has to use either MD5+SHA1 for RSA or&lt;br /&gt;
just SHA1 for other algorithms. So client authentication violates the new FIPS&lt;br /&gt;
restrictions and cannot be used for TLs 1.0/1.1.&lt;br /&gt;
&lt;br /&gt;
TLS 1.2 removes the restriction to SHA1. In this case the server sends back the&lt;br /&gt;
algorithms it supports and the client selects one. Again SHA256 or&lt;br /&gt;
better s needed to comply with new FIPS restrictions.&lt;br /&gt;
&lt;br /&gt;
Next consider the non-PFS case. We consider RSA&lt;br /&gt;
key exchange only as is the only practical option. This is completely different from PFS. In&lt;br /&gt;
this case the client generates the pre master secret and encrypts it using the&lt;br /&gt;
servers key. The server decrypts it and then uses that to complete the&lt;br /&gt;
handshake. No additional signing is used here so no place for SHA1 to be used.&lt;br /&gt;
The server is authenticated because if it didn't have the right key it couldn't&lt;br /&gt;
decrypt the pre-master secret. It's a bit unusual in that authentication (which&lt;br /&gt;
is normally associated with signatures) is performed using an RSA decryption&lt;br /&gt;
operation.&lt;br /&gt;
&lt;br /&gt;
Some further discussion in case that wasn't confusing enough:&lt;br /&gt;
&lt;br /&gt;
Some people say that it is implied that TLS 1.1 and 1.0 must use SHA1 in&lt;br /&gt;
digital signatures in all certificates. If so then&lt;br /&gt;
TLS 1.1 and 1.0 can never be compliant with new FIPS.&lt;br /&gt;
&lt;br /&gt;
Assuming that is not true, what does it mean in practice? A&lt;br /&gt;
a public webserver would require a certificate signed by CAs that&lt;br /&gt;
use SHA256 minimum and large enough keys. Not a trivial&lt;br /&gt;
task in itself.&lt;br /&gt;
&lt;br /&gt;
Aside from that, problems will be encountered if your server needs to use anything&lt;br /&gt;
outside of the new FIPS restrictions (e.g. to talk to other&lt;br /&gt;
clients). Some older browsers (e.g. IE on XP is one which is&lt;br /&gt;
still very common) don't support SHA2 at all. So they'll fail when they talk to&lt;br /&gt;
that server because the can't verify the signatures.&lt;br /&gt;
&lt;br /&gt;
TLS 1.2 is a bit better, at least in theory. The supported signatures should apply to the&lt;br /&gt;
whole certificate chain. So a client advertising only SHA1+RSA receive a&lt;br /&gt;
chain supporting SHA1+RSA only (if the  server has one) and a client supporting SHA256+RSA&lt;br /&gt;
will receive a &amp;quot;new FIPS&amp;quot; friendly chain.&lt;br /&gt;
&lt;br /&gt;
However, in practice that requirement is generally ignored and implementations serve up whatever&lt;br /&gt;
chain is configured regardless of signature algorithms sent by the client&lt;br /&gt;
because many implementers consider that a slly restriction. For interoperability OpenSSL is&lt;br /&gt;
similarly lax if a &amp;quot;strict&amp;quot; option isn't set. In fact configuring multiple&lt;br /&gt;
chains like that can't be directly done in OpenSSL without application support&lt;br /&gt;
which nothing other than s_server can currently handle.&lt;br /&gt;
&lt;br /&gt;
==== Digests in TLS ====&lt;br /&gt;
&lt;br /&gt;
There are different purposes that digest algorithms are put to.&lt;br /&gt;
&lt;br /&gt;
In TLS 1.2 something called the supported signature algorithms extension&lt;br /&gt;
determines the supported digests as a public key + algorithm pair. It's that&lt;br /&gt;
usage that FIPS 186-4 (and SP800-57) has an impact on. So you can't use RSA+SHA1&lt;br /&gt;
any more. For digital signatures the strength of SHA1 is at most 80 bits: it can&lt;br /&gt;
be less with a weak key.&lt;br /&gt;
&lt;br /&gt;
That digital signature is used to maintain the integrity of the handshake&lt;br /&gt;
messages and certificate chains in PFS ciphersuites: basically server and client&lt;br /&gt;
authentication.&lt;br /&gt;
&lt;br /&gt;
For TLS 1.2 you can specify any digest to be used to maintain handshake&lt;br /&gt;
integrity for digital signatures: for TLS 1.1 and below you could only use&lt;br /&gt;
SHA1+MD5. It's that reason why PFS ciphersuites are banned in TLS 1.1 and below.&lt;br /&gt;
&lt;br /&gt;
Digests use HMAC. For HMAC use the key strength is the digest length so SHA1 is 160 bits.&lt;br /&gt;
&lt;br /&gt;
Before TLS 1.2 all cipher suites used SHA1 HMAC (or in legacy cases MD5) for the&lt;br /&gt;
HMAC.&lt;br /&gt;
&lt;br /&gt;
TLS 1.2 introduced some ciphersuites which used SHA256 and SHA384 for the HMAC&lt;br /&gt;
and the AEAD ones like AES-GCM which have a mac as part of the algorithm itself.&lt;br /&gt;
&lt;br /&gt;
Note that TLS 1.2 also permits all the ciphersuites for TLS 1.1, 1.0 too.&lt;br /&gt;
For details see Table 2 and 3 in SP800-57.&lt;br /&gt;
&lt;br /&gt;
Those tables make a lot more sense when you realise for digital signatures it's&lt;br /&gt;
half the digest size. So SHA1 is 20 bytes which is 160 bits and so 80 bits of&lt;br /&gt;
strength so it only appears in the &amp;quot;80 bits&amp;quot; box for digital signatures. Whereas&lt;br /&gt;
for other uses it is the full digest size so SHA1 appears in the 80, 112 and 128&lt;br /&gt;
bit boxes.&lt;br /&gt;
&lt;br /&gt;
Unfortunately the FIPS terminology unnecessarily obfuscated the issue. It would&lt;br /&gt;
have been easier to just say in SP800-57 that SHA1 HMAC is 160 bits&lt;br /&gt;
of equivalent security instead of placing it in the :Security Strenght 128&amp;quot; row&lt;br /&gt;
of Table 3. &lt;br /&gt;
&lt;br /&gt;
TLS 1.2 can use SHA1 in two different places. One is the signature algorithms on&lt;br /&gt;
certificates: i.e. the algorithm the CA signs with. The second place is&lt;br /&gt;
temporary key signature (server authentication) as described below.&lt;br /&gt;
&lt;br /&gt;
==== Digital Signatures in TLS ====&lt;br /&gt;
&lt;br /&gt;
There are three places digital signatures are used in TLS.&lt;br /&gt;
&lt;br /&gt;
1. The signatures on certificates.&lt;br /&gt;
&lt;br /&gt;
The certificates' signatures are set by the CA so to comply with new FIPS&lt;br /&gt;
whatever else you do you need a certificate chain that uses SHA256 at least.&lt;br /&gt;
&lt;br /&gt;
2. Server Key Exchange.&lt;br /&gt;
&lt;br /&gt;
The Server Key Exchange message contains a signature in any authenticated PFS&lt;br /&gt;
ciphersuite. The algorithm used depends on the version of TLS.&lt;br /&gt;
&lt;br /&gt;
For TLS 1.1 and 1.0 the algorithm is either a MD5+SHA1 hybrid (RSA) or SHA1&lt;br /&gt;
(DSA, ECDSA). Both of these are prohibited by new FIPS so TLS 1.1 and 1.0&lt;br /&gt;
authenticated PFS ciphersuites are not allowed.&lt;br /&gt;
&lt;br /&gt;
For TLS 1.2 any appropriate algorithm can be used to sign Server Key Exchange&lt;br /&gt;
messages. So PFS authenticated ciphersuites *are* allowed under new FIPS as long&lt;br /&gt;
as SHA1 is not used to sign Server Key Exchange. MD5 is of course a double no-no.&lt;br /&gt;
&lt;br /&gt;
3. Certificate Verify.&lt;br /&gt;
&lt;br /&gt;
The Certificate Verify message is used whenever client authentication is enabled&lt;br /&gt;
for any applicable ciphersuite (not just PFS). The same digest algorithms are&lt;br /&gt;
used as Server Key Exchange.&lt;br /&gt;
&lt;br /&gt;
Therefore new FIPS and TLS 1.1 and 1.0 prohibits client authentication outright&lt;br /&gt;
in *any* ciphersuite.&lt;br /&gt;
&lt;br /&gt;
TLS 1.2 is more flexible and can use any appropriate algorithm so client&lt;br /&gt;
authentication is permitted as long as SHA1 and MD5 are not used.&lt;br /&gt;
&lt;br /&gt;
=== What about versions of OpenSSL prior to 1.0.1f? ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;TLSv1.2&amp;quot; ciphersuite designation was added at 1.0.1f. For earlier versions of&lt;br /&gt;
OpenSSL the current equivalent of the cipherstring&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	'TLSv1.2:kRSA:!eNULL:!aNULL'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
can be &amp;quot;brute forced&amp;quot; as the unwieldy&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:ADH-AES256-GCM-SHA384:ADH-AES256-SHA256:ECDH-RSA-AES256-GCM-SHA384:ECDH-ECDSA-AES256-GCM-SHA384:ECDH-RSA-AES256-SHA384:ECDH-ECDSA-AES256-SHA384:AES256-GCM-SHA384:AES256-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:ADH-AES128-GCM-SHA256:ADH-AES128-SHA256:ECDH-RSA-AES128-GCM-SHA256:ECDH-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA256:AES128-GCM-SHA256:AES128-SHA256:NULL-SHA256:kRSA:!eNULL:!aNULL'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, as new ciphersuites get added to the 'TLSv1.2' ciphersuite that brute force&lt;br /&gt;
equivalent might end up not being&lt;br /&gt;
equivalent any more.&lt;br /&gt;
&lt;br /&gt;
Since TLSv1.2 only ciphers use SHA256, SHA384 and AES in GCM mode so one string is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	'AESGCM:SHA384:SHA256'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are other ways to get the same effect. One is to disable any ciphers which&lt;br /&gt;
use SHA1. So &amp;quot;FIPS:-SHA&amp;quot; is currently equivalent to &amp;quot;FIPS+TLSv1.2&amp;quot;. The use of&lt;br /&gt;
the &amp;quot;-SHA&amp;quot; is necessary here because it only *temporarily* disables SHA1 MACs.&lt;br /&gt;
That means you can do: &amp;quot;FIPS:-SHA:FIPS+kRSA&amp;quot; to add back the RSA key exchange&lt;br /&gt;
ciphersuites that use SHA1. Contrast that with using &amp;quot;!SHA&amp;quot; instead which permanently&lt;br /&gt;
removes SHA1 from the cipherstring.&lt;/div&gt;</summary>
		<author><name>Stevem</name></author>
	</entry>
</feed>