Skip to content

[feature] Add support for tls-crypt instead of tls-auth #252

Open

Description

@kosli

OpenVPN 2.4 onwards supports the tls-crypt option instead of tls-auth.
It would be great if OpenWISP would support this feature instead of just tls-auth.

From the OpenVPN 2.5. manual:

  • 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).
  • In contrast to --tls-auth, --tls-crypt does not require the user to set --key-direction.

Activity

  1. kosli commented on Feb 16, 2023

    @kosli
    Author

    OpenVPN 2.5 would even support client-specific tls-crypt keys, see
    Client-specific tls-crypt keys (--tls-crypt-v2)
    tls-crypt-v2 adds the ability to supply each client with a unique tls-crypt key. This allows large organisations and VPN providers to profit from the same DoS and TLS stack protection that small deployments can already achieve using tls-auth or tls-crypt.

  2. changed the title [-][feature] add support for tls-crypt instead of tls-auth[/-] [+][feature] Add support for tls-crypt instead of tls-auth[/+] on Jun 13, 2024
  3. moved this to To do (Python & Django) in OpenWISP Contributor's Boardon Aug 21, 2024
  4. amanbn8 commented on Oct 4, 2026

    @amanbn8
    Contributor

    Hi, I'd like to take this one.

    Plan, mirroring how tls_auth is handled today:

    • schema: new optional tls_crypt string field (textarea) in the OpenVPN backend, next to tls_auth;
    • converter: when the field holds the key material rather than a path, write it to <ca dir>/<dev>_tls_crypt.key the same way __add_tls_auth_key does and render tls-crypt <path> (no key direction, tls-crypt keys are symmetric);
    • auto_client(): copy the key material into the generated client config, so clients created by openwisp-controller pick it up automatically;
    • validation: reject configurations that set both tls_auth and tls_crypt, since OpenVPN refuses to start with both (--tls-auth and --tls-crypt are mutually exclusive);
    • the OpenWrt backend needs no special handling (tls_crypt is already in the openvpn package's option list) and the parser picks the directive up through the generic key/value path; docs and tests included.

    I'd leave tls-crypt-v2 out of this PR: it needs per-client keys, so auto_client() would need a new argument to receive them. Better handled separately once the basic option is in.

    Unless you'd prefer a different approach, I'll open a PR referencing this issue.

  5. openwisp-companion commented on Oct 4, 2026

    @openwisp-companion

    This issue has been automatically assigned to @amanbn8 who opened PR #421 to address it. 🎯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions