How Do Fingerprint and Face Unlock Work on Your Phone?

15 min read · Updated: October 23, 2026

Fingerprint and face unlock on a phone turn the features of your finger or face, as read by a sensor, into numbers. The phone then checks whether they are similar to the numbers saved when you set it up. The comparing and the storage happen in a protected area inside the chip, and images and feature data are not sent out of it. The chance of letting someone else in is not zero, so these methods are used together with a PIN or passcode.

What you'll learn

  • Why biometrics decide by "how similar," not by "an exact match"
  • The three types of fingerprint sensor (capacitive, optical and ultrasonic)
  • How face unlock with an ordinary camera differs from methods that measure 3D shape
  • In what form, and where, fingerprint and face data are stored
  • The official figures for letting someone else in, and why you still need a PIN
  • How passkeys relate to your fingerprint and face

Prerequisites: none. Links to related articles cover the basics of encryption and passwords.

In everyday life

Pick up your phone and look at the screen, and it unlocks. Rest a finger on it, and a payment goes through. On the iPhone, Touch ID (fingerprint) arrived in 2013, and Face ID (face) in 2017.

Still, some people worry. Are photos of their fingerprint or face kept on the phone, or sent to the maker? Others wonder whether someone who looks just like them could open it.

Biometrics: checking who you are by your body

There are three broad kinds of clue for checking that you are you. There is something you know (a PIN or password), something you have (such as your phone) and something about your body. Checking who you are by features of your body is called biometric authentication. How to combine the three is covered in "How Are Passwords Cracked?"

The big difference from a password is that the reading is never exactly the same twice. The pattern the sensor reads shifts slightly with the angle and pressure of your finger, and with how dry it is. A face looks different with the lighting, your expression and glasses. So the phone doesn't ask "Is it an exact match?" It asks "How similar is it?"

It turns the similarity into a score, and treats you as the owner if the score passes a set line. This line is called the threshold. Where to set it comes up later, in "Two kinds of mistakes."

Fingerprint sensors: three types

The skin of your fingertip has rows of thin raised lines, called ridges. Between two ridges is a slight dip, called a valley. A fingerprint sensor is a semiconductor chip that reads this pattern of ridges and valleys as a grid of tiny dots. There are three main ways to read it.

Capacitive: measuring how much charge builds up

Under the sensor's surface sits a dense grid of tiny plates that conduct electricity. These plates are called electrodes. When you place a finger, the ridges come very close to the electrodes. The valleys sit a little farther away.

Each electrode and the finger above it can store a little electric charge. The amount they can store is called capacitance, and it grows the closer they are. So an electrode under a ridge gives a large value, and one under a valley gives a small value. Lay the values out as light and dark, and the fingerprint pattern appears. It is the same idea as a touchscreen, explained in "How Do Touchscreens Work?"

Capacitive fingerprint sensor: electrodes under the finger's ridges give large values, and electrodes under the valleys give small values. Laid out together, the values form the fingerprint pattern A fingertip, seen from the side Finger Value at each electrode (square) Under a ridge: close, so large Under a valley: farther, so small
The ridges of a finger (the raised lines of skin) are close to the electrodes, and the valleys are farther away. So each electrode gives a different value. Left out: real sensors have tens of thousands of electrodes in rows and columns, spaced much more finely than this. The thickness of the surface cover and the height difference between ridges and valleys are also exaggerated.

Apple's Touch ID uses this capacitive sensing method. According to Apple, it reads a detailed image from below the outermost layer of skin.

Optical: lighting the finger with the screen and taking a picture

Most sensors that read your finger through the screen itself are optical. Many phones have OLED screens. In these, each of the tiny dots that make up the picture (pixels) gives off its own light. When the spot under your finger lights up, the light bounces off the finger. Ridges and valleys reflect it differently, which creates a pattern of light and dark.

A small camera sensor under the screen picks up this light. It turns light into electricity the same way as the image sensor in a phone camera (see "How Do Image Sensors Work?"). Fingerprint sensors placed under the screen began appearing in phones around 2018.

Ultrasonic: measuring shape from sound that bounces back

Sound too high-pitched for human ears to hear is called ultrasound. An ultrasonic sensor sends ultrasound from under the screen toward the finger and measures what bounces back. The ridges touch the surface, but there is a tiny gap of air above each valley. This difference changes how the sound bounces back.

Qualcomm's "3D Sonic" ultrasonic sensor was used in Samsung's 2019 Galaxy S10 series.

TypeWhat it readsExample locations
CapacitiveHow much charge builds upHome button, power button
OpticalScreen light bouncing backUnder the screen
UltrasonicSound bouncing backUnder the screen

Recognizing a face: flat images vs 3D shape

There are two broad approaches to face unlock. One compares images taken with the ordinary front camera. It needs no special parts, but the image is flat. Telling a real face apart from a photo, or from a face shown on a screen, takes extra measures.

The other also measures the bumps and hollows of the face, that is, its 3D shape. Apple's Face ID works this way. The top of the iPhone's front holds a cluster of parts that use infrared light (a kind of light human eyes can't see). Apple calls this the TrueDepth camera.

Three parts do most of the work. One lights the whole face with invisible light. Another projects many dots of invisible light (the dot projector). The third is an infrared camera that photographs them. Apple's support page says "thousands" of dots. The 2017 iPhone X announcement said "more than 30,000." Because the phone supplies its own light, it works in the dark too.

Shine the dots on a flat wall, and they appear in the same fixed pattern. Shine them on a face, and they appear slightly shifted where the nose sticks out or the eyes sit deeper. From these shifts, the phone works out the distance to each spot. The resulting "distance map" of the face is called a depth map.

Dots projected on a flat photo stay in a regular grid, but dots on a real face shift with bumps such as the nose. These shifts reveal distance Photographing projected invisible dots Photo (flat) Real face Dots unchanged Dots shift The size of each shift gives the distance
The camera sits a little apart from the part that projects the dots, so bumps and hollows make the dots appear shifted. Left out: real systems use thousands of dots or more, and they are not laid out in a regular grid. The light is invisible to the human eye (infrared), so you can't see the real dots.

Once the 3D shape is known, fooling the system with a flat photo becomes hard. Face ID combines the depth map with an infrared image, and turns the features of the face into numbers.

What's stored is not a photo but "feature numbers"

When you enroll a finger or face, the phone does not save the image as it is. It pulls out only the features needed for comparison and turns them into a list of numbers. This list is called a template. When you unlock, the phone turns the new reading into numbers the same way and compares them with the template.

Features often used for fingerprints are the points where a ridge ends and where it splits in two. A document from the US National Institute of Standards and Technology (NIST) also describes matching by the position and direction of such points. However, which features phone makers actually use is mostly not public.

For Touch ID, Apple says it stores only a mathematical representation of the fingerprint, not an image of the finger. Apple's explanation is that the original fingerprint image can't be rebuilt from the stored data.

Even so, you can't say feature numbers are safe just because they aren't images. A 2007 study produced closely matching fingerprint images from feature-point data in a standard format. And unlike a password, a fingerprint or face can't be replaced if it leaks. That's why the feature numbers are also encrypted and protected so they don't leave the device.

Where it's stored: a "protected area" inside the chip

Templates are stored and compared in a special area built into the phone's chip. Ordinary apps can't look inside it. Neither can the core software that runs the whole phone, the operating system (OS). On the iPhone, this area is called the Secure Enclave.

According to Apple's developer documentation, the Secure Enclave is a computing circuit for security, isolated from the rest of the system. An app that uses your fingerprint or face receives only one answer: success or failure. Fingerprint images and the like are never handed to the app.

The Secure Enclave sits inside the chip at the center of the phone's computing (on the 2013 iPhone 5s, the A7). The chip as a whole is introduced in "What Chips Are Inside a Smartphone?"

Attacks on secrets don't only use software. Some disturb the power supply voltage, and some open up the chip to examine what's inside. The ability to withstand such physical attacks is called tamper resistance. Apple says it deliberately runs the Secure Enclave's circuit at a lower speed. This protects it against attacks that disturb its power supply and similar inputs.

Android's official documentation also requires that neither the raw images from the sensor nor the templates be visible outside an isolated environment. The leading example of such an environment is the trusted execution environment (TEE).

A widely used way to build a TEE is Arm's TrustZone. It lets one chip switch between a normal world and a protected world. The circuitry itself keeps the normal world from reaching the protected world's memory.

When a template is saved, it is encrypted with a key that only the TEE knows. Android's documentation also requires that a template file be unusable if moved to another device. The enrolled data has meaning only on that one phone. How the dedicated parts that store keys differ is compared in "TPM vs HSM vs Secure Element."

Two kinds of mistakes

Biometrics can make two kinds of mistakes. One is judging another person to be you. The rate at which this happens is called the false acceptance rate, or FAR for short.

The other is rejecting you even though it really is you. This rate is called the false rejection rate (FRR). When you have to place your finger again and again, false rejections are happening. Making the threshold stricter lowers the false acceptance rate and raises the false rejection rate. The two pull against each other.

Some attacks try to fool the sensor with a fake instead of a real finger or face. Separately from the false acceptance rate, Android tests the rate at which fakes get through (SAR). That's because the false acceptance rate is the chance that a randomly chosen other person gets in by chance. It doesn't show how well the system resists fakes. Android uses this rate, among others, to sort biometrics into three classes. The strongest is Class 3.

Apps can choose to accept only Class 3 biometrics. So on some phones, face unlock can open the lock screen but can't be used in some apps.

By the numbers

Here are the published chances that "someone else gets in by chance," next to the chance of guessing a PIN in one try. Each value is as stated in its source as of 2026.

CaseChance someone else gets in (approximate)
Touch ID (one finger enrolled)Less than 1 in 50,000
Touch ID (five fingers enrolled)Up to 1 in 10,000
Face ID (one appearance enrolled)Less than 1 in 1,000,000
Face ID (an alternate appearance also enrolled)About 1 in 500,000
Android standard (false acceptance rate)1 in 50,000
Guessing a 4-digit PIN in one try1 in 10,000
Guessing a 6-digit PIN in one try1 in 1,000,000

Apple's values are its own estimates of the chance that one randomly chosen person gets in by chance. Enrolling more fingers or appearances gives more to compare against, so the chance goes up. Apple warns that the chance is higher for twins, siblings who look alike, and children under 13. That's because a child's facial features may not have fully developed yet. If this concerns you, Apple recommends using a passcode.

Android's 1 in 50,000 is the rate for a randomly chosen other person, and it is a target shared by every class. What separates the classes is mainly how well they resist fakes.

The PIN values assume the digits are picked at random. A PIN that's easy to guess, like a birthday, is much weaker than the table shows.

There's also a limit on failed attempts. For Face ID and Touch ID, Apple requires the passcode after five failed matches. So someone else can't just keep trying and wait to get lucky.

Why you still need a PIN or passcode

To use biometrics, you first have to set a PIN or passcode. Biometrics don't replace the passcode. They are a shortcut that saves you typing it every time.

The first reason is that biometrics sometimes can't be used. Your finger may be wet or injured, or something may be in front of your face. Apple also requires the passcode in cases like these:

  • Right after the phone is turned on or restarted
  • When it hasn't been unlocked for more than 48 hours
  • After five failed match attempts
  • When the passcode hasn't been used for six and a half days (156 hours) and biometrics haven't been used for 4 hours

The second reason is data encryption. Photos and messages on the phone are encrypted with keys tied to the passcode (see "What Is Encryption?"). Always asking for the passcode after a restart is part of this protection. To put it simply, biometrics are a check that lets you keep using a key the passcode has already unlocked.

The third reason is that you can't change your fingerprints or face. You need a separate method that you can replace if something leaks.

Passkeys: your fingerprint is not sent to the site

More and more services let you sign in with a passkey instead of a password. With a passkey, your phone creates and keeps a secret key for each site. The site is given only the matching key meant to be shared, called the public key. This approach is based on public-key cryptography.

When you sign in, the phone uses the secret key to make a signature and sends it to the site. A signature is a mark that only a device holding that key can make (a digital signature). The fingerprint or face check decides whether the secret key may be used (a PIN or similar can also do this job). Once the check passes, the key can be used inside the device.

Fingerprint and face data are compared inside the phone and don't leave it. If the check passes, a signature is made with the secret key, and only the signature reaches the site Sensor (finger, face) Inside the phone's chip Compare with the saved feature numbers If it passes Make a signature with the secret key Signature only Site (public key) Fingerprint and face data stay in the phone
The flow when you sign in with a passkey. When you unlock the phone, no signature is made; only the result "this is the owner" goes to the OS. Left out: the site sends a new problem to sign each time (a challenge). Also, a passkey's secret key may be encrypted and synced to the same person's other devices.

The FIDO Alliance, an industry group, explains that biometric information and its processing stay on the device and are not sent to servers. All the server learns is that checking who you are succeeded. Even if data is stolen from a site, there's no fingerprint or face data in it.

In short, your fingerprint or face is not "a certificate you show the site." It is "a signal that unlocks the key on your own device."

Common myths

Myth: Your phone stores photos of your fingerprint and face, and sends them to the maker

In fact, what's stored is feature numbers for comparison (a template), kept in the protected area inside the chip. Apple says Face ID data is not sent to Apple and is not included in backups such as iCloud. People often assume photos are kept because enrolling looks like the camera is taking pictures.

Myth: Once you set up biometrics, a simple PIN is fine

In fact, the PIN or passcode is the last line of defense after a restart or a run of failed attempts. If the PIN is "0000" or a birthday, someone can get in that way, however strong the biometrics are. Because you no longer type it every time, it matters all the more that it's hard to guess.

Myth: "1 in 1,000,000" means nobody but me can ever open it

In fact, this is the chance that one randomly chosen person gets in by chance. It's higher for twins and siblings who look alike. Google also notes that Pixel face unlock may open for someone who looks a lot like you. The chance is small, but it is not zero.

Learn more

Read next

Articles in the series “Security and everyday IT”

  1. How Are Passwords Cracked? Why Length and Uniqueness Matter
  2. What Is Cloud Computing? How the Cloud Actually Works
  3. What Is Encryption? Symmetric vs Public-Key Simply Explained
  4. How Do Large Language Models Work? Generative AI Explained
  5. What Is a VPN? How the Tunnel Works and What It Can't Do
  6. What Is Machine Learning? How Computers Learn From Data
  7. What Is a Data Center? Power, Cooling and PUE Explained
  8. What Is a Firewall? How It Allows and Blocks Traffic
  9. How QR Codes Work: Error Correction and the Three Squares
  10. What Is Phishing? How to Spot and Stop Fake Emails and Sites
  11. How Do Fingerprint and Face Unlock Work on Your Phone?
  12. What Is Malware? Viruses, Ransomware and How to Stay Safe

Questions on this topic: Hardware Security

Sources

All explainers