<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Encryption on rHomelab</title><link>https://rhomelab.com/tags/encryption/</link><description>Recent content in Encryption on rHomelab</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 03 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://rhomelab.com/tags/encryption/index.xml" rel="self" type="application/rss+xml"/><item><title>Encrypting Your Data Hoard: LUKS vs ZFS Native Encryption vs VeraCrypt</title><link>https://rhomelab.com/data-hoarding/encrypting-your-data-hoard/</link><pubDate>Sat, 03 Oct 2026 00:00:00 +0000</pubDate><guid>https://rhomelab.com/data-hoarding/encrypting-your-data-hoard/</guid><description>A multi-drive archive is also a multi-drive liability if a disk walks out the door or gets RMA&amp;#39;d with data still on it. Here&amp;#39;s how LUKS, ZFS native encryption, and VeraCrypt actually compare for encrypting a data hoard at rest.</description><content:encoded><![CDATA[<p>Most data hoarding advice is about keeping data alive: redundancy, checksums, off-site copies. Almost none of it is about keeping that data private if a drive leaves your control. And drives leave your control more often than people think - a failed disk goes back to the manufacturer under warranty, a drive gets sold or handed off once you upgrade capacity, a laptop or external drive gets lost or stolen. If none of that data was encrypted, every one of those events is a potential data breach, not just an inconvenience.</p>
<p>This is the piece that&rsquo;s easy to skip because it doesn&rsquo;t feel urgent the way a dead drive does. It only matters on the day it matters, and by then it&rsquo;s too late to retroactively encrypt a drive that already left the building unencrypted.</p>
<h2 id="what-encryption-at-rest-actually-protects-against">What &ldquo;encryption at rest&rdquo; actually protects against</h2>
<p>Encryption at rest protects data on a drive that is powered off or otherwise not actively unlocked. It does <strong>not</strong> protect against:</p>
<ul>
<li>A compromised, already-unlocked system (if someone has shell access to a live, mounted encrypted volume, encryption isn&rsquo;t doing anything at that point)</li>
<li>Malware or ransomware running under your own user account</li>
<li>You forgetting the passphrase and having no recovery key saved anywhere</li>
</ul>
<p>It <strong>does</strong> protect against:</p>
<ul>
<li>A drive being physically removed, lost, stolen, or improperly disposed of</li>
<li>A failed drive going back to a manufacturer or recycler with your data still readable on the platters</li>
<li>Someone with physical access to a powered-off machine pulling a drive</li>
</ul>
<p>If your threat model is &ldquo;what happens when hardware leaves my control,&rdquo; encryption at rest is the right tool. If your threat model is &ldquo;what happens if my running server gets compromised,&rdquo; you need different controls entirely (network segmentation, backups that aren&rsquo;t reachable from the compromised host, etc.) - encryption at rest won&rsquo;t save you there.</p>
<h2 id="the-three-real-options">The three real options</h2>
<h3 id="luks-linux-unified-key-setup">LUKS (Linux Unified Key Setup)</h3>
<p>LUKS is the standard block-device encryption layer on Linux, sitting underneath whatever filesystem you put on top of it (ext4, XFS, even a ZFS pool&rsquo;s member vdevs, though that&rsquo;s an unusual combination). It encrypts the entire block device, so everything written to it, filesystem metadata included, is opaque without the key.</p>
<p><strong>Strengths:</strong></p>
<ul>
<li>Mature, extremely well-audited (it&rsquo;s been the Linux standard for two decades), no filesystem-specific quirks to learn</li>
<li>Works under literally any filesystem you put on top of it</li>
<li>Supports multiple key slots, so you can have a passphrase for daily unlock and a separate recovery key stored somewhere safe, without sharing one secret between both uses</li>
<li>TPM-backed auto-unlock is well-supported (<code>clevis</code> + <code>tang</code>, or <code>systemd-cryptenroll</code> with a TPM2 chip) if you want a server to unlock itself on boot without typing a passphrase into a headless machine</li>
</ul>
<p><strong>Weaknesses:</strong></p>
<ul>
<li>It&rsquo;s a block-device layer, not filesystem-aware, so it doesn&rsquo;t get any of ZFS&rsquo;s self-healing/checksum benefits for free, you still need those from the filesystem on top</li>
<li>Per-drive LUKS containers in a multi-drive array mean you&rsquo;re unlocking N separate volumes, which is more key management overhead than a single ZFS pool with native encryption</li>
<li>No built-in replication or send/receive story, that&rsquo;s the filesystem&rsquo;s job if you layer one on top</li>
</ul>
<p><strong>Best fit:</strong> a non-ZFS array (mdadm/LVM, or a single external drive), or any setup where you specifically want the encryption layer decoupled from the filesystem.</p>
<h3 id="zfs-native-encryption">ZFS native encryption</h3>
<p>Added in ZFS 0.8 (OpenZFS), this encrypts data at the dataset level rather than the whole pool, meaning you can have encrypted and unencrypted datasets side by side in the same pool, each with its own key. The pool structure and dataset names remain visible unencrypted; only data content and most metadata are encrypted.</p>
<p><strong>Strengths:</strong></p>
<ul>
<li>Fits straight into an existing ZFS workflow if you&rsquo;re already running ZFS for the pool-layout reasons covered in the <a href="/proxmox/zfs-storage-pools-in-proxmox/">ZFS pool layout guide</a> - no extra layer, no extra tooling</li>
<li>Per-dataset keys mean you can encrypt just the sensitive dataset (say, a <code>tank/documents</code> dataset) and leave bulk media unencrypted if you don&rsquo;t care about privacy for that content, saving the CPU overhead where you don&rsquo;t need it</li>
<li><code>zfs send</code>/<code>zfs receive</code> can transmit encrypted datasets <strong>without decrypting them first</strong>, so an off-site replication target never needs the key at all, it just holds encrypted blocks it can&rsquo;t read. That&rsquo;s a genuinely unique property neither LUKS nor VeraCrypt gives you cleanly.</li>
<li>Native AES-GCM/AES-CCM, hardware-accelerated on any modern CPU with AES-NI, overhead is close to negligible in practice</li>
</ul>
<p><strong>Weaknesses:</strong></p>
<ul>
<li>Some metadata (dataset names, snapshot names, properties) is not encrypted, so it leaks structural information even with data encrypted - usually a non-issue, but worth knowing</li>
<li>Raw send (<code>zfs send -w</code>) for encrypted datasets has had real historical bugs around certain edge cases in older OpenZFS versions; keep your ZFS version current and test a restore before trusting it blind</li>
<li>Key management is pool/dataset-specific, different mental model if you&rsquo;re used to LUKS&rsquo;s single-block-device-per-key approach</li>
</ul>
<p><strong>Best fit:</strong> anyone already running ZFS (TrueNAS, Proxmox-with-ZFS, a DIY ZFS box) who wants selective, low-overhead encryption that plays nicely with send/receive-based off-site backups.</p>
<h3 id="veracrypt">VeraCrypt</h3>
<p>VeraCrypt (the actively maintained successor to the abandoned TrueCrypt) creates encrypted containers or encrypts whole volumes, and crucially, it&rsquo;s cross-platform: Windows, macOS, and Linux all read the same container format. It also supports hidden volumes (plausible deniability via a decoy volume) which neither LUKS nor ZFS offer.</p>
<p><strong>Strengths:</strong></p>
<ul>
<li>The only option here that&rsquo;s genuinely cross-platform without extra tooling, if you need the same encrypted volume readable from both a Linux NAS and a Windows desktop, this is the practical answer</li>
<li>Container-file mode means you don&rsquo;t need to dedicate a whole physical drive or partition, a single large file can be the encrypted volume, which is convenient for portable/removable media</li>
<li>Hidden volume support, a real feature if your threat model includes someone compelling you to reveal a password</li>
</ul>
<p><strong>Weaknesses:</strong></p>
<ul>
<li>Container-file mode adds a filesystem-on-top-of-a-file-on-top-of-a-filesystem layer, with the performance and complexity overhead that implies, not ideal for a large active media library</li>
<li>No native integration with ZFS/RAID redundancy or checksumming, it&rsquo;s a straightforward encryption layer with no awareness of what&rsquo;s underneath or on top</li>
<li>Mounting/unmounting at scale (dozens of TB, many datasets) is clunkier than LUKS&rsquo;s or ZFS&rsquo;s native tooling, VeraCrypt is built around the mental model of a handful of volumes, not a large multi-dataset archive</li>
</ul>
<p><strong>Best fit:</strong> portable/removable drives, cross-platform shares, or any case where the encrypted volume genuinely needs to be read on a non-Linux machine without a Linux-specific driver stack.</p>
<h2 id="the-decision-in-practice">The decision in practice</h2>
<p>For a homelab data hoard specifically, the choice usually comes down to what you&rsquo;re already running:</p>
<ul>
<li><strong>Already on ZFS (TrueNAS, Proxmox ZFS pool, DIY OpenZFS box):</strong> use ZFS native encryption. It&rsquo;s already there, the overhead is minimal, and the encrypted-send-to-off-site-target property is a real, concrete win if you&rsquo;re doing <code>zfs send</code>-based off-site backups per the <a href="/data-hoarding/3-2-1-backup-strategy/">3-2-1 backup guide</a>.</li>
<li><strong>mdadm/LVM array, or a filesystem other than ZFS:</strong> LUKS underneath whatever filesystem you&rsquo;re using. It&rsquo;s the most mature option and doesn&rsquo;t care what&rsquo;s on top of it.</li>
<li><strong>A drive or volume that needs to move between Linux, Windows, and Mac, or that you want to carry around:</strong> VeraCrypt. Nothing else here is genuinely cross-platform.</li>
</ul>
<h2 id="key-management-is-the-part-people-skip">Key management is the part people skip</h2>
<p>Whichever option you pick, the encryption itself is the easy part. The failure mode that actually bites people is losing the key.</p>
<ul>
<li><strong>Store a recovery key somewhere that isn&rsquo;t the encrypted drive itself.</strong> A LUKS header backup (<code>cryptsetup luksHeaderBackup</code>), a ZFS wrapping key, or a VeraCrypt volume header backup all need to live somewhere independent of the volume they unlock, a password manager, a printed copy in a safe, a separate encrypted USB stick kept elsewhere.</li>
<li><strong>Test the recovery path before you need it.</strong> Restore from the backup key on a spare machine at least once. A recovery key you&rsquo;ve never actually used to unlock anything is a recovery key you don&rsquo;t actually know works.</li>
<li><strong>Decide your unlock model up front for anything headless.</strong> A home server that reboots unattended needs either a TPM-backed auto-unlock (LUKS+TPM2, or a ZFS key stored in a protected location) or someone physically present to type a passphrase after every reboot, including after a power outage your UPS didn&rsquo;t fully cover. Pick one deliberately rather than discovering the gap the first time the server reboots while you&rsquo;re not home.</li>
</ul>
<p>None of this is exotic cryptography. It&rsquo;s standard, well-supported tooling on every platform covered here. The only real risk is treating it as optional because a dead or stolen drive feels like someone else&rsquo;s problem, right up until it&rsquo;s an unencrypted drive with your data on it in someone else&rsquo;s hands.</p>
]]></content:encoded></item></channel></rss>