Skip to content

TLS Algorithms and Post-Quantum Key Exchange

What the Defaults Protect, and What to Check in Your TLS Options

Security agencies ask organizations to move to post-quantum cryptography, and TLS servers are one of the first things to update, because a configuration change is often enough. For Traefik, most of this work is already done by the defaults. This page explains what the defaults protect, which settings remove that protection, and how to require post-quantum key exchange.

Traefik terminates TLS with the Go standard library, and its defaults follow the Go defaults. Without any TLS option, Traefik negotiates a post-quantum hybrid key exchange with every TLS 1.3 client that offers one. Other clients still connect with a classical key exchange. Unless a requirement says otherwise, keep the defaults: each option set in a TLS option replaces the Go default for that option.

Defaults

Setting Default
Minimum TLS version TLS 1.2
Maximum TLS version TLS 1.3
Cipher suites The cipher suites Go considers secure
Key exchange Post-quantum hybrids (X25519MLKEM768, SecP256r1MLKEM768, SecP384r1MLKEM1024), then X25519, CurveP256, CurveP384, CurveP521

TLS Versions

TLS 1.0 and TLS 1.1 are deprecated (RFC 8996). Do not set minVersion below VersionTLS12.

TLS 1.3 is preferred: its cipher suites are all secure, and post-quantum key exchange is only available with TLS 1.3. When all the clients support it, set minVersion to VersionTLS13.

Cipher Suites

With TLS 1.3, the cipher suites are not configurable, and all of them are secure.

With TLS 1.2, the default list only contains the cipher suites Go considers secure. The cipherSuites option also accepts cipher suites that Go considers insecure, to support legacy clients:

  • TLS_RSA_WITH_RC4_128_SHA
  • TLS_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_RSA_WITH_AES_128_CBC_SHA
  • TLS_RSA_WITH_AES_256_CBC_SHA
  • TLS_RSA_WITH_AES_128_CBC_SHA256
  • TLS_RSA_WITH_AES_128_GCM_SHA256
  • TLS_RSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDHE_RSA_WITH_RC4_128_SHA
  • TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

Only list them when a legacy client requires it.

Key Exchange and Post-Quantum Cryptography

An attacker can record encrypted traffic today, and decrypt it later once a quantum computer can break the classical key exchange. This is known as "harvest now, decrypt later". The key exchange is what protects recorded traffic, so it is the part to move to post-quantum cryptography first.

A post-quantum hybrid key exchange combines a classical elliptic curve with ML-KEM, the post-quantum algorithm standardized by NIST (FIPS 203). The connection stays secure as long as either of the two algorithms holds.

The pure post-quantum key exchange MLKEM1024 has no classical component: the connection relies on ML-KEM alone. It is not enabled by default, and is only offered when listed in curvePreferences, for instance to meet the CNSA 2.0 requirement of ML-KEM-1024 alone.

By default, Traefik negotiates a post-quantum hybrid key exchange with the TLS 1.3 clients that support one, and falls back to a classical elliptic curve for the other clients. X25519MLKEM768 is in the Go defaults since Go 1.24, and SecP256r1MLKEM768 and SecP384r1MLKEM1024 since Go 1.26.

Setting curvePreferences replaces the default list. Go ignores the order of this list, and uses its own preference order. Traefik logs a warning when the list contains no post-quantum key exchange, because the connections using this TLS option are exposed to "harvest now, decrypt later".

The following default TLS option only accepts clients that support a post-quantum hybrid key exchange, and refuses the other clients, including all the TLS 1.2 clients, on all the routers that do not reference another TLS option:

# Dynamic configuration

tls:
  options:
    default:
      minVersion: VersionTLS13
      curvePreferences:
        - X25519MLKEM768
        - SecP256r1MLKEM768
        - SecP384r1MLKEM1024
# Dynamic configuration

[tls.options]
  [tls.options.default]
    minVersion = "VersionTLS13"
    curvePreferences = ["X25519MLKEM768", "SecP256r1MLKEM768", "SecP384r1MLKEM1024"]
apiVersion: traefik.io/v1alpha1
kind: TLSOption
metadata:
  name: default
  namespace: default

spec:
  minVersion: VersionTLS13
  curvePreferences:
    - X25519MLKEM768
    - SecP256r1MLKEM768
    - SecP384r1MLKEM1024

To apply it to some routers only, give this TLS option another name, and reference it from these routers.

Check and Roll Out

To check the key exchange a hostname negotiates, use OpenSSL 3.5 or later:

openssl s_client -connect example.com:443 -servername example.com -groups X25519MLKEM768 </dev/null 2>&1 | grep -E "Negotiated TLS1.3 group|Peer Temp Key|alert"

The output is Negotiated TLS1.3 group: X25519MLKEM768 when the post-quantum hybrid key exchange is used. With -groups X25519, the same command shows what a client without post-quantum support gets: Peer Temp Key: X25519 with the defaults, or a handshake failure alert when a post-quantum key exchange is required.

Before requiring a post-quantum key exchange, check the clients: older operating systems, older Java runtimes, and tools built on older TLS libraries only offer classical elliptic curves, and are refused. The post-quantum hybrid key exchanges also add about 1.2 KB to the first message of the handshake, which can affect network equipment that inspects TLS traffic.

Certificates

The certificate signature authenticates the server during the handshake. A future quantum computer cannot use a recorded handshake to impersonate the server afterwards, so RSA and ECDSA certificates are not exposed to "harvest now, decrypt later".

Traefik also serves post-quantum ML-DSA certificates, with the private key in the PKCS #8 seed format. The clients that do not support ML-DSA, including all the TLS 1.2 clients, cannot connect. As public certificate authorities do not issue ML-DSA certificates yet, they require a private certificate authority.

Connections to the Backends

Traefik connects to the backends over TLS with the Go defaults for the key exchange. It offers the post-quantum hybrid key exchanges to the backends that support TLS 1.3, and the key exchange offered to the backends is not configurable.