Guessing protection is what stops someone from trying PIN after PIN until one works. A photo vault can slow guessing in three different ways: waits after wrong tries (enforced by the app), a slow, memory-heavy step that makes every single guess expensive (Argon2id), and a key in the phone's secure hardware that forces all guessing to happen on that phone instead of on a fast computer. Each one covers a gap in the others, and each can be got around in a specific way, which a vault should tell you plainly. In HideBerry, the vault we make, the first 4 wrong tries have no wait, then waits rise from 30 seconds to 30 minutes per try. Below is the full schedule, what it adds up to, what bypasses it, and what still protects you when it is bypassed.
This page is part of photo encryption and security explained.
HideBerry's wait schedule
| Wrong try | Wait before the next try | Total waiting so far |
|---|---|---|
| 1st to 4th | None | 0 |
| 5th | 30 seconds | 30 seconds |
| 6th | 1 minute | 1 minute 30 seconds |
| 7th | 5 minutes | 6 minutes 30 seconds |
| 8th | 15 minutes | 21 minutes 30 seconds |
| 9th | 30 minutes | 51 minutes 30 seconds |
| 10th | 30 minutes | 1 hour 21 minutes 30 seconds |
| 20th | 30 minutes | 6 hours 21 minutes 30 seconds |
| 50th | 30 minutes | 21 hours 21 minutes 30 seconds |
| 100th | 30 minutes | About 46 hours 22 minutes |
The working: the waits after tries 5 to 8 add up to 0.5 + 1 + 5 + 15 = 21.5 minutes. From the 9th wrong try on, each one adds 30 minutes. So after wrong try number n (9 or more), the total is 21.5 + 30 × (n − 8) minutes. For the 100th: 21.5 + 30 × 92 = 2,781.5 minutes, a little under two days.
Free first tries matter because people mistype. A vault that punishes the first slip pushes people towards short, easy codes, which is worse.
Leveling off at 30 minutes still does the job: from the 9th wrong try on, a fixed 30-minute wait limits a guesser to 48 tries a day, every day.
The wrong-attempt count and the time of the last wrong try are saved on the phone, so closing or restarting the app doesn't reset the waits. A correct unlock resets the count. Fingerprint unlock and the recovery words aren't blocked by the waits. And HideBerry never erases the vault after wrong tries: there is no self-destruct.
What that means against a real code
At 48 tries a day, a guesser working through the app gets about 56 tries in the first 24 hours, 344 in a week and 17,528 in a year. Against HideBerry's minimum codes:
- 6-digit PIN (1,000,000 options): about 57 years to try them all, about 28.5 years on average.
- 6-dot pattern (at most 60,480 options): about 3.4 years to try them all, about 1.7 years on average.
That assumes random guessing. Someone who knows you will try birthdays and simple shapes first, so the code you choose matters more than the schedule. The full working, by code length, is on PIN vs pattern: which is stronger.
The three layers of guessing protection
| Layer | What it stops | Who enforces it | What gets around it |
|---|---|---|---|
| Wrong-attempt waits | Someone trying codes in the app by hand | The app | Root access, or moving the phone's clock forward |
| Argon2id | Fast guessing, because each guess costs memory and time | The math itself | Nothing skips it, but more powerful hardware runs it faster |
| Hardware-bound key (Android Keystore) | Copying the files to a computer and guessing there | The phone's secure hardware (StrongBox or TEE) | Nothing copies the key off; but someone in control of the phone can still use it there |
Wrong-attempt waits are the visible one. They are timing rules in the app, not encryption. That is why someone with root (full control over Android on the phone), or who sets the clock ahead, can get past them. We say this on every page that mentions the waits, because a lockout that sounds absolute but isn't gives people a false sense of safety.
Argon2id is a function for turning a password or PIN into a key, standardized by the IETF in RFC 9106. It is built to need a lot of memory for each attempt, which makes mass guessing on specialized hardware expensive. HideBerry uses 64 MiB of memory and 3 passes. For comparison, RFC 9106's second recommended setting, meant for when less memory is available, is 3 passes with 64 MiB.
The hardware-bound key comes from the Android Keystore. The result of Argon2id is wrapped again by a key that lives in the phone's secure hardware: StrongBox, a separate security chip, when the phone has one, otherwise the TEE, an isolated area of the main processor. Google's documentation says such keys can't be extracted from the device even if Android itself is compromised. So all guessing has to run on your phone, one attempt at a time. See Android Keystore explained.
When the waits are bypassed
Suppose someone has root on your unlocked phone and removes the waits. What is left:
- Every guess still goes through Argon2id on the phone, with its memory cost.
- Every guess still needs the hardware key, which can't leave that phone, so guesses can't be spread over many fast computers.
- Your code length decides how many guesses are needed. An 8-digit PIN has 100 times the options of a 6-digit one.
This is slower than guessing a plain hash on a computer, but it is not years of enforced waiting. And someone with root on an unlocked phone has options beyond guessing, which no app can rule out. That is on what a photo vault can't stop.
Your screen lock is a second, stronger gate
Android's own lock screen has guessing limits too. Its Gatekeeper component checks your screen lock PIN, pattern or password inside the TEE, and Android's documentation says it must throttle brute-force attempts securely, writing a failure counter before each check. Those limits are enforced in the secure hardware, not just in an app.
That matters for a vault. With a screen lock set, HideBerry's hardware key only works while the phone is unlocked. So someone who picks up your locked phone faces the phone's hardware-enforced limits first, and the vault's waits second. Without a screen lock, anyone holding the phone goes straight to the vault's PIN screen.
Warning signs of weak guessing protection in any vault app
- It doesn't say what happens after wrong tries.
- It claims nobody can get past its lockout, with no mention of root or clock changes.
- The PIN can be 4 digits.
- It offers to reset your PIN by email or account, which means someone else can open the vault.
- It says nothing about how the PIN becomes a key (no slow hashing, no hardware key).
- It stores the PIN, or something easily turned back into it, in a readable file.
If you are weighing apps more broadly, can a photo vault app be hacked looks at the common attacks.
What you can do
- Use a longer code. More than 6 digits. It is the only part of the protection that you control directly.
- Set a phone screen lock. It adds hardware-enforced limits before the vault is even reachable.
- Don't hand over your phone unlocked. Waits protect a vault; they don't protect a phone in someone else's hands for a weekend.
- Keep your recovery words on paper. If waits ever lock you out after a bad memory day, your 12 recovery words let you choose a new PIN. See forgot photo vault PIN.
People Also Ask
Are waits enough on their own? No. Waits only work while the app's rules hold. That is why HideBerry also runs each guess through Argon2id and a hardware-bound key, and why your code length and a phone screen lock matter. The waits stop casual guessers; the other layers handle a determined one.
Can I skip the wait if I remember my PIN? The wait applies to the next PIN or pattern try whoever is typing, and restarting the app doesn't clear it. Fingerprint unlock, if you turned it on, isn't blocked by the waits. If you are locked out by waits and sure you've forgotten the code, your 12 recovery words let you set a new PIN with everything kept.
Is a lockout the same as encryption? No. A lockout is a rule about when the app accepts the next try. Encryption is what makes the data unreadable without the key. A vault needs both: the lockout slows guessing in the app, and encryption plus the hardware key protect the files themselves.
Why not lock forever after 10 wrong tries? Because the person most likely to hit 10 wrong tries is often the owner, or someone who grabbed the phone. A permanent lock would let anyone shut you out of your own vault. Waits slow an attacker without handing that power to them.
FAQs
What is brute force protection in a photo vault?
It is anything that stops someone from trying every possible PIN until one works. Common forms are waits after wrong tries, a slow key-making step like Argon2id that makes each guess expensive, and a hardware-bound key so guessing can't move to a faster computer.
How long is the lockout after wrong PINs in HideBerry?
The first 4 wrong tries have no wait. Then 30 seconds after the 5th, 1 minute after the 6th, 5 minutes after the 7th, 15 minutes after the 8th, and 30 minutes after the 9th and each one after. That adds up to about 56 tries in the first day.
Can someone get around the wrong-attempt waits?
Yes. Someone with root access, or who moves the phone's clock forward, can get past them, because they are rules in the app, not encryption. What remains is the Argon2id cost per guess, the hardware key that keeps guessing on your phone, and the length of your code.
Does Argon2id make guessing impossible?
No. It makes each guess cost memory and time, so mass guessing is slower and more expensive. Combined with a long code and a key that can't leave the phone, it raises the effort a lot. A short or predictable code can still be guessed.
What if I lock myself out?
Wait out the timer and try again, or use your 12 recovery words to choose a new PIN or pattern. Everything stays in the vault. Without the recovery words, nobody can reset access, including us.
Choose a code the waits can protect
HideBerry pairs wrong-attempt waits with Argon2id and a hardware-bound key, and says where each one stops. It is coming soon to Google Play. The complete list of protections and limits is on HideBerry security.
Sources
- RFC 9106: Argon2 Memory-Hard Function for Password Hashing, IETF
- Android Keystore system, Android Developers
- Gatekeeper, Android Open Source Project