Glossary
Data Protection Class
iOS Data Protection classes (A to D) decide when each file's key is available: only while unlocked, after first unlock, or always. Why that limits forensics.
On iOS every file is encrypted with its own key, and that key is wrapped by a class key chosen by the app or the system when the file is created. The class decides when the file can be read:
| Class | Name in the API | Key available |
|---|---|---|
| A | NSFileProtectionComplete | Only while the device is unlocked (shortly after locking, the key is discarded) |
| B | NSFileProtectionCompleteUnlessOpen | Files can be written while locked; reading needs the device unlocked |
| C | NSFileProtectionCompleteUntilFirstUserAuthentication | From the first unlock after boot until the next reboot. The default for most app data |
| D | NSFileProtectionNone | Always (protected only by the device's hardware key) |
Class keys derive from the user's passcode combined with a key held in the device's Secure Enclave, so they cannot be brute-forced off the device. This is why the device's state matters so much: in BFU state only class D data and a few system files can be read, while an AFU device exposes class C data such as most databases on this site.
Backups carry the class of each file in Manifest.db, and encrypted backups re-wrap file keys with a backup keybag protected by the backup password. See iOS acquisition for how classes shape each acquisition method.