On 10/1/22 16:16, Viktor Dukhovni wrote:
4096-bit RSA certificates mostly work, but are pointless crypto
exhibitionism, waste CPU, can run into client implementation
limitations, and so are not a good idea.
Interesting. This message is offtopic for the thread.
My cert from letsencrypt is 4096 bit. At the link below is part of a
report from SSL labs indicating which browsers can't handle my settings
for https:
https://www.dropbox.com/s/o1il6wbst3seuid/browser_compatibility_4096_bit.png?dl=0
The browsers that don't work are ones that I don't care about. The vast
majority of users will have something newer.
This report is browser-centric, so it's not directly applicable to
Postfix. My settings on postfix are a lot more lenient than those I
have on haproxy and dovecot. Here are all the tls settings grepped out
of postconf -n:
elyograg@bilbo:~$ postconf -n | grep tls
lmtp_tls_ciphers = $smtpd_tls_ciphers
lmtp_tls_mandatory_ciphers = $smtpd_tls_mandatory_ciphers
smtp_tls_ciphers = $smtpd_tls_ciphers
smtp_tls_loglevel = 1
smtp_tls_mandatory_ciphers = $smtpd_tls_mandatory_ciphers
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = dane
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_client_new_tls_session_rate_limit = 0
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = REDACTED
smtpd_tls_ciphers = medium
smtpd_tls_loglevel = 1
smtpd_tls_mandatory_ciphers = high
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_high_cipherlist =
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256
tls_medium_cipherlist =
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:AES256-SHA:AES128-SHA
tls_preempt_cipherlist = yes
Feel free to critique those settings, but if you do, please back up what
you say with real data.
Most the TLS connections I get on postfix are TLSv1.2. Here is a
summary of the counts for TLS versions in my mailserver logs:
elyograg@bilbo:~$ sudo zgrep -cE "TLSv1\.3" /var/log/mail.log*
/var/log/mail.log:1109
/var/log/mail.log.1:1348
/var/log/mail.log.2.gz:973
/var/log/mail.log.3.gz:1488
/var/log/mail.log.4.gz:946
elyograg@bilbo:~$ sudo zgrep -cE "TLSv1\.2" /var/log/mail.log*
/var/log/mail.log:6051
/var/log/mail.log.1:5937
/var/log/mail.log.2.gz:3217
/var/log/mail.log.3.gz:5453
/var/log/mail.log.4.gz:4217
elyograg@bilbo:~$ sudo zgrep -cE "TLSv1\s+" /var/log/mail.log*
/var/log/mail.log:0
/var/log/mail.log.1:1
/var/log/mail.log.2.gz:8
/var/log/mail.log.3.gz:2
/var/log/mail.log.4.gz:6
elyograg@bilbo:~$ sudo zgrep -cE "TLSv1\.1" /var/log/mail.log*
/var/log/mail.log:0
/var/log/mail.log.1:0
/var/log/mail.log.2.gz:0
/var/log/mail.log.3.gz:0
/var/log/mail.log.4.gz:0
And here are total connection counts that say "smtpd":
elyograg@bilbo:~$ for i in /var/log/mail.log /var/log/mail.log.1 ; do
echo -n "$i:" ; sudo cat $i | perl -lne 'print if m/smtpd\[\d+\]\:
connect/' | wc -l ; done
/var/log/mail.log:15829
/var/log/mail.log.1:10973
elyograg@bilbo:~$ for i in /var/log/mail.log.?.gz ; do echo -n "$i:" ;
sudo zcat $i | perl -lne 'print if m/smtpd\[\d+\]\: connect/' | wc -l ; done
/var/log/mail.log.2.gz:6959
/var/log/mail.log.3.gz:11920
/var/log/mail.log.4.gz:9655
If the way I got the total counts is valid, then most of the connections
are NOT using TLS. I wonder how many of those are using plaintext
because my cert is 4096 bit and their encryption library cannot use it.
I don't know if there is any way to log enough information to determine
that.
The CPUs in this AWS instance are by AMD and have the "aes" flag. If
openssl 1.1.1f for Ubuntu 20.04 uses that capability, then encryption
should be greatly accelerated and be less of a CPU hog.
Thanks,
Shawn