11Data channel cipher negotiation
2- ===============================
2+ -------------------------------
33
44OpenVPN 2.4 and higher have the capability to negotiate the data cipher that
55is used to encrypt data packets. This section describes the mechanism in more detail and the
66different backwards compatibility mechanism with older server and clients.
77
88OpenVPN 2.5 and later behaviour
9- --------------------------------
9+ ```````````````````````````````
1010When both client and server are at least running OpenVPN 2.5, that the order of
1111the ciphers of the server's ``--data-ciphers `` is used to pick the data cipher.
1212That means that the first cipher in that list that is also in the client's
@@ -25,7 +25,7 @@ For backwards compatibility OpenVPN 2.6 and later with ``--compat-mode 2.4.x``
2525``--cipher `` option to this list.
2626
2727OpenVPN 2.4 clients
28- -------------------
28+ ```````````````````
2929The negotiation support in OpenVPN 2.4 was the first iteration of the implementation
3030and still had some quirks. Its main goal was "upgrade to AES-256-GCM when possible".
3131An OpenVPN 2.4 client that is built against a crypto library that supports AES in GCM
@@ -40,7 +40,7 @@ always have the `AES-256-GCM` and `AES-128-GCM` ciphers to the ``--ncp-ciphers``
4040options to avoid this behaviour.
4141
4242OpenVPN 3 clients
43- -----------------
43+ `````````````````
4444Clients based on the OpenVPN 3.x library (https://github.com/openvpn/openvpn3/)
4545do not have a configurable ``--ncp-ciphers `` or ``--data-ciphers `` option. Newer
4646versions by default disable legacy AES-CBC, BF-CBC, and DES-CBC ciphers.
@@ -52,7 +52,7 @@ included in the server's ``--data-ciphers`` option.
5252
5353
5454OpenVPN 2.3 and older clients (and clients with ``--ncp-disable ``)
55- ------------------------------------------------------------------
55+ ``````````````````````````````````````````````````````````````````
5656When a client without cipher negotiation support connects to a server the
5757cipher specified with the ``--cipher `` option in the client configuration
5858must be included in the ``--data-ciphers `` option of the server to allow
@@ -65,7 +65,7 @@ If the client is 2.3 or older and has been configured with the
6565cipher used by the client is necessary.
6666
6767OpenVPN 2.4 server
68- ------------------
68+ ``````````````````
6969When a client indicates support for `AES-128-GCM ` and `AES-256-GCM `
7070(with ``IV_NCP=2 ``) an OpenVPN 2.4 server will send the first
7171cipher of the ``--ncp-ciphers `` to the OpenVPN client regardless of what
@@ -76,7 +76,7 @@ option is required. OpenVPN 2.5+ will only announce the ``IV_NCP=2`` flag if
7676those ciphers are present.
7777
7878OpenVPN 2.3 and older servers (and servers with ``--ncp-disable ``)
79- ------------------------------------------------------------------
79+ ``````````````````````````````````````````````````````````````````
8080The cipher used by the server must be included in ``--data-ciphers `` to
8181allow the client connecting to a server without cipher negotiation
8282support.
@@ -89,7 +89,7 @@ If the server is 2.3 or older and has been configured with the
8989cipher used by the server is necessary.
9090
9191Blowfish in CBC mode (BF-CBC) deprecation
92- ------------------------------------------
92+ `````````````````````````````````````````
9393The ``--cipher `` option defaulted to `BF-CBC ` in OpenVPN 2.4 and older
9494version. The default was never changed to ensure backwards compatibility.
9595In OpenVPN 2.5 this behaviour has now been changed so that if the ``--cipher ``
0 commit comments