Terminology note: I realized I should explain that
X25519MLKEM768 is what OpenSSL calls a “group”, although that’s technically a misnomer here. You will want to know that terminology, if you are exploring the code or trying to configure something like a webserver.
I see that the older Debian based distros' default openssl version is 3.0.22 or older, but Debian13's package manager's default calls for 3.5.9.
Useful info. v3.5.10 is out, latest tag on branch
openssl-3.5; Debian needs to speed up, as OpenSSL LTS point releases mean CVEs.

commit 938b2b47eb2a7c2d12fd0f23aa14b560249883ca (tag: openssl-3.5.10)
Author: openssl-machine <openssl-machine@openssl.org>
Date: Tue Dec 1 14:25:11 2026 +0000
Prepare for release of 3.5.10
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Merge-date: Tue Dec 1 14:25:11 2026
Release: yes
It might be helpful to compile a list of the distros that are stuck on older versions for those relay operators that are still using older LTS operating systems.
Debian is my go-to distro, so it's the only one I checked. And, I know Debian is notoriously slow to update it's default packages.
Indeed. For those who are stuck with an old package, here is a workaround.
I build my own OpenSSL from
git, and statically link it into my Tor daemon. I do
not recommend doing this generally; there’s
generally no security reason, and it means you need to keep up-to-date with your own builds of
both repos.
PITA and error-prone. However, it gives you an escape hatch for upgrading OpenSSL without fighting your system’s package manager. It also facilitates development and experimentation, which is why I started to do it years ago—and I guess it has various other specialized use cases.
Tor’s
configure has
explicit support for static link of OpenSSL—but getting it to work is a bit finicky due to OpenSSL’s weirdness.
Use ip:port of your Tor daemon; user:pass@ gives stream isolation:[http]
proxy = socks5h://git:password1@192.0.2.1:65536
OpenSSL official repo.git clone https://github.com/openssl/openssl
Tor (tpo) official repo. Current URL, which I’ve had to change a bunch of times since it as a v2 onion for a different host.
Verify that this is
gitlab.torproject.org. Don’t blindly trust me; even if you think I’m trustworthy,
always “trust-but-verify” this sort of thing!
git clone http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/tpo/core/tor.git/
Important late edit: Sorry, forgot! You need to
git switch to appropriate branches,
openssl-3.5 and for Tor,
release-0.4.9 (or
maint-0.4.9 if you want). Or
git clone -b <branch> these branches to begin with—if you are only trying to build this, and not interested in Tor/OpenSSL development.
OpenSSL build script excerpt: Just the tricky part to fit with the Tor build script. I run it from anywhere, as I hardcode some paths to work with how OpenSSL’s build system works. I am currently running with
v3.5.10 in production, with build options stripping it down to about the minimum of what Tor needs; I have a different build script for v4.
prefix="${somewhere}/tls35"
# OSSLSRC is the root of the git repo:
"${OSSLSRC}/Configure" \
"--prefix=${prefix}" \
--libdir=lib \
[...]
Tor build script excerpt: I run it from inside my clone of the Tor repo.
ossldir="${somewhere}/tls35/lib"
./autogen.sh # Needed for building from git.
./configure \
"--with-openssl-dir=${ossldir}" \
--enable-static-openssl \
--enable-gpl \
--enable-module-pow
Note: I
make distclean my tor between production builds, just to be extra-sure. In my experience, that needs to be done
before pulling any upstream changes; otherwise,
make gets confused. I build OpenSSL into a separate object directory, which I can simply
rm -r.
Another important late edit: Before deploying my binary, I
make test OpenSSL (slooow), and
make check Tor (pretty fast). This is in parts of my build scripts that I didn’t quote. When deploying your Tor binary, the three most important files (= what you actually need to run an up-to-date Tor) are build tree paths:
- src/app/tor → /usr/local/bin/tor (or sbin or whatever)
- src/config/geoip and src/config/geoip6 → /usr/local/share/tor/
(End this edit. With apologies for the mess, that’s important info.)
Aargh, edit in one more helpful note: If you’re
only building OpenSSL to upgrade your Tor, then you probably want to use OpenSSL’s
make install_sw and
make uninstall_sw targets for a slimmer/faster (un)installation than the
install/
uninstall targets.
I see that at some point, I set something logically equivalent to
export CPPFLAGS=-I${ossldir}/../include before my
configure line for Tor. However, I don’t think it’s necessary; IIRC, I added it when I was building a security release in a hurry and I’d made a mistake somewhere else. There is history to each of these lines, and it’s not well-documented outside of my fallible human memory.

It’s embarrassing that I’m actually not managing these build scripts in
git, as I should. The reason is
git’s stupidly insisting on my choice of an identity to commit (
user.name and
user.email). It is one thing that I hate about
git.
Additional notesOpenSSL v4 has some new features that are important for webservers, but (thus far) totally irrelevant to the Tor daemon. To try to settle on v4 for all purposes, when v4.0.0 was first released, I tried it with my Tor and got problems with the opporunistic post-quantum. The outcome would have been silent failure; I observed it in practice with custom patches to Tor. It
may have been caused by my very nonstandard build of OpenSSL, or it may have been something else. I shrugged and went back to v3.5 LTS. Tor and OpenSSL codebases have both substantially changed since that time; before I provide more advice to the public about this, I should re-test a bunch of stuff, as I suggested in OP.
.onion operators will surely want a strategy for post-quantum encryption. I need to do more research to give advice on two points:
- Post-quantum E2EE at the application layer. Major browsers, including Tor Browser (Firefox ESR) support the same X25519MLKEM768 key exchange; if your webserver also does, then the content communicated remains E2EE even against a HNDL QC attacker, even if they deanonymize both endpoints. At some point, I intend to make a new thread for webserver configurations for post-quantum hybrid encryption in TLS. Onions have the added problem of obtaining a TLS certificate trusted by Tor Browser. More to come on this... I’ve been doing a lot of thinking about this.
- Configuration for your onion’s Tor daemon. I am very reluctant to give advice here; incorrect advice could be a massive footgun that deanonymizes you right now, to try to protect against future risks. However, I do have some ideas for trying to preserve at least some location-hiding protection even against HNDL/QC, to mitigate and reduce future risks. I need to work on it, and see if I can figure out a strategy that I feel comfortable advising people to deploy when their personal safety may be on the line. I will NOT give any advice that I would not apply myself in the same situation; right now, I’m frankly not sure what I would do, if I ran an onion with a high threat model.
There is yet a huge amount of work to do on all of these issues.