For your phone itself, a long password is the strongest lock, and a PIN of six or more digits that isn't a birthday, a repeat or a run is a good everyday choice. Patterns are quick and easy to remember, but they're the easiest of the three to learn by watching over your shoulder, and people tend to draw predictable ones. Fingerprint and face unlock are handy shortcuts that sit on top. And for your most private photos, the best lock is a separate one: a vault with its own secret.
Here's what the research says about each, and how to make the lock you choose harder to crack.
The three locks at a glance
| Pattern on a 3 by 3 grid | PIN | Password | |
|---|---|---|---|
| Possible choices | 389,112 | 10,000 with 4 digits, 1,000,000 with 6 | Many more, and the count grows with every character |
| Recovered after one look, in a 2017 study | 64.2% of 6-dot patterns | 10.8% of 6-digit PINs | Not tested |
| What Google's help page says | "Draw a simple pattern" | "A 6 digit PIN is recommended" | "The most secure screen lock option" |
The quotes come from Google's screen lock guide, which also notes that longer PINs tend to be more secure.
How easy is each to guess?
On paper, a pattern beats a four-digit PIN but loses to a six-digit one. Android's 3 by 3 pattern must connect at least four dots and use each dot once, which allows 389,112 patterns in all, as researchers at the University of Pennsylvania counted in 2010. A four-digit PIN has 10,000 possibilities, a six-digit PIN a million, and a password more still.
People don't choose at random, though. A 2013 study of real Android patterns found strong habits, such as the top-left corner and straight lines of three dots. Its authors estimated that, to crack one pattern in five, a guesser needs fewer tries than for randomly assigned three-digit PINs.
PINs have the same weakness. In a 2020 study of 1,220 smartphone PINs, many people based theirs on birthdays and anniversaries, and 123456 was by far the most common six-digit choice. Against a guesser limited to 10, 30 or 100 tries, six-digit PINs gave "little to no increase in security" over four-digit ones.
That limit on tries is real: Android slows down repeated wrong guesses, so a guesser only gets so many attempts. Which means the first few guesses matter most. Avoid anything a person who knows you would try first.
How easy is each to watch?
Shoulder surfing means watching someone unlock their phone. In a 2017 study presented at the ACSAC security conference, 1,173 people watched videos of phones being unlocked and tried to repeat what they saw. One look was enough for 64.2% of six-dot patterns, but only 10.8% of six-digit PINs. Hiding the line a pattern draws brought that 64.2% down to 35.3%, and shorter patterns were even easier to catch.
Two easy habits help:
- Hide the line. On Samsung Galaxy phones, turn off Make pattern visible in Settings > Lock screen and AOD > Secure lock settings, as Samsung's guide describes. On other phones, look for a similar switch in your screen lock settings.
- Unlock out of view. Tilt the screen toward you on a bus or in a queue, and wait a moment if someone is right behind you.
What smudges give away
Your finger leaves oily traces on the glass. In the 2010 study, researchers photographed phones after a pattern had been drawn. In one experiment, the pattern was partly readable in 92% of their lighting and camera setups, and fully readable in 68%. A quick wipe on clothing and a trip in a jeans pocket didn't remove it.
Screens have changed since 2010, so treat those numbers as a picture of the risk, not a measurement of your phone. The habit to keep is simple: give the screen a proper clean now and then.
Fingerprint and face: handy, with a catch
Fingerprint and face unlock are fast, but they don't replace your code. Your phone still asks for your PIN, pattern or password after a restart, and Google's own fingerprint help notes that "a fingerprint can be less secure than a strong PIN, pattern, or password."
There's a human catch too. Someone can press your finger to the sensor or hold the phone up to your face. Why a privacy app should not use your fingerprint covers what courts have said about that. If you use biometrics, learn your phone's lockdown option. On a Pixel, press Power and Volume up together and tap Lockdown, which turns off fingerprint and face unlock until you next unlock with your code.
What to use
- For the phone: a password if you don't mind typing it, or a PIN of at least six digits that isn't a date, a repeat or a run. If you love patterns, make yours long, steer clear of the top-left corner, and hide the line. How to choose a pattern has more ideas.
- For your most private photos: a separate secret. Anything that opens with your screen lock, such as Google Photos' Locked Folder, opens for anyone who knows or has watched your code. A vault with its own secret stays closed even then.
- For speed: fingerprint or face, if you like, as long as you know how to turn them off quickly.
Where Cachette fits
Cachette is that separate secret, and it's a pattern, but not Android's. You draw it on a 5 by 5 grid of 25 dots, using at least 6 dots, each one once. Only the dots your finger touches are added, and a dot your finger passes over counts as touched. What Cachette never does is fill in a dot by itself because your line crosses it, the way some pattern locks do. During setup, very common shapes, such as straight lines, letters, corner runs, the outer ring and the most common published patterns, are refused with a plain message.
Each guess is also deliberately expensive. Your pattern goes through Argon2id, a step designed to be slow that uses 128 MiB of memory, and is then combined with a key that can't be exported from your phone. So a copy of the vault's files from the phone can't be attacked on another computer: every guess has to run on the phone and pay the full cost. Backup files are the exception, because each carries a check of your pattern, so keep them somewhere private. The numbers behind pattern locks goes deeper.
There's no fingerprint or face unlock, by design. Like any pattern, yours can be watched, so draw it where nobody can see the screen. And nobody can reset a forgotten pattern, so choose one you'll remember and draw it often.