What Is a Panic PIN? How Duress Codes Protect Your Photos
iOS has no built-in duress or panic code. What happens when someone forces you to unlock your phone, and which apps handle it properly.
- A Panic PIN is a second code that opens a decoy vault instead of the real one.
- It covers coercion: encryption stops helping once someone forces you to type the correct code.
- US courts are split, and the Ninth Circuit allows compelled biometric unlocking with a warrant.
- A decoy space filled with believable photos holds up better than a data wipe or an empty screen.
The coercion problem encryption doesn't solve
Encryption protects data from being read without the key. It does nothing when someone is standing next to you demanding the key.
Security research calls this the rubber-hose attack: the attacker doesn't break the math, they pressure the person who holds the password. Once you type the correct PIN under pressure, ChaCha20-Poly1305 encryption changes nothing and the vault opens.
How a Panic PIN works
The concept comes from the security industry. Home alarm systems have used duress codes for decades: a special code appears to disarm the alarm but silently alerts the monitoring company. Banks use silent alarms triggered by specific PINs, and Bruce Schneier discussed duress codes for fingerprint systems back in 2017.
The person watching sees an unlocked vault with the photos you placed in it. This is plausible deniability applied to photo storage.
Courts can force you to unlock your phone
| Context | Rule | Source |
|---|---|---|
| US, Ninth Circuit | Biometric unlock compellable with a warrant | 2025 ruling |
| US, D.C. Circuit | Compelled fingerprint implicates the Fifth Amendment | Early 2025 ruling |
| United Kingdom | Up to 2 years for refusing | RIPA, section 49 |
| Australia | Broad powers to compel access | Assistance and Access Act |
| US border | Device searches without a warrant | CBP |
The Fifth Amendment protects against self-incrimination through "testimonial" acts, and US courts have debated for over a decade whether typing a passcode counts. Passcodes have stronger protection than biometrics, but not everywhere. A 2026 analysis from a Florida criminal defense firm noted that if police have a warrant and your phone uses biometrics, they can access it.
In the UK, refusing to provide a decryption key is a criminal offense, with up to five years in prison for national security cases. At US ports of entry, a 2023 report by the Knight First Amendment Institute documented thousands of device searches annually.
Three approaches to duress codes in apps
| Approach | What the other person sees | Limit |
|---|---|---|
| Data wipe | An emptied app | Suspicious, evidence destroyed |
| Decoy screen | A fake screen or empty vault | Thin under scrutiny |
| Functional secondary space | A normal vault with photos | Must be filled in advance |
GrapheneOS offers a duress PIN that wipes the device on entry, and Discovery Bank in South Africa launched a panic code that freezes the account. In legal contexts, courts can draw adverse inferences from destroyed data.
In the third approach, the decoy space holds your decoy photos (vacation pictures, memes) and is indistinguishable from a primary space.
What to look for in a Panic PIN implementation
To disable biometrics quickly on iPhone, press and hold the side button and a volume button. The SOS screen appears and Face ID stays disabled until the passcode is entered.
Inner Gallery's Panic PIN implementation
In Inner Gallery, the Panic PIN opens a fully functional secondary space with its own photo library and its own ChaCha20-Poly1305 encryption.


When a Panic PIN matters
The most realistic scenario often involves a partner, family member, or acquaintance rather than law enforcement. The iOS Hidden Album falls short here because it unlocks with the device passcode, which the other person likely knows.
The limits of plausible deniability
- Forensic analysis. With physical device access, extraction tools like GrayKey or Cellebrite may detect traces of multiple encrypted containers, even without decrypting them. Plausible deniability works against casual observation, not necessarily against a full forensic examination.
- Destroying evidence. Using a wipe-style duress code after a court order could result in obstruction charges or contempt of court. A decoy space doesn't destroy anything, and the real data remains encrypted. Consult a lawyer if you're in a legal situation.
- Preparation. An empty Panic PIN space is suspicious. Fill it with believable decoy photos before you need it.
Related reading:
- Does iPhone Have a Duress PIN?: what iOS offers instead of a duress passcode
- Photo Encryption on iPhone: What It Actually Means: how OS-level and app-level encryption differ
- 5 Best Photo Vault Apps for iPhone: comparison of vault apps with privacy as the criterion
- iOS Hidden Folder Is Not Enough: why Apple's built-in Hidden album fails under pressure
- The iPhone Photo Privacy Checklist: 10 steps to lock down photo privacy on your device
- Can Someone See Your Hidden Photos on iPhone?: who can access the Hidden album
- Why Inner Gallery Works Without a Server: the architecture behind a local-first vault