Archive-Opsec

Search

/ to open · ↑↓ to move · Enter to open

Indexes guides, archive entries, news, resources and sources. Nothing is sent to a third party.

Guide categories

Operating Systems

Full-Disk Encryption

What FDE does and does not protect against, and how to set it up without losing the recovery key.

Full-disk encryption encodes the entire contents of a storage device and only decrypts it once the correct key is presented. On a powered-off or locked device, the contents are unreadable. It is the single most effective control against device loss and theft.

What it protects against

  • A stolen, powered-off laptop. The disk contents are ciphertext.
  • A stolen, powered-on but locked device, provided the key is held in hardware.
  • Recovery of files from a discarded or resold drive, which is the case most often forgotten.
  • Untargeted disk-imaging attacks, where an adversary pulls the drive and processes it offline at leisure.

What it does not protect against

Where the key lives

ApproachHow the key is releasedTrade-off
TPM-backedThe platform’s secure hardware releases the key after verifying boot integrityBest balance: no password at boot, and it does not release to a modified system
TPM plus PINAs above, with a second factor you must enter at bootResists someone who removes the drive and puts it in another machine
Password onlyThe passphrase decrypts the key directlyPortable between machines; protected only by the passphrase

Setting it up

Windows — BitLocker. The device must have TPM 2.0 and secure boot. Save the recovery key, and decide deliberately whether to also require a PIN.

macOS — FileVault. Enable from System Settings; the recovery key is escrowed to an Apple account only if you choose that.

Linux — LUKS. Straightforward and fully under your control:

bash
# Encrypt a new partition during installation, or afterwards
cryptsetup luksFormat --type luks2 /dev/nvme0n1p3
cryptsetup open /dev/nvme0n1p3 luks_crypt
mkfs.ext4 /dev/mapper/luks_crypt

With a header and keyfile for a machine you manage yourself:

bash
# 1. Create the encrypted container
cryptsetup luksFormat --type luks2 --cipher aes-xts-plain64 --key-size 512 /dev/sdb1

# 2. Back up the header. If this volume's header is lost, the data is unrecoverable.
cryptsetup luksHeaderBackup /dev/sdb1 --header-backup-file luks-header-backup.bin

# 3. Create and open it
cryptsetup open --type luks2 /dev/sdb1 crypt_archive
mkfs.xfs /dev/mapper/crypt_archive

A very large LUKS2 header with additional integrity protection is worth considering for long-lived archives:

bash
cryptsetup luksFormat --type luks2 \
  --integrity hmac-sha256 \
  --key-size 512 \
  --cipher aes-xts-plain64 \
  /dev/sdb1

Do not forget

  1. Store the recovery key in a password manager and, ideally, printed somewhere separate from the device.
  2. Store the LUKS header backup separately from the drive it unlocks.
  3. Verify the recovery path once: restore from the recovery key, or unlock the header backup on a different machine.
  4. If the device is reinstalled, a new encryption setup is not automatically a continuation of the old one. Check what you expect to still be readable.

Sources

Sources

  1. NIST SP 800-111: Guide to Storage Encryption Technologies for End User Devices National Institute of Standards and Technology standard Accessed
  2. LUKS2 On-Disk Format Specification The cryptsetup project standard The on-disk format specification, maintained by the cryptsetup project. This is not an IETF standard and never was: an earlier citation to draft-camara-hw-encrypted-luks pointed at a draft that was never published. Accessed
  3. About BitLocker Microsoft Corporation docs Accessed
  4. FileVault and other security protections for a Mac Apple Inc. docs Accessed
  • Guide Introductory

    Encryption Explained (Guide)

    Encryption in transit and at rest, symmetric and asymmetric primitives, and the misconceptions that make people over- or under-trust it.

  • Guide Advanced

    Key Management (Guide)

    The part of cryptography that actually determines whether it helps: who holds keys, where, and for how long.

  • Guide Intermediate

    Mobile Device Privacy (Guide)

    What a phone knows that a laptop does not, which platform settings matter, and the limits of user control.