Introduction
This document describes how to configure the preference for Perfect Forward Secrecy (PFS) in Transport Layer Security (TLS) encrypted connections on the Email Security Appliance (ESA).
Prerequisites
Requirements
Cisco recommends that you have knowledge of Secure Sockets Layer (SSL)/TLS.
Components Used
The information in this document is based on AsyncOS for Email version 9.6 and above.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Background Information
The ESA does offer Forward Secrecy (PFS). Forward secrecy means that the data is transferred via a channel that uses symmetrical encryption with ephemeral secrets, and even if the private key (long-term key) on one or both of the hosts was compromised, it is not possible to decrypt a previously recorded session.
The secret is not transferred through the channel, instead the shared secret is derived with a mathematical problem (Diffie Hellman (DH) Problem). The secret is not stored anywhere else than the hosts Random Access Memory (RAM) during the established session or key regeneration timeout.
The ESA supports DH for Key Exchange.
Configure
INBOUND - ESA Acts as TLS Server
These cipher suites are available on the ESA for INBOUND Simple Mail Transfer Protocol (SMTP) traffic that provide Forward Secrecy. In this example,cipher selection allows only cipher suites considered HIGH or MEDIUM and use Ephemeral Diffie Hellman (EDH) for Key Exchange and prefers TLSv1.2. The cipher selection syntax follows the OpenSSL syntax.
Ciphers with Forward Secrecy on AsyncOS 9.6+:
"EDH+TLSv1.2:EDH+HIGH:EDH+MEDIUM:!LOW:!EXP:!aNULL:!RC4:!DSS:!SEED:!IDEA:!MD5:!PSK:!3DES:!SRP"
List:
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(256) Mac=SHA256
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(128) Mac=SHA256
DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(256) Mac=SHA1
DHE-RSA-AES128-SHA SSLv3 Kx=DH Au=RSA Enc=AES(128) Mac=SHA1
DHE-RSA-CAMELLIA128-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(128) Mac=SHA1
The Kx (= Key Exchange) section shows that DH is used in order to derive the secret.
The ESA supports these ciphers with the default sslconfig settings (:ALL), but does not prefer it. If you want to prefer ciphers that offer PFS, you need to change your sslconfig and add EDH or a combination EDH+<cipher or cipher group name> to your cipher selection.
Default configuration:
ESA> sslconfig
sslconfig settings:
Inbound SMTP method: tlsv1/tlsv1.2
Inbound SMTP ciphers:
RC4-SHA
RC4-MD5
ALL
New configuration:
ESA> sslconfig
Inbound SMTP method: tlsv1/tlsv1.2
Inbound SMTP ciphers:
EDH+TLSv1.2
EDH+HIGH
EDH+MEDIUM
RC4-SHA
RC4-MD5
ALL
Note: RC4 as a cipher and MD5 as a MAC is considered weak, legacy and in order to avoid the use with SSL/TLS, especially when it comes to higher data volume without key regeneration.
Recommended sslconfig Settings for INBOUND
This is a prevailing opinion and to only allow ciphers that are generally considered strong and secure.
A recommendable configuration for INBOUND that removes RC4 and MD5 as well as other legacy and weak options, namely Export (EXP), Low (LOW), IDEA (IDEA), SEED (SEED), 3DES (3DES) ciphers, DSS certificates (DSS), anonymous Key Exchange (aNULL), pre-shared Keys (PSK), SRP protocol (SRP), disables Elliptic Curve Diffie Hellman (ECDH) for Key Exchange and Elliptic Curve Digital Signature Algorithm (ECDSA) are the examples:
EDH+TLSv1.2:EDH+HIGH:EDH+MEDIUM:HIGH:MEDIUM:!ECDH:!ECDSA:!LOW:!EXP:!aNULL:!RC4:!DSS:!SEED:!IDEA:!MD5:!PSK:!3DES:!SRP
The string entered in sslconfig results in this list of supported ciphers for INBOUND:
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(256) Mac=SHA256
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(128) Mac=SHA256
DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(256) Mac=SHA1
DHE-RSA-AES128-SHA SSLv3 Kx=DH Au=RSA Enc=AES(128) Mac=SHA1
DHE-RSA-CAMELLIA128-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(128) Mac=SHA1
AES256-GCM-SHA384 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(256) Mac=AEAD
AES256-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA256
AES256-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA1
CAMELLIA256-SHA SSLv3 Kx=RSA Au=RSA Enc=Camellia(256) Mac=SHA1
AES128-GCM-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(128) Mac=AEAD
AES128-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA256
AES128-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA1
CAMELLIA128-SHA SSLv3 Kx=RSA Au=RSA Enc=Camellia(128) Mac=SHA1
Note: The ESA that acts as a TLS server (INBOUND traffic) currently does not support Elliptic Curve Diffie Hellman for Key Exchange (ECDHE) and ECDSA Certificates.
OUTBOUND - ESA acts as TLS Client
For OUTBOUND SMTP traffic, the ESA in addition to INBOUND supports ECDHE and ECDSA Certificates.
Note: Elliptic Curve Cryptography (ECC) certificates with the ECDSA are not widely adopted.
When an OUTBOUND email is delivered, the ESA is the TLS client. A TLS-client certificate is optional. If the TLS-Server do not force (require) the ESA (as a TLS-client) in order to provide a ECDSA client certificate, the ESA can continue with a ECDSA secured session. When the ESA as the TLS-Client is asked for it's certificate, it provides the configured RSA certificate for the OUTBOUND direction.
Caution: The preinstalled Trusted CA Certificate Store (System List) on the ESA does not include ECC (ECDSA) Root Certificates! You might need to manually add ECC Root Certificates (which you trust) to the Custom List in orderto make the ECC Chain of Trust verifiable.
In order to prefer DHE/ECDHE ciphers that offer Forward Secrecy, you can modify the sslconfig cipher selection as follows.
Add this to your current cipher selection.
"EDH+TLSv1.2:ECDH+TLSv1.2:EDH+HIGH:EDH+MEDIUM:ECDH+HIGH:ECDH+MEDIUM"
Recommended sslconfig Settings for OUTBOUND
This is a prevailing opinion and to only allow ciphers that are generally considered strong and secure.
EDH+TLSv1.2:ECDH+TLSv1.2:EDH+HIGH:EDH+MEDIUM:ECDH+HIGH:ECDH+MEDIUM:HIGH:MEDIUM:!LOW:!EXP:!aNULL:!RC4:!DSS:!SEED:!IDEA:!MD5:!PSK:!3DES:!SRP
The string entered in sslconfig results in this list of supported ciphers for OUTBOUND:
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(256) Mac=SHA256
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(128) Mac=SHA256
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA384
ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA384
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA256
ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA256
DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(256) Mac=SHA1
DHE-RSA-AES128-SHA SSLv3 Kx=DH Au=RSA Enc=AES(128) Mac=SHA1
DHE-RSA-CAMELLIA128-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(128) Mac=SHA1
ECDHE-RSA-AES256-SHA SSLv3 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA1
ECDHE-ECDSA-AES256-SHA SSLv3 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA1
ECDHE-RSA-AES128-SHA SSLv3 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA1
ECDHE-ECDSA-AES128-SHA SSLv3 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA1
AES256-GCM-SHA384 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(256) Mac=AEAD
AES256-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA256
AES256-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA1
CAMELLIA256-SHA SSLv3 Kx=RSA Au=RSA Enc=Camellia(256) Mac=SHA1
AES128-GCM-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(128) Mac=AEAD
AES128-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA256
AES128-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA1
CAMELLIA128-SHA SSLv3 Kx=RSA Au=RSA Enc=Camellia(128) Mac=SHA1
Verify
There is currently no verification procedure available for this configuration.
Troubleshoot
There is currently no specific troubleshooting information available for this configuration.
Related Information