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
| Approach | How the key is released | Trade-off |
|---|---|---|
| TPM-backed | The platform’s secure hardware releases the key after verifying boot integrity | Best balance: no password at boot, and it does not release to a modified system |
| TPM plus PIN | As above, with a second factor you must enter at boot | Resists someone who removes the drive and puts it in another machine |
| Password only | The passphrase decrypts the key directly | Portable 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:
# 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_cryptWith a header and keyfile for a machine you manage yourself:
# 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_archiveA very large LUKS2 header with additional integrity protection is worth considering for long-lived archives:
cryptsetup luksFormat --type luks2 \
--integrity hmac-sha256 \
--key-size 512 \
--cipher aes-xts-plain64 \
/dev/sdb1Do not forget
- Store the recovery key in a password manager and, ideally, printed somewhere separate from the device.
- Store the LUKS header backup separately from the drive it unlocks.
- Verify the recovery path once: restore from the recovery key, or unlock the header backup on a different machine.
- 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
- NIST SP 800-111 — storage encryption for end-user devices, including pre-boot authentication and the threat model.
- LUKS specification — the on-disk format, key slots, and integrity options.
- Microsoft: About BitLocker — device requirements and the TPM model.
- Apple: FileVault — the platform description, including what it protects against on a Mac.
Topics
Sources
- NIST SP 800-111: Guide to Storage Encryption Technologies for End User Devices Accessed
- LUKS2 On-Disk Format Specification 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
- About BitLocker Accessed
- FileVault and other security protections for a Mac Accessed
Related guides
-
Guide Intermediate
Operating System Hardening Basics (Guide)
A short, durable hardening routine: updates, permissions, encryption, telemetry, and what to leave alone.
-
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.