Sub topic 2
How full-disk encryption protects data at rest
This chapter assumes you can use System Settings and run a command in Terminal. It also assumes you know that a Mac stores files on a disk. It covers the ideas behind disk encryption. The next chapters cover turning FileVault on and choosing a recovery method.
What "data at rest" means
Data exists in three states:
- At rest: stored on a drive while the computer is off or locked.
- In transit: moving across a network.
- In use: loaded into memory and being processed by running programs.
Full-disk encryption addresses the first state only. It protects the bytes written to the drive. If someone removes the drive, boots the Mac from another system, or reads the storage directly, they see scrambled data instead of your files.
It does not protect data in transit, such as web traffic. It also does not protect data in use. Once you log in and the disk is unlocked, any program running as you can read your files normally.
The threat it answers
The threat model chapter introduced theft and loss. Disk encryption is the control for that case. A thief who has the Mac but not your password should not be able to read your documents, browser sessions, saved credentials, or mail.
Without encryption, a password-protected login screen gives less protection than it seems to. The login password only gates the operating system. An attacker can bypass the operating system by:
- Starting the Mac from an external disk or recovery environment.
- Connecting the Mac to another computer in a disk-sharing mode.
- Removing the storage and attaching it to another machine (possible on older Macs with removable drives).
In each case the files themselves are still readable, because nothing protects them except the operating system's access checks. Encryption moves the protection into the data itself.
How encryption works, in plain terms
Encryption uses an algorithm and a key. The algorithm turns readable data (plaintext) into unreadable data (ciphertext). Only someone with the correct key can reverse it. Modern algorithms are public and well studied, so the security depends on keeping the key secret.
macOS uses AES, the Advanced Encryption Standard. Apple documents that FileVault uses AES in XTS mode with 128-bit blocks and a 256-bit key. XTS mode is designed for storage devices. It makes the ciphertext of each disk block depend on that block's position, so two identical blocks in different places look different.
Disk encryption is transparent. The system encrypts data as it writes to the drive and decrypts it as it reads. Programs never see ciphertext, and you do not manage individual files.
The key hierarchy
The system does not encrypt your files directly with your password. A password is short and changeable, and re-encrypting a whole disk every time you change it would be slow. macOS uses layers of keys instead.
- A volume encryption key encrypts the actual data on the volume.
- The volume key is itself stored encrypted ("wrapped") by a key encryption key.
- The key encryption key is derived from secrets such as your login password. On modern Macs it is also combined with a key that never leaves the hardware.
This design has practical consequences:
- Changing your password is fast. macOS re-wraps the small volume key. It does not re-encrypt the disk.
- Multiple users and recovery methods can each unlock the same volume. Each has its own wrapped copy of the volume key. A recovery key or iCloud account is simply another path to unwrap it. The recovery chapter returns to this.
- Erasing the Mac can be nearly instant. If the volume key is destroyed, the ciphertext becomes permanently unreadable. This is called cryptographic erase, and Erase in Find My relies on the same idea.
Intel and Apple silicon differ
The hardware inside your Mac changes what happens when FileVault is off. You can check which kind you have with uname -m.
uname -mThe command prints arm64 on Apple silicon and x86_64 on Intel.
| Mac type | Encryption hardware | FileVault off | FileVault on |
|---|---|---|---|
| Apple silicon | AES engine in the processor, keys tied to the Secure Enclave | Internal storage is still encrypted, but the key does not depend on your password | The key is protected by your password, so the data needs it |
| Intel with a T2 security chip | AES engine in the T2 chip | Same as Apple silicon | Same as Apple silicon |
| Intel without a T2 chip | Software encryption on the main processor | Data is stored unencrypted | Data is encrypted, keyed from your password |
The middle column surprises many people. On Apple silicon and T2 Macs, the internal drive is always encrypted, so a removed storage chip is useless on another machine because the hardware key stays behind. But with FileVault off, the Mac can derive the volume key on its own at startup. Anyone who can reach the login screen is, in effect, a user the disk trusts. The only barrier to your data is the operating system's login window and its access controls.
Turning FileVault on changes that. The volume key can no longer be unwrapped without your password (or a recovery method). So on every Mac type, FileVault is what makes your password part of the cryptography, not just a check performed by software.
What the hardware key adds
On Macs with a Secure Enclave, part of the key material is generated inside the chip and cannot be extracted. This has two effects.
First, an attacker cannot copy the encrypted data to a powerful machine and guess passwords at high speed. Every guess has to be processed by the Mac's own hardware, which rate-limits attempts. Second, repeated wrong attempts at the login screen cause increasing delays.
This helps a moderate password a great deal, but it does not rescue a weak one. A password such as password1 is still guessed quickly. A long passphrase is the strongest control you control.
When the disk is locked and unlocked
Encryption protects the disk only while the keys are unavailable. The sequence on a FileVault Mac looks like this:
- You start the Mac. The disk is locked.
- The pre-boot login screen asks for a password. Entering a correct one unwraps the volume key.
- The volume key is held in a protected form while the Mac runs, and the system reads and writes data normally.
- You shut down. The key is gone from memory, and the disk is locked again.
Sleep and screen lock are in-between states. On a Mac that is asleep or has a locked screen, the volume key is usually still available in memory, because the system must keep working. The encryption is not protecting you against someone who gets your running, logged-in Mac. The screen lock and login password protect you there, and they are software controls, not encryption.
Shutting down is the strongest state for a Mac you are leaving somewhere risky, such as a hotel room or checked luggage. A powered-off, FileVault-protected Mac gives an attacker only ciphertext.
macOS also has an option to remove the key from memory when the Mac goes into standby. You can read the current setting with the power management tool.
pmset -g | grep -i destroyfvkeyIf the setting is present, a value of 1 means the key is discarded on standby, and 0 means it is kept. If the command prints nothing, your Mac does not list the setting. Do not change this casually. Discarding the key means you must enter your password when waking from standby, and some Mac models do not support the option the same way.
Checking the state of the disk
You can confirm whether encryption is active without opening System Settings. The fdesetup command reports FileVault status.
fdesetup statusYou will see FileVault is On. or FileVault is Off. If encryption is still running after you enable it, the output also shows progress. Encryption continues in the background, and you can keep using the Mac.
For more detail per volume, use diskutil. This script combines the checks:
#!/bin/bash
# Summarize disk encryption state for this Mac.
echo "Architecture: $(uname -m)"
echo "FileVault: $(fdesetup status | head -n 1)"
echo
echo "Per-volume details:"
diskutil apfs list | grep -E "Name:|FileVault:"In the diskutil output, a line such as FileVault: Yes (Unlocked) means the volume is encrypted with FileVault and currently unlocked, which is the normal state while you use the Mac. The word in parentheses tells you the current lock state, not whether the data is encrypted.
Note that fdesetup status can show FileVault off on an Apple silicon Mac whose internal storage is still hardware-encrypted. The tool reports whether FileVault protection is enabled, meaning keys tied to your credentials. It does not report the always-on hardware layer.
What full-disk encryption does not protect
Be clear about the limits so you do not rely on it for the wrong job.
- A running, unlocked Mac. If an attacker has your session, the disk is already decrypted for them.
- Malware running as you. Malware reads files through the operating system, which decrypts them on request.
- Network attacks. Encryption at rest does nothing for connections. That is the firewall's and your own habits' role.
- A weak password. If the password is easy to guess, the key hierarchy rests on it.
- Lost recovery credentials. If you lose both your password and your recovery method, you lose the data, and Apple cannot unlock the volume for you.
- Other storage. FileVault covers the startup disk. External drives, USB sticks, and cloud copies have their own protections, or none.
- Files you share. Once you email or upload a file, it leaves the encrypted volume as ordinary data.
- Backups. A Time Machine backup is a copy on another drive. Encrypt backup disks when you set them up.
Putting the idea to use
The practical rule is short. Enable FileVault so your password becomes part of the key. Use a long password. Shut down when the Mac will be unattended in an untrusted place. Treat the logged-in session as fully exposed, and rely on other controls for that case.
The next chapter walks through turning FileVault on in System Settings.
Exercise
A coworker says, "My Apple silicon Mac always encrypts its internal drive, so FileVault is pointless." What is wrong with this reasoning?
Show answer
The always-on hardware encryption protects against reading the storage on another machine, but with FileVault off the Mac can unlock the volume key by itself at startup. Anyone who gets past the login window (or boots in a way that reaches the data) is not blocked by cryptography. FileVault ties the volume key to your password or a recovery method, so the data cannot be unlocked without those credentials.
Exercise
You change your login password. Why does macOS not need to re-encrypt the entire disk, and what does it do instead?
Show answer
The data is encrypted with a volume encryption key, not directly with your password. Your password is used to derive a key encryption key that wraps the volume key. Changing the password only requires re-wrapping the small volume key with the new derived key, so the bulk data stays untouched.
Exercise
Your FileVault Mac is asleep with the screen locked on a desk in a shared office. Does disk encryption protect your files from someone with physical access? Explain.
Show answer
Not mainly. While the Mac is asleep or locked, the volume key is normally still in memory, so the disk is effectively unlocked and the lock screen and login password are the software controls in the way. Disk encryption is strongest when the Mac is shut down, because then the key is gone and only ciphertext remains.