Face ID, Secure Enclave, and Biometric Security
3D Depth vs 2D Photographs
Apple Face ID, introduced in 2017, uses a TrueDepth camera system that projects over 30,000 invisible infrared dots onto your face, building a precise three-dimensional mathematical depth map. This geometric mesh captures the exact contours of your face including the depth of your eye sockets, the curve of your cheekbones, and the angle of your jawline. A flat photograph or even a printed 3D mask cannot replicate this infrared depth field, making Face ID fundamentally resistant to spoofing attacks.
Many Android devices, particularly budget and mid-range models, use a simple 2D camera-based face unlock. This method captures a flat RGB image of your face and compares it against a stored reference. Because a 2D image contains zero depth information, it can often be fooled by holding up a high-resolution photograph, a video of the owner playing on a tablet, or even a social media profile picture printed on paper. This is why most 2D face unlock systems explicitly warn users that they are less secure than a PIN or fingerprint.
Premium Android devices like the Google Pixel 4 briefly offered hardware-based 3D face unlock using dedicated IR sensors (Project Soli), achieving security comparable to Face ID. However, Google discontinued the hardware in subsequent models due to cost and design constraints. Samsung flagship devices use a hybrid approach with iris scanning, but most Android face unlock implementations remain fundamentally 2D and should never be trusted for securing sensitive data like password vaults or banking applications.
The Secure Enclave Architecture
The critical security layer behind Face ID is not the camera itself but the Secure Enclave, a dedicated cryptographic coprocessor physically isolated from the main A-series or M-series chip. The mathematical representation of your face (a 3D depth map reduced to a compact neural embedding) is encrypted and stored exclusively inside the Secure Enclave. It never leaves the chip, never touches the main operating system memory, and is never backed up to iCloud or any external server.
When you authenticate with Face ID, the TrueDepth camera captures a new infrared depth scan. The neural network running inside the Secure Enclave compares the live scan against the stored embedding. If the match exceeds the confidence threshold, the Secure Enclave releases the cryptographic key that decrypts your keychain, authorizes Apple Pay transactions, or unlocks your device. The main iOS operating system never sees your face data and never receives the decryption key directly. It only receives a binary yes or no answer from the Secure Enclave.
Everyday Example
Imagine two security systems at a building entrance. The first (2D face unlock) is a guard who checks visitors against a printed photo pinned to the wall. A clever intruder could hold up a glossy magazine photo of the authorized person and walk right in. The second system (Face ID) uses a laser scanner that maps the exact 3D shape of every visitor's face, measuring the depth of every curve down to the millimeter. A flat photo or even a realistic rubber mask would fail instantly because it lacks the precise three-dimensional geometry. The laser scanner also locks its records in an impenetrable vault (the Secure Enclave) that even the building manager cannot open.
The Deep Mathematics
Face ID's neural network produces a 128-dimensional feature vector (embedding) from the infrared depth map. Authentication compares the live embedding against the stored reference using a distance metric in high-dimensional space. Apple states the probability of a random person unlocking your device is approximately 1 in 1,000,000 (compared to 1 in 50,000 for Touch ID). The Secure Enclave protects the embedding using AES-256 encryption with a hardware-fused UID key unique to each individual chip. Even physical decapping and electron microscopy of the silicon cannot extract this UID because it is generated during manufacturing using physically unclonable function (PUF) circuits derived from nanoscale transistor variations.
Discover how giovium protects your data
giovium leverages these very cryptographic principles to keep your passwords, files, and secrets completely safe. Try it for free on any platform.
Download giovium