← Sun, Nov 15 digest

Disk encryption on NetBSD – achieving secrecy

read article ↗ hn thread ↗

A practical guide demonstrates how to configure partial disk encryption on NetBSD using the cgd driver to secure user data while maintaining a standard boot process.

read it Provides a clear, hands-on technical walkthrough for implementing practical disk encryption on NetBSD.

summary

The guide outlines a middle-ground approach to disk encryption on NetBSD, separating the immutable base system from sensitive directories like home, var, and usr. By installing the OS onto a small unencrypted root partition and mapping the rest to an encrypted cgd device, users can protect their personal data without complex full-disk setups. The tutorial details the configuration process for both traditional disklabels and modern GPT wedges, finishing with steps to migrate directories. This setup requires using online upgrades rather than traditional offline installation media.

key points

  1. NetBSD separates immutable base system files from user data, enabling a small unencrypted root partition alongside an encrypted cgd partition.
  2. The configuration utilizes NetBSD's cryptographic driver with Argon2id key derivation and Adiantum or AES-CBC ciphers.
  3. Post-installation requires migrating /home, /var, and /usr to the encrypted mount point and establishing symbolic links.
  4. Online upgrade tools like sysupgrade must be used since the NetBSD installer is unaware of the custom encrypted layout.

who should read it

NetBSD users and systems administrators looking to secure user data without full-disk encryption complexity.

discussion positive

consensus

Commenters debate the security trade-offs of leaving system packages unencrypted, with many noting it leaves the system vulnerable to tampering unless paired with file integrity tools.

pushback

A minority argues that partial encryption is inadequate for high-threat environments like authoritarian states, where full-disk encryption or specialized hardened operating systems are required.

best comment by jmclnx ↗

You can use veriexec to validate executables prior them starting. I have used it and it works fine.

https://man.netbsd.org/veriexec.8

https://man.netbsd.org/veriexecgen.8

Introduces NetBSD's built-in veriexec framework as a way to validate executables and mitigate the risk of unencrypted binaries being modified.

Generated by an LLM from the article and thread. Check the sources before relying on it.