I know how to configure OpenVPN and that there are control and data channels. But I did not yet find a nice overview of the crypto processes and especially how keys and certificates are really used in OpenVPN.

I wonder if it's possible to e.g. have an ECC server key and still enforce an RSA TLS cipher. Does the TLS cipher use the server/client keys or are they only used for authentication and TLS generates random private keys according to the negotiated cipher?


Most of your question should be answered here: OpenVPN -cipher vs -tls-cipher?

Still, because your question is slightly different focussed, let me provide you a simplified list of steps performed in an OpenVPN connection setup, and which keys are used where:

  1. The client connects to the server. If tls-auth or tls-crypt is used, this packet and all following control channel packets are authenticated or authenticated-and-encrypted with this key by both parties.

  2. The client and server perform a TLS handshake over the control channel. Both use the key, cert and ca keys for the TLS authentication. The server uses the dh parameters if an DH(E) cipher suite is used. TLS uses one of the cipher suites allowed by the tls-cipher option.

  3. Over the TLS secure channel (which has it's own encryption) OpenVPN performs the OpenVPN key exchange.

  4. The keys resulting from this OpenVPN key exchange are used to encrypt-and-authenticate data channel packets (the actual virtual network packets). The data channel uses the encryption and authentication methods specified by the cipher and auth options, or a cipher negotiated over the control channel, which is one of the ciphers in the ncp-ciphers option (the latter is OpenVPN 2.4+ only).

This means that the keys in key, cert and ca are used only by TLS, and in the same way that TLS (or, the TLS library) does. The TLS ciphersuite specifies the authentication type of the server. So if you only allow RSA cipher suites, the server must have an RSA privkey/cert, but the client may still use a different certificate.

  • This is a nice and detailed explanation, but does not answer my question concerning RSA/ECC. You wrote that the asymmetric crypto key and also tls-cipher are used for TLS auth, but what exactly does that mean? I meanwhile found out that I can NOT use an ECC key and try to enforce an RSA cipher. – MaxHQ Aug 5 '17 at 6:12
  • I added a statement to explicitly answer that part of the question too. Does this fully answer it now? – Steffan Karger Aug 6 '17 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.