hn.today

Disk encryption on NetBSD – achieving secrecy

netbsd.org96 points18 comments
Screenshot of Disk encryption on NetBSD – achieving secrecy

The guide explains how to protect data on a NetBSD computer if it is lost or stolen, while distinguishing that goal from preventing or detecting hardware tampering. It argues that encrypting every byte is difficult because the system must boot and obtain a password before it can unlock storage. Instead, it separates relatively stable operating-system files from data that can contain private information. Directories such as /home, /var, /root, /usr/pkg, and /usr/local may hold personal files, logs, crash dumps, databases, and installed software. Even /etc can expose secrets such as Wi-Fi or VPN credentials, though many of its files are needed only later in startup and can be relocated.

The proposed compromise keeps a small, roughly 4 GB root filesystem unencrypted so NetBSD can boot normally, and places sensitive or changeable files on an encrypted partition. The guide walks through reserving that partition in the installer, configuring NetBSD’s encrypted-device driver (CGD), and creating a filesystem within it. It provides separate procedures for disklabels and GPT disk wedges, with password-derived keys, encrypted-device configuration at boot, and an internal disklabel or GPT table used to confirm that the password is correct. FFS is presented as a well-tested filesystem choice, while LFS is used experimentally. The approach avoids the more intrusive encrypted-root-and-ramdisk setup, but requires deciding which files must remain available during boot and accounting for encryption performance, recovery tools, and any sensitive data left outside the encrypted volume.

Read on netbsd.org18 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.