
AES-256-GCM and Argon2id, explained for photo vaults
· 8 min read

On the usual 3×3 grid, the patterns people actually draw are easier to guess and to spy on than a 6-digit PIN. A longer pattern on a bigger grid, drawn without a visible trail, can be stronger than a typical PIN. What decides it is length, predictability and who can see you unlock, not the shape of the lock: a hard PIN or pattern is long, avoids the usual starting corners, letters and number habits, and is unlocked out of sight.
| Lock | Possible combinations |
|---|---|
| 4-digit PIN | 10,000 |
| 6-digit PIN | 1,000,000 |
| Android 3×3 pattern (4 to 9 dots) | 389,112 |
| 5×5 pattern (4 to 25 dots, no dot twice) | Many orders of magnitude more, because every extra dot multiplies the choices |
On paper, a 3×3 pattern sits between a 4-digit and a 6-digit PIN. A 5×5 grid changes the picture: with 25 dots instead of 9, even a pattern of 8 or 10 dots has a vast number of possible shapes. But these totals assume people choose at random, and they don’t.
A large study of user-chosen Android patterns found them far more predictable than the 389,112 total suggests: for an attacker trying to guess one in five of them, real patterns offered less protection than random 3-digit PINs (Uellenbeck et al., ACM CCS 2013). The same is true of PINs: birthdays, years and 1234-style sequences make up a large share of real ones.
So the real question is not “pattern or PIN?” but “how guessable is the one you picked?”
Someone guessing your lock does not try every combination. They try the popular ones first. So a lock is hard to guess when it is long and does not look like what most people choose.
Marte Løge studied almost 4,000 user-chosen Android patterns for her master’s thesis. 44% started in the top-left dot and 77% started in one of the four corners. The average pattern used about five dots, which leaves fewer than 9,000 likely combinations (reported by Bruce Schneier, August 2015). The most common length was four dots, and patterns tended to run left to right and top to bottom, and often traced the user’s initials (The Register, August 2015).
That is why letter shapes such as L, Z, C, M, N or P are weak, as are squares, a single zigzag and your initials: they are the shapes people remember, so they are the shapes a guesser tries early.
When researchers compared 934 patterns drawn on a 3×3 grid with 504 drawn on a 4×4 grid, many 4×4 patterns were just 3×3 shapes spread over the larger grid. On either grid, the first 20% of patterns could be guessed about as efficiently as a random 2-digit PIN (Aviv, Budzitowski and Kuber, ACSAC 2015). A 5×5 grid offers far more shapes, but a 4-dot L in the corner is still a 4-dot L in the corner.
An analysis of almost 3.4 million four-digit codes from leaked password data found 1234 alone in 10.7% of them, 1111 in 6.0% and 0000 in 1.9%. The 20 most common codes made up 26.8% of the total. Every year from 1900 to 1999 ranked in the top fifth, and 2580, a straight line down the middle of the keypad, ranked 22nd (DataGenetics, 2012).
A longer PIN only helps if it is not predictable. In a study of 1,220 PINs chosen for unlocking a phone, 6-digit PINs added little or no security over 4-digit ones against an attacker allowed only 10 to 100 guesses. The study also found that the small lists of easy PINs iPhones warn about (“This PIN Can Be Easily Guessed”) did little against such an attacker (Markert et al., IEEE S&P 2020).
The US National Institute of Standards and Technology’s guidance for PINs that unlock an authenticator says they must be at least four characters and should be at least six, should be checked against a list of commonly used values, and must stop working after no more than 10 wrong tries in a row (NIST SP 800-63B-4, section 3.2.10). A phone’s lock screen can enforce that limit. A vault’s files copied off the phone cannot, which is the next point.
A pattern is a large, visible movement. That makes it easier to learn by looking over someone’s shoulder than a PIN typed on a small keypad, especially when the app draws a line behind your finger. In a study with 1,173 participants watching recorded unlocks, a 6-dot Android pattern was correctly picked up after one viewing 64.2% of the time, against 10.8% for a 6-digit PIN. Hiding the line behind the finger brought the pattern down to 35.3% (Aviv et al., ACSAC 2017). Patterns can also leave a readable trail of finger grease on the screen: in early experiments, smudges often revealed the pattern in full or in part (Aviv et al., USENIX WOOT 2010).
For a phone’s own lock screen, the phone’s secure hardware limits how fast and how often anyone can guess. A vault app’s files are different: if someone copies the encrypted files off the phone, they can guess offline, as fast as their computers allow. What slows them down then is the key-derivation function, which turns your pattern or PIN into the encryption key. A memory-hard function such as Argon2id makes every guess cost real time and memory (see AES-256-GCM and Argon2id, explained). Even so, a short or predictable secret falls quickly, so length still matters most. A vault that stores your PIN instead of deriving a key from it gives no such protection; how to tell if a photo vault app is safe covers what to check.
| Situation | Better choice |
|---|---|
| Short and simple, on a 3×3 grid | A 6-digit random PIN beats it |
| Long, unusual pattern on a 5×5 grid, trail hidden | The pattern, and it is easier to remember than a long PIN |
| You often unlock in public | Whatever you use, hide the trail and shield the screen |
TigerVault opens with a pattern drawn on a 5×5 grid of dots, at least 4 dots long with no dot used twice. The pattern is never stored: it goes through Argon2id (64 MiB of memory, 3 passes) to unlock the vault’s key. Each pattern opens its own vault. In settings, you can turn off Show pattern so no line follows your finger. We still recommend a pattern of 8 dots or more; the security overview explains why. If you worry about forgetting a long pattern, the vault’s nine recovery words are the way back in (see how recovery words work).
Not usually. On a 3×3 grid, the patterns people choose are easier to guess and to watch than a 6-digit PIN. A long, unusual pattern on a bigger grid, drawn with the trail hidden, can be stronger than a typical PIN.
One with six or more digits that do not follow a habit: not 1234, 0000 or a repeated digit, not a year or birthday, and not a straight line on the keypad such as 2580.
No. Letters and initials are common choices, so a guesser tries them early. Pick a shape that is not a letter, number or simple outline, and that does not start in a corner.
As many as you can draw reliably. In one large study, the most common length was four dots and the average about five. On a 5×5 grid, aim for 8 or more.