Applied Crypto Hardening
Applied Crypto Hardening
Applied Crypto Hardening
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 2 of 100
Acknowledgements
We would like to express our thanks to the following reviewers and people who have generously
offered their time and interest (in alphabetical order):
Brown, Scott
Brulebois, Cyril
Dirksen-Thedens, Mathis
Dulaunoy, Alexandre
Ghring Philipp
Grigg, Ian
Horenbeck, Maarten
Huebl, Axel
Kovacic, Daniel
Lenzhofer, Stefan
Lornser, Thomas
Mehlmauer, Christian
Millauer, Tobias
Mirbach, Andreas
OBrien, Hugh
Pacher, Christoph
Palfrader, Peter
Pape, Tobias (layout)
Petukhova, Anna (Logo)
Pichler, Patrick
Riebesel, Nicolas
Roeckx, Kurt
Rublik, Martin
Schpany, Mathias
Schwarz, Ren (DigNative)
Seidl, Eva (PDF layout)
Wagner, Sebastian (sebix)
Zangerl, Alexander
The reviewers did review parts of the document in their area of expertise; all remaining errors in
this document are the sole responsibility of the primary authors.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 3 of 100
Abstract
Unfortunately, the computer security and cryptology
communities have drifted apart over the last 25 years.
Security people dont always understand the available
crypto tools, and crypto people dont always understand
the real-world problems.
Ross Anderson in [And08]
This guide arose out of the need for system administrators to have an updated, solid, well researched and thought-through guide for conguring SSL, PGP, SSH and other cryptographic tools
in the post-Snowden age. Triggered by the NSA leaks in the summer of 2013, many system administrators and IT security ocers saw the need to strengthen their encryption settings. This guide is
specically written for these system administrators.
As Schneier noted in [Sch13a], it seems that intelligence agencies and adversaries on the Internet
are not breaking so much the mathematics of encryption per se, but rather use software and
hardware weaknesses, subvert standardization processes, plant backdoors, rig random number
generators and most of all exploit careless settings in server congurations and encryption systems
to listen in on private communications. Worst of all, most communication on the internet is not
encrypted at all by default (for SMTP, opportunistic TLS would be a solution).
This guide can only address one aspect of securing our information systems: getting the crypto
settings right to the best of the authors current knowledge. Other attacks, as the above mentioned,
require different protection schemes which are not covered in this guide. This guide is not an
introduction to cryptography. For background information on cryptography and cryptoanalysis we
would like to refer the reader to the references in appendix B and C at the end of this document.
The focus of this guide is merely to give current best practices for conguring complex cipher suites
and related parameters in a copy & paste-able manner. The guide tries to stay as concise as is possible for such a complex topic as cryptography. Naturally, it can not be complete. There are many
excellent guides [IS12, fSidIB13, ENI13] and best practice documents available when it comes to
cryptography. However none of them focuses specically on what an average system administrator
needs for hardening his or her systems crypto settings.
This guide tries to ll this gap.
Contents
1. Introduction
1.1. Audience . . . . . . . .
1.2. Related publications .
1.3. How to read this guide
1.4. Disclaimer and scope .
1.5. Methods . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7
7
7
7
8
10
2. Practical recommendations
2.1. Webservers . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1. Apache . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.2. lighttpd . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.3. nginx . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.4. Cherokee . . . . . . . . . . . . . . . . . . . . . . . .
2.1.5. MS IIS . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2. SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1. OpenSSH . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2. Cisco ASA . . . . . . . . . . . . . . . . . . . . . . .
2.2.3. Cisco IOS . . . . . . . . . . . . . . . . . . . . . . . .
2.3. Mail Servers . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.1. SMTP in general . . . . . . . . . . . . . . . . . . . .
2.3.2. Dovecot . . . . . . . . . . . . . . . . . . . . . . . .
2.3.3. cyrus-imapd . . . . . . . . . . . . . . . . . . . . . .
2.3.4. Postx . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.5. Exim . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4. VPNs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.1. IPsec . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.2. Check Point FireWall-1 . . . . . . . . . . . . . . . .
2.4.3. OpenVPN . . . . . . . . . . . . . . . . . . . . . . .
2.4.4. PPTP . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.5. Cisco ASA . . . . . . . . . . . . . . . . . . . . . . .
2.4.6. Openswan . . . . . . . . . . . . . . . . . . . . . . .
2.4.7. tinc . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5. PGP/GPG - Pretty Good Privacy . . . . . . . . . . . . . . .
2.6. IPMI, ILO and other lights out management solutions . .
2.7. Instant Messaging Systems . . . . . . . . . . . . . . . . .
2.7.1. General server conguration recommendations .
2.7.2. ejabberd . . . . . . . . . . . . . . . . . . . . . . . .
2.7.3. Chat privacy - Off-the-Record Messaging (OTR) .
2.7.4. Charybdis . . . . . . . . . . . . . . . . . . . . . . .
2.7.5. SILC . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.8. Database Systems . . . . . . . . . . . . . . . . . . . . . .
2.8.1. Oracle . . . . . . . . . . . . . . . . . . . . . . . . .
2.8.2. MySQL . . . . . . . . . . . . . . . . . . . . . . . . .
2.8.3. DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11
11
11
12
14
16
17
22
22
24
25
25
26
26
28
29
31
35
35
37
40
42
42
44
46
46
47
47
47
48
49
49
50
50
50
50
51
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 5 of 100
Contents
Contents
2.8.4. PostgreSQL . . . . . . . . . . . . . . . . . .
2.9. Intercepting proxy solutions and reverse proxies
2.9.1. Bluecoat . . . . . . . . . . . . . . . . . . . .
2.9.2. HAProxy . . . . . . . . . . . . . . . . . . . .
2.9.3. Pound . . . . . . . . . . . . . . . . . . . . .
2.9.4. stunnel . . . . . . . . . . . . . . . . . . . . .
2.10.Kerberos . . . . . . . . . . . . . . . . . . . . . . . .
2.10.1. Overview . . . . . . . . . . . . . . . . . . . .
2.10.2. Implementations . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
52
53
54
55
57
57
58
58
60
3. Theory
3.1. Overview . . . . . . . . . . . . . . . . . . . . . .
3.2. Cipher suites . . . . . . . . . . . . . . . . . . . .
3.2.1. Architectural overview . . . . . . . . . .
3.2.2. Forward Secrecy . . . . . . . . . . . . .
3.2.3. Recommended cipher suites . . . . . .
3.2.4. Compatibility . . . . . . . . . . . . . . .
3.3. Random Number Generators . . . . . . . . . .
3.3.1. When random number generators fail
3.3.2. Linux . . . . . . . . . . . . . . . . . . . .
3.3.3. Recommendations . . . . . . . . . . . .
3.4. Keylengths . . . . . . . . . . . . . . . . . . . . .
3.5. A note on Elliptic Curve Cryptography . . . . .
3.6. A note on SHA-1 . . . . . . . . . . . . . . . . . .
3.7. A note on Die Hellman Key Exchanges . . .
3.8. Public Key Infrastructures . . . . . . . . . . . .
3.8.1. Certicate Authorities . . . . . . . . . .
3.8.2. Hardening PKI . . . . . . . . . . . . . . .
3.9. TLS and its support mechanisms . . . . . . . .
3.9.1. HTTP Strict Transport Security . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
64
64
64
64
66
66
68
69
69
70
70
71
72
73
73
74
74
76
76
76
A. Tools
A.1. SSL & TLS .
A.2. Key length
A.3. RNGs . . .
A.4. Guides . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
82
82
83
83
83
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
B. Links
84
C. Suggested Reading
85
86
E. Further research
E.1. Software not covered by this guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
95
95
Index
100
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 6 of 100
1. Introduction
1.1. Audience
Sysadmins. Sysadmins. Sysadmins. They are a force-multiplier.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 7 of 100
Start
Introduction
yes
read Practical recommendations
no
To understand why we chose
certain settings, read Theory rst
This guide specically does not address physical security, protecting software and hardware against
exploits, basic IT security housekeeping, information assurance techniques, trac analysis attacks,
issues with key-roll over and key management, securing client PCs and mobile devices (theft,
loss), proper Operations Security1 , social engineering attacks, protection against tempest [Wik13c]
attack techniques, thwarting different side-channel attacks (timing, cache timing, differential fault
analysis, differential power analysis or power monitoring attacks), downgrade attacks, jamming
the encrypted channel or other similar attacks which are typically employed to circumvent strong
encryption. The authors can not overstate the importance of these other techniques. Interested
1 https://en.wikipedia.org/wiki/Operations_security
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 8 of 100
readers are advised to read about these attacks in detail since they give a lot of insight into other
parts of cryptography engineering which need to be dealt with.2
This guide does not talk much about the well-known insecurities of trusting a public-key infrastructure (PKI)3 . Nor does this text fully explain how to run your own Certicate Authority (CA).
Most of this zoo of information security issues are addressed in the very comprehensive book
Security Engineering by Ross Anderson [And08].
For some experts in cryptography this text might seem too informal. However, we strive to keep the
language as non-technical as possible and tting for our target audience: system administrators
who can collectively improve the security level for all of their users.
Security is a process, not a product.
Bruce Schneier
This guide can only describe what the authors currently believe to be the best settings based
on their personal experience and after intensive cross checking with literature and experts. For a
complete list of people who reviewed this paper, see the Acknowledgements. Even though multiple
specialists reviewed the guide, the authors can give no guarantee whatsoever that they made the
right recommendations. Keep in mind that tomorrow there might be new attacks on some ciphers
and many of the recommendations in this guide might turn out to be wrong. Security is a process.
We therefore recommend that system administrators keep up to date with recent topics in IT
security and cryptography.
In this sense, this guide is very focused on getting the cipher strings done right even though there
is much more to do in order to make a system more secure. We the authors, need this document
as much as the reader needs it.
Scope
In this guide, we restricted ourselves to:
Internet-facing services
Commonly used services
Devices which are used in business environments (this specically excludes XBoxes, Playstations and similar consumer devices)
OpenSSL
We explicitly excluded:
Specialized systems (such as medical devices, most embedded systems, industrial control
systems, etc.)
2 An
easy to read yet very insightful recent example is the "FLUSH+RELOAD" technique [YF13] for leaking cryptographic
keys from one virtual machine to another via L3 cache timing attacks.
3 Interested readers are referred to https://bugzilla.mozilla.org/show_bug.cgi?id=647959 or http://www.h-online.com/
security/news/item/Honest-Achmed-asks-for-trust-1231314.html which brings the problem of trusting PKIs right to the
point
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 9 of 100
1.5. Methods
1.5. Methods
1.5. Methods
C.O.S.H.E.R - completely open source, headers, engineering
and research
A. Kaplans mail signature for many years
For writing this guide, we chose to collect the most well researched facts about cryptography
settings and let as many trusted specialists as possible review those settings. The review process
is completely open and done on a public mailing list. The document is available (read-only) to
the public Internet on the web page and the source code of this document is on a public git
server, mirrored on GitHub.com and open for public scrutiny. However, write permissions to the
document are only granted to vetted people. The list of reviewers can be found in the section
Acknowledgements. Every write operation to the document is logged via the git version control
system and can thus be traced back to a specic author. We accept git pull requests on the github
mirror4 for this paper.
Public peer-review and multiple eyes checking of our guide is the best strategy we can imagine at
the present moment 5 .
We invite the gentle reader to participate in this public review process.
4 https://github.com/BetterCrypto/Applied-Crypto-Hardening
5 http://www.wired.com/opinion/2013/10/how-to-design-and-defend-against-the-perfect-backdoor/
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 10 of 100
2. Practical recommendations
2.1. Webservers
2.1.1. Apache
Note that any cipher suite starting with EECDH can be omitted, if in doubt. (Compared to the theory
section, EECDH in Apache and ECDHE in OpenSSL are synonyms 1 )
Settings
Enabled modules SSL and Headers are required.
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
#SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCompression off
# Add six earth month HSTS header for all users...
Header always set Strict-Transport-Security "max-age=15768000"
# If you want to protect all subdomains, use the following header
# ALL subdomains HAVE TO support HTTPS if you use this!
# Strict-Transport-Security: "max-age=15768000 ; includeSubDomains"
SSLCipherSuite 'EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+\
\aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!\
\eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256\
\-SHA:CAMELLIA128-SHA:AES128-SHA'
1 https://www.mail-archive.com/openssl-dev@openssl.org/msg33405.html
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 11 of 100
2.1. Webservers
2.1.2. lighttpd
Additional settings
You might want to redirect everything to https:// if possible. In Apache you can do this with the
following setting inside of a VirtualHost environment:
<VirtualHost *:80>
Redirect permanent / https://SERVER_NAME/
</VirtualHost>
References
Apache2 Docs on SSL and TLS: https://httpd.apache.org/docs/2.4/ssl/
How to test
See appendix A
2.1.2. lighttpd
Tested with Versions
lighttpd/1.4.31-4 with OpenSSL 1.0.1e on Debian Wheezy
lighttpd/1.4.33 with OpenSSL 0.9.8o on Debian Squeeze (note that TLSv1.2 does not work in
openssl 0.9.8 thus not all ciphers actually work)
lighttpd/1.4.28-2 with OpenSSL 0.9.8o on Debian Squeeze (note that TLSv1.2 does not work
in openssl 0.9.8 thus not all ciphers actually work)
lighttpd/1.4.31, Ubuntu 14.04.2 Trusty with Openssl 1.0.1f
Settings
$SERVER["socket"] == "0.0.0.0:443" {
ssl.engine = "enable"
ssl.use-sslv2 = "disable"
ssl.use-sslv3 = "disable"
ssl.pemfile = "/etc/lighttpd/server.pem"
ssl.ca-file = "/etc/ssl/certs/server.crt"
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 12 of 100
2.1. Webservers
2.1.2. lighttpd
ssl.cipher-list = "EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:\
\EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!\
\aNULL!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:\
\AES256-SHA:CAMELLIA128-SHA:AES128-SHA"
ssl.honor-cipher-order = "enable"
setenv.add-response-header = ( "Strict-Transport-Security" => "max-age\
\=15768000") # six months
# use this only if all subdomains support HTTPS!
# setenv.add-response-header = ( "Strict-Transport-Security" => "max-age\
\=15768000; includeSubDomains")
}
Starting with lighttpd version 1.4.29 Die-Hellman and Elliptic-Curve Die-Hellman key agreement
protocols are supported. By default, elliptic curve "prime256v1" (also "secp256r1") will be used, if
no other is given. To select special curves, it is possible to set them using the conguration options
ssl.dh-file and ssl.ec-curve.
# use group16 dh parameters
ssl.dh-file = "/etc/lighttpd/ssl/dh4096.pem"
ssl.ec-curve = "secp384r1"
Please read section 3.7 for more information on Die Hellman key exchange and elliptic curves.
Additional settings
As for any other webserver, you might want to automatically redirect http:// trac toward https://.
It is also recommended to set the environment variable HTTPS, so the PHP applications run by the
webserver can easily detect that HTTPS is in use.
$HTTP["scheme"] == "http" {
# capture vhost name with regex condition -> %0 in redirect pattern
# must be the most inner block to the redirect rule
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://%0$0")
}
# Set the environment variable properly
setenv.add-environment = (
"HTTPS" => "on"
)
}
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 13 of 100
2.1. Webservers
2.1.3. nginx
Additional information
The cong option honor-cipher-order is available since 1.4.30, the supported ciphers depend on
the used OpenSSL-version (at runtime). ECDHE has to be available in OpenSSL at compile-time,
which should be default. SSL compression should by deactivated by default at compile-time (if not,
its active).
Support for other SSL-libraries like GnuTLS will be available in the upcoming 2.x branch, which is
currently under development.
References
HTTPS redirection: http://redmine.lighttpd.net/projects/1/wiki/HowToRedirectHttpToHttps
Lighttpd Docs SSL: http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_SSL
Release 1.4.30 (How to mitigate BEAST attack) http://redmine.lighttpd.net/projects/lighttpd/
wiki/Release-1_4_30
SSL Compression disabled by default: http://redmine.lighttpd.net/issues/2445
How to test
See appendix A
2.1.3. nginx
Tested with Version
Settings
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # not possible to do exclusive
ssl_ciphers 'EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+\
\aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!\
\eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256\
\-SHA:CAMELLIA128-SHA:AES128-SHA';
add_header Strict-Transport-Security max-age=15768000; # six months
# use this only if all subdomains support HTTPS!
# add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 14 of 100
2.1. Webservers
2.1.3. nginx
If you absolutely want to specify your own DH parameters, you can specify them via
ssl_dhparam file;
However, we advise you to read section 3.7 and stay with the standard IKE/IETF parameters (as
long as they are >1024 bits).
Additional settings
If you decide to trust NISTs ECC curve recommendation, you can add the following line to nginxs
conguration le to select special curves:
ssl_ecdh_curve secp384r1;
You might want to redirect everything to https:// if possible. In Nginx you can do this with the
following setting:
return 301 https://$server_name$request_uri;
The variable $server_name refers to the rst server_name entry in your cong le. If you specify
more than one server_name only the rst will be taken. Please be sure to not use the $host variable
here because it contains data controlled by the user.
References
http://nginx.org/en/docs/http/ngx_http_ssl_module.html
http://wiki.nginx.org/HttpSslModule
How to test
See appendix A
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 15 of 100
2.1. Webservers
2.1.4. Cherokee
2.1.4. Cherokee
Tested with Version
Cherokee/1.2.104 on Debian Wheezy with OpenSSL 1.0.1e 11 Feb 2013
Settings
The conguration of the cherokee webserver is performed by an admin interface available via
the web. It then writes the conguration to /etc/cherokee/cherokee.conf, the important lines of
such a conguration le can be found at the end of this section.
General Settings
Network
* SSL/TLS back-end: OpenSSL/libssl
Ports to listen
* Port: 443, TLS: TLS/SSL port
Virtual Servers, For each vServer on tab Security:
Required SSL/TLS Values: Fill in the correct paths for Certicate and Certicate key
Advanced Options
* Ciphers: EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:
EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:
+SSLv3:!aNULL!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:
!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
Additional settings
For each vServer on the Security tab it is possilbe to set the Die Hellman length to up to 4096
bits. We recommend to use >1024 bits. More information about Die-Hellman and which curves
are recommended can be found in section 3.7.
In Advanced: TLS it is possible to set the path to a Die Hellman parameters le for 512, 1024,
2048 and 4096 bits.
HSTS can be congured on host-basis in section vServers / Security / HTTP Strict Transport Security
(HSTS):
Enable HSTS: Accept
HSTS Max-Age: 15768000
Include Subdomains: depends on your setup
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 16 of 100
2.1. Webservers
2.1.5. MS IIS
To redirect HTTP to HTTPS, congure a new rule per Virtual Server in the Behavior tab. The rule is
SSL/TLS combined with a NOT operator. As Handler dene Redirection and use /(.*)$ as Regular
Expression and https://${host}/$1 as Substitution.
server!bind!2!port = 443
server!bind!2!tls = 1
server!tls = libssl
vserver!1!hsts = 1
vserver!1!hsts!max_age = 15768000
vserver!1!hsts!subdomains = 1
vserver!1!rule!5!handler = redir
vserver!1!rule!5!handler!rewrite!10!regex = /(.*)$
vserver!1!rule!5!handler!rewrite!10!show = 1
vserver!1!rule!5!handler!rewrite!10!substring = https://${host}/$1
vserver!1!rule!5!handler!type = just_about
vserver!1!rule!5!match = not
vserver!1!rule!5!match!right = tls
vserver!1!ssl_certificate_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
vserver!1!ssl_certificate_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
vserver!1!ssl_cipher_server_preference = 1
vserver!1!ssl_ciphers = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384\
\:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!\
\aNULL!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:\
\AES256-SHA:CAMELLIA128-SHA:AES128-SHA
vserver!1!ssl_compression = 0
vserver!1!ssl_dh_length = 2048
References
Cookbook: SSL, TLS and certicates: http://cherokee-project.com/doc/cookbook_ssl.html
Cookbook: Redirecting all trac from HTTP to HTTPS: http://cherokee-project.com/doc/
cookbook_http_to_https.html
How to test
See appendix A
2.1.5. MS IIS
To congure SSL/TLS on Windows Server IIS Crypto can be used. 2 Simply start the Programm, no
installation required. The tool changes the registry keys described below. A restart is required for
the changes to take effect.
2 https://www.nartac.com/Products/IISCrypto/
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 17 of 100
2.1. Webservers
2.1.5. MS IIS
Instead of using the IIS Crypto Tool the conguration can be set using the Windows Registry. The
following Registry keys apply to the newer Versions of Windows (Windows 7, Windows Server
2008, Windows Server 2008 R2, Windows Server 2012 and Windows Server 2012 R2). For detailed
information about the older versions see the Microsoft knowledgebase article. 3
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\\
\Ciphers]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\\
\CipherSuites]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\\
\Hashes]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\\
\KeyExchangeAlgorithms]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\\
\Protocols]
Settings
When trying to avoid RC4 (RC4 biases) as well as CBC (BEAST-Attack) by using GCM and to support
perfect forward secrecy, Microsoft SChannel (SSL/TLS, Auth,.. Stack) supports ECDSA but lacks
support for RSA signatures (see ECC suite B doubts4 ).
Since one is stuck with ECDSA, an elliptic curve certicate needs to be used.
The conguration of cipher suites MS IIS will use, can be congured in one of the following ways:
1. Group Policy 5
2. Registry 6
3 http://support.microsoft.com/kb/245030/en-us
4 http://safecurves.cr.yp.to/rigid.html
5 http://msdn.microsoft.com/en-us/library/windows/desktop/bb870930(v=vs.85).aspx
6 http://support.microsoft.com/kb/245030
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 18 of 100
2.1. Webservers
2.1.5. MS IIS
Cipher Suite
Client
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
3. IIS Crypto 7
4. Powershell
Table 2.1 shows the process of turning on one algorithm after another and the effect on the
supported clients tested using https://www.ssllabs.com.
SSL 3.0, SSL 2.0 and MD5 are turned off. TLS 1.0 and TLS 1.2 are turned on.
Table 2.1 shows the algorithms from strongest to weakest and why they need to be added in this
order. For example insisting on SHA-2 algorithms (only rst two lines) would eliminate all versions
of Firefox, so the last line is needed to support this browser, but should be placed at the bottom,
so capable browsers will choose the stronger SHA-2 algorithms.
TLS_RSA_WITH_RC4_128_SHA or equivalent should also be added if MS Terminal Server Connection
is used (make sure to use this only in a trusted environment). This suite will not be used for SSL,
since we do not use a RSA Key.
Clients not supported:
1. Java 6
2. WinXP
3. Bing
Additional settings
Its recommended to use Strict-Transport-Security: max-age=15768000 for detailed information
visit the 8 Microsoft knowledgebase.
You might want to redirect everything to https:// if possible. In IIS you can do this with the following
setting by Powershell:
Set-WebConfiguration -Location "$WebSiteName/$WebApplicationName"
-Filter 'system.webserver/security/access'
-Value "SslRequireCert"
7 https://www.nartac.com/Products/IISCrypto/
8 http://www.iis.net/congreference/system.webserver/httpprotocol/customheaders
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 19 of 100
2.1. Webservers
2.1.5. MS IIS
How to test
See appendix A
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 20 of 100
2.1. Webservers
2.1.5. MS IIS
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 21 of 100
2.2. SSH
2.2. SSH
2.2. SSH
Please be advised that any change in the SSH-Settings of your server might cause problems
connecting to the server or starting/reloading the SSH-Daemon itself. So every time you congure your SSH-Settings on a remote server via SSH itself, ensure that you have a second open
connection to the server, which you can use to reset or adapt your changes!
2.2.1. OpenSSH
Tested with Version
OpenSSH 6.6p1 (Gentoo)
OpenSSH 6.6p1-2 on Ubuntu 14.04.2 LTS
Settings
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no # or 'without-password' to allow SSH key based login
StrictModes yes
PermitEmptyPasswords no
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.\
\com,aes256-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-\
\etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,\
\diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1
Settings
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 22 of 100
2.2. SSH
2.2.1. OpenSSH
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no # or 'without-password' to allow SSH key based login
StrictModes yes
PermitEmptyPasswords no
Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-\
\etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,\
\diffie-hellman-group-exchange-sha1
Settings
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
PermitRootLogin no # or 'without-password' to allow SSH key based login
StrictModes yes
PermitEmptyPasswords no
Ciphers aes256-ctr,aes128-ctr
MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,\
\diffie-hellman-group-exchange-sha1
Note: Older Linux systems wont support SHA2. PuTTY (Windows) does not support RIPE-MD160.
Curve25519, AES-GCM and UMAC are only available upstream (OpenSSH 6.6p1). DSA host keys
have been removed on purpose, the DSS standard does not support for DSA keys stronger than
1024bit 9 which is far below current standards (see section 3.4). Legacy systems can use this
conguration and simply omit unsupported ciphers, key exchange algorithms and MACs.
9 https://bugzilla.mindrot.org/show_bug.cgi?id=1647
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 23 of 100
2.2. SSH
References
The OpenSSH sshd_cong man page is the best reference: http://www.openssh.org/cgi-bin/man.
cgi?query=sshd_cong
How to test
Connect a client with verbose logging enabled to the SSH server
$ ssh -vvv myserver.com
Settings
crypto key generate rsa modulus 2048
ssh version 2
ssh key-exchange group dh-group14-sha1
Note: When the ASA is congured for SSH, by default both SSH versions 1 and 2 are allowed. In
addition to that, only a group1 DH-key-exchange is used. This should be changed to allow only SSH
version 2 and to use a key-exchange with group14. The generated RSA key should be 2048 bit (the
actual supported maximum). A non-cryptographic best practice is to recongure the lines to only
allow SSH-logins.
References
http://www.cisco.com/en/US/docs/security/asa/asa91/conguration/general/admin_management.
html
How to test
Connect a client with verbose logging enabled to the SSH server
$ ssh -vvv myserver.com
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 24 of 100
Settings
crypto
ip ssh
ip ssh
ip ssh
line vty 0 15
transport input ssh
Note: Same as with the ASA, also on IOS by default both SSH versions 1 and 2 are allowed and the
DH-key-exchange only use a DH-group of 768 Bit. In IOS, a dedicated Key-pair can be bound to SSH
to reduce the usage of individual keys-pairs. From IOS Version 15.0 onwards, 4096 Bit rsa keys are
supported and should be used according to the paradigm "use longest supported key". Also, do
not forget to disable telnet vty access.
References
http://www.cisco.com/en/US/docs/ios/sec_user_services/conguration/guide/sec_cfg_secure_
shell.html
How to test
Connect a client with verbose logging enabled to the SSH server
$ ssh -vvv myserver.com
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 25 of 100
We strongly recommend to allow all cipher suites for anything but MSA mode, because the alternative is plain text transmission.
2.3.2. Dovecot
Tested with Version
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 26 of 100
2.3.2. Dovecot
Settings
# SSL protocols to use
ssl_protocols = !SSLv3 !SSLv2
# SSL ciphers to use
ssl_cipher_list = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH\
\+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!\
\eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-\
\SHA:CAMELLIA128-SHA:AES128-SHA
# Prefer the server's order of ciphers over client's.
ssl_prefer_server_ciphers = yes
Additional info
Dovecot 2.0, 2.1: Almost as good as dovecot 2.2. Dovecot does not ignore unknown conguration
parameters. Does not support ssl_prefer_server_ciphers
Limitations
Dovecot currently does not support disabling TLS compression. Furthermore, DH parameters
greater than 1024bit are not supported. The most recent version 2.2.7 of Dovecot implements
congurable DH parameter length 10 .
References
http://wiki2.dovecot.org/SSL
How to test
openssl s_client -crlf -connect SERVER.TLD:993
10 http://hg.dovecot.org/dovecot-2.2/rev/43ab5abeb8f0
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 27 of 100
2.3.3. cyrus-imapd
2.3.3. cyrus-imapd
Tested with Versions
2.4.17
Settings
To activate SSL/TLS congure your certicate with
tls_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
tls_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
This way MUAs can only authenticate with plain text authentication schemes after issuing the
STARTTLS command. Providing CRAM-MD5 or DIGEST-MD5 methods is not recommended.
To support POP3/IMAP on ports 110/143 with STARTTLS and POP3S/IMAPS on ports 995/993 check
the SERVICES section in cyrus.conf
SERVICES {
imap cmd="imapd -U 30" listen="imap" prefork=0 maxchild=100
imaps cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 28 of 100
2.3.4. Postx
Limitations
cyrus-imapd currently (2.4.17, trunk) does not support elliptic curve cryptography. Hence, ECDHE
will not work even if dened in your cipher list.
Currently there is no way to prefer server ciphers or to disable compression.
There is a working patch for all three features: https://bugzilla.cyrusimap.org/show_bug.cgi?id=
3823
How to test
openssl s_client -crlf -connect SERVER.TLD:993
2.3.4. Postx
Tested with Versions
Postx 2.9.6, Debian Wheezy with OpenSSL 1.0.1e
Postx 2.11.0 on Ubuntu 14.04.02 with OpenSSL 1.0.1f
Settings
Postx has ve internal lists of ciphers, and the possibility to switch between those with smtpd_tls_ciphers.
However, we leave this at its default value for server to server connections, as many mail servers
only support outdated protocols and ciphers. We consider bad encryption still better than plain
text transmission. For connections to MUAs, TLS is mandatory and the ciphersuite is modied.
MX and SMTP client conguration: As discussed in section 2.3.1, because of opportunistic encryption we do not restrict the list of ciphers or protocols for communication with other mail servers to
avoid transmission in plain text. There are still some steps needed to enable TLS, all in main.cf:
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 29 of 100
2.3.4. Postx
MSA: For the MSA smtpd process which communicates with mail clients, we rst dene the ciphers
that are acceptable for the mandatory security level, again in main.cf:
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_mandatory_ciphers=high
tls_high_cipherlist=EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:\
\EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL\
\:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256\
\-SHA:CAMELLIA128-SHA:AES128-SHA
Then, we congure the MSA smtpd in master.cf with two additional options that are only used for
this instance of smtpd:
submission inet n - - - - smtpd
-o smtpd_tls_security_level=encrypt
-o tls_preempt_cipherlist=yes
For those users who want to use EECDH key exchange, it is possible to customize this via:
smtpd_tls_eecdh_grade=ultra
Limitations
tls_ssl_options is supported from Postx 2.11 onwards. You can leave the statement in the conguration for older versions, it will be ignored.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 30 of 100
2.3.5. Exim
tls_preempt_cipherlist is supported from Postx 2.8 onwards. Again, you can leave the statement
in for older versions.
References
Refer to http://www.postx.org/TLS_README.html for an in-depth discussion.
Additional settings
Postx has two sets of built-in DH parameters that can be overridden with the smtpd_tls_dh512_param_file
and smtpd_tls_dh1024_param_file options. The dh512 parameters are used for export ciphers,
while the dh1024 ones are used for all other ciphers.
The bit length in those parameter names is just a name, so one could use stronger parameter
sets; it should be possible to e.g. use the IKE Group14 parameters (see section 3.7) without much
interoperability risk, but we have not tested this yet.
How to test
You can check the effect of the settings with the following command:
$ zegrep "TLS connection established from.*with cipher" /var/log/mail.log | awk \
\'{printf("%s %s %s %s\n", $12, $13, $14, $15)}' | sort | uniq -c | sort -n
1 SSLv3 with cipher DHE-RSA-AES256-SHA
23 TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384
60 TLSv1 with cipher ECDHE-RSA-AES256-SHA
270 TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384
335 TLSv1 with cipher DHE-RSA-AES256-SHA
openssl s_client -starttls smtp -crlf -connect SERVER.TLD:25
2.3.5. Exim
Tested with Versions
Exim 4.82, Debian Jessie
Exim 4.82, Ubuntu 14.04.2 with OpenSSL 1.0.1e
It is highly recommended to read http://exim.org/exim-html-current/doc/html/spec_html/ch-encrypted_
smtp_connections_using_tlsssl.html rst.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 31 of 100
2.3.5. Exim
tls_certificate = /etc/ssl/exim.crt
tls_privatekey = /etc/ssl/exim.pem
If you want to support legacy SMTPS on port 465, and STARTTLS on smtp(25)/submission(587)
ports set
daemon_smtp_ports = smtp : smtps : submission
tls_on_connect_ports = 465
This switches Exim to submission mode and allows addition of missing Message-ID and Date
headers.
It is not advisable to restrict the default cipher list for MSA mode if you dont know all connecting
MUAs. If you still want to dene one please consult the Exim documentation or ask on the eximusers mailinglist.
The cipher used is written to the logles by default. You may want to add
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 32 of 100
2.3.5. Exim
tls_certificate = /etc/ssl/exim.crt
tls_privatekey = /etc/ssl/exim.pem
It is not advisable to restrict the default cipher list for opportunistic encryption as used by SMTP.
Do not use cipher lists recommended for HTTPS! If you still want to dene one please consult the
Exim documentation or ask on the exim-users mailinglist.
If you want to request and verify client certicates from sending hosts set
tls_verify_certificates = /etc/pki/tls/certs/ca-bundle.crt
tls_try_verify_hosts = *
tls_try_verify_hosts only reports the result to your logle. If you want to disconnect such clients
you have to use
tls_verify_hosts = *
The cipher used is written to the logles by default. You may want to add
log_selector = <whatever your log_selector already contains> +\
\tls_certificate_verified +tls_peerdn +tls_sni
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 33 of 100
2.3.5. Exim
Client mode settings have to be done in the conguration section of the smtp transport (driver =
smtp).
If you want to use a client certicate (most server certicates can be used as client certicate, too)
set
tls_certificate = /etc/ssl/exim.crt
tls_privatekey = /etc/ssl/exim.pem
OpenSSL:
GnuTLS:
Exim string expansion: Note that most of the options accept expansion strings. This way you can
e.g. set cipher lists or STARTTLS advertisement conditionally. Please follow the link to the ocial
Exim documentation to get more information.
Limitations: Exim currently (4.82) does not support elliptic curves with OpenSSL. This means that
ECDHE is not used even if dened in your cipher list. There already is a working patch to provide
support: http://bugs.exim.org/show_bug.cgi?id=1397
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 34 of 100
2.4. VPNs
2.4. VPNs
How to test
openssl s_client -starttls smtp -crlf -connect SERVER.TLD:25
2.4. VPNs
2.4.1. IPsec
Settings
Assumptions:
We assume the use of IKE (v1 or v2) and ESP for this document.
Authentication: IPSEC authentication should optimally be performed via RSA signatures, with
a key size of 2048 bits or more. Conguring only the trusted CA that issued the peer certicate
provides for additional protection against fake certicates.
If you need to use Pre-Shared Key authentication:
1. Choose a random, long enough PSK (see below)
2. Use a separate PSK for any IPSEC connection
3. Change the PSKs regularly
The size of the PSK should not be shorter than the output size of the hash algorithm used in
IKE11 .
For a key composed of upper- and lowercase letters, numbers, and two additional symbols12 ,
table 2.2 gives the minimum lengths in characters.
Table 2.2.: PSK lengths
IKE Hash
SHA256
43
SHA384
64
SHA512
86
11 It
is used in a HMAC, see RFC2104 [KBC97] and the discussion starting in http://www.vpnc.org/ietf-ipsec/02.ipsec/
msg00268.html.
12 64 possible values = 6 bits
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 35 of 100
2.4. VPNs
2.4.1. IPsec
Conguration A
Conguration B
Notes
Suite-B-GCM-256
Suite-B-GCM-128
VPN-B
Mode
Conguration A
Conguration B
Main Mode
Main Mode
Encryption
AES-256
Hash
SHA2-*
SHA2-*, SHA1
DH Group
Group 14-18
Group 14-18
Conguration A
Conguration B
Encryption
AES-GCM-16, AES-CTR,
AES-CCM-16, AES-256
Hash
DH Group
Same as Phase 1
Same as Phase 1
Cryptographic Suites: IPSEC Cryptographic Suites are pre-dened settings for all the items of a
conguration; they try to provide a balanced security level and make setting up VPNs easier. 13
When using any of those suites, make sure to enable Perfect Forward Secrecy for Phase 2, as this
is not specied in the suites. The equivalents to the recommended ciphers suites in section 3.2.3
are shown in table 2.3.
Phase 1: Alternatively to the pre-dened cipher suites, you can dene your own, as described in
this and the next section.
Phase 1 is the mutual authentication and key exchange phase; table 2.4 shows the parameters.
Use only main mode, as aggressive mode has known security vulnerabilities 14 .
Phase 2: Phase 2 is where the parameters that protect the actual data are negotiated; recommended parameters are shown in table 2.5.
13 RFC6379
14 http://ikecrack.sourceforge.net/
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 36 of 100
2.4. VPNs
References
A Cryptographic Evaluation of IPsec, Niels Ferguson and Bruce Schneier: https://www.
schneier.com/paper-ipsec.pdf
Settings
Please see section 2.4.1 for guidance on parameter choice. In this section, we will congure a
strong setup according to Conguration A.
This is based on the concept of a VPN Community, which has all the settings for the gateways
that are included in that community. Communities can be found in the IPSEC VPN tab of SmartDashboard.
Either chose one of the encryption suites in the properties dialog (gure 2.2), or proceed to Custom
Encryption..., where you can set encryption and hash for Phase 1 and 2 (gure 2.3).
The Die-Hellman groups and Perfect Forward Secrecy Settings can be found under Advanced
Settings / Advanced VPN Properties (gure 2.4).
Additional settings
For remote Dynamic IP Gateways, the settings are not taken from the community, but set in the
Global Properties dialog under Remote Access / VPN Authentication and Encryption. Via the
Edit... button, you can congure sets of algorithms that all gateways support (gure 2.5).
Please note that these settings restrict the available algorithms for all gateways, and also inuence
the VPN client connections.
References
Check Point VPN R77 Administration Guide (may require a UserCenter account to access)
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 37 of 100
2.4. VPNs
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 38 of 100
2.4. VPNs
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 39 of 100
2.4. VPNs
2.4.3. OpenVPN
2.4.3. OpenVPN
Tested with Versions
OpenVPN 2.3.2 from Debian wheezy-backports linked against openssl (libssl.so.1.0.0)
OpenVPN 2.2.1 from Debian Wheezy linked against openssl (libssl.so.1.0.0)
OpenVPN 2.3.2 for Windows
Settings
General We describe a conguration with certicate-based authentication; see below for details
on the easyrsa tool to help you with that.
OpenVPN uses TLS only for authentication and key exchange. The bulk trac is then encrypted
and authenticated with the OpenVPN protocol using those keys.
Note that while the tls-cipher option takes a list of ciphers that is then negotiated as usual with
TLS, the cipher and auth options both take a single argument that must match on client and
server.
OpenVPN duplexes the tunnel into a data and a control channel. The control channel is a usual
TLS connection, the data channel currently uses encrypt-then-mac CBC, see https://github.com/
BetterCrypto/Applied-Crypto-Hardening/pull/91#issuecomment-75365286
Server Conguration
tls-cipher DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-\
\SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES256-SHA:DHE-RSA\
\-CAMELLIA128-SHA:DHE-RSA-AES128-SHA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:\
\AES128-SHA
cipher AES-256-CBC
auth SHA384
Client Conguration Client and server have to use compatible congurations, otherwise they
cant communicate. The cipher and auth directives have to be identical.
tls-remote server.example.com
# Attention: it must fit in 256 bytes, so not the infamous CipherStringB!
tls-cipher DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-\
\SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES256-SHA:DHE-RSA\
\-CAMELLIA128-SHA:DHE-RSA-AES128-SHA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:\
\AES128-SHA
cipher AES-256-CBC
auth SHA384
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 40 of 100
2.4. VPNs
2.4.3. OpenVPN
# https://openvpn.net/index.php/open-source/documentation/howto.html#mitm
remote-cert-tls server
References
OpenVPN Documentation: Security Overview https://openvpn.net/index.php/open-source/
documentation/security-overview.html
Additional settings
Key renegotiation interval The default for renegotiation of encryption keys is one hour (renegsec 3600). If you transfer huge amounts of data over your tunnel, you might consider conguring
a shorter interval, or switch to a byte- or packet-based interval (reneg-bytes or reneg-pkts).
Fixing easy-rsa When installing an OpenVPN server instance, you are probably using easy-rsa to
generate keys and certicates. The le vars in the easyrsa installation directory has a number of
settings that should be changed to secure values:
export KEY_SIZE=4096
export CA_EXPIRE=1826
export KEY_EXPIRE=365
This will enhance the security of the key generation by using RSA keys with a length of 4096 bits,
and set a lifetime of one year for the server/client certicates and ve years for the CA certicate.
NOTE: 4096 bits is only an example of how to do this with easy-rsa. See also section 3.4 for a
discussion on keylengths.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 41 of 100
2.4. VPNs
2.4.4. PPTP
In addition, edit the pkitool script and replace all occurrences of sha1 with sha256, to sign the
certicates with SHA256.
Limitations
Note that the ciphersuites shown by openvpn --show-tls are known, but not necessarily supported
.
15
2.4.4. PPTP
PPTP is considered insecure, Microsoft recommends to use a more secure VPN tunnel16 .
There is a cloud service that cracks the underlying MS-CHAPv2 authentication protocol for the price
of USD 20017 , and given the resulting MD4 hash, all PPTP trac for a user can be decrypted.
Settings
crypto ipsec ikev2 ipsec-proposal AES-Fallback
protocol esp encryption aes-256 aes-192 aes
protocol esp integrity sha-512 sha-384 sha-256
crypto ipsec ikev2 ipsec-proposal AES-GCM-Fallback
protocol esp encryption aes-gcm-256 aes-gcm-192 aes-gcm
protocol esp integrity sha-512 sha-384 sha-256
crypto ipsec ikev2 ipsec-proposal AES128-GCM
15 https://community.openvpn.net/openvpn/ticket/304
16 http://technet.microsoft.com/en-us/security/advisory/2743314
17 https://www.cloudcracker.com/blog/2012/07/29/cracking-ms-chap-v2/
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 42 of 100
2.4. VPNs
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 43 of 100
2.4. VPNs
2.4.6. Openswan
References
http://www.cisco.com/en/US/docs/security/asa/roadmap/asaroadmap.html
http://www.cisco.com/web/about/security/intelligence/nextgen_crypto.html
2.4.6. Openswan
Tested with Version
Openswan 2.6.39 (Gentoo)
Settings
Note: the available algorithms depend on your kernel conguration (when using protostack=netkey)
and/or build-time options.
To list the supported algorithms
$ ipsec auto --status | less
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 44 of 100
2.4. VPNs
2.4.6. Openswan
How to test
Start the vpn and using
$ ipsec auto --status | less
and look for IKE algorithms wanted/found and ESP algorithms wanted/loaded.
References
https://www.openswan.org/
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 45 of 100
2.4.7. tinc
2.4.7. tinc
Tested with Version
tinc 1.0.23 from Gentoo linked against OpenSSL 1.0.1e
tinc 1.0.23 from Sabayon linked against OpenSSL 1.0.1e
Defaults
tinc uses 2048 bit RSA keys, Blowsh-CBC, and SHA1 as default settings and suggests the usage of
CBC mode ciphers. Any key length up to 8196 is supported and it does not need to be a power of
two. OpenSSL Ciphers and Digests are supported by tinc.
Settings
Generate keys with
tincd -n NETNAME -K8196
Old keys will not be deleted (but disabled), you have to delete them manually. Add the following
lines to your tinc.conf on all machines
Cipher = aes-256-cbc
Digest = SHA512
References
18 https://tools.ietf.org/search/rfc4880
19 https://www.schneier.com/blog/archives/2005/02/sha1_broken.html
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 46 of 100
When using PGP, there are a couple of things to take care of:
Properly dealing with key material, passphrases and the web-of-trust is outside of the scope of
this document. The GnuPG website20 has a good tutorial on PGP.
This Debian How-to21 is a great resource on upgrading your old PGP key as well as on safe default
settings. This section is built based on the Debian How-to.
Hashing
Avoid SHA-1 in GnuPG. Edit $HOME/.gnupg/gpg.conf:
personal-digest-preferences SHA256
cert-digest-algo SHA256
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB \
\BZIP2 ZIP Uncompressed
Before you generate a new PGP key, make sure there is enough entropy available (see subsection
3.3.2).
20 http://www.gnupg.org/
21 https://www.debian-administration.org/users/dkg/weblog/48
22 https://github.com/stpeter/manifesto
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 47 of 100
2.7.2. ejabberd
In short:
require the use of TLS for both client-to-server and server-to-server connections
prefer or require TLS cipher suites that enable forward secrecy
deploy certicates issued by well-known and widely-deployed certication authorities (CAs)
The last point being out-of-scope for this section, we will only cover the rst two points.
2.7.2. ejabberd
Tested with Versions
Debian Wheezy 2.1.10-4+deb7u1
Settings
ejabberd is one of the popular Jabber servers. In order to be compliant with the manifesto, you
should adapt your conguration23 :
{listen,
[
{5222, ejabberd_c2s, [
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536},
starttls,
starttls_required,
{certfile, "/etc/ejabberd/ejabberd.pem"}
]},
]}.
{s2s_use_starttls, required_trusted}.
{s2s_certfile, "/etc/ejabberd/ejabberd.pem"}.
Additional settings
Older versions of ejabberd (< 2.0.0) need to be patched24 to be able to parse all of the certicates
in the CA chain.
23 http://www.process-one.net/docs/ejabberd/guide_en.html
24 http://hyperstruct.net/2007/06/20/installing-the-startcom-ssl-certicate-in-ejabberd/
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 48 of 100
Newer versions of ejabberd now support specifying the cipher string in the cong le. See the commit message: https://github.com/processone/ejabberd/commit/1dd94ac0d06822daa8c394ea2da20d91c8209124.
However, this change did not yet make it into the stable release at the time of this writing.
References
TODO: ADD references!!
How to test
https://xmpp.net is a practical website to test Jabber server congurations.
Authentication
Integrity
Condentiality
Forward secrecy
It basically uses Die-Hellman, AES and SHA1. Communicating over an insecure instant messaging
network, OTR can be used for end to end encryption.
There are no specic congurations required but the protocol itself is worth to be mentioned.
2.7.4. Charybdis
There are numerous implementations of IRC servers. In this section, we choose Charybdis which
serves as basis for ircd-seven26 , developed and used by freenode. Freenode is actually the biggest
IRC network27 . Charybdis is part of the Debian & Ubuntu distributions.
/* Extensions */
#loadmodule "extensions/chm_sslonly_compat.so";
loadmodule "extensions/extb_ssl.so";
serverinfo {
ssl_private_key = "etc/test.key";
ssl_cert = "etc/test.cert";
ssl_dh_params = "etc/dh.pem";
25 https://otr.cypherpunks.ca/Protocol-v3-4.0.0.html
26 https://dev.freenode.net/redmine/projects/ircd-seven
27 http://irc.netsplit.de/networks/top10.php
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 49 of 100
2.7.5. SILC
2.7.5. SILC
SILC28 is instant messaging protocol publicly released in 2000. SILC is a per-default secure chat
protocol thanks to a generalized usage of symmetric encryption. Keys are generated by the server
meaning that if compromised, communication could be compromised.
The protocol is not really popular anymore.
References
Technical safety requirements by Deutsche Telekom AG (German). Please read section 17.12
or pages 129 and following (Req 396 and Req 397) about SSL and ciphersuites http://www.
telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si
2.8.2. MySQL
Tested with Versions
Debian Wheezy and MySQL 5.5
28 http://www.silcnet.org/
and https://en.wikipedia.org/wiki/SILC_(protocol)
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 50 of 100
2.8.3. DB2
Settings
[mysqld]
ssl
ssl-ca=/etc/mysql/cacert.pem
ssl-cert=/etc/mysql/server-cert.pem
ssl-key=/etc/mysql/server-key.pem
# needs OpennSSL build
ssl-cipher=DH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+\
\SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!\
\LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:\
\CAMELLIA128-SHA:AES128-SHA
References
MySQL Documentation on SSL Connections.
https://dev.mysql.com/doc/refman/5.5/en/ssl-connections.html
How to test
After restarting the server run the following query to see if the ssl settings are correct:
show variables like '%ssl%';
2.8.3. DB2
Tested with Version
We do not test this here, since we only reference other papers for DB2 so far.
Settings
ssl_cipherspecs: In the link above the whole SSL-conguration is described in-depth. The following
command shows only how to set the recommended ciphersuites.
# recommended and supported ciphersuites
db2 update dbm cfg using SSL_CIPHERSPECS
TLS_RSA_WITH_AES_256_CBC_SHA256,
TLS_RSA_WITH_AES_128_GCM_SHA256,
TLS_RSA_WITH_AES_128_CBC_SHA256,
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 51 of 100
2.8.4. PostgreSQL
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
TLS_RSA_WITH_AES_256_GCM_SHA384,
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
TLS_RSA_WITH_AES_256_CBC_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA,
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
References
IBM Db2 Documentation on Supported cipher suites.
http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.
sec.doc%2Fdoc%2Fc0053544.html
2.8.4. PostgreSQL
Tested with Versions
Debian Wheezy and PostgreSQL 9.1
Linux Mint 14 nadia / Ubuntu 12.10 quantal with PostgreSQL 9.1+136 and OpenSSL 1.0.1c
Settings
ssl = on
# (change requires restart)
ssl_ciphers = 'EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+\
\aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!\
\eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-\
\SHA:CAMELLIA128-SHA:AES128-SHA' # allowed SSL ciphers
To start in SSL mode the server.crt and server.key must exist in the servers data directory $PGDATA.
Starting with version 9.2, you have the possibility to set the path manually.
ssl_cert_file = 'server.crt' # (change requires restart)
ssl_key_file = 'server.key' # (change requires restart)
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 52 of 100
ssl_ca_file = 'root.crt'
References
Its recommended to read Security and Authentication in the manual29 .
PostgreSQL Documentation on Secure TCP/IP Connections with SSL: http://www.postgresql.
org/docs/9.1/static/ssl-tcp.html
PostgreSQL Documentation on host-based authentication: http://www.postgresql.org/docs/
current/static/auth-pg-hba-conf.html
How to test
To test your ssl settings, run psql with the sslmode parameter:
psql "sslmode=require host=postgres-server dbname=database" your-username
29 http://www.postgresql.org/docs/9.1/interactive/runtime-cong-connection.html
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 53 of 100
2.9.1. Bluecoat
Conclusion: Dont forget to check your proxy solutions SSL-capabilities. Also do so for your reverse
proxies!
2.9.1. Bluecoat
Tested with Versions
SGOS 6.5.x
BlueCoat Proxy SG Appliances can be used as forward and reverse proxies. The reverse proxy
feature is rather under-developed, and while it is possible and supported, there only seems to be
limited use of this feature "in the wild" - nonetheless there are a few cipher suites to choose from,
when enabling SSL features.
The same protocols are available for forward proxy settings and should be adjusted accordingly:
In your local policy le add the following section:
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 54 of 100
2.9.2. HAProxy
<ssl>
DENY server.connection.negotiated_ssl_version=(SSLV2, SSLV3)
Disabling protocols and ciphers in a forward proxy environment could lead to unexpected results
on certain (miscongured?) webservers (i.e. ones accepting only SSLv2/3 protocol connections)
2.9.2. HAProxy
HAProxy can be used as loadbalancer and proxy for TCP and HTTP-based applications. Since
version 1.5 it supports SSL and IPv6.
Settings
global
ssl-default-bind-ciphers EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+\
\SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+\
\SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:\
\CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
ssl-default-bind-options no-sslv3 no-tls-tickets #disable SSLv3
tune.ssl.default-dh-param 2048 #tune DH to 2048
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 55 of 100
2.9.2. HAProxy
Additional Settings
Enable Next Protocol Negotiation ( N P N ) Support:
bind *:443 ssl crt server.pem npn "http/1.1,http/1.0"
openssl x509 -in server.crt -pubkey -noout | openssl rsa -pubin -outform der | \
\openssl dgst -sha256 -binary | base64
Then you append the returned string in the HAProxy conguration. Add the following line to the
backend conguration:
rspadd Public-Key-Pins:\ pin-sha256="YOUR_KEY";\ max-age=15768000;\ \
\includeSubDomains
How to test
See appendix A
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 56 of 100
2.9.3. Pound
2.9.3. Pound
Tested with Versions
Pound 2.6
Settings
# HTTP Listener, redirects to HTTPS
ListenHTTP
Address 10.10.0.10
Port 80
Service
Redirect "https://some.site.tld"
End
End
## HTTPS Listener
ListenHTTPS
Address 10.10.0.10
Port 443
AddHeader "Front-End-Https: on"
Cert "/path/to/your/cert.pem"
## See 'man ciphers'.
Ciphers "TLSv1.2:TLSv1.1:!SSLv3:!SSLv2:EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM\
\:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128\
\:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!\
\ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA"
Service
BackEnd
Address 10.20.0.10
Port 80
End
End
End
2.9.4. stunnel
Tested with Versions
stunnel 4.53-1.1ubuntu1 on Ubuntu 14.04 Trusty with OpenSSL 1.0.1f, without disabling
Secure Client-Initiated Renegotiation
stunnel 5.02-1 on Ubuntu 14.04 Trusty with OpenSSL 1.0.1f
stunnel 4.53-1.1 on Debian Wheezy with OpenSSL 1.0.1e, without disabling Secure ClientInitiated Renegotiation
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 57 of 100
2.10. Kerberos
2.10. Kerberos
Settings
ciphers = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+\
\SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL!eNULL:!LOW\
\:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:\
\CAMELLIA128-SHA:AES128-SHA
curve = secp384r1
options = NO_SSLv2
options = NO_SSLv3
options = cipher_server_preference
; Secure Client-Initiated Renegotiation can only be disabled wit stunnel >= 4.54
;renegotiation = no
Additional information
Secure Client-Initiated Renegotiation can only be disabled for stunnel versions >= 4.54, when the
renegotiation parameter has been added (See changelog).
References
stunnel documentation: https://www.stunnel.org/static/stunnel.html
stunnel changelog: https://www.stunnel.org/sdf_ChangeLog.html
How to test
See appendix A
2.10. Kerberos
This section discusses various implementations of the Kerberos 5 authentication protocol on Unix
and Unix-like systems as well as on Microsoft Windows.
2.10.1. Overview
Kerberos provides mutual authentication of two communicating parties, e.g. a user using a network service. The authentication process is mediated by a trusted third party, the Kerberos key
distribution centre (KDC). Kerberos implements secure single-sign-on across a large number of
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 58 of 100
2.10. Kerberos
2.10.1. Overview
network protocols and operating systems. Optionally, Kerberos can be used to create encrypted
communications channels between the user and service.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 59 of 100
2.10. Kerberos
2.10.2. Implementations
the realm a client belongs to as well as the KDC, kpasswd and kerberos-adm servers may
be specied in DNS TXT and SRV records. Spoofed DNS entries will cause denial-of-service
situations and might endanger[MIT13, HA00] the security of a Kerberos realm.
Clients and servers in Kerberos realms need to have synchronized clocks. Tickets in Kerberos
are created with a limited, strictly enforced lifetime. This limits an attackers window of
opportunity for various attacks such as the decryption of tickets in sniffed network trac or
the use of tickets read from a client computers memory. Kerberos will refuse tickets with
old timestamps or timestamps in the future. This would enable an attacker with access to a
systems clock to deny access to a service or all users logging in from a specic host.
Therefore we suggest:
Secure all KDCs at least as strongly as the most secure service in the realm.
Dedicate physical (i.e. non-VM) machines to be KDCs. Do not run any services on those
machines beyond the necessary KDC, kerberos-adm, kpasswd and kprop services.
Restrict physical and administrative access to the KDCs as severely as possible. E.g. ssh
access should be limited to responsible adminstrators and trusted networks.
Encrypt and secure the KDCs backups.
Replicate your primary KDC to at least one secondary KDC.
Prefer easy-to-secure replication (propagation in Kerberos terms) methods.Especially avoid
LDAP replication and database backends. LDAP enlarges the attack surface of your KDC and
facilitates unauthorized access to the principal database e.g. by ACL misconguration.
Use DNSSEC. If that is not possible, at least ensure that all servers and clients in a realm use
a trustworthy DNS server contacted via secure network links.
Use NTP on a trustworthy server via secure network links.
Avoid services that require the user to enter a password which is then checked against
Kerberos. Prefer services that are able to use authentication via service tickets, usually not
requiring the user to enter a password except for the initial computer login to obtain a
ticket-granting-ticket (TGT). This limits the ability of attackers to spy out passwords through
compromised services.
2.10.2. Implementations
Cryptographic Algorithms in Kerberos Implementations The encryption algorithms (commonly
abbreviated etypes or enctypes) in Kerberos exchanges are subject to negotiation between both
sides of an exchange. Similarly, a ticket granting ticket (TGT), which is usually obtained on initial
login, can only be issued if the principal contains a version of the password encrypted with an
etype that is available both on the KDC and on the client where the login happens. Therefore, to
ensure interoperability among components using different implementations as shown in table
??, a selection of available etypes is necessary. However, the negotiation process may be subject
to downgrade attacks[EHS10] and weak hashing algorithms endanger integrity protection and
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 60 of 100
2.10. Kerberos
2.10.2. Implementations
password security. This means that the des3-cbc-sha1-kd or rc4-hmac algorithms should not be
used, except if there is a concrete and unavoidable need to do so. Other des3-*, des-* and rc4hmac-exp algorithms should never be used.
Along the lines of cipher string B, the following etypes are recommended: aes256-cts-hmac-sha1-96
camellia256-cts-cmac aes128-cts-hmac-sha1-96 camellia128-cts-cmac.
Table 2.6.: Commonly supported Kerberos encryption types by implementation. Algorithm names according to RFC3961, except where aliases can be used or the algorithm is named differently altogether
as stated [Rae05a, Hud12, Rae05b, NYHR05, NYHR05, krb10, Jav, Shi].
ID
Algorithm
MIT
Heimdal
GNU Shishi
MS ActiveDirectory
des-cbc-crc
des-cbc-md4
des-cbc-md5
des3-cbc-none
des3-cbc-sha1
16
17
des3-cbc-sha1-kd
aes128-cts-hmac-sha1-96
18
aes256-cts-hmac-sha1-96
23
rc4-hmac
24
rc4-hmac-exp
25
camellia128-cts-cmac
26
camellia256-cts-cmac
named des3-cbc-sha1
since Vista,
Existing installations The conguration samples below assume new installations without preexisting principals.
For existing installations:
Existing setups should be migrated to a new master key if the current master key is using a
weak enctype.
When changing the list of supported_enctypes, principals where all enctypes are no longer
supported will cease to work.
Be aware that Kerberos 4 is obsolete and should not be used.
Principals with weak enctypes pose an increased risk for password bruteforce attacks if an
attacker gains access to the database.
To get rid of principals with unsupported or weak enctypes, a password change is usually the
easiest way. Service principals can simply be recreated.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 61 of 100
2.10. Kerberos
2.10.2. Implementations
MIT krb5
KDC conguration In /etc/krb5kdc/kdc.conf set the following in your realms conguration:
supported_enctypes = aes256-cts-hmac-sha1-96:normal camellia256-cts-cmac:\
\normal aes128-cts-hmac-sha1-96:normal camellia128-cts-cmac:normal
default_principal_flags = +preauth
Upgrading a MIT krb5 database to a new enctype To check if an upgrade is necessary, execute
the following on the KDC in question:
root@kdc.example.com:~# kdb5_util list_mkeys
Master keys for Principal: K/M@EXAMPLE.COM
KVNO: 1, Enctype: des-cbc-crc, Active on: Thu Jan 01 00:00:00 UTC 1970 *
In this case, an old unsafe enctype is in use as indicated by the star following the key line. To
upgrade, proceed as follows. First create a new master key for the database with the appropriate
enctype. You will be prompted for a master password that can later be used to decrypt the
database. A stash-le containing this encryption key will also be written.
root@kdc.example.com:~# kdb5_util add_mkey -s -e aes256-cts-hmac-sha1-96
Creating new master key for master key principal 'K/M@EXAMPLE.COM'
You will be prompted for a new database Master Password.
It is important that you NOT FORGET this password.
Enter KDC database master key:
Re-enter KDC database master key to verify:
Verify that the new master key has been successfully created. Note the key version number (KVNO)
of the new master key, in this case 2.
root@kdc.example.com:~# kdb5_util list_mkeys
Master keys for Principal: K/M@EXAMPLE.COM
KVNO: 2, Enctype: aes256-cts-hmac-sha1-96, No activate time set
KVNO: 1, Enctype: des-cbc-crc, Active on: Thu Jan 01 00:00:00 UTC 1970 *
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 62 of 100
2.10. Kerberos
2.10.2. Implementations
Set the new master key as the active master key by giving its KVNO. The active master key will be
indicated by an asterisk in the master key list.
root@kdc.example.com:~# kdb5_util use_mkey 2
root@kdc.example.com:~# kdb5_util list_mkeys
Master keys for Principal: K/M@EXAMPLE.COM
KVNO: 2, Enctype: aes256-cts-hmac-sha1-96, Active on: Wed May 13 14:14:18 UTC \
\2015 *
KVNO: 1, Enctype: des-cbc-crc, Active on: Thu Jan 01 00:00:00 UTC 1970
After verifying that everything still works as desired it is possible to remove unused master keys.
root@kdc.example.com:~# kdb5_util purge_mkeys
Will purge all unused master keys stored in the 'K/M@EXAMPLE.COM' principal, are \
\you sure?
(type 'yes' to confirm)? yes
OK, purging unused master keys from 'K/M@EXAMPLE.COM'...
Purging the following master key(s) from K/M@EXAMPLE.COM:
KVNO: 1
1 key(s) purged.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 63 of 100
3. Theory
3.1. Overview
The balance between freedom and security is a delicate
one.
Mark Udall, american politician
This chapter provides the necessary background information on why chapter 2 recommended
cipher string B.
We start off by explaining the structure of cipher strings in section 3.2.1 (architecture) and dene
perfect forward secrecy ( P F S ) in 3.2.2. Next we present Cipher String A and Cipher String B in section
3.2.3. This concludes the section on cipher strings. In theory, the reader should now be able to
construct his or her own cipher string. However, the question why certain settings were chosen still
remains. To answer this part, we need to look at recommended keylengths, problems in specic
algorithms and hash functions and other cryptographic parameters. As mentioned initially in
section 1.2, the ENISA [ENI13], ECRYPT 2 [IS12] and BSI [fSidIB13] reports go much more into these
topics and should be consulted in addition.
We try to answer the questions by explaining issues with random number generators (section 3.3),
keylengths (section 3.4), current issues in ECC (section 3.5), a note of warning on SHA-1 (section
3.6) and some comments on Die Hellman key exchanges (section 3.7). All of this is important in
understanding why certain choices were made for Cipher String A and B. However, for most system
administrators, the question of compatibility is one of the most pressing ones. Having the freedom
to be compatible with any client (even running on outdated operating systems) of course, reduces
the security of our cipher strings. We address these topics in section 3.2.4. All these sections will
allow a system administrator to balance his or her needs for strong encryption with usability and
compatibility.
Last but not least, we nish this chapter by talking about issues in PKIs (section 3.8), Certicate
Authorities and on hardening a PKI. Note that these last few topics deserve a book on their own.
Hence this guide can only mention a few current topics in this area.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 64 of 100
A cipher suite is a standardized collection of key exchange algorithms, encryption algorithms (ciphers) and Message authentication codes (MAC) algorithm that provides authenticated encryption
schemes. It consists of the following components:
Key exchange protocol: An (interactive) key exchange protocol is a method whereby parties who
do not share any secret information can generate a shared, secret key by communicating over
a public channel. The main property guaranteed here is that an eavesdropping adversary
who sees all the messages sent over the communication line does not learn anything about
the resulting secret key. [KL08]
Example: DHE
Authentication: The client authenticates the server by its certicate. Optionally the server may
authenticate the client certicate.
Example: RSA
Cipher: The cipher is used to encrypt the message stream. It also contains the key size and mode
used by the suite.
Example: AES256
Message authentication code (MAC): A MAC ensures that the message has not been tampered
with (integrity).
Examples: SHA256
Authenticated Encryption with Associated Data (AEAD): AEAD is a class of authenticated encryption block-cipher modes which take care of encryption as well as authentication (e.g. GCM,
CCM mode).
Example: AES256-GCM
DHE RSA AES256 SHA256
A note on nomenclature: there are two common naming schemes for cipher strings IANA names
(see appendix B) and the more well known OpenSSL names. In this document we will always use
OpenSSL names unless a specic service uses IANA names.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 65 of 100
TLS 1.2
Perfect forward secrecy / ephemeral Die Hellman
strong MACs (SHA-2) or
GCM as Authenticated Encryption scheme
Compatibility: At the time of this writing only Win 7 and Win 8.1 crypto stack, OpenSSL 1.0.1e,
Safari 6 / iOS 6.0.1 and Safar 7 / OS X 10.9 are covered by that cipher string.
1 https://en.wikipedia.org/wiki/Forward_secrecy
2 https://www.eff.org/deeplinks/2013/08/pushing-perfect-forward-secrecy-important-web-privacy-protection
3 http://news.netcraft.com/archives/2013/06/25/ssl-intercepted-today-decrypted-tomorrow.html
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 66 of 100
ID
OpenSSL Name
Version
KeyEx
Auth
Cipher
MAC
0x009F
DHE-RSA-AES256-GCM-SHA384
TLSv1.2
DH
RSA
AESGCM(256)
AEAD
0x006B
DHE-RSA-AES256-SHA256
TLSv1.2
DH
RSA
AES(256) (CBC)
SHA256
0xC030
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-RSA-AES256-SHA384
TLSv1.2
TLSv1.2
ECDH
ECDH
RSA
RSA
AESGCM(256)
AES(256) (CBC)
AEAD
SHA384
0xC028
Compatibility: Note that these cipher suites will not work with Windows XPs crypto stack (e.g.
IE, Outlook), We could not verify yet if installing JCE also xes the Java 7 DH-parameter length
limitation (1024 bit). TODO: do that!
Explanation: For a detailed explanation of the cipher suites chosen, please see ??. In short,
nding a single perfect cipher string is practically impossible and there must be a tradeoff between
compatibility and security. On the one hand there are mandatory and optional ciphers dened
in a few RFCs, on the other hand there are clients and servers only implementing subsets of the
specication.
Straight forward, the authors wanted strong ciphers, forward secrecy 4 and the best client compatibility possible while still ensuring a cipher string that can be used on legacy installations (e.g.
OpenSSL 0.9.8).
4 http://nmav.gnutls.org/2011/12/price-to-pay-for-perfect-forward.html
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 67 of 100
3.2.4. Compatibility
ID
OpenSSL Name
Version
KeyEx
Auth
Cipher
MAC
0x009F
DHE-RSA-AES256-GCM-SHA384
TLSv1.2
DH
RSA
AESGCM(256)
AEAD
0x006B
DHE-RSA-AES256-SHA256
TLSv1.2
DH
RSA
AES(256)
SHA256
0xC030
0xC028
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-RSA-AES256-SHA384
TLSv1.2
TLSv1.2
ECDH
ECDH
RSA
RSA
AESGCM(256)
AES(256)
AEAD
SHA384
0x009E
DHE-RSA-AES128-GCM-SHA256
TLSv1.2
DH
RSA
AESGCM(128)
AEAD
0x0067
DHE-RSA-AES128-SHA256
TLSv1.2
DH
RSA
AES(128)
SHA256
0xC02F
ECDHE-RSA-AES128-GCM-SHA256
TLSv1.2
ECDH
RSA
AESGCM(128)
AEAD
0xC027
ECDHE-RSA-AES128-SHA256
TLSv1.2
ECDH
RSA
AES(128)
SHA256
0x0088
DHE-RSA-CAMELLIA256-SHA
SSLv3
DH
RSA
Camellia(256)
SHA1
0x0039
DHE-RSA-AES256-SHA
SSLv3
DH
RSA
AES(256)
SHA1
0xC014
ECDHE-RSA-AES256-SHA
SSLv3
ECDH
RSA
AES(256)
SHA1
0x0045
DHE-RSA-CAMELLIA128-SHA
SSLv3
DH
RSA
Camellia(128)
SHA1
0x0033
DHE-RSA-AES128-SHA
SSLv3
DH
RSA
AES(128)
SHA1
0xC013
ECDHE-RSA-AES128-SHA
SSLv3
ECDH
RSA
AES(128)
SHA1
0x0084
CAMELLIA256-SHA
SSLv3
RSA
RSA
Camellia(256)
SHA1
0x0035
AES256-SHA
SSLv3
RSA
RSA
AES(256)
SHA1
0x0041
CAMELLIA128-SHA
SSLv3
RSA
RSA
Camellia(128)
SHA1
0x002F
AES128-SHA
SSLv3
RSA
RSA
AES(128)
SHA1
Our recommended cipher strings are meant to be used via copy and paste and need to work "out
of the box".
TLSv1.2 is preferred over TLSv1.0 (while still providing a useable cipher string for TLSv1.0
servers).
AES256 and CAMELLIA256 count as very strong ciphers at the moment.
AES128 and CAMELLIA128 count as strong ciphers at the moment
DHE or ECDHE for forward secrecy
RSA as this will t most of todays setups
AES256-SHA as a last resort: with this cipher at the end, even server systems with very
old OpenSSL versions will work out of the box (version 0.9.8 for example does not provide
support for ECC and TLSv1.1 or above).
Note however that this cipher suite will not provide forward secrecy. It is meant to provide
the same client coverage (eg. support Microsoft crypto libraries) on legacy setups.
3.2.4. Compatibility
TODO: write this section. The idea here is to rst document which server (and openssl) version
we assumed. Once these parameters are xed, we then list all clients which are supported for
Variant A) and B). Therefore we can document compatibilities to some extent. The sysadmin can
then choose roughly what he looses or gains by omitting certain cipher suites.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 68 of 100
A good source of random numbers is essential for many crypto operations. The key feature of a
good random number generator is the non-predictability of the generated numbers. This means
that hardware support for generating entropy is essential.
Hardware random number generators in operating systems or standalone components collect
entropy from various random events mostly by using the (low bits of the) time an event occurs
as an entropy source. The entropy is merged into an entropy pool and in some implementations
there is some bookkeeping about the number of random bits available.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 69 of 100
3.3.2. Linux
3.3.2. Linux
On Linux there are two devices that return random bytes when read; the /dev/random can block
until sucient entropy has been collected while /dev/urandom will not block and return whatever
(possibly insucient) entropy has been collected so far.
Unfortunately most crypto implementations are using /dev/urandom and can produce predictable
random numbers if not enough entropy has been collected [HDWH12].
Linux supports the injection of additional entropy into the entropy pool via the device /dev/random.
On the one hand this is used for keeping entropy across reboots by storing output of /dev/random
into a le before shutdown and re-injecting the contents during the boot process. On the other
hand this can be used for running a secondary entropy collector to inject entropy into the kernel
entropy pool.
On Linux you can check how much entropy is available with the command:
$ cat /proc/sys/kernel/random/entropy_avail
3.3.3. Recommendations
To avoid situations where a newly deployed server doesnt have enough entropy it is recommended
to generate keys (e.g. for SSL or SSH) on a system with a sucient amount of entropy available and
transfer the generated keys to the server. This is especially advisable for small embedded devices
or virtual machines.
For embedded devices and virtual machines deploying additional userspace software that generates entropy and feeds this to kernel entropy pool (e.g. by writing to /dev/random on Linux)
is recommended. Note that only a process with root rights can update the entropy counters in
the kernel; non-root or user processes can still feed entropy to the pool but cannot update the
counters [Wik13a].
For Linux the haveged implementation [HAV13a] based on the HAVEGE [SS03] strong random
number generator currently looks like the best choice. It can feed its generated entropy into the
kernel entropy pool and recently has grown a mechanism to monitor the quality of generated
random numbers [HAV13b]. The memory footprint may be too high for small embedded devices,
though.
For systems where during the lifetime of the keys it is expected that low-entropy situations
occur, RSA keys should be preferred over DSA keys: For DSA, if there is ever insucient entropy
at the time keys are used for signing this may lead to repeated ephemeral keys. An attacker who
can guess an ephemeral private key used in such a signature can compromise the DSA secret
key. For RSA this can lead to discovery of encrypted plaintext or forged signatures but not to the
compromise of the secret key [HDWH12].
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 70 of 100
3.4. Keylengths
3.4. Keylengths
3.4. Keylengths
On the choice between AES256 and AES128: I would never
consider using AES256, just like I dont wear a helmet when
I sit inside my car. Its too much bother for the epsilon
improvement in security.
Vincent Rijmen in a personal mail exchange Dec 2013
Recommendations on keylengths need to be adapted regularly. Since this document rst of all is
static and second of all, does not consider itself to be authoritative on keylengths, we would rather
refer to existing publications and websites. Recommending a safe key length is a hit-and-miss
issue.
Furthermore, when choosing an encryption algorithm and key length, the designer/sysadmin
always needs to consider the value of the information and how long it must be protected. In other
words: consider the number of years the data needs to stay condential.
The ECRYPT II publication [IS12] gives a fascinating overview of strengths of symmetric keys in
chapter 5 and chapter 7. Summarizing ECRYPT II, we recommend 128 bit of key strength for
symmetric keys. In ECRYPT II, this is considered safe for security level 7, long term protection.
In the same ECRYPT II publication you can nd a practical comparison of key size equivalence
between symmetric key sizes and RSA, discrete log (DLOG) and EC keylengths. ECRYPT II arrives at
the interesting conclusion that for an equivalence of 128 bit symmetric size, you will need to use
an 3248 bit RSA key [IS12, chapter 7, page 30].
There are a couple of other studies comparing keylengths and their respective strengths. The
website http://www.keylength.com/ compares these papers and offers a good overview of approximations for key lengths based on recommendations by different standardization bodies and
academic publications. Figure 3.3 shows a typical comparison of keylengths on this web site.
Summary
For asymmetric public-key cryptography we consider any key length below 3248 bits to be
deprecated at the time of this writing (for long term protection).
For elliptic curve cryptography we consider key lengths below 256 bits to be inadequate for
long term protection.
For symmetric algorithms we consider anything below 128 bits to be inadequate for long
term protection.
Special remark on 3DES: We want to note that 3DES theoretically has 168 bits of security, however
based on the NIST Special Publication 800-57 5 , it is clear that 3DES can only be considered to
provide for 80 bits / 112 bits security.
5 http://csrc.nist.gov/publications/PubsSPs.html#800-57-part1,
pages 63 and 64
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 71 of 100
Figure 3.3.: Screenshot of http://www.keylength.com for 128 bit symmetric key size equivalents
Elliptic Curve Cryptography (simply called ECC from now on) is a branch of cryptography that
emerged in the mid-1980s. The security of the RSA algorithm is based on the assumption that
factoring large numbers is infeasible. Likewise, the security of ECC, DH and DSA is based on the
discrete logarithm problem [Wik13b, McC90, Wol13]. Finding the discrete logarithm of an elliptic
curve from its public base point is thought to be infeasible. This is known as the Elliptic Curve
Discrete Logarithm Problem (ECDLP). ECC and the underlying mathematical foundation are not
easy to understand - luckily, there have been some great introductions on the topic lately 6 7 8 . ECC
provides for much stronger security with less computationally expensive operations in comparison
to traditional asymmetric algorithms (See the Section 3.4). The security of ECC relies on the elliptic
curves and curve points chosen as parameters for the algorithm in question. Well before the NSAleak scandal there has been a lot of discussion regarding these parameters and their potential
subversion. A part of the discussion involved recommended sets of curves and curve points chosen
by different standardization bodies such as the National Institute of Standards and Technology
6 http://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography
7 https://www.imperialviolet.org/2010/12/04/ecc.html
8 http://www.isg.rhul.ac.uk/~sdg/ecc.html
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 72 of 100
(NIST) 9 which were later widely implemented in most common crypto libraries. Those parameters
came under question repeatedly from cryptographers [BL13, Sch13b, W.13]. At the time of writing,
there is ongoing research as to the security of various ECC parameters [DJB13]. Most software
congured to rely on ECC (be it client or server) is not able to promote or black-list certain curves.
It is the hope of the authors that such functionality will be deployed widely soon. The authors of
this paper include congurations and recommendations with and without ECC - the reader may
choose to adopt those settings as he nds best suited to his environment. The authors will not
make this decision for the reader.
A word of warning: One should get familiar with ECC, different curves and parameters if one
chooses to adopt ECC congurations. Since there is much discussion on the security of ECC, awed
settings might very well compromise the security of the entire system!
9 http://www.nist.gov
10 http://crypto.stackexchange.com/questions/1963/how-large-should-a-die-hellman-p-be
11 https://www.bettercrypto.org/static/dhparams/
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 73 of 100
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 74 of 100
Generating a key pair and a certicate request can be done with a number of tools. On Unix-like
systems, it is likely that the OpenSSL suite is available to you. In this case, you can generate a
private key and a corresponding certicate request as follows:
% openssl req -new -nodes -keyout <servername>.key -out <servername>.csr -newkey \
\rsa:<keysize> -sha256
Country Name (2 letter code) [AU]:DE
State or Province Name (full name) [Some-State]:Bavaria
Locality Name (eg, city) []:Munich
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Example
Organizational Unit Name (eg, section) []:Example Section
Common Name (e.g. server FQDN or YOUR name) []:example.com
Email Address []:admin@example.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Answer the questions according to your setup. Now that you have congured your basic settings
and issued a new root certicate, you can issue new certicates as follows:
% cd /usr/lib/ssl/misc
% sudo ./CA.pl -newreq
Alternatively, software such as TinyCA [Wik13d] that acts as a wrapper around OpenSSL and tries
to make life easier is available.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 75 of 100
overhead of running a CA is eliminated at the expense of having to establish all trust relationships
between entities manually.
With OpenSSL, you can self-sign a previously created certicate with this command:
% openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
The resulting certicate will by default not be trusted by anyone at all, so in order to be useful, the
certicate will have to be made known a priori to all parties that may encounter it.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 76 of 100
HSTS reduces the risk of active man-in-the-middle attacks such as SSL stripping, and impersonation
attacks with untrusted certicate. HSTS also helps to avoid unintentional mistakes such as insecure
links to a secure web site (missing HTTPS links13 ), and mistyped HTTPS URLs.
After the web browser receives a HSTS header in a correctly 14 prepared SSL session it will automatically use secure HTTPS links for accessing the server. This prevents unencrypted HTTP access (SSL
striping, mistyped HTTPS URLs, etc.) when the server is accessed later by the client.
When a server (that previously emitted a HSTS header) starts using untrusted certicate, complying
user agent must show an error message and block the server connection. Thus impersonation MITM
attack with untrusted certicate cannot occur.
For the initial setup HSTS header needs a trusted secure connection over HTTPS. This limitation
can be addressed by compiling a list of STS enabled sites directly into a browser15 .
13 Thus,
it might be useful for xing HTTPS mixed-content related errors, see https://community.qualys.com/blogs/
securitylabs/2014/03/19/https-mixed-content-still-the-easiest-way-to-break-ssl.
14 Website must load without SSL/TLS browser warnings (certicate is issued by a trusted CA, contains correct DNS name, it
is time valid, etc.)
15 List of the preloaded sites can be found at http://dev.chromium.org/sts. This list is managed by Google/Chrome but it is
also used by Firefox https://wiki.mozilla.org/Privacy/Features/HSTS_Preload_List
16 http://caniuse.com/stricttransportsecurity
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 77 of 100
HSTS Considerations
Before enabling HSTS it is recommended to consider following:
Is it required to serve content or services over HTTP?
Enabling includeSubdomains and SSL certicate management.
Proper value of max-age.
It is recommended to serve all content using HTTPS, but there are exceptions to this rule as
well. Consider running a private PKI18 . CRLs and OCSP responses are published typically by HTTP
protocol. If HSTS is enabled on the site where OCSP and CRLs are published the browser might fail
fetching CRL or validating OCSP response.
Similar reasoning goes for includeSubdomains. One needs to be sure that HTTPS can be enforced
for all subdomains. Moreover the administrators are advised to watch for expiration of the SSL
certicate and handle the renewal process with caution. If a SSL certicate is renewed after expiration or misses a (HSTS enabled) domain name, the connection to site will break (without providing
override mechanism to the end user).
Finally HSTS should be tested with lower max-age values and deployed with higher max-age values.
Testing HSTS
HSTS can be tested either using locally or through the Internet.
For local testing it is possible to utilize Chrome Web browser UI by typing chrome://net-internals/
#hsts19 in the address bar.
Testing over the Internet can be conducted by Qualys SSL Labs test https://www.ssllabs.com/
ssltest/. Strict Transport Security (HSTS) information is located in the Protocol Details section.
References
Websites Must Use HSTS in Order to Be Secure https://www.eff.org/deeplinks/2014/02/
websites-hsts
OWASP: HTTP Strict Transport Security: https://www.owasp.org/index.php/HTTP_Strict_Transport_
Security
HSTS Browser Compatibility List: http://caniuse.com/stricttransportsecurity
17 http://status.modern.ie/httpstricttransportsecurityhsts
18 see
19 see
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 78 of 100
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 79 of 100
Listings
2.1. SSL conguration for an Apache vhost
configuration/Webservers/Apache/default-ssl . . . . . . . . . . . . . . . . . . . .
11
12
12
13
13
14
15
15
. . . . . . . . . . . . . . . . .
17
configuration/SSH/OpenSSH/6.6/sshd_config . . . . . . . . . . . . . . . . . . . . . .
22
23
23
27
28
28
28
28
29
30
30
30
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
32
page 80 of 100
Listings
Listings
32
32
32
32
. . . . . . . . . . . . . . . . .
33
. . . . . . . . . . . . . . . . .
33
. . . . . . . . . . . . . . . . .
33
. . . . . . . . . . . . . . . . .
33
. . . . . . . . . . . . . . . . .
34
. . . . . . . . . . . . . . . . . . .
40
. . . . . . . . . . . . . . . . . . .
40
. . . . . . . . . . . . . . . . . . .
41
. . . . . . . . . . . . . . . . . . .
46
. . . . . . . . . . . . . . . . . . .
47
. . . . . . . . . . . . . . . . . . .
48
. . . . . . . . . . . . . . . . . . .
49
. . . . . . . . . . . . . . . . . . .
51
configuration/DBs/PostgreSQL/9.1/postgresql.conf . . . . . . . . . . . . . . . . .
52
52
2.42.global conguration
configuration/Proxies/HAProxy/haproxy.cfg . . . . . . . . . . . . . . . . . . . . . .
55
2.43.frontend conguration
configuration/Proxies/HAProxy/haproxy.cfg . . . . . . . . . . . . . . . . . . . . . .
55
2.44.backend conguration
configuration/Proxies/HAProxy/haproxy.cfg . . . . . . . . . . . . . . . . . . . . . .
55
. . . . . . . . . . . . . . . . . . . . . . . .
57
configuration/Proxies/stunnel/stunnel.conf . . . . . . . . . . . . . . . . . . . . .
58
62
. . . . . . . . . . . . . . . . . . . . . . . .
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
62
page 81 of 100
A. Tools
This section lists tools for checking the security settings.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 82 of 100
A.4. Guides
A.3. RNGs
ENT is a pseudo random number generator sequence tester.
HaveGE is a tool which increases the Entropy of the Linux random number generator devices.
It is based on the HAVEGE algorithm. http://dl.acm.org/citation.cfm?id=945516
Dieharder a random number generator testing tool.
CAcert Random another random number generator testing service.
A.4. Guides
See: https://www.ssllabs.com/downloads/SSL_TLS_Deployment_Best_Practices.pdf.
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 83 of 100
B. Links
IANA ocial list of Transport Layer Security (TLS) Parameters: https://www.iana.org/assignments/
tls-parameters/tls-parameters.txt
SSL cipher settings: http://www.skytale.net/blog/archives/22-SSL-cipher-setting.html
Elliptic curves and their implementation (04 Dec 2010): https://www.imperialviolet.org/2010/
12/04/ecc.html
A (relatively easy to understand) primer on elliptic curve cryptography: http://arstechnica.
com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography
Duraconf, A collection of hardened conguration les for SSL/TLS services (Jacob Appelbaums github): https://github.com/ioerror/duraconf
Attacks on SSL a comprehensive study of BEAST, CRIME, TIME, BREACH, LUCKY 13 & RC4
Biases: https://www.isecpartners.com/media/106031/ssl_attacks_survey.pdf
EFF How to deploy HTTPS correctly: https://www.eff.org/https-everywhere/deploying-https
Bruce Almighty: Schneier preaches security to Linux faithful (on not recommending to use
Blowsh anymore in favor of Twosh): https://www.computerworld.com.au/article/46254/
bruce_almighty_schneier_preaches_security_linux_faithful/?pp=3
Implement FIPS 183-3 for DSA keys (1024bit constraint): https://bugzilla.mindrot.org/show_
bug.cgi?id=1647
Elliptic Curve Cryptography in Practice: http://eprint.iacr.org/2013/734.pdf
Factoring as a Service: http://crypto.2013.rump.cr.yp.to/981774ce07e51813fd4466612a78601b.
pdf
Black Ops of TCP/IP 2012: http://dankaminsky.com/2012/08/06/bo2012/
SSL and the Future of Authenticity, Moxie Marlinspike - Black Hat USA 2011: https://www.
youtube.com/watch?v=Z7Wl2FW2TcA
ENISA - Algorithms, Key Sizes and Parameters Report (Oct.13) http://www.enisa.europa.eu/
activities/identity-and-trust/library/deliverables/algorithms-key-sizes-and-parameters-report
Die-Hellman Groups http://ibm.co/18lslZf
Die-Hellman Groups standardized in RFC3526 [KK03] https://datatracker.ietf.org/doc/rfc3526/
ECC-enabled GnuPG per RFC6637 [Jiv12] https://code.google.com/p/gnupg-ecc
TLS Security (Survey + Lucky13 + RC4 Attack) by Kenny Paterson https://www.cosic.esat.
kuleuven.be/ecc2013/les/kenny.pdf
Ensuring High-Quality Randomness in Cryptographic Key Generation http://arxiv.org/abs/
1309.7366v1
Wikipedia: Ciphertext Stealing https://en.wikipedia.org/wiki/Ciphertext_stealing
Wikipedia: Malleability (Cryptography) https://en.wikipedia.org/wiki/Malleability_(cryptography)
Ritters Crypto Glossary and Dictionary of Technical Cryptography http://www.ciphersbyritter.
com/GLOSSARY.HTM
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 84 of 100
C. Suggested Reading
This section contains suggested reading material.
Cryptography Engineering: Design Principles and Practical Applications, Ferguson, N. and
Schneier, B. and Kohno, T. (ISBN-13: 978-0470474242)
Security Engineering: A Guide to Building Dependable Distributed Systems, Anderson, R.J.
(ISBN-13: 978-0470068526)
Applied cryptography: protocols, algorithms, and source code in C, Schneier, B. (ISBN-13:
978-0471117094)
Guide to Elliptic Curve Cryptography, Hankerson, D. and Vanstone, S. and Menezes, A.J. (ISBN13: 978-0387952734)
A Introduction To The Theory of Numbers, Godfrey Harold Hardy, E. M. Wrigh (ISBN-13:
978-0199219865)
Malicious Cryptography: Exposing Cryptovirology, Young A., Yung, M. (ISBN-13: 978-0764549755)
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 85 of 100
IANA Name
OpenSSL Name
0x00,0x00
TLS_NULL_WITH_NULL_NULL
0x00,0x01
TLS_RSA_WITH_NULL_MD5
NULL-MD5
0x00,0x02
TLS_RSA_WITH_NULL_SHA
NULL-SHA
0x00,0x03
TLS_RSA_EXPORT_WITH_RC4_40_MD5
EXP-RC4-MD5
0x00,0x04
TLS_RSA_WITH_RC4_128_MD5
RC4-MD5
0x00,0x05
TLS_RSA_WITH_RC4_128_SHA
RC4-SHA
EXP-RC2-CBC-MD5
0x00,0x06
TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5
0x00,0x07
TLS_RSA_WITH_IDEA_CBC_SHA
0x00,0x08
TLS_RSA_EXPORT_WITH_DES40_CBC_SHA
EXP-DES-CBC-SHA
0x00,0x09
TLS_RSA_WITH_DES_CBC_SHA
DES-CBC-SHA
DES-CBC3-SHA
0x00,0x0A
TLS_RSA_WITH_3DES_EDE_CBC_SHA
0x00,0x0B
TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA
0x00,0x0C
TLS_DH_DSS_WITH_DES_CBC_SHA
0x00,0x0D
TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA
0x00,0x0E
TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA
0x00,0x0F
TLS_DH_RSA_WITH_DES_CBC_SHA
0x00,0x10
TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA
0x00,0x11
TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
EXP-EDH-DSS-DES-CBC-SHA
0x00,0x12
TLS_DHE_DSS_WITH_DES_CBC_SHA
EDH-DSS-DES-CBC-SHA
0x00,0x13
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
EDH-DSS-DES-CBC3-SHA
0x00,0x14
TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
EXP-EDH-RSA-DES-CBC-SHA
0x00,0x15
TLS_DHE_RSA_WITH_DES_CBC_SHA
EDH-RSA-DES-CBC-SHA
0x00,0x16
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
EDH-RSA-DES-CBC3-SHA
0x00,0x17
TLS_DH_anon_EXPORT_WITH_RC4_40_MD5
EXP-ADH-RC4-MD5
0x00,0x18
TLS_DH_anon_WITH_RC4_128_MD5
ADH-RC4-MD5
0x00,0x19
TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA
EXP-ADH-DES-CBC-SHA
0x00,0x1A
TLS_DH_anon_WITH_DES_CBC_SHA
ADH-DES-CBC-SHA
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 86 of 100
A.4. Guides
A.4. Guides
Code
IANA Name
OpenSSL Name
0x00,0x1B
TLS_DH_anon_WITH_3DES_EDE_CBC_SHA
ADH-DES-CBC3-SHA
0x00,0x1E
TLS_KRB5_WITH_DES_CBC_SHA
0x00,0x1F
TLS_KRB5_WITH_3DES_EDE_CBC_SHA
0x00,0x20
TLS_KRB5_WITH_RC4_128_SHA
0x00,0x21
TLS_KRB5_WITH_IDEA_CBC_SHA
0x00,0x22
TLS_KRB5_WITH_DES_CBC_MD5
0x00,0x23
TLS_KRB5_WITH_3DES_EDE_CBC_MD5
0x00,0x24
TLS_KRB5_WITH_RC4_128_MD5
0x00,0x25
TLS_KRB5_WITH_IDEA_CBC_MD5
0x00,0x26
TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
0x00,0x27
TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA
0x00,0x28
TLS_KRB5_EXPORT_WITH_RC4_40_SHA
0x00,0x29
TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
0x00,0x2A
TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5
0x00,0x2B
TLS_KRB5_EXPORT_WITH_RC4_40_MD5
0x00,0x2C
TLS_PSK_WITH_NULL_SHA
0x00,0x2D
TLS_DHE_PSK_WITH_NULL_SHA
0x00,0x2E
TLS_RSA_PSK_WITH_NULL_SHA
0x00,0x2F
TLS_RSA_WITH_AES_128_CBC_SHA
AES128-SHA
0x00,0x30
TLS_DH_DSS_WITH_AES_128_CBC_SHA
0x00,0x31
TLS_DH_RSA_WITH_AES_128_CBC_SHA
0x00,0x32
TLS_DHE_DSS_WITH_AES_128_CBC_SHA
DHE-DSS-AES128-SHA
0x00,0x33
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
DHE-RSA-AES128-SHA
0x00,0x34
TLS_DH_anon_WITH_AES_128_CBC_SHA
ADH-AES128-SHA
0x00,0x35
TLS_RSA_WITH_AES_256_CBC_SHA
AES256-SHA
0x00,0x36
TLS_DH_DSS_WITH_AES_256_CBC_SHA
0x00,0x37
TLS_DH_RSA_WITH_AES_256_CBC_SHA
0x00,0x38
TLS_DHE_DSS_WITH_AES_256_CBC_SHA
DHE-DSS-AES256-SHA
0x00,0x39
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
DHE-RSA-AES256-SHA
0x00,0x3A
TLS_DH_anon_WITH_AES_256_CBC_SHA
ADH-AES256-SHA
0x00,0x3B
TLS_RSA_WITH_NULL_SHA256
NULL-SHA256
0x00,0x3C
TLS_RSA_WITH_AES_128_CBC_SHA256
AES128-SHA256
0x00,0x3D
TLS_RSA_WITH_AES_256_CBC_SHA256
AES256-SHA256
0x00,0x3E
TLS_DH_DSS_WITH_AES_128_CBC_SHA256
0x00,0x3F
TLS_DH_RSA_WITH_AES_128_CBC_SHA256
0x00,0x40
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
DHE-DSS-AES128-SHA256
0x00,0x41
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
CAMELLIA128-SHA
0x00,0x42
TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA
0x00,0x43
TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA
0x00,0x44
TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA
DHE-DSS-CAMELLIA128-SHA
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 87 of 100
A.4. Guides
A.4. Guides
Code
IANA Name
OpenSSL Name
0x00,0x45
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
DHE-RSA-CAMELLIA128-SHA
0x00,0x46
TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA
ADH-CAMELLIA128-SHA
0x00,0x67
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
DHE-RSA-AES128-SHA256
0x00,0x68
TLS_DH_DSS_WITH_AES_256_CBC_SHA256
0x00,0x69
TLS_DH_RSA_WITH_AES_256_CBC_SHA256
0x00,0x6A
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
DHE-DSS-AES256-SHA256
0x00,0x6B
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
DHE-RSA-AES256-SHA256
0x00,0x6C
TLS_DH_anon_WITH_AES_128_CBC_SHA256
ADH-AES128-SHA256
0x00,0x6D
TLS_DH_anon_WITH_AES_256_CBC_SHA256
ADH-AES256-SHA256
0x00,0x84
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
CAMELLIA256-SHA
0x00,0x85
TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA
0x00,0x86
TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA
0x00,0x87
TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA
DHE-DSS-CAMELLIA256-SHA
0x00,0x88
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
DHE-RSA-CAMELLIA256-SHA
0x00,0x89
TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA
ADH-CAMELLIA256-SHA
0x00,0x8A
TLS_PSK_WITH_RC4_128_SHA
PSK-RC4-SHA
0x00,0x8B
TLS_PSK_WITH_3DES_EDE_CBC_SHA
PSK-3DES-EDE-CBC-SHA
0x00,0x8C
TLS_PSK_WITH_AES_128_CBC_SHA
PSK-AES128-CBC-SHA
0x00,0x8D
TLS_PSK_WITH_AES_256_CBC_SHA
PSK-AES256-CBC-SHA
0x00,0x8E
TLS_DHE_PSK_WITH_RC4_128_SHA
0x00,0x8F
TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
0x00,0x90
TLS_DHE_PSK_WITH_AES_128_CBC_SHA
0x00,0x91
TLS_DHE_PSK_WITH_AES_256_CBC_SHA
0x00,0x92
TLS_RSA_PSK_WITH_RC4_128_SHA
0x00,0x93
TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
0x00,0x94
TLS_RSA_PSK_WITH_AES_128_CBC_SHA
0x00,0x95
TLS_RSA_PSK_WITH_AES_256_CBC_SHA
0x00,0x96
TLS_RSA_WITH_SEED_CBC_SHA
0x00,0x97
TLS_DH_DSS_WITH_SEED_CBC_SHA
0x00,0x98
TLS_DH_RSA_WITH_SEED_CBC_SHA
0x00,0x99
TLS_DHE_DSS_WITH_SEED_CBC_SHA
DHE-DSS-SEED-SHA
0x00,0x9A
TLS_DHE_RSA_WITH_SEED_CBC_SHA
DHE-RSA-SEED-SHA
0x00,0x9B
TLS_DH_anon_WITH_SEED_CBC_SHA
ADH-SEED-SHA
0x00,0x9C
TLS_RSA_WITH_AES_128_GCM_SHA256
AES128-GCM-SHA256
0x00,0x9D
TLS_RSA_WITH_AES_256_GCM_SHA384
AES256-GCM-SHA384
0x00,0x9E
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
DHE-RSA-AES128-GCM-SHA256
0x00,0x9F
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
DHE-RSA-AES256-GCM-SHA384
0x00,0xA0
TLS_DH_RSA_WITH_AES_128_GCM_SHA256
0x00,0xA1
TLS_DH_RSA_WITH_AES_256_GCM_SHA384
0x00,0xA2
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
SEED-SHA
DHE-DSS-AES128-GCM-SHA256
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 88 of 100
A.4. Guides
A.4. Guides
Code
IANA Name
OpenSSL Name
0x00,0xA3
TLS_DHE_DSS_WITH_AES_256_GCM_SHA384
DHE-DSS-AES256-GCM-SHA384
0x00,0xA4
TLS_DH_DSS_WITH_AES_128_GCM_SHA256
0x00,0xA5
TLS_DH_DSS_WITH_AES_256_GCM_SHA384
0x00,0xA6
TLS_DH_anon_WITH_AES_128_GCM_SHA256
ADH-AES128-GCM-SHA256
0x00,0xA7
TLS_DH_anon_WITH_AES_256_GCM_SHA384
ADH-AES256-GCM-SHA384
0x00,0xA8
TLS_PSK_WITH_AES_128_GCM_SHA256
0x00,0xA9
TLS_PSK_WITH_AES_256_GCM_SHA384
0x00,0xAA
TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
0x00,0xAB
TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
0x00,0xAC
TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
0x00,0xAD
TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
0x00,0xAE
TLS_PSK_WITH_AES_128_CBC_SHA256
0x00,0xAF
TLS_PSK_WITH_AES_256_CBC_SHA384
0x00,0xB0
TLS_PSK_WITH_NULL_SHA256
0x00,0xB1
TLS_PSK_WITH_NULL_SHA384
0x00,0xB2
TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
0x00,0xB3
TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
0x00,0xB4
TLS_DHE_PSK_WITH_NULL_SHA256
0x00,0xB5
TLS_DHE_PSK_WITH_NULL_SHA384
0x00,0xB6
TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
0x00,0xB7
TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
0x00,0xB8
TLS_RSA_PSK_WITH_NULL_SHA256
0x00,0xB9
TLS_RSA_PSK_WITH_NULL_SHA384
0x00,0xBA
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
0x00,0xBB
TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256
0x00,0xBC
TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256
0x00,0xBD
TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256
0x00,0xBE
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
0x00,0xBF
TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256
0x00,0xC0
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
0x00,0xC1
TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256
0x00,0xC2
TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256
0x00,0xC3
TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256
0x00,0xC4
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
0x00,0xC5
TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256
0x00,0xFF
TLS_EMPTY_RENEGOTIATION_INFO_SCSV
0xC0,0x01
TLS_ECDH_ECDSA_WITH_NULL_SHA
ECDH-ECDSA-NULL-SHA
0xC0,0x02
TLS_ECDH_ECDSA_WITH_RC4_128_SHA
ECDH-ECDSA-RC4-SHA
0xC0,0x03
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
ECDH-ECDSA-DES-CBC3-SHA
0xC0,0x04
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
ECDH-ECDSA-AES128-SHA
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 89 of 100
A.4. Guides
A.4. Guides
Code
IANA Name
OpenSSL Name
0xC0,0x05
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
ECDH-ECDSA-AES256-SHA
0xC0,0x06
TLS_ECDHE_ECDSA_WITH_NULL_SHA
ECDHE-ECDSA-NULL-SHA
0xC0,0x07
TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
ECDHE-ECDSA-RC4-SHA
0xC0,0x08
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
ECDHE-ECDSA-DES-CBC3-SHA
0xC0,0x09
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
ECDHE-ECDSA-AES128-SHA
0xC0,0x0A
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
ECDHE-ECDSA-AES256-SHA
0xC0,0x0B
TLS_ECDH_RSA_WITH_NULL_SHA
ECDH-RSA-NULL-SHA
0xC0,0x0C
TLS_ECDH_RSA_WITH_RC4_128_SHA
ECDH-RSA-RC4-SHA
0xC0,0x0D
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
ECDH-RSA-DES-CBC3-SHA
0xC0,0x0E
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
ECDH-RSA-AES128-SHA
0xC0,0x0F
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
ECDH-RSA-AES256-SHA
0xC0,0x10
TLS_ECDHE_RSA_WITH_NULL_SHA
ECDHE-RSA-NULL-SHA
0xC0,0x11
TLS_ECDHE_RSA_WITH_RC4_128_SHA
ECDHE-RSA-RC4-SHA
0xC0,0x12
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
ECDHE-RSA-DES-CBC3-SHA
0xC0,0x13
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
ECDHE-RSA-AES128-SHA
0xC0,0x14
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
ECDHE-RSA-AES256-SHA
0xC0,0x15
TLS_ECDH_anon_WITH_NULL_SHA
AECDH-NULL-SHA
0xC0,0x16
TLS_ECDH_anon_WITH_RC4_128_SHA
AECDH-RC4-SHA
0xC0,0x17
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA
AECDH-DES-CBC3-SHA
0xC0,0x18
TLS_ECDH_anon_WITH_AES_128_CBC_SHA
AECDH-AES128-SHA
0xC0,0x19
TLS_ECDH_anon_WITH_AES_256_CBC_SHA
AECDH-AES256-SHA
0xC0,0x1A
TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA
SRP-3DES-EDE-CBC-SHA
0xC0,0x1B
TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA
SRP-RSA-3DES-EDE-CBC-SHA
0xC0,0x1C
TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA
SRP-DSS-3DES-EDE-CBC-SHA
0xC0,0x1D
TLS_SRP_SHA_WITH_AES_128_CBC_SHA
SRP-AES-128-CBC-SHA
0xC0,0x1E
TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA
SRP-RSA-AES-128-CBC-SHA
0xC0,0x1F
TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA
SRP-DSS-AES-128-CBC-SHA
0xC0,0x20
TLS_SRP_SHA_WITH_AES_256_CBC_SHA
SRP-AES-256-CBC-SHA
0xC0,0x21
TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA
SRP-RSA-AES-256-CBC-SHA
0xC0,0x22
TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA
SRP-DSS-AES-256-CBC-SHA
0xC0,0x23
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
ECDHE-ECDSA-AES128-SHA256
0xC0,0x24
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
ECDHE-ECDSA-AES256-SHA384
0xC0,0x25
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
ECDH-ECDSA-AES128-SHA256
0xC0,0x26
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
ECDH-ECDSA-AES256-SHA384
0xC0,0x27
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
ECDHE-RSA-AES128-SHA256
0xC0,0x28
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
ECDHE-RSA-AES256-SHA384
0xC0,0x29
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
ECDH-RSA-AES128-SHA256
0xC0,0x2A
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
ECDH-RSA-AES256-SHA384
0xC0,0x2B
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
ECDHE-ECDSA-AES128-GCM-SHA256
0xC0,0x2C
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
ECDHE-ECDSA-AES256-GCM-SHA384
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 90 of 100
A.4. Guides
A.4. Guides
Code
IANA Name
0xC0,0x2D
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
ECDH-ECDSA-AES128-GCM-SHA256
0xC0,0x2E
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
ECDH-ECDSA-AES256-GCM-SHA384
0xC0,0x2F
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
ECDHE-RSA-AES128-GCM-SHA256
0xC0,0x30
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
ECDHE-RSA-AES256-GCM-SHA384
0xC0,0x31
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
ECDH-RSA-AES128-GCM-SHA256
0xC0,0x32
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
ECDH-RSA-AES256-GCM-SHA384
0xC0,0x33
TLS_ECDHE_PSK_WITH_RC4_128_SHA
0xC0,0x34
TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
0xC0,0x35
TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
0xC0,0x36
TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
0xC0,0x37
TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
0xC0,0x38
TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
0xC0,0x39
TLS_ECDHE_PSK_WITH_NULL_SHA
0xC0,0x3A
TLS_ECDHE_PSK_WITH_NULL_SHA256
0xC0,0x3B
TLS_ECDHE_PSK_WITH_NULL_SHA384
0xC0,0x3C
TLS_RSA_WITH_ARIA_128_CBC_SHA256
0xC0,0x3D
TLS_RSA_WITH_ARIA_256_CBC_SHA384
0xC0,0x3E
TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256
0xC0,0x3F
TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384
0xC0,0x40
TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256
0xC0,0x41
TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384
0xC0,0x42
TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256
0xC0,0x43
TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384
0xC0,0x44
TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256
0xC0,0x45
TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384
0xC0,0x46
TLS_DH_anon_WITH_ARIA_128_CBC_SHA256
0xC0,0x47
TLS_DH_anon_WITH_ARIA_256_CBC_SHA384
0xC0,0x48
TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256
0xC0,0x49
TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384
0xC0,0x4A
TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256
0xC0,0x4B
TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384
0xC0,0x4C
TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256
0xC0,0x4D
TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384
0xC0,0x4E
TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256
0xC0,0x4F
TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384
0xC0,0x50
TLS_RSA_WITH_ARIA_128_GCM_SHA256
0xC0,0x51
TLS_RSA_WITH_ARIA_256_GCM_SHA384
0xC0,0x52
TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256
0xC0,0x53
TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384
0xC0,0x54
TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256
OpenSSL Name
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 91 of 100
A.4. Guides
A.4. Guides
Code
IANA Name
0xC0,0x55
TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384
0xC0,0x56
TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256
0xC0,0x57
TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384
0xC0,0x58
TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256
0xC0,0x59
TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384
0xC0,0x5A
TLS_DH_anon_WITH_ARIA_128_GCM_SHA256
0xC0,0x5B
TLS_DH_anon_WITH_ARIA_256_GCM_SHA384
0xC0,0x5C
TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256
0xC0,0x5D
TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384
0xC0,0x5E
TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256
0xC0,0x5F
TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384
0xC0,0x60
TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256
0xC0,0x61
TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384
0xC0,0x62
TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256
0xC0,0x63
TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384
0xC0,0x64
TLS_PSK_WITH_ARIA_128_CBC_SHA256
0xC0,0x65
TLS_PSK_WITH_ARIA_256_CBC_SHA384
0xC0,0x66
TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256
0xC0,0x67
TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384
0xC0,0x68
TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256
0xC0,0x69
TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384
0xC0,0x6A
TLS_PSK_WITH_ARIA_128_GCM_SHA256
0xC0,0x6B
TLS_PSK_WITH_ARIA_256_GCM_SHA384
0xC0,0x6C
TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256
0xC0,0x6D
TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384
0xC0,0x6E
TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256
0xC0,0x6F
TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384
0xC0,0x70
TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256
0xC0,0x71
TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384
0xC0,0x72
TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
0xC0,0x73
TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
0xC0,0x74
TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
0xC0,0x75
TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
0xC0,0x76
TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
0xC0,0x77
TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
0xC0,0x78
TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
0xC0,0x79
TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
0xC0,0x7A
TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x7B
TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x7C
TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
OpenSSL Name
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 92 of 100
A.4. Guides
A.4. Guides
Code
IANA Name
0xC0,0x7D
TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x7E
TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x7F
TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x80
TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x81
TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x82
TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x83
TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x84
TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x85
TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x86
TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x87
TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x88
TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x89
TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x8A
TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x8B
TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x8C
TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x8D
TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x8E
TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x8F
TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x90
TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x91
TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x92
TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
0xC0,0x93
TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
0xC0,0x94
TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
0xC0,0x95
TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
0xC0,0x96
TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
0xC0,0x97
TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
0xC0,0x98
TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
0xC0,0x99
TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
0xC0,0x9A
TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
0xC0,0x9B
TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
0xC0,0x9C
TLS_RSA_WITH_AES_128_CCM
0xC0,0x9D
TLS_RSA_WITH_AES_256_CCM
0xC0,0x9E
TLS_DHE_RSA_WITH_AES_128_CCM
0xC0,0x9F
TLS_DHE_RSA_WITH_AES_256_CCM
0xC0,0xA0
TLS_RSA_WITH_AES_128_CCM_8
0xC0,0xA1
TLS_RSA_WITH_AES_256_CCM_8
0xC0,0xA2
TLS_DHE_RSA_WITH_AES_128_CCM_8
0xC0,0xA3
TLS_DHE_RSA_WITH_AES_256_CCM_8
0xC0,0xA4
TLS_PSK_WITH_AES_128_CCM
OpenSSL Name
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 93 of 100
A.4. Guides
A.4. Guides
Code
IANA Name
0xC0,0xA5
TLS_PSK_WITH_AES_256_CCM
0xC0,0xA6
TLS_DHE_PSK_WITH_AES_128_CCM
0xC0,0xA7
TLS_DHE_PSK_WITH_AES_256_CCM
0xC0,0xA8
TLS_PSK_WITH_AES_128_CCM_8
0xC0,0xA9
TLS_PSK_WITH_AES_256_CCM_8
0xC0,0xAA
TLS_PSK_DHE_WITH_AES_128_CCM_8
0xC0,0xAB
TLS_PSK_DHE_WITH_AES_256_CCM_8
0xC0,0xAC
TLS_ECDHE_ECDSA_WITH_AES_128_CCM
0xC0,0xAD
TLS_ECDHE_ECDSA_WITH_AES_256_CCM
0xC0,0xAE
TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
0xC0,0xAF
TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8
OpenSSL Name
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 94 of 100
E. Further research
The following is a list of services, software packages, hardware devices or protocols that we considered documenting but either did not manage to document yet or might be able to document later.
We encourage input from the Internet community.
Lync
Wi-Fi APs, 802.1X
Tomcat
SIP
SRTP
DNSSec (mention BCPs)
DANE
TOR
S/Mime (check are there
any BCPs? )
TrueCrypt, LUKS, FileVault
AFS
Kerberos
NNTP
NTPs tlsdate
BGP / OSPF
LDAP
seclayer-tcp
Commerical
network
equipment vendors
RADIUS
Moxa , APC, und co... ICS .
Ethernet to serial
rsyslog
v6 spoong (look at work
by Ferndo Gont, Marc
Heuse, et. al.)
tinc
racoon
l2tp
telnets
ftps
DSL modems (where to
start?)
UPnP, natPmp
SAML federated auth
providers 1
Microsoft SQL Server
Microsoft Exchange
HAProxy2
HTTP Key Pinning (HTKP)
IBM HTTP Server
Elastic Load Balancing
(ELB)3
https://wiki.shibboleth.net/conuence/display/SHIB2/TrustManagement)
2 https://lists.cert.at/pipermail/ach/2014-November/001601.html
3 https://lists.cert.at/pipermail/ach/2014-May/001422.html
4 https://lists.cert.at/pipermail/ach/2014-May/001389.html
5 https://lists.cert.at/pipermail/ach/2014-November/001626.html
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 95 of 100
Bibliography
[Ada13a] Adam Langley, Ben Laurie, Emilia Kasper. Certicate Transparency. http://www.
certicate-transparency.org https://datatracker.ietf.org/doc/rfc6962/, 07 2013.
[Ada13b] Adam Langley, et. al. Go X.509 Verication Source Code. https://code.google.com/p/go/
source/browse/src/pkg/crypto/x509/verify.go#173, 12 2013.
[And08]
[BL13]
D. J. Bernstein and Tanja Lange. Security dangers of the NIST curves. Presentation slides,
September 2013. http://cr.yp.to/talks/2013.09.16/slides-djb-20130916-a4.pdf
[C. 13]
C. Evans and C. Palmer. Public Key Pinning Extension for HTTP. https://tools.ietf.org/
html/draft-ietf-websec-key-pinning-09, November 2013.
[Dam11] Damon Poeter. Fake Google Certicate Puts Gmail at Risk. http://www.pcmag.com/
article2/0,2817,2392063,00.asp, August 2011.
[DJB13]
[DKBH13] Zakir Durumeric, James Kasten, Michael Bailey, and J. Alex Halderman. Analysis of the
HTTPS certicate ecosystem. In Proceedings of the 13th Internet Measurement Conference,
October 2013. https://jhalderm.com/pub/papers/https-imc13.pdf
[EHS10]
[Eli11]
Elinor
Mills.
Fraudulent
Google
certicate
points
to
Internet
attack.
http://news.cnet.com/8301-27080_3-20098894-245/
fraudulent-google-certicate-points-to-internet-attack/, August 2011.
[Eng11]
[ENI13]
ENISA and Vincent Rijmen, Nigel P. Smart, Bogdan warinschi, Gaven Watson.
Enisa - algorithms, key sizes and parameters report.
Technical report,
Oct 2013. http://www.enisa.europa.eu/activities/identity-and-trust/library/deliverables/
algorithms-key-sizes-and-parameters-report
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 96 of 100
Bibliography
Bibliography
[fSidIB13] Bundesamt fr Sicherheit in der Informationstechnik (BSI). Bsi tr-02102 kryptographische verfahren. Technical report, Jan 2013. https://www.bsi.bund.de/SharedDocs/
Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR02102/BSI-TR-02102_pdf
[Gle13]
Glenn Greenwald.
Edward Snowden: NSA whistleblower answers
reader
questions.
http://www.theguardian.com/world/2013/jun/17/
edward-snowden-nsa-les-whistleblower, http://www.theguardian.com/world/2013/
jun/17/edward-snowden-nsa-les-whistleblower, 07 2013.
[H. 13]
H. Tschofenig and E. Lear. Evolving the Web Public Key Infrastructure. https://tools.ietf.
org/html/draft-tschofenig-iab-webpki-evolution-01.txt, November 2013.
[HA00]
Ken Hornstein and Jeffrey Altman. Distributing kerberos kdc and realm information
with dns. Internet draft, IETF, March 2000. https://www.ietf.org/proceedings/48/I-D/
cat-krb-dns-locate-02.txt
[HAV13a] haveged a simple entropy daemon. Software homepage, December 2013. Accessed
2013-12-06. http://www.issihosts.com/haveged/
[HAV13b] haveged a simple entropy daemon: Runtime testing. Technical background, December
2013. Accessed 2013-12-06. http://www.issihosts.com/haveged/
[HDWH12] Nadia Heninger, Zakir Durumeric, Eric Wustrow, and J. Alex Halderman. Mining your Ps
and Qs: Detection of widespread weak keys in network devices. In Proceedings of the 21st
USENIX Security Symposium, August 2012. https://factorable.net/weakkeys12.extended.
pdf
[Hof05]
P. Hoffman. Cryptographic Suites for IPsec. RFC 4308 (Proposed Standard), December
2005. https://www.ietf.org/rfc/rfc4308.txt
[HS12]
[Hud12] G. Hudson. Camellia Encryption for Kerberos 5. RFC 6803 (Informational), November
2012. https://www.ietf.org/rfc/rfc6803.txt
[IS12]
[Jav]
Java generic security services: (java gss) and kerberos. Documentation, Oracle. http:
//docs.oracle.com/javase/7/docs/technotes/guides/security/jgss/jgss-features.html
[Jiv12]
A. Jivsov. Elliptic Curve Cryptography (ECC) in OpenPGP. RFC 6637 (Proposed Standard),
June 2012. https://www.ietf.org/rfc/rfc6637.txt
[KBC97]
H. Krawczyk, M. Bellare, and R. Canetti. HMAC: Keyed-Hashing for Message Authentication. RFC 2104 (Informational), February 1997. Updated by RFC 6151. https:
//www.ietf.org/rfc/rfc2104.txt
[KK03]
T. Kivinen and M. Kojo. More Modular Exponential (MODP) Die-Hellman groups for
Internet Key Exchange (IKE). RFC 3526 (Proposed Standard), May 2003. https://www.ietf.
org/rfc/rfc3526.txt
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 97 of 100
Bibliography
Bibliography
[KL08]
[krb10]
[LK08]
M. Lepinski and S. Kent. Additional Die-Hellman Groups for Use with IETF Standards.
RFC 5114 (Informational), January 2008. https://www.ietf.org/rfc/rfc5114.txt
[LS11]
L. Law and J. Solinas. Suite B Cryptographic Suites for IPsec. RFC 6379 (Informational),
October 2011. https://www.ietf.org/rfc/rfc6379.txt
[McC90] Kevin S. McCurley. The discrete logarithm problem. In Cryptology and Computational
Number Theory, Proceedings of Symposia in Applied Mathematics, volume 42, pages 4974,
1990. http://www.mccurley.org/papers/dlog.pdf
[MIT13]
[NYHR05] C. Neuman, T. Yu, S. Hartman, and K. Raeburn. The Kerberos Network Authentication
Service (V5). RFC 4120 (Proposed Standard), July 2005. Updated by RFCs 4537, 5021,
5896, 6111, 6112, 6113, 6649, 6806. https://www.ietf.org/rfc/rfc4120.txt
[POL11]
[Rae05a] K. Raeburn. Advanced Encryption Standard (AES) Encryption for Kerberos 5. RFC 3962
(Proposed Standard), February 2005. https://www.ietf.org/rfc/rfc3962.txt
[Rae05b] K. Raeburn. Encryption and Checksum Specications for Kerberos 5. RFC 3961 (Proposed
Standard), February 2005. https://www.ietf.org/rfc/rfc3961.txt
[Sch13a] Bruce Schneier. The NSA is breaking most encryption on the internet. Blog: Schneier on
security, September 2013. https://www.schneier.com/blog/archives/2013/09/the_nsa_
is_brea.html
[Sch13b] Bruce Schneier. The NSA is breaking most encryption on the internet. Answer to blog
comment, September 2013. https://www.schneier.com/blog/archives/2013/09/the_nsa_
is_brea.html#c1675929
[Shi]
[SS03]
A. Seznec and N. Sendrier. HAVEGE: a user-level software heuristic for generating empirically strong random numbers. ACM Transactions on Modeling and Computer Simulation, 13(4):334346, October 2003. http://www.irisa.fr/caps/projects/hipsor/scripts/
down.php?id=13781296&ext=.pdf
[W.13]
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 98 of 100
Bibliography
Bibliography
[Wol13]
Elliptic curve. Math dictionary entry, Wolfram Research Mathworld, December 2013.
Accessed 2013-12-12. http://mathworld.wolfram.com/EllipticCurve.html
[YF13]
Yuval Yarom and Katrina Falkner. Flush+ reload: a high resolution, low noise, l3 cache
side-channel attack, 2013. http://eprint.iacr.org/2013/448.pdf
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
page 99 of 100
Index
L
Linux 22
Applied Crypto Hardening Draft revision: 3f947d6 (2015-05-14 19:08:32 +0200) Aaron Zauner
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: