If you use Tomcat to run Java apps such as Atlassian Confluence (the pag= e you're looking at now), JIRA, etc, via HTTPS, you might have noticed that your app will not support any 256 bit ci= phers, however it will support 128 and 168 bit ciphers, as well as the lame= 40 and 56 bit ciphers. The sslscan tool confirms th= is, and reports:

=20=20

Accepted SSLv3 128 bits DHE-RSA-AES128-SHA=20 Accepted SSLv3 128 bits AES128-SHA Accepted SSLv3 168 bits EDH-RSA-DES-CBC3-SHA Accepted SSLv3 56 bits EDH-RSA-DES-CBC-SHA Accepted SSLv3 40 bits EXP-EDH-RSA-DES-CBC-SHA Accepted SSLv3 168 bits DES-CBC3-SHA Accepted SSLv3 56 bits DES-CBC-SHA Accepted SSLv3 40 bits EXP-DES-CBC-SHA Accepted SSLv3 128 bits RC4-SHA Accepted SSLv3 128 bits RC4-MD5 Accepted SSLv3 40 bits EXP-RC4-MD5 Accepted TLSv1 128 bits DHE-RSA-AES128-SHA Accepted TLSv1 128 bits AES128-SHA Accepted TLSv1 168 bits EDH-RSA-DES-CBC3-SHA Accepted TLSv1 56 bits EDH-RSA-DES-CBC-SHA Accepted TLSv1 40 bits EXP-EDH-RSA-DES-CBC-SHA Accepted TLSv1 168 bits DES-CBC3-SHA Accepted TLSv1 56 bits DES-CBC-SHA Accepted TLSv1 40 bits EXP-DES-CBC-SHA Accepted TLSv1 128 bits RC4-SHA Accepted TLSv1 128 bits RC4-MD5 Accepted TLSv1 40 bits EXP-RC4-MD5=20

So what's the problem here?

=20The issue lies in the so-called *policy files* of JDK6. According to Sun:

=20=20Due to import control restrictions for some countries, the Java Cryptogr= aphy Extension (JCE) policy files shipped with the Java SE Development Kit = and the Java SE Runtime Environment allow strong but limited cryptography t= o be used.

From the Sun website, download the JCE Un=
limited Strength Jurisdiction Policy Files 6 Release Candidate.

Unp=
ack the ZIP file - it will contain two jar files: **local_policy.jar<=
/strong> and US_export_policy.jar. On our Ubuntu boxes=
we use the packages sun-java6-jdk, sun-java6-bin<=
/strong>, and sun-java6-jre. The files in question are sto=
red in /usr/lib/jvm/java-6-sun/jre/lib/security. Replace the d=
efault jar files with the ones you downloaded, then restart your app. It sh=
ould now support 256 bit ciphers:**

=20

Accepted SSLv3 256 bits DHE-RSA-AES256-SHA Accepted SSLv3 256 bits AES256-SHA Accepted TLSv1 256 bits DHE-RSA-AES256-SHA Accepted TLSv1 256 bits AES256-SHA=20

By default, also 40 and 56 bit ciphers are supported - you probably want=
to disable these. To do so you have to explicitly configure the allowed ci=
phers: take the previous list, include the 256 bit ciphers, leave out the 4=
0 and 56 bit ones, then put the =
official names (not the OpenSSL equivalent) of the remaining ciphers in=
your HTTPS config (in my case at the bottom of `server.xml`

). T=
his will look like this:

=20

<Connector port=3D"443" maxHttpHeaderSize=3D"8192" maxThreads=3D"150" minSpareThreads=3D"25" maxSpareThreads=3D"75" enableLookups=3D"false" disableUploadTimeout=3D"true" acceptCount=3D"100" scheme=3D"https" secure=3D"true" clientAuth=3D"false" sslProtocol=3D"TLS" useBodyEncodingForURI=3D"true= " URIEncoding=3D"UTF-8" SSLEnabled=3D"true" keystoreFile=3D"/etc/ssl/private/tracker.jks" keystorePass=3D"hackme" ciphers=3D"SSL_DHE_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_AES_256_CBC_S= HA, SSL_DHE_RSA_WITH_AES_128_CBC_SHA,SSL_RSA_WITH_AES_128_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_RC4_128_MD5, TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_RC4_128_MD5" />=20

After restarting your app, you can verify with `sslscan`

that=
now 256 bit ciphers are supported and preferred, and no 40 and 56 bits one=
s are available anymore:

=20

./sslscan --no-failed my.site.org:443 [...] Supported Server Cipher(s): Accepted SSLv3 256 bits DHE-RSA-AES256-SHA Accepted SSLv3 256 bits AES256-SHA Accepted SSLv3 128 bits DHE-RSA-AES128-SHA Accepted SSLv3 128 bits AES128-SHA Accepted SSLv3 168 bits EDH-RSA-DES-CBC3-SHA Accepted SSLv3 168 bits DES-CBC3-SHA Accepted SSLv3 128 bits RC4-SHA Accepted SSLv3 128 bits RC4-MD5 Accepted TLSv1 256 bits DHE-RSA-AES256-SHA Accepted TLSv1 256 bits AES256-SHA Accepted TLSv1 128 bits DHE-RSA-AES128-SHA Accepted TLSv1 128 bits AES128-SHA Accepted TLSv1 168 bits EDH-RSA-DES-CBC3-SHA Accepted TLSv1 168 bits DES-CBC3-SHA Accepted TLSv1 128 bits RC4-SHA Accepted TLSv1 128 bits RC4-MD5 Prefered Server Cipher(s): SSLv3 256 bits DHE-RSA-AES256-SHA TLSv1 256 bits DHE-RSA-AES256-SHA=20

For apache the following will have the same result:

=20=20

SSLCipherSuite ALL:!ADH:!EXP:!DES:RC4+RSA:+HIGH:+MEDIUM!SSLv2=20