Software updates and TUF
Why not RPM and DPKG?
Why not just package your software as an RPM or a DEB file and provide updates using the provided tools? Both of these package formats support signing of the packages themselves, and the repository data can be signed to prevent attacks against the metadata. However, the main failing of both RPM and DPKG is their reliance on very few keys. Typically, only one key is used to sign both the packages and the repository data. Although you can use different keys to sign the repository and the packages, a compromise of either key would still be disastrous, because an attacker could execute rollback attacks and so forth.
TOR Begets TUF
You could also use Thandy. The Tor project [4] was originally funded by the US Naval Research Laboratory who needed, among other things, a way for people overseas to communicate securely without being detected. Since then, Tor has grown and established itself as a healthy open source project with widespread support.
Tor, however, faces some significant challenges when it comes to updates. Basically, people using Tor are trying to protect themselves from state-level attackers (e.g., governments), who can view and intercept Internet traffic either through technical means or by simply getting a court order. Also, Tor users want protection from attackers who create arbitrary web server or code-signing certificates. That means anything Tor uses to support updates must be resistant basically to every possible attack – with no reliance on third-party certificate authorities, DNS, servers, networks, and so on.
Additionally, Tor has to worry about people attacking the Tor project itself. The cost of sending someone in to install a keylogger on a laptop is not that much. There have been confirmed incidents of online poker players' laptops being physically compromised so that malware can be installed, and some of the people who use Tor play for much higher stakes (sorry, but I do love a bad pun). Thus, the Tor Project had to build an update system that would securely handle encryption keys as well as compromises of these keys without putting users at a significant risk. To do this, the Tor project created the "Thandy" updater, which in turn was forked: The Update Framework (TUF) was born [3].
TUF – Security vs. Usability
Users and administrators often have to make a trade-off between security and usability. Longer and more complex passwords are more secure, but people rarely remember them. Keeping encryption keys on a secured offline machine improves security but also makes usability a pain. If you need to sign something like software update metadata daily, or even hourly, it becomes unusable. Additionally, you can use separate keys for various functions; rather than relying on a single key to sign everything, you can use a separate key for each function or duty. Thus, the compromise of a single key will affect only that specific function; however, it also means you have more keys to manage.
You can also prepare for key compromises and make them more survivable [5] by using threshold keys, which are also referred to as quorum keys. TUF supports the use of threshold keys. This approach allows you to specify multiple keys, some or all of which must be used to sign data for it to be considered valid. For example, you can create five root keys and require that three or more be used for the other keys to be valid. In this way, you can survive the compromise of two keys without an adverse effect; the attacker won't be able to sign anything, and you will still be able to sign things properly. You'll also want to be able to revoke your encryption keys explicitly (i.e., if a server where a key is stored is compromised, you should stop using that key and generate a new one), and implicitly (i.e., keys should have a defined life span).
TUF takes a pragmatic and secure approach by splitting the keys into four roles: targets, delegated targets, release, and timestamp (Figure 1).
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.