FileVault 2 is Apple’s full-disk encryption, used on OS X 10.7 and later with CoreStorage, and on APFS volumes since macOS 10.13. It is standard on many Macs, and unlocking needs the user password, recovery key or institutional key.
Overview
On Core Storage volumes FileVault 2 stores an encrypted volume key in the Core Storage metadata, wrapped by user and recovery keys; data is encrypted with AES-XTS. On APFS, encryption is native, with a keybag listing per-user and recovery key wraps. Unlocking requires a password or recovery key.
History
Introduced in Mac OS X Lion 10.7 (2011), replacing the older home-folder-based FileVault.
APFS native encryption arrived in macOS High Sierra (2017).
Structures
Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.
Check Header
Offset
Size
Type
Field
Notes
0x8
2
u16 LE
–
0x48
8
u64 LE
–
0x58
1
u8
–
0x59
1
u8
–
0x60
4
u32 LE
Block Size
Parse Family
Offset
Size
Type
Field
Notes
0x68
4
u32 LE
Compressed
0x6C
4
u32 LE
Uncompressed
0x70
4
u32 LE
Xml Offset
0x74
4
u32 LE
Xml Size
Parse Family
Offset
Size
Type
Field
Notes
0x4
4
i32 LE
Salt Length
0x4
4
i32 LE
Length
0x18
4
i32 LE
Key Length
0x1C
4
i32 LE
Wrapped Length
0xA8
4
i32 LE
Iterations
Parse Map
Offset
Size
Type
Field
Notes
0x8
8
u64 LE
Logical
0x10
4
u32 LE
Blocks
0x20
8
u64 LE
Physical
0x26
2
u16 LE
Pv
Parse Volume
Offset
Size
Type
Field
Notes
0x80
4
u32 LE
Xml Offset
0x84
4
u32 LE
Xml Size
Read Encrypted Metadata
Offset
Size
Type
Field
Notes
0x8
2
u16 LE
–
0xA
2
u16 LE
Type
0x10
8
u64 LE
Transaction
Read Header
Offset
Size
Type
Field
Notes
0xA8
4
u32 LE
–
0xB0
16
bytes
–
0x130
16
bytes
–
0x140
16
bytes
–
104 + copy * 8
8
u64 LE
–
Read Label
Offset
Size
Type
Field
Notes
0x8
8
u64 LE
Count
0x20
8
u64 LE
Primary
0x28
8
u64 LE
Secondary
Read Label
Offset
Size
Type
Field
Notes
0xA
2
u16 LE
–
0x10
8
u64 LE
Transaction
0xDC
4
u32 LE
Descriptor
0xE0
4
u32 LE
Plist Offset
0xE4
4
u32 LE
Plist Size
Verify Crc
Offset
Size
Type
Field
Notes
0x0
4
u32 LE
Stored
0x4
4
u32 LE
Crc
Aes Key Unwrap
Offset
Size
Type
Field
Notes
0x0
8
bytes
–
0x8
8
bytes
–
Looks Decrypted
Offset
Size
Type
Field
Notes
0x400
512
bytes
–
0x400
1
u8
–
0x401
1
u8
–
Other fields read
Read in
Offset
Size
Type
Field
Notes
Parse Map
0x40
4
u32 LE
Count
Verify Crc
i
8
u64 LE
Crc
Aes Key Unwrap
0x0
8
u64 BE
Value
Constants
Core Storage Metadata
Name
Value
Type
Notes
HeaderSize
512
int
MetadataBlockSize
8192
int
The group’s plist: its PV list gives the PV indexes.
Name
Value
Type
Notes
ChunkBlocks
64
int
File Vault Decrypted Device
Name
Value
Type
Notes
Sector
512
int
Implementation limits
Class
Name
Value
Notes
Core Storage Metadata
MaxMetadataBlocks
1 << 17
File Vault Decrypted Device
MaxChunkBytes
1024 * 1024
File Vault Keys
DefaultIv
[0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6]
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.