Sub topic 2
How full-disk encryption protects data at rest
This chapter assumes you can open System Settings and run a command in Terminal. It explains the idea behind FileVault before you turn it on in the next chapter. You need no cryptography background.
Data at rest and data in use
Data at rest is information stored on a disk while the computer is off or locked. Data in use is information that programs are reading or changing right now. Full-disk encryption protects data at rest. It does not stop malware from reading your files while you are logged in.
The risk it addresses is physical. If someone steals your Mac, they can try to bypass your login password. They might start the Mac in another mode, or they might remove the storage and read it from another machine. Without encryption, the files are readable that way. With encryption, the disk holds only scrambled data.
What encryption does
Encryption turns readable data (plaintext) into unreadable data (ciphertext) using a key. A key is a long secret number. Anyone with the key can reverse the process. Anyone without it sees noise.
Full-disk encryption applies this to everything on the startup volume: documents, apps' data, caches, and temporary files. You don't choose which files to protect. This matters because sensitive data often ends up in places you would not think to protect, such as a cache or a swap file.
Why you don't notice it
Encryption and decryption happen automatically as data moves between the disk and memory. Once you log in, the Mac unlocks the key it needs, and files open as usual. When you log out or shut down, the key is no longer available, and the disk contents are unreadable again.
Modern Macs make this fast. Apple silicon Macs and Macs with an Apple T2 Security Chip have dedicated hardware for encryption. Their internal storage is encrypted in hardware all the time. FileVault adds a further layer: it ties the keys to your login password, so the data is unreadable without it.
A chain of keys
The disk is not encrypted directly with your password. The design uses layers of keys:
- A volume encryption key encrypts the data on the disk.
- A key encryption key protects the volume key.
- Your login password, or a recovery method, unlocks the key encryption key.
This layering has a practical benefit. Changing your password re-protects the small key, not every file, so it happens instantly. It also explains why recovery needs a separate path: if you forget the password and have no recovery method, nothing can unlock the chain.
What it protects and what it doesn't
The table summarizes the scope. Keep it in mind, because the limits come up again in the final chapter.
| Situation | Protected by full-disk encryption? |
|---|---|
| Mac is shut down and stolen | Yes |
| Storage is removed and read elsewhere | Yes |
| Mac is stolen while logged in and unlocked | No |
| Malware runs on your account | No |
| Someone learns your password | No |
| You forget your password and have no recovery method | Data is lost to you too |
Checking whether a disk is encrypted
You can ask macOS about encryption from Terminal. This command lists the volumes on your system:
diskutil apfs listIn the output, look for the line that begins with FileVault:. It reads Yes or No for each volume. The next chapter shows how to turn FileVault on, and a later chapter covers the simpler fdesetup status command.
Exercise
A thief steals your Mac while it is shut down and FileVault is on. Why can't they read your files by moving the storage to another computer? Name one situation where FileVault would not help.
Show answer
The data on the disk is ciphertext, and the key to decrypt it is protected by your login password (or your recovery method), which the thief doesn't have. FileVault would not help if the Mac were stolen while logged in and unlocked, or if the thief knew your password.
Exercise
Why does changing your login password not require re-encrypting the whole disk?
Show answer
The password protects a key encryption key, which in turn protects the volume encryption key. Changing the password only re-protects the small key, while the volume key and the encrypted data stay the same.