Technology1 min read

Disk encryption on NetBSD – achieving secrecy

By · Published by Everything Blog

In short

Achieving complete data secrecy on NetBSD involves distinct technical challenges because the system must run software to accept boot keys, leaving some files necessarily exposed. Administrators must carefully distinguish unmodified open-source binaries from sensitive locations such as /home, /var, and /etc. Although modern processors offer hardware acceleration for ciphers like AES, systems without support can rely on alternatives like Adiantum to mitigate performance penalties. Securing these environments often requires specialized partitioning or ramdisk pivots to avoid leaving crash dumps and logs vulnerable.

Key points

  • Modern hardware features AES instructions to limit encryption overhead, while ciphers lik…: Modern hardware features AES instructions to limit encryption overhead, while ciphers like Adiantum serve systems without such hardware.
  • Simply encrypting user directories leaves operational secrets exposed in system logs and…: Simply encrypting user directories leaves operational secrets exposed in system logs and crash dumps.
  • Standard installation tools allow administrators to isolate sensitive partitions and mana…: Standard installation tools allow administrators to isolate sensitive partitions and manage protected configuration files using symbolic links.

Sources checked by our analysis pipeline: 1

Threat models

These are two threat models for which disk encryption is the answer:

-

The device is stolen or lost and its contents must remain secret.

-

The device is tampered with, and all attempts at tampering must render it unusable.

Right now, we will focus on the first threat model. It is very difficult to build a tamper-proof system, and you need to worry about tamper-proofing your hardware, depending on what kind of actor is a realistic threat.

If we want to keep data on the system secret, we must first consider which data is worth protecting. On a NetBSD system, our data can be grouped into two broad categories:

-

System files (open source software)

-

User-modified files

Does the /bin/sh

executable downloaded from the NetBSD FTP server contain any sensitive information?

On a BSD system, due to the separation of the base system and packages, many root file system directories are mostly unmodified outside of upgrades. In a properly configured system, nearly all system daemons and user applications are not going to be running as root

Technology