Zentry is a lightweight encrypted file vault implemented in Python, designed to securely store sensitive files using a two-layer authentication model (L1 + optional L2) and an independent Decoy Vault for coercion-resistant scenarios.
The system maintains strict separation between the Real Vault (protected) and the Decoy Vault (controlled disclosure). Under coercion, the decoy vault can be revealed without exposing real vault content.
- Overview
- Key Capabilities
- System Model
- Cryptography and Security Design
- Command Line Interface
- Repository Structure
- Installation
- Operational Workflow
- Example Usage
- Operational Notes
- Author
Zentry provides encrypted storage for files in two separate compartments:
- Real Vault: intended for sensitive assets requiring strong access control
- Decoy Vault: intended for safe disclosure under coercion (contains non-sensitive content only)
This model allows controlled access without compromising the confidentiality of real assets.
- Dual-vault architecture: independent encrypted stores for Real and Decoy vaults
- Two-layer authentication:
- L1 password (mandatory)
- L2 factor (configurable: password / recovery key / disabled)
- Cryptographic confidentiality and integrity using AES-GCM
- Password-based key derivation using PBKDF2 with per-vault random salt
- Coercion-aware access model:
- Decoy password unlocks the decoy vault only
- Real vault remains inaccessible without real credentials
- CLI-driven operation for deterministic and reproducible workflows
Zentry maintains two vaults with strict separation:
- Real Vault (
real.zvlt) - Decoy Vault (
decoy.zvlt)
Both vaults are encrypted independently with different derived keys and metadata.
Used as the primary authentication factor and as input to key derivation.
Supported L2 modes:
- L2 Password
- Recovery Key (offline secret) (recommended for stronger security posture)
- No L2
If recovery key mode is selected:
Real Vault unlock requires L1 password + recovery key
The Decoy Vault is unlocked using the Decoy Password. This provides controlled disclosure without revealing real vault contents.
Operational intent:
- If coerced, provide the decoy password
- Attacker gains access only to decoy content
- Real vault remains encrypted and protected
Zentry follows a pragmatic security baseline using widely adopted cryptographic primitives.
- AES-GCM (Authenticated Encryption)
- Confidentiality: prevents disclosure without correct keys
- Integrity/authentication: detects modifications (tampering)
- PBKDF2
- Derives cryptographic keys from passwords
- Uses per-vault random salt
- Mitigates brute-force effectiveness compared to raw password usage
- Random salt and nonce are generated for cryptographic operations.
✅ Files are never stored in plaintext inside vault containers.
| Command | Function |
|---|---|
init |
Initialize Real and Decoy vaults |
add <file> |
Encrypt and add a file to the Real Vault |
add <file> --decoy |
Encrypt and add a file to the Decoy Vault |
list |
List Real Vault contents |
list --decoy |
List Decoy Vault contents |
export <file> |
Decrypt and export a file |
decoy-init |
Generate and insert synthetic decoy data |
lock |
Clear in-memory keys (utility / demo) |
Zentry/
├── cli.py # CLI entry point
├── crypto.py # Cryptographic utilities (AES-GCM, PBKDF2)
├── vault.py # Vault management logic (Real + Decoy)
├── decoy_gen.py # Decoy content generator
├── hello.txt # Sample file
├── exports/ # Decrypted exports (output)
├── storage/ # Internal support modules
├── zentry_store/ # Vault artifacts (encrypted)
│ ├── real.zvlt
│ ├── decoy.zvlt
│ └── meta.json
└── .venv/ # Virtual environment (excluded from Git)- Python 3.12+
- Dependency:
cryptography
Create and activate a virtual environment:
python -m venv .venv
source .venv/Scripts/activateInstall dependency:
pip install cryptographypython cli.py initYou will be prompted for:
- L1 password
- L2 mode: password / recovery key / none
- L2 credential (if applicable)
- Decoy password
Generated vault artifacts:
zentry_store/real.zvlt
zentry_store/decoy.zvlt
zentry_store/meta.jsonAdd to Real Vault:
python cli.py add hello.txtAdd to Decoy Vault:
python cli.py add hello.txt --decoyList Real Vault contents:
python cli.py listList Decoy Vault contents:
python cli.py list --decoypython cli.py export hello.txtDecrypted exports are written to:
exports/hello.txtpython cli.py decoy-initpython cli.py lockpython cli.py init
python cli.py add hello.txt
python cli.py list
python cli.py export hello.txtRecommended .gitignore exclusions:
.venv/
__pycache__/
.pyc
exports/
zentry_store/Important: Do not commit encrypted vault artifacts (
*.zvlt) or vault metadata (meta.json) to source control.
Zentry is intended for educational and demonstration use in secure storage workflows. It has not been formally security-audited and is not positioned as a certified security product.
Arya Dinesh
B.Tech — Electronics and Communication Engineering (ECE)
Project: Secure File Storage System (Zentry)