Security
How Face ID Actually Protects Your Data (Secure Enclave Deep-Dive)
How Face ID works security-wise: the Secure Enclave, the TrueDepth camera, the 1 in 1,000,000 false match odds, and the threats Face ID does and does not cover.

Quick answer: Face ID projects more than 30,000 infrared dots, builds a depth map of your face, and compares it with a template protected by the Secure Enclave. If it matches, the Secure Enclave allows the keys that protect your data to be used. Your face data never leaves the iPhone, and Apple puts the odds of a random stranger unlocking it at 1 in 1,000,000. Face ID does not encrypt anything itself; it gates access to keys.
What is the Secure Enclave?
The Secure Enclave is a separate security coprocessor built into every iPhone since the 5s. It runs its own small operating system (sepOS), has its own encrypted memory, and talks to iOS only through a narrow interface. Apple designs it to keep keys safe even if an attacker fully controls iOS.
The Secure Enclave protects your Face ID and Touch ID data, generates and guards cryptographic keys, and takes part in Data Protection, the system that encrypts files on the iPhone with keys tied to your passcode. It does not hold your photos or notes. Those stay on the flash storage, encrypted, and become readable only when the right passcode or biometric match lets the keys be used.
How does the Face ID match work?
The TrueDepth camera floods your face with infrared light, projects a known pattern of more than 30,000 dots, and reads how each dot shifts on your face. That shift pattern is a depth map. A neural network turns the depth map and an infrared image into a mathematical representation that is compared with your enrolled template.
Apple says the network was trained on over a billion images and is hardened against photos and masks. If the match score clears the threshold, the Secure Enclave signals a successful authentication for that unlock.
Apple's published numbers: a 1 in 1,000,000 chance that a random person could unlock your iPhone with Face ID, versus 1 in 50,000 for Touch ID. The odds are worse for twins, siblings who look alike, and children under 13. The iPhone asks for the passcode after a restart, after 48 hours without unlocking, after five failed Face ID attempts, and after the emergency button shortcut.
How does Face ID gate encryption keys?
Face ID does not encrypt data. On iPhone, storage is encrypted by a hardware AES-256 engine with keys derived from your passcode and a unique hardware key. A successful Face ID match lets the Secure Enclave unlock those keys without you typing the passcode again. Apps can use the same mechanism for their own secrets.
The flow when you unlock your phone:
- You glance at the iPhone. TrueDepth projects the dots and the infrared camera reads them.
- The image data is processed in a protected path and matched against your template under Secure Enclave protection.
- On a match, the Secure Enclave makes the Data Protection keys available again.
- Files protected by your passcode become readable until the phone locks.
- Apps can also store a secret in the Keychain that requires a fresh Face ID check (for example with the
biometryCurrentSetaccess control). iOS releases it only after the Secure Enclave confirms a match.
Apps use Face ID in two different ways, and the difference matters. Some only ask iOS “did the owner just authenticate?” and then show the content, which is an access gate. Others keep an encryption key in the Keychain that only a Face ID match can release, so the biometric check unlocks an actual key.
How does Secure Notes use Face ID?
On iPhone and iPad, Secure Notes uses Face ID or Touch ID through Apple's standard authentication to open the app lock, and you can lock single notes and folders too. The notes themselves are protected by iOS Data Protection, so they are encrypted at rest by the iPhone whenever it is locked. The app does not add its own encryption to notes.
On Android, fingerprint or face unlock goes through BiometricPrompt and the Android Keystore, which releases a key that unwraps the master key of the AES-256 encrypted vault. Your PIN is the other way in, and 12 recovery words are the fallback if you forget it. See our security page for the full model and how to set up Face ID for notes for the steps.
What can Face ID not protect against?
Face ID is strong against strangers and weak against anyone who can hold the phone up to your face. It also cannot stop someone reading the screen once you have unlocked, and it cannot reliably tell identical twins apart. Know these limits and keep a strong passcode behind it.
- Forced unlock. Someone holds your phone up to your face. You can refuse to say a passcode; you cannot refuse to have a face. Use the emergency shortcut first if you can.
- Sleeping or unconscious users. If attention detection is off, closed eyes still unlock. Keep it on.
- Identical twins. Apple says Face ID may not tell them apart. Use the passcode if that is a real concern.
- After a restart. Until the first unlock after a reboot, the iPhone requires the passcode and most data stays encrypted with keys that are not available. Restarting before a border crossing or another high-risk moment raises the bar.
- Shoulder surfing. Once content is on screen, Face ID does nothing about a camera over your shoulder.
The practical setup: Face ID for convenience on top of a strong passcode. Learn the shortcut: press and hold the side button and either volume button until the power off slider appears, then cancel, and the next unlock needs the passcode. Restart before high-risk crossings. And keep sensitive notes locked in an app with its own lock, so an unlocked phone does not mean unlocked notes.
Frequently asked: Face ID security
Can Face ID be fooled by a photo?
No. Face ID uses the TrueDepth camera to project more than 30,000 infrared dots and read the depth map they create, so a flat photo has no depth and is rejected. Researchers have fooled it only with elaborate custom masks. Apple cites a 1 in 1,000,000 chance that a random person could unlock your iPhone, versus 1 in 50,000 for Touch ID.
Where is the Face ID data stored?
Face ID data is encrypted and protected by the Secure Enclave, a dedicated security coprocessor on Apple chips that is isolated from the main processor. The mathematical representation of your face never leaves the device. It is not synced to iCloud, not included in backups, and not available to Apple or to the apps you install.
Can someone unlock my phone while I'm asleep?
Not with the default settings. Face ID checks for attention, meaning open eyes looking at the phone, so a sleeping face does not unlock it. If you turned off Require Attention for Face ID in Settings, Face ID and Passcode, someone could hold the phone up to your closed eyes and unlock it. Leave attention detection on.
What is the Secure Enclave?
The Secure Enclave is a dedicated security coprocessor in every iPhone since the iPhone 5s. It runs its own operating system (sepOS) with its own encrypted memory, separate from the main processor. It protects biometric data, generates and guards cryptographic keys, and supports Data Protection and Apple Pay. It is designed to stay isolated even if iOS itself is compromised.
Is Face ID more secure than a passcode?
It depends on the attacker. Against a stranger, Face ID's 1 in 1,000,000 false match odds are comparable to guessing a 6-digit passcode on the first try. Against someone who can force you, such as a partner or a mugger, a passcode is harder to extract than a face. Best practice: use both, with a long alphanumeric passcode as the fallback.
Can police force me to unlock with Face ID?
In the United States, courts are split. Some have held that a face or fingerprint unlock can be compelled while a passcode is protected by the Fifth Amendment. This is not legal advice. In a high-risk moment, press and hold the side button and either volume button until the power off slider appears: the iPhone then requires the passcode on the next unlock.
Keep reading
