Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

PFS encryption

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


cyborg2 at benderirc

Jul 30, 2013, 12:56 AM

Post #1 of 4 (76 views)
Permalink
PFS encryption

Hi all,

as i just read about PFS, i was wondering how exim is handling the key
exchange.

the article suggested to use these ciphers in this order:

TLS_ECDHE_RSA_WITH_RC4_128_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA

as they implement the PFS Keyexchange, which prevents a sniffed
datastream from being decrypted in the future.

( for anyone wondering, thats because the session key never gets
directly transmitted )

So, whats exim prefering as cipher and how can that be controlled via
exim.conf , if it's configureable at all.

Marius

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


graeme at graemef

Jul 30, 2013, 2:19 AM

Post #2 of 4 (77 views)
Permalink
Re: PFS encryption [In reply to]

On 30 Jul 2013, at 08:56, Cyborg <cyborg2 [at] benderirc> wrote:
> as i just read about PFS, i was wondering how exim is handling the key exchange.
>
> the article suggested to use these ciphers in this order:
>
> TLS_ECDHE_RSA_WITH_RC4_128_SHA
> TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
> TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
> TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA

Look for tls_require_ciphers in the docs.

Also read up on openssl_options, and

http://www.exim.org/exim-html-current/doc/html/spec_html/ch-encrypted_smtp_connections_using_tlsssl.html#SECTreqciphssl
http://www.exim.org/exim-html-current/doc/html/spec_html/ch-encrypted_smtp_connections_using_tlsssl.html#SECTreqciphgnu

Graeme
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


cyborg2 at benderirc

Jul 30, 2013, 3:54 AM

Post #3 of 4 (77 views)
Permalink
Re: PFS encryption [In reply to]

Am 30.07.2013 11:19, schrieb Graeme Fowler:
> On 30 Jul 2013, at 08:56, Cyborg <cyborg2 [at] benderirc> wrote:
>> as i just read about PFS, i was wondering how exim is handling the key exchange.
>>
>> the article suggested to use these ciphers in this order:
>>
>> TLS_ECDHE_RSA_WITH_RC4_128_SHA
>> TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
>> TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
>> TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
> Look for tls_require_ciphers in the docs.
>

But was is the DEFAULT ?

Is it the output of "openssl ciphers" ?

if so, i don't see any ellipticbased ciphers there, but at least they
use DHE, which indicates PFS is used, which is good.

Next question, out of curiosity :

are there any statistics about the usage of ciphers in exim mailservers ?

( google returns only the exim specs as result for "statistics about
exim cipher usage" )



Marius



--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


exim-users at spodhuis

Jul 30, 2013, 10:06 AM

Post #4 of 4 (71 views)
Permalink
Re: PFS encryption [In reply to]

On 2013-07-30 at 12:54 +0200, Cyborg wrote:
> Am 30.07.2013 11:19, schrieb Graeme Fowler:
> > On 30 Jul 2013, at 08:56, Cyborg <cyborg2 [at] benderirc> wrote:
> >> as i just read about PFS, i was wondering how exim is handling the key exchange.
> >>
> >> the article suggested to use these ciphers in this order:
> >>
> >> TLS_ECDHE_RSA_WITH_RC4_128_SHA
> >> TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
> >> TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
> >> TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
> > Look for tls_require_ciphers in the docs.
> >
>
> But was is the DEFAULT ?

The default is whatever the SSL library, whether OpenSSL or GnuTLS,
provides as the default.

Rationale: although I happen to know a bit about crypto engineeering
(but not crypto math), it's a bad call for application developers to be
making decisions about which ciphersuites to trust. We lock ourselves
into a decaying trap if we do that. So instead, we leave the decisions
to the experts (the OpenSSL and GnuTLS developers) and provide
configuration options so that folks can change the settings.


Next: note that Exim when connecting outbound does check the trust chain
to a certificate but does not verify hostnames, because there has
historically been nothing trustworthy to verify. We're still hoping to
have improvements for this in before Exim 4.82, with DANE support.
Unfortunately for Exim, my day job is at a start-up which keeps me very
busy, so there's been no code movement here for some time. :(

Thus if you're caring about PFS, this is presumably for Exim-as-server,
not Exim-as-client.

> if so, i don't see any ellipticbased ciphers there, but at least they
> use DHE, which indicates PFS is used, which is good.

If you're using OpenSSL, then this depends upon the version of OpenSSL
which you're using. I believe that you need at least the OpenSSL 1.0.1
series to get elliptic-curve cryptography.

Running "exim -d --version" will tell you which version of OpenSSL is
being used.

My main server config has:

----------------------------8< cut here >8------------------------------
tls_require_ciphers = ${if INBOUND_MTA_CONDITION {DEFAULT:!SSLv2:!LOW} {TLS_SERVER_SUBMISSION_CIPHERSPEC}}:!aNULL:!eNULL
----------------------------8< cut here >8------------------------------

and the smtp transport uses a condition to decide between
TLS_CLIENT_HIGHSEC_CIPHERSPEC and TLS_CLIENT_DEFAULT_CIPHERSPEC; ignore
the INBOUND_MTA_CONDITION specifics: it boils down to "port 25 or not"
but with some complexity not relevant to this discussion.

These three TLS_* macros are defined as:

----------------------------8< cut here >8------------------------------
# We have a default cipherspec, and a high-sec cipherspec we'll use for known
# good hosts later, typically anyone with it enough to have DANE turned on, so
# we can verify identity. Until you can verify identity, no point worrying too
# much about the cipher choices
# default: we permit aNULL since we don't have anything to test against, but not eNULL
TLS_CLIENT_DEFAULT_CIPHERSPEC=DEFAULT:!SSLv2:!LOW:aNULL:!eNULL
# high: prep for having something to test against
TLS_CLIENT_HIGHSEC_CIPHERSPEC=ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:HIGH:!MD5:!RC4:!aNULL:!ADH:!DES:!EXP:!NULL
TLS_SERVER_SUBMISSION_CIPHERSPEC=ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:HIGH:!MD5:!RC4:!aNULL:!ADH:!DES:!EXP:!NULL
----------------------------8< cut here >8------------------------------

The DANE part isn't there yet; the file which I use to define properties
for remote domains I care a lot about (hard-require TLS, for instance)
has a key to force on high mode.

-Phil

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.