Skip to content

APFS Encrypted vs FileVault: How macOS Disk Encryption Actually Works

APFS vs APFS (Encrypted) vs FileVault: what each Disk Utility option does, why Apple silicon and T2 Macs are always encrypted, how to check a volume, and the key hierarchy underneath.

Published 9 min read

On a Mac with Apple silicon or a T2 chip, every byte written to the internal SSD is encrypted. Not by user choice — by default, by the hardware. On those Macs FileVault is not a feature you turn on to encrypt your disk; it's a feature you turn on to gate decryption behind your password. The underlying encryption is always there.

That is why Disk Utility's choice between APFS and APFS (Encrypted), and the separate FileVault switch in System Settings, confuse so many people. This article answers that question first, then walks how the encryption actually works — the keys, the SEP's role, and where the AES happens.

APFS vs APFS (Encrypted) vs FileVault

APFSAPFS (Encrypted)FileVault
Where you choose itDisk Utility → Erase → FormatDisk Utility → Erase → Format, or Finder → right-click a drive → EncryptSystem Settings → Privacy & Security → FileVault
Applies toAny volumeAny volume you format or convert, typically external drivesThe startup volume group (System + Data)
Internal SSD, Apple silicon / T2Already encrypted by the hardware, with a key protected only by the chip's UIDNot how the internal startup disk is protected; use FileVaultSame encryption; the key is now also bound to your login password
Internal SSD, older Intel Mac without T2Not encryptedEncrypted in softwareEncrypts the volume in software (a background conversion)
External drivesNot encryptedThe only option: the volume key is wrapped by a password you chooseNot applicable
Who can read the data if the disk is removedAnyone (external); nobody off-device on Apple silicon / T2 internal, because the key is tied to that MacAnyone with the passwordOnly with a user password or the recovery key, and only on that Mac
UnlockAutomaticPassword prompt when the drive is attached (can be saved in the keychain)At login: your user password unlocks the disk
Recovery if you forget the passwordNot neededNone. Lose the password and the data is goneRecovery key, or your Apple Account if you chose that option
Performance on Apple siliconInline AES engine, no measurable costExternal drives are encrypted by the main CPU (with its AES instructions), not the inline engine; overhead is small on modern MacsIdentical to not turning it on: the data was already encrypted

The short version:

  • Apple silicon or T2 Mac, internal disk: your data is always encrypted. Turn on FileVault so that a stolen Mac cannot be booted into your data without your password. Enabling it is instant, because nothing needs to be re-encrypted.
  • External drive: choose APFS (Encrypted), or right-click the drive in Finder and pick Encrypt, which converts it in place in the background. Store the password somewhere safe: there is no recovery key.
  • Plain APFS on an external drive means anyone who plugs it in can read it.

How to check if a volume is encrypted

fdesetup status
# FileVault is On.   (or: FileVault is Off.)

diskutil apfs list

In diskutil apfs list, each volume has a FileVault: line. Yes (Unlocked) means the volume's key is protected by a password (FileVault for the startup Data volume, APFS Encrypted for others) and is currently unlocked; No means it is not password-protected. On Apple silicon and T2 internal SSDs, No does not mean the data is stored in the clear: it means the hardware key alone unlocks it, which is exactly the gap FileVault closes.

To encrypt an existing external APFS volume from the command line instead of Finder:

diskutil apfs encryptVolume disk4s1 -user disk
# prompts for a new passphrase; encryption runs in the background
diskutil apfs list   # shows the progress on that volume

The key hierarchy

Encryption on modern Macs is layered:

  • Per-file key (FK) — a unique AES-XTS key for each file. Generated by the SEP at file creation.
  • Per-class key (PK) — wraps the per-file key. Multiple classes exist with different protections (e.g., "available always" vs "available only after user unlock").
  • Volume encryption key (VEK) — wraps the per-class keys.
  • Key encryption key (KEK) — wraps the VEK. The KEK is what user password / biometric unwrap.

When you read a file:

  1. The kernel reads the file's wrapped per-file key from its metadata and asks the Secure Enclave to unwrap it with the per-class key (available only while that class is unlocked).
  2. The SEP hands back the per-file key re-wrapped for the AES engine (see below), never in the clear.
  3. The AES engine decrypts the file's blocks with it as they come off flash.

When you write, the chain runs in reverse — a new per-file key is generated, the data is encrypted with it, and the key is stored in the file's metadata wrapped with the per-class key.

apple-oss-distributions/xnubsd/vfs/vfs_syscalls.cVFS where every file syscall lands — APFS's vnop_read/write under encryption transparently.View on GitHub(line —)

Where the AES actually happens

On Apple silicon (and in the T2), AES for the internal SSD is not done by the CPU. It's done by a dedicated AES engine on the path between memory and flash, which encrypts and decrypts at line rate.

The application processor never handles the raw keys:

  1. At boot, the Secure Enclave negotiates an ephemeral key with the AES engine.
  2. When a file is opened, its wrapped per-file key is unwrapped inside the Secure Enclave, re-wrapped with that ephemeral key, and handed back to the kernel.
  3. The kernel attaches the re-wrapped key to the I/O request. Only the AES engine can unwrap it, and it encrypts or decrypts the data as it flows through.

The result: block-level FileVault performance is identical to unencrypted on Apple Silicon. AES happens in dedicated silicon at zero CPU cost. Older Intel Macs paid a measurable cost (a few percent of disk bandwidth); Apple Silicon doesn't.

The Secure Enclave's role

Several things in the key hierarchy never leave the Secure Enclave:

  • The device UID — fused into the chip at manufacture, never readable.
  • The KEK — derived in the SEP from the user's password + device UID + a hardware secret.
  • The user authentication state — the SEP tracks whether the user has unlocked, for how long, with what method (password / Touch ID / Face ID).

When a user authenticates, the login process passes the password to the SEP. The SEP runs the key derivation entangled with the device UID, unwraps the KEK and then the VEK, and keeps them inside the enclave. What the kernel receives are keys re-wrapped for the AES engine, not the VEK or class keys in the clear.

Because the derivation needs the UID, which never leaves the SEP, password guessing has to happen on that Mac, where the SEP rate-limits attempts. It cannot be moved to a GPU cluster with a copy of the disk.

This is why a kernel exploit on the main CPU doesn't immediately compromise FileVault: the raw keys live in the SEP and the AES engine, not in kernel memory, and without the user's password the SEP will not unwrap the VEK in the first place.

What FileVault changes

If encryption is always on, what does turning on FileVault do?

  • Before FileVault: the VEK is protected by a key derived from the hardware alone (no user secret). The SEP can unwrap it at boot without user input. Disk is encrypted, but anyone who can boot the Mac gets to the data.
  • After FileVault: the VEK is also bound to the user password + hardware. The SEP will only unwrap it after the user types the password at the pre-boot login. Without the password (or the recovery key), disk contents are inaccessible.

In both cases, the AES on disk is identical. The difference is whether unwrapping requires a user secret.

This is why "turning on FileVault" is fast on modern Macs — it doesn't re-encrypt the disk (everything was already encrypted), it just changes how the VEK is wrapped. The actual disk content stays put.

Per-class keys and Data Protection

iOS pioneered the Data Protection classes; modern macOS uses them too:

  • Class A — Complete Protection — keys wiped immediately on device lock. Files inaccessible until unlock.
  • Class B — Protected Unless Open — files can be opened before lock; the open file stays accessible after lock until closed.
  • Class C — Protected Until First User Authentication — accessible after the first unlock-after-boot, then accessible until reboot.
  • Class D — No Protection — keys derived from hardware only; accessible at any time, including before user unlock.

On macOS, most user files are Class C — once you've logged in for the first time, the keys stay available. iOS uses Class A for sensitive files like the Mail app's database.

The class system is what lets your Mac wake from sleep and continue serving notifications, downloads, syncs without re-prompting for the password — Class C keys stay unlocked in the SEP until reboot.

Per-file keys — uniqueness matters

Why a per-file key? Two reasons:

  1. Forensic isolation. A single compromised key exposes one file, not the whole disk.
  2. Secure deletion. Deleting a file means destroying its per-file key. The encrypted blocks on disk become unreadable, even though the bits are still there. APFS marks per-file keys as deleted in metadata; the wear-leveling SSD eventually overwrites the blocks at its leisure.

The per-file key is generated by the SEP at file creation, wrapped with the per-class key, and stored in the file's metadata. There's one per file — millions of unique keys on a typical Mac.

What surprises newcomers

  • Disk is encrypted whether or not FileVault is on. FileVault gates the key; the encryption is unconditional.
  • Decryption of the internal SSD happens in the inline AES engine, not the CPU. AES is essentially free on Apple Silicon. External APFS (Encrypted) drives are the exception: the CPU does that work.
  • The kernel never holds the raw disk keys. It moves keys around only in a form wrapped for the AES engine.
  • Per-file keys make secure delete trivial. Throwing away the metadata key makes the file blocks permanently unreadable.

For the open-source bits Apple does publish:

apple-oss-distributions/SecurityOSX/libsecurity_keychain/lib/Keychain.cppKeychain — the high-level storage SEP-protected keys are exposed through.View on GitHub(line —) apple-oss-distributions/xnubsd/vfs/vfs_subr.cVFS plumbing — APFS's encryption is one layer below vfs from the kernel's view.View on GitHub(line —)

For the full architecture, Apple's Platform Security Guide is the definitive document.

And the APFS overview for the on-disk format encryption is layered onto.

Related

How Time Machine uses APFS snapshots for local backups, the per-hour/per-day/per-week retention policy, and what rollback actually does to your filesystem.
Every block on an APFS volume is reachable through one b-tree — the object map. Here's how it's laid out, how it survives a write, and why APFS is self-checksumming by design.
clonefile, fclonefileat, fs_snapshot — three syscalls that let you copy 50 GB in 50 milliseconds. Here's what happens under each one, and what doesn't get copied.