A Flutter-based Android application for capturing and storing photos and videos with military-grade encryption. All media is encrypted using AES-256 and protected by biometric authentication.
- Secure Camera: Capture photos and videos directly within the app
- Military-Grade Encryption: AES-256-CBC encryption for all media files
- Biometric Protection: Fingerprint/face authentication required to access
- Hardware-Backed Security: Encryption keys stored in Android KeyStore
- Encrypted Gallery: View your encrypted media with swipe navigation
- Video Thumbnails: Automatic thumbnail generation for video files
- Orientation Detection: Full support for all device orientations with accelerometer-based detection
- Private Storage: Files stored in sandboxed app directory, invisible to file browsers
- Local-Only: No cloud upload, no network access - everything stays on your device
Algorithm: AES-256-CBC (Advanced Encryption Standard, 256-bit key, Cipher Block Chaining mode)
Key Management:
- Encryption keys are randomly generated (not derived from user password)
- Keys stored in Android KeyStore (hardware-backed on supported devices)
- Keys never leave the secure element
- Biometric authentication required to access keys
Authentication:
- Your password/biometric only unlocks the app
- Encryption keys are separate from your authentication credentials
- Even if someone knows your password, they cannot decrypt files without the device's KeyStore
Your files are protected by two independent layers:
- Authentication Layer: Biometric lock prevents unauthorized app access
- Encryption Layer: AES-256 encryption makes files unreadable without the key
Even if an attacker:
- Extracts files from your device using ADB or root access
- Knows your app password
- Has advanced cryptanalysis tools
They cannot decrypt your files without the hardware-backed encryption key that's locked in your device's secure element.
We've thoroughly tested the encryption to ensure your files are truly secure:
# Normal JPEG starts with: FF D8 FF E0/E1
# Encrypted file starts with: 40 6D 52 76 (random bytes)
xxd -l 4 encrypted_file.encResult: ✓ No recognizable file format
file encrypted_file.enc
# Output: dataResult: ✓ Cannot be identified as any known format
# Count byte frequency distribution
xxd -p encrypted_file.enc | fold -w2 | sort | uniq -c | sort -rn | head -n 10Result: ✓ Even distribution (all bytes appear ~equally, no patterns)
# Calculate cryptographic randomness
python3 -c "
import math
from collections import Counter
with open('encrypted_file.enc', 'rb') as f:
data = f.read()
freq = Counter(data)
entropy = -sum((count/len(data)) * math.log2(count/len(data)) for count in freq.values())
print(f'Entropy: {entropy:.4f} bits/byte (max: 8.0000)')
"Measured: 7.9993 bits/byte (99.99% of theoretical maximum) Result: ✓ Cryptographically random data
strings -n 10 encrypted_file.encResult: ✓ No EXIF data, GPS coordinates, or readable strings found
All tests confirm the encryption is working correctly. The data is cryptographically indistinguishable from random noise.
- Flutter SDK (^3.5.4)
- Android SDK (minSdk 22, compileSdk 36)
- Android device with biometric authentication support
- Clone the repository:
git clone <repository-url>
cd vault_app- Install dependencies:
flutter pub get-
Connect your Android device and enable USB debugging
-
Run the app:
flutter run- App requests biometric authentication setup
- Configure fingerprint or face unlock on your device
- Grant camera and storage permissions
- Open the app and authenticate with biometric
- Tap the Camera icon
- Use the mode switcher to toggle between Photo and Video mode
- Camera preview automatically rotates with device orientation
- Tap the capture button to take photos or start/stop video recording
- Media is automatically encrypted and saved
- Tap the Gallery icon
- Swipe through your encrypted media
- Tap a thumbnail to view full-screen
- Swipe left/right to navigate between media items
- Videos show play button overlay and auto-generate thumbnails
- Tap video to play/pause
- Long-press a thumbnail in the gallery, or
- Tap the delete button while viewing media
Files are stored in the app's sandboxed directory:
/data/data/com.vault.vault/app_flutter/vault_media/
This directory is:
- Not accessible to other apps
- Not visible in file browsers
- Protected by Android's app sandbox
- Cleared when the app is uninstalled
Encrypted files use the format:
{timestamp_in_milliseconds}.{extension}.enc
Example: 1763918177465.jpg.enc
Media metadata is stored in SQLite:
CREATE TABLE media (
id INTEGER PRIMARY KEY AUTOINCREMENT,
filename TEXT NOT NULL,
type TEXT NOT NULL, -- 'photo' or 'video'
timestamp INTEGER NOT NULL,
file_size INTEGER NOT NULL
)- camera: Camera functionality and video recording
- local_auth: Biometric authentication
- flutter_secure_storage: Secure key storage using Android KeyStore
- encrypt: AES encryption implementation
- sqflite: Local database for media metadata
- path_provider: App directory access
- video_player: Video playback
- video_thumbnail: Video thumbnail generation
- sensors_plus: Accelerometer-based orientation detection
- No Network Access: App does not connect to the internet
- No Analytics: No tracking or telemetry
- No Cloud Backup: Everything stays on your device
- No Third-Party Services: No external dependencies
Your encrypted files cannot be decrypted on another device, even if you know your password. This is a security feature, not a bug. The encryption key is:
- Tied to your specific device's hardware
- Stored in the Android KeyStore
- Not exportable or transferable
If you lose your device, your encrypted files are permanently unrecoverable.
If you need to backup your media:
- View the media in the app
- Take screenshots or screen recordings
- Store backups in a separate encrypted location
Do not backup the .enc files themselves - they cannot be decrypted elsewhere.
- Enable Strong Biometric Authentication: Use fingerprint or face unlock
- Keep Your Device Secure: Use a strong device PIN/password
- Regular Backups: Export important media before they're deleted
- Update Regularly: Keep the app and Android OS updated
- Physical Security: Keep your device physically secure
This project is private and not intended for redistribution.
- v1.0.0+22: Added encryption verification, debuggable mode for testing
- v1.0.0+21: Implemented swipe navigation for media viewer
- v1.0.0+20: Fixed camera orientation detection and preview rotation
- v1.0.0+19: Added accelerometer-based orientation detection
- v1.0.0+16: Initial release with core encryption and media features
This is a personal security project. Contributions are not currently accepted.
For security issues or questions, please review the encryption verification tests above to understand how the security model works.