Mark Loveless, aka Simple Nomad, is a researcher and hacker. He frequently speaks at security conferences around the globe, gets quoted in the press, and has a somewhat odd perspective on security in general.

Q-Day Prep

Q-Day Prep

The rack as of late November 2026. You can see Daemon, Rigor-mortis, Talon, The Vortex, and Blackhole. There are other servers and devices in the rack as well as plenty of other servers and devices outside of the rack. Fun stuff.

This was written and set to automatically publish before the Anthropic announcement about attacks on quantum-safe algorithms (see here) however I still deem post quantum cryptography to be safe.


We’ve all heard about Q-Day, that wondrous day in the future where quantum computers can decrypt encrypted data and learn what secrets were being protected by specific cryptographic algorithms. And there’s the added danger of “harvest now, decrypt later” where a nefarious party captures encrypted data (such as encrypted web traffic) and decrypts it later on with a quantum computer.

I discussed this at length in a blog post entitled Quantum Readiness from last spring so I won’t rehash it here. I wanted to make sure the various public servers I manage for the NMRC team were safe. The main concern involved SSH and TLS, as the latest versions of OpenSSH and OpenSSL had quantum safe algorithms included. This turned out to be quite the adventure.

Initial Assessment

I used a tool I very quickly coded up called Quantum Safety Check to see what the state of my SSH and TLS connections were and if they were actually operating in a quantum safe state. After testing it internally against internal servers, I pointed it at the public IP addresses.

The five public IP addresses are for five physical devices located in my server room. These include one UniFi UDM Pro (The Vortex aka vortex.nmrc.org) functioning as the gateway between the internal network and the rest of the internet, and four System76 “meerkat” devices providing various services including web service, email, logging, and code development. As UniFi had updated their platform so that web and SSH services to their device supported quantum safe algorithms, Quantum Safety Check reported that The Vortex was fine. Good, and one down already.

Despite OpenSSH and OpenSSL shipping quantum safe algorithms in their latest versions, the four remaining IP addresses were running Ubuntu Pro Server 24.04.3 LTS which had older versions of OpenSSH and OpenSSL. Quantum Safety Check showed all four to be running non-quantum safe SSH and TLS. I run these with Pro which means they get early patches and so on (Pro is free for 5 or less systems) and they are rock stable otherwise. Before you say something about using Ubuntu note that I am not even considering switching to another distro, but it became clear that upgrading them to the latest LTS - 26.04.1 - was a priority. Once the upgrades were done, I could start applying the configs and everything would be fine. Piece of cake, right? Not exactly.

Upgrades

I started with Daemon (daemon.nmrc.org). The main services it provides is running Pi-hole in recursive mode with Unbound (details here), a Veilid node, and an rsyslog server. Pi-hole and rsyslog are mainly used for the public systems with a few select internal devices using them as well. There is a separate Pi-hole server running internally for all of the various clients and “smart” devices which handles the bulk of the DNS filtering, but the public systems are covered. Anyway, the upgrade for Daemon was definitely the easiest - the only thing to adjust was the Duo Security package repository, as all public servers use Duo Unix’ “push” MFA for member access.

Next was Talon (talon.nmrc.org). It handles mail, a web server whose sole purpose was redirecting some web traffic to Rigor-mortis (rigor-mortis.nmrc.org) to solve a stupid DNS issue involving a few organization’s misconfiguration of DNS, and Wireguard for NMRC members’ shell access as well as remote IMAPs. Again, surprisingly easy and painless - just the Duo Security tweaks.

For both Talon and Daemon, I went ahead and set up their various settings (such as SSH configurations) to be fully quantum safe. Blackhole and Rigor-mortis were anticipated to be the biggest efforts, especially Rigor-mortis.

Blackhole

Blackhole is the GitLab standalone server used by NMRC members. All of the Ubuntu servers are System76 meerkats, and this was the first one purchased way back at the beginning of the decade. As it came with Ubuntu pre-loaded I simply used it as it was, and over the years performed upgrades from LTS to LTS versions. For some reason though, this one ran into a couple of problems this time around.

There were multiple conflicts happening where things that ran before were no longer running. These was minor things (for example log rotation) and after looking into the errors it became clear that some of the Linux utilities were coming from the System76 repository that had been there since I had received the hardware, which were now clashing with some of the software coming from the Ubuntu repositories.

Somewhat painfully I went through the process of removing the System76 repository and then downgrading all of the Ubuntu versions of what I was getting via System76. It took a while, and a couple of config files had to be tweaked, but it was finally resolved. On this one I did ask Claude a couple of times for help, but this was mainly to save myself from massive amounts of Googling as Claude was providing more or less the same information but infinitely quicker.

Rigor-mortis

I felt this one was going to be the most painful due to past experiences. Rigor-mortis supplies web services for nmrc.org, a subdomain called mta-sts.nmrc.org (to handle MTA-STS), cryptonomicon.us (an industrial metal band I was in a decade and a half ago), handjoballey.net (a joke that got out of hand), and the one that had me the most nervous which was the NMRC Mastodon instance for NMRC members. It also handles what little mail comes in for the Cryptonomicon and Handjob Alley websites, although it is simply forwarding it over to the NMRC mail server.

First up, Mastodon was on 4.4.29. It had dependencies that had security vulnerabilities and the whole 4.4.x was going to be EOL in mid December, so I decided not just to update Mastodon to a more recent version, but to get things to the latest non-beta - 4.7.6. This took quite a while, and had its own problems although none of them were that tough, mainly just tedious. Finally, after a very long session I had Mastodon 4.7.6 up and running. Like with Blackhole, I did consult Claude a couple of times, but I was ready to start the upgrade to 26.04.1.

I encountered error after error once the server was upgraded to 26.04.1, fixed all of those as they were not too bad, rebooted, and Mastodon was simply dead in the water. Here is a list of things that I dealt with:

  • The wrong PostgreSQL versions were installed, and it came from the PGDG repository (PostgreSQL runs that). I had versions 16, 17, and 19. I really wanted 18. I got the postgresql-18 package installed from the Ubuntu repository, purged the 17 and 19 packages, and marked the 16 package as manually installed so autoremove wouldn’t remove it.

  • pg_upgradecluster kept failing. The dump-and-restore stopped on unrecognized parameter "pg_attver". That was an invalid column option stored on account_summaries.account_id in the 16 database, and ALTER TABLE … RESET couldn't remove it. Removed the pg_attver entry directly from pg_attribute, then confirmed it was gone with pg_dump -s. After that, pg_upgradecluster -v 18 16 main ran cleanly. The "dump-and-restore” also rebuilt every index under the new glibc, which cleared the annoying “2.39 → 2.43 collation mismatch” I kept seeing.

  • The 18 server was Ubuntu's build, but shared packages (libpq5, postgresql-common and others) were still on PGDG versions. The PGDG repository was disabled and the shared packages were downgraded to Ubuntu’s versions. Mastodon started working.

  • After a reboot, mastodon-sidekiq and mastodon-web crashed at boot. Gems with native code had been built against libraries that had since changed, including libpq after the downgrade. Rebuilding them failed because the OS upgrade had removed build dependencies such as libidn-dev and libicu-dev. I installed the full set of Mastodon build dependencies and rebuilt vendor/bundle.

  • Next, mastodon-sidekiq and mastodon-web were failing at start with exit 127, which was “command not found”. The gems had been installed by a stray Ruby 3.3 in /usr/local, so they went into vendor/bundle/ruby/3.3.0. The services run rbenv's Ruby 4.0.10, which looks in ruby/4.0.0. The underlying cause: the mastodon user had no ~/.profile (what?), so a login shell never ran rbenv init, and the shell had been using the /usr/local Ruby all along. I removed the /usr/local Ruby, created /home/mastodon/.profile from /etc/skel which wasn’t there for some reason, added rbenv init to the mastodon user’s .bashrc, and corrected which Ruby rbenv selects. Then I reinstalled the gems into ruby/4.0.0. FIXED.

This Rigor-mortis upgrade, especially the Mastodon server part of it, took hours. And thank god I had Claude helping me, otherwise this could have taken a couple of days. After things were all said and done including Mastodon up and running, I purged everything else that needed to be purged, removed the old disabled PGDG repository, and upgraded the SSH and TLS configs. Rebooted for the hell of it with fingers crossed. All good.

Summation

First off, it feels really good to be able to say that all of the public servers (and all of the internal servers and client laptops running Linux and MacOS) are using quantum safe settings. Secondly, all of the systems are up to date, and all of their applications and services are up to date as well. This is really awesome.

It might be worth mentioning that in the middle of all of this was ruby2shell and nginx2root, so I was also patching and dealing with workarounds, plus the usual regular patches one might get on a given day. All systems are at this point patched up from the major bullshit-named flaws that have their own website (why do we in the security industry do this type of shit?) so as I type this I think things are good for at least a few minutes.

One question you might have is when did I find time to do this, being a person with a fulltime job and a life? Well, it certainly wasn’t done in a day, or even a weekend. This happened usually one or two agenda items at a time on a weekend morning or a weekday evening. Rigor-mortis took up the better part of a day on a weekend. I had started in October, with a goal of being done before Thanksgiving, and it was in fact completed before then.

This wasn’t easy, but I learned a lot - way more than simply reading about things. Getting my hands dirty and digging into problems is probably the best way for me to learn. It can be dangerous at times, because after something that monumental has been completed, you start getting brave. I’m not worried though, like usual the next project will likely challenge me and humble me with instance imposter syndrome, but that does seem to be the nature of things for me.

Minor Compromise

Minor Compromise