Security
How ECam protects you
ECam exists so that a phone that falls into the wrong hands holds nothing anyone can use. Here's who it defends against, exactly what it protects, where its limits are, and how we check that it works.
ECam hasn't had an independent security audit yet. Everything below describes how it's designed and tested, but please don't rely on it where your safety depends on it until it has been independently reviewed.
Who ECam defends against
Someone searching your phone
Border agents, police, or soldiers who unlock your phone, or force you to, and look through it.
A forensic examiner
Someone using commercial extraction tools to copy everything on the phone and search it for caches, thumbnails, and leftovers.
Whoever carries your files
A cloud provider, or a government compelling one, that can see the files you move off the phone.
Someone who swaps your key
A person with brief access to your phone who replaces your key with theirs, so future photos are readable by them.
What ECam protects
- Nothing unencrypted is stored on the phone. Photos are encrypted in memory the moment they're taken. There are no unencrypted files, thumbnails, caches, or previews, and the snapshot iOS takes for the app switcher shows only a lock screen.
- The phone can't decrypt. It only ever holds your public key. There's no private key on it to find, guess, or force you to reveal, so you can truthfully say you can't open the photos.
- Transfer doesn't need to be trusted. Photos stay encrypted whether you use cloud storage, AirDrop, USB, or anything else.
- A swapped key is detectable. The app and your computer both show a short fingerprint of your key, so you can confirm the phone is encrypting to the right one.
- You're never locked in. Every photo is a standard age file, decryptable with the standard
agetool.
Limits
These are deliberate or unavoidable limits. If ECam's protection matters to you, they matter too.
- The app is visible. Someone searching your phone can see ECam is installed, and see encrypted files until you move them off. That alone may draw attention, or pressure to hand over the key on your computer.
- When and how many photos you took is visible. File counts, sizes, and timestamps aren't hidden.
- A compromised phone can't be protected. Malware or a compromised operating system can see what the camera sees before ECam encrypts it.
- Your computer holds the keys. Anyone with your key file and passphrase can decrypt every photo. Once decrypted, photos are ordinary files.
- Memory is protected only on a best-effort basis. A photo exists briefly in the phone's memory before it's encrypted, and memory can't be reliably wiped.
- The shutter sound can't always be silenced. Some countries, such as Japan and South Korea, require it.
- Not yet quantum-resistant. ECam uses X25519 keys today. Support for post-quantum keys is planned, and the design leaves room for it.
- Screenshots are up to you. ECam can't stop you from taking a screenshot of the viewfinder.
How it's built
Encryption
- Photos are encrypted with age, a modern, well-reviewed file format. The iPhone app uses a small, encrypt-only implementation built on Apple's CryptoKit, with no third-party code.
- The phone never decrypts anything and never reads encrypted data, which removes a whole class of parsing bugs from the device.
- Your private key is stored on your computer as a standard passphrase-protected age identity.
On the iPhone
- Photos are captured directly with AVFoundation, held in memory, encrypted, and written only as encrypted files.
- ECam never asks for access to your photo library or your location. The camera is the only permission it uses.
- Live Photos, depth data, and other extras are turned off, so a capture produces nothing beyond the one encrypted photo.
- Encrypted files use iOS's strongest data protection, so they can't be read while the phone is locked, and they're excluded from device backups.
- The screen is covered whenever the app isn't in the foreground, so the app-switcher snapshot never contains camera content.
- No analytics, crash reporting, advertising, or networking code. Apple frameworks only.
On your computer
ecamuses the reference age implementation.- Each photo is fully decrypted and checked before anything is written, and existing files are never overwritten.
--strip-metadataremoves identifying metadata without re-encoding the photo, keeping only what's needed to display it correctly.
How it's tested
- Compatibility with the reference implementation. Photos encrypted by the iPhone code are decrypted by the reference age implementation in every automated test run, across a wide range of file sizes.
- Fuzzing. The code that reads scanned keys, the only untrusted input on the phone, is compared against the reference implementation on millions of generated inputs. This found and fixed a real bug: keys with hidden, invisible characters were being accepted. The desktop tool's photo-metadata parser is fuzzed too.
- End-to-end checks. Automated tests take photos in the iOS Simulator, then confirm that every file decrypts and that no unencrypted image data exists anywhere in the app's storage.
- Device testing. On a real iPhone, we copied the app's entire storage off the device and confirmed that only encrypted files contain image data, that app-switcher snapshots show only the lock screen, and that metadata stripping works on real photos.
- Code scanning. GitHub's CodeQL analysis runs on every change.
Not done yet: an independent security audit, a full forensic image of a device, and testing on more iPhone models.
Reporting a problem
If you find a security problem, please report it privately through GitHub's private vulnerability reporting. Don't open a public issue. Only the maintainers can see the report. See the security policy for what's in scope.
Going deeper
The full threat model and architecture documents describe the design in technical detail.