Shrinking an encrypted photo vault on the phone: AES-256-GCM plus HEVC, and no cloud
Most photo vault apps solve one problem: hiding pictures behind a PIN. We wanted to solve two at once on a phone that is already full: keep private photos encrypted on the device, and make that private library take less
Most photo vault apps solve one problem: hiding pictures behind a PIN. We wanted to solve two at once on a phone that is already full: keep private photos encrypted on the device, and make that private library take less space, without sending anything to a server.
That became PhotoVault (on the App Store as "PhotoVault: Encrypt & Compress", on Google Play as "Photo Vault: Private Gallery"). This post covers the design choices and the trade-offs we decided to be honest about.
The constraints
- No account and no cloud. Nothing leaves the device unless the user exports it.
- Encryption at rest that does not depend on the phone's own file protection alone.
- A real storage win, measured, not promised.
- iPhone, iPad and Android, with a way to move a library between them.
Encryption
Media files and the metadata indexes are encrypted on the device with AES-256-GCM. The key is device-bound and lives in the iOS Keychain or the Android Keystore. Unlocking the app (password, 5x5 pattern, or Face ID / Touch ID) is a gate in front of that encrypted store; it is not the encryption key itself.
What this means in practice: there is no server copy to subpoena or leak, and also no server copy to restore from. We do not offer a password reset or a recovery phrase. That is a deliberate trade-off, and we say so in the app and on the site.
Two storage modes, and no default
At import the user picks one of two buttons:
| Mode | What is stored | Space saved | Export |
|---|---|---|---|
| Lossless | The original file, byte for byte | Practically none | The original file |
| Compact | A lossy HEVC re-encode | Typically 60%+ | A re-encoded copy, not the original |
We did not want a silent default here. Compact is great for a big archive of everyday pictures; Lossless is the right choice for anything where exact fidelity matters (evidence, professional editing). Making the user choose each time keeps that decision visible.
Measured results from our demos (your photos will differ):
| Device | Before | After | Smaller by |
|---|---|---|---|
| iOS demo set | 313.3 MB | 122.7 MB | 60.8% |
| iPhone 18 Pro Max | 470 MB | 27 MB | 94% |
| Android demo set | 120.8 MB | 20.5 MB | 83.0% |
Moving a vault without a cloud: .pvsecure
Without sync, users still need to get photos onto a new phone. Secure Share writes an encrypted .pvsecure file protected by a password or a pattern. You move that file any way you like (AirDrop, USB, a messenger), and Secure Import opens it on another iPhone, iPad or Android device. It is a one-time transfer, not sync, and no account is involved.
The container format is documented here: https://github.com/minchopm/pvsecure-spec
What it deliberately does not do
- No in-app camera (photos you take land in the system Photos app first).
- No decoy vault.
- No cloud backup, no recovery phrase, no password reset.
If you need cloud sync or a decoy vault, other apps do that better, and we keep an honest comparison table of 18 of them: https://photovault.arte-soft.com/compare/ . For example, Vaultaire (iPhone and iPad) offers encrypted iCloud backup and decoy vaults, while PhotoVault adds on-device compression and Android: https://photovault.arte-soft.com/compare/photovault-vs-vaultaire/
Try it
- iPhone and iPad (iOS 18+): https://apps.apple.com/us/app/id6824412013
- Android (Android 11+): https://play.google.com/store/apps/details?id=com.artesoft.photovault
Free to download, with optional plans. Questions about the crypto or the HEVC pipeline are welcome in the comments. I am the developer, at Arte Soft in Sofia, Bulgaria.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.