heypete wrote:
1. In the absence of "ecdh-curve" being declared, what curve is used for ECDHE? I would expect the server to use the same curve as the server certificate (e.g. if the server uses secp384r1, the key exchange would use secp384r1, while if the server uses secp521r1, the key exchange would use secp521r1, and so on), but it'd be nice to confirm this.
As per man pages:
--ecdh-curve name
Specify the curve to use for elliptic curve Diffie Hellman. Available curves can be listed with --show-curves. The specified curve will only be used for ECDH TLS-ciphers. This option is not supported in mbed TLS builds of OpenVPN.
If no ecdh-curve is provided than at least my OpenVPN server (compiled with the latest LibreSSL and all my certs using brainpoolP512r1) will use secp384r1. My openvpn.log (Initialization Sequence details)
without ecdh-curve at all
Wed Feb 8 13:27:14 2017 OpenVPN 2.4.0 armv7l-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Feb 5 2017
Wed Feb 8 13:27:14 2017 library versions: LibreSSL 2.5.1, LZO 2.09
Wed Feb 8 13:27:14 2017 Failed to extract curve from certificate (UNDEF), using secp384r1 instead.
Wed Feb 8 13:27:14 2017 ECDH curve secp384r1 added
Wed Feb 8 13:27:14 2017 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Wed Feb 8 13:27:14 2017 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Wed Feb 8 13:27:14 2017 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Wed Feb 8 13:27:14 2017 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
with "ecdh-curve brainpoolP512r1"
Wed Feb 8 13:29:04 2017 OpenVPN 2.4.0 armv7l-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Feb 5 2017
Wed Feb 8 13:29:04 2017 library versions: LibreSSL 2.5.1, LZO 2.09
Wed Feb 8 13:29:04 2017
ECDH curve brainpoolP512r1 added
Wed Feb 8 13:29:04 2017 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Wed Feb 8 13:29:04 2017 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Wed Feb 8 13:29:04 2017 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Wed Feb 8 13:29:04 2017 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
heypete wrote:
2. Is there some way of verifying that the key exchange uses secp521r1 as expected? Even with verbosity turned up to 7 there's no indication of which curve is used for the key exchange.
check your server log after restart - as in previous point it should list what curve has been selected.
heypete wrote:
3. Is there any particular reason to prefer tls-auth vs. tls-crypt? Any downsides of one versus the other? In my case, there's a very limited number of users (myself and a few family members) all using systems I administer, so widespread compatibility with the public is not necessary.
Actually tls-crypt introduced in 2.4 is better. It does not only authenticate (like tls-auth) , but also encrypt the TLS control channel.
As per man pages:
--tls-crypt keyfile
Encrypt and authenticate all control channel packets with the key from keyfile. (See --tls-auth for more background.)
Encrypting (and authenticating) control channel packets:
· provides more privacy by hiding the certificate used for the TLS connection,
· makes it harder to identify OpenVPN traffic as such,
· provides "poor-man's" post-quantum security, against attackers who will never know the pre-shared key (i.e. no forward secrecy).