Triplebit's Post-Quantum Transition

December 3, 2026 · Jonah Aragon

Based on recent news that the National Security Agency is advising an "immediate transition" to post-quantum cryptography following "recent discoveries that impact the security of some cryptographic systems currently in use", we are accelerating our post-quantum deployment timeline to be fully implemented by the end of 2026.

The nature of these discoveries is not known to us, but we agree with Mozilla that the wording of the note that the discoveries "do not present an immediate and widespread threat" appears to imply that at least one widely deployed classical encryption system could now be in the reach of some (i.e. state level) actors. As Mozilla states, "such a capability would present an “immediate but narrow threat” to high-value targets."

With many breakthroughs like this, it is only a matter of time before they figure out how to make it much easier, and the threat becomes more widespread.

While most systems Triplebit already operates support post-quantum cryptography, in some cases they will fall back to classical encryption systems for compatibility reasons. This will largely remain the case for now, but we will be eliminating any classical systems weaker than P-384 or RSA-4096 (most notably including eliminating the use of Curve25519), and ensuring that PQC is always used assuming the client supports it.

At this time we will not implement ML-DSA and ML-KEM exclusively as the NSA is currently suggesting government agencies do. We will only use hybrid algorithms which combine these algorithms with P-384 or Curve25519 algorithms, since the security properties of older classical encryption algorithms is more well-known. This ensures that in the event that concerns with ML-DSA and ML-KEM develop, in the worst-case scenario we are still at minimum as secure as the current classical algorithms.

We think it is unlikely that significant flaws will be found in ML-DSA and ML-KEM, which are resistant to both classical and quantum attacks. Anthropic recently made a discovery which was widely reported as finding a flaw in ML-DSA, but as Filippo Valsorda states:

It is unfortunate that just yesterday we got a result about lattices, but that result is completely theoretical and should not have gotten as much attention as it did. If anything, it should give us confidence that the labs are looking at ML-DSA and ML-KEM, and this is the best they found.

The rest of this blog post details the main configuration changes we are making today, both for our own use and for reference if you would like to implement similar changes on your own systems.

After these changes, we will individually evaluate the rest of our services separately. For the most part, our services currently use Debian 13.

Configuring Caddy

We use a custom build of Caddy to add support for a few plugins not included by default, but it is especially relevant today because we now also include support for secp384r1mlkem1024 and secp256r1mlkem768, neither of which Caddy natively exposes as a configuration option even though it is supported by Go. There's an open PR for this, so hopefully it's included in the next release, but in the meantime the patch is incredibly simple.

Caddy has instructions on how to use a custom build of Caddy instead of the pre-packaged version on Debian, while retaining the ability to use Debian's systemd and other support files from their package.

After following their dpkg-divert instructions, it is as easy as replacing the custom Caddy file with my latest release.

wget https://github.com/jonaharagon/caddy-build/releases/latest/download/caddy-linux-amd64
chmod +x caddy-linux-amd64
mv caddy-linux-amd64 /usr/bin/caddy.custom
caddy version

Now that we have support for the latest hybrid post-quantum encryption, we need to configure each site to use these new security options, which we can do by adding a snippet in our Caddyfile:

(pqc_tls) {
	tls {
		key_type p384
		protocols tls1.2 tls1.3
		curves secp384r1mlkem1024 secp256r1mlkem768 x25519mlkem768 secp384r1
		issuer acme {
			preferred_chains {
				root_common_name "ISRG Root X2"
			}
			profile shortlived
		}
	}
}

This snippet:

  1. Changes our own private key to P-384 (the default is 256-bit)
  2. Enforces TLS 1.2 and 1.3
  3. Enables secp384r1mlkem1024 secp256r1mlkem768, and disables x25519 and secp256r1 curves
  4. Requests that Let's Encrypt provides a certificate from their X2 root
  5. Configures shortlived certificates, which expire after 6 days.

Tip

For readers following along, you may wish to set profile tlsserver instead of shortlived, which will set your certificate expiration to 45 days instead of 90 days, and implement some other improvements. profile shortlived is the same, except certificates expire after 6 days, so you should be confident your certificate automation is working properly (although with Caddy it likely is). In either case, we would recommend not sticking with the default profile classic setting. More information about request profiles.

As noted in this post's introduction, we leave x25519mlkem768 (included in Caddy currently) and secp256r1mlkem768 (included via patch) support enabled despite their use of 256-bit ECC for the classical encryption component, because ML-KEM is already believed to be secure against classical attacks anyway, and x25519mlkem768 in particular has the widest client support. Disabling it would mean some clients would fall back to non-PQC secp384r1.

Tip

If you want to enforce PQC, you can instead set curves secp384r1mlkem1024 secp256r1mlkem768 x25519mlkem768. We plan to evaluate our current traffic to determine when it would be acceptable to make this change on our end.

We use Let's Encrypt's X2 root secured with P-384 keys instead of their X1 root secured with RSA-4096 because while RSA-4096 should be secure, unfortunately the intermediate certificates underneath the X1 root are RSA-2048, which makes X1 unacceptable.

Next, we import this snippet on each website:

triplebit.org {
	import pqc_tls
	...
}

privacyguides.org {
	import pqc_tls
	...
}

Note

By the end of 2026, every service hosted by Triplebit will be behind two identically configured Caddy reverse proxies per datacenter, which share TLS certificates. In Minneapolis, 23.188.56.113 and 23.188.56.114. This will allow us to enable Encrypted Client Hello (ECH) in a future update.

Finally, we check our configuration: caddy validate --config /etc/caddy/Caddyfile and restart: systemctl restart caddy

Configuring Mastodon (Nginx)

Thankfully, Debian's standard nginx package uses OpenSSL 3.5, so all three standardized ML-KEM hybrid key exchange groups are available without installing alternative packages or compiling anything.

At the moment we are only using nginx for a Mastodon installation, using the default nginx template included with Mastodon. We will edit /etc/nginx/sites-available/mastodon.

To that file, we will add a ssl_conf_command line:

ssl_conf_command Groups SecP384r1MLKEM1024:X25519MLKEM768:SecP256r1MLKEM768/P-384;

Important

The / separator in the ssl_conf_command line is important here. OpenSSL supports separating groups into priority tiers, so this configuration prioritizes hybrid PQC over classical key exchange even if doing so requires an additional handshake round trip.

We will also replace the ssl_ciphers line with this line to remove the finite-field DHE suites:

ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;

Combined with the current default configuration options, these changes mean that our entire SSL configuration section (every line starting with ssh_) should look like this, and there should be no other SSL lines:

ssl_protocols TLSv1.2 TLSv1.3;
ssl_conf_command Groups SecP384r1MLKEM1024:X25519MLKEM768:SecP256r1MLKEM768/P-384;

ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;

ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;

ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

We now need to change our Let's Encrypt certificate to use a P-384 key. We can see our current certificates with the sudo certbot certificates. We have two certificates (one for Mastodon, and one for the media backend), so we will renew both with a stronger key:

sudo certbot renew \
    --cert-name example.com \
    --key-type ecdsa \
    --elliptic-curve secp384r1 \
    --new-key \
    --force-renewal

sudo certbot renew \
    --cert-name files.example.com \
    --key-type ecdsa \
    --elliptic-curve secp384r1 \
    --new-key \
    --force-renewal

Then check your configuration: nginx -t, and restart nginx: systemctl restart nginx.

Configuring Discourse

Triplebit hosts the Privacy Guides forum as well as our own Discourse forum, and we need to harden the default TLS configuration here. Discourse's default docker container already supports the algorithms we need.

We will make copies of the existing configurations:

cp templates/web.ssl.template.yml \
	templates/web.ssl.pqc.template.yml

cp templates/web.letsencrypt.ssl.template.yml \
	templates/web.letsencrypt.pqc.template.yml

In templates/web.ssl.pqc.template.yml we add the following immediately after the ssl_prefer_server_ciphers directive:

ssl_conf_command Groups SecP384r1MLKEM1024:X25519MLKEM768:SecP256r1MLKEM768/P-384;

Important

As with Mastodon, the / separator is important here. OpenSSL supports separating groups into priority tiers, so this configuration prioritizes hybrid PQC over classical key exchange even if doing so requires an additional handshake round trip.

We then need to switch to a P-384 certificate from Let's Encrypt, in templates/web.letsencrypt.pqc.template.yml: In this file we replace the two instances of ec-256 with ec-384.

We then edit /var/discourse/containers/app.yml and replace the previous configuration lines:

  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

With our updated templates:

#  - "templates/web.ssl.template.yml"
#  - "templates/web.letsencrypt.ssl.template.yml"
  - "templates/web.ssl.pqc.template.yml"
  - "templates/web.letsencrypt.pqc.template.yml"

To force-regenerate our ECC certificate, we stop Discourse and back up the certificates:

cd /var/discourse

domain=discuss.privacyguides.net
shared=/var/discourse/shared/standalone
backup=$(mktemp -d /root/discourse-ecc.XXXXXXXX)

./launcher stop app

mv "$shared/letsencrypt/${domain}_ecc" "$backup/"
mv "$shared/ssl/${domain}_ecc.cer" "$backup/"
mv "$shared/ssl/${domain}_ecc.key" "$backup/"

Then run ./launcher rebuild app to start Discourse and generate the new certificates.

Discourse serves both an RSA-4096 certificate and this new P-384 certificate simultaneously, with the user's browser choosing which it prefers. We do not consider this to be a problem at this time.

In the future, the forums will be behind a separate Caddy reverse proxy, allowing us to enable ECH as noted in the Caddy section. At this time, our custom Discourse configuration will be upgraded to exclusively use the strongest possible encryption, so that internal communication between the Caddy reverse proxy and the Discourse VM will be upgraded.

This isn't strictly necessary on our secured internal network, but we prefer to encrypt whenever possible anyway. In that case, the upgrade on the Discourse end would have no impact for people visiting the forum, since that line of communication would be governed by our Caddy configuration.

Testing Our Webservers

We can test our configurations with the following webserver-test.sh script:

#!/bin/bash
for group in X25519MLKEM768 SecP384r1MLKEM1024 P-384 X25519 P-256; do
    echo "Testing $group"
    openssl s_client \
        -connect "$domain:443" \
        -servername "$domain" \
        -tls1_3 \
        -groups "$group" \
        -brief </dev/null
done

When running domain=discuss.privacyguides.net bash webserver-test.sh (for example) in a terminal, before our changes were applied we would see "CONNECTION ESTABLISHED" under four of the five keys, with SecP384r1MLKEM1024 failing to connect.

After the change is applied we will see the connection now establishes with SecP384r1MLKEM1024, and we will no longer see "CONNECTION ESTABLISHED" underneath X25519 and P-256.

To my knowledge, there are no browsers which support X25519 but do not support P-384, so this change should not introduce compatibility issues. For performance reasons, browsers will typically prefer X25519 to P-384 when both are offered, so disabling X25519 explicitly will therefore improve security.

OpenSSH

Post-quantum certificates can be generated today with:

ssh-keygen -t mldsa44-ed25519

We are switching services to these keys now, and we await ssh-mldsa87-p384 keys to be added to OpenSSH. They are currently in a draft, and when it is released we will rotate again to those keys.

We are using a new key management system to use one key per server, rather than one key per user. We plan to publish additional details about this in the future.