A secure, zero-knowledge CLI password manager with military-grade encryption
| Feature | Description |
|---|---|
| 🔒 Zero-Knowledge | Your passwords are never stored in plain text |
| 🔐 Fernet Encryption | AES-128-CBC + HMAC-SHA256 for data protection |
| 🔑 PBKDF2HMAC | 480,000 iterations for secure key derivation |
| 🔄 Recovery System | Recovery key + security questions for account recovery |
| 💻 Cross-Platform | Works on Windows, Linux, and macOS |
| 🎨 Beautiful CLI | Colorful terminal interface with ASCII art |
| 📦 Modular Design | Clean, maintainable codebase |
██████████████
██████░░░░░░░░░░░░░░██████
████░░░░░░░░░░░░░░░░░░░░░░░░░░████
██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
╔═══════════════════════════════════════════════════════════════════════════╗
║ ██████╗ █████╗ ███████╗███████╗██╗ ██╗ ██████╗ ██████╗ ██████╗ ║
║ ██╔══██╗██╔══██╗██╔════╝██╔════╝██║ ██║██╔═══██╗██╔══██╗██╔══██╗ ║
║ ██████╔╝███████║███████╗███████╗██║ █╗ ██║██║ ██║██████╔╝██║ ██║ ║
║ ██║ ██║ ██║███████║███████║╚███╔███╔╝╚██████╔╝██║ ██║██████╔╝ ║
╚═══════════════════════════════════════════════════════════════════════════╝
═══════════════════════════════════════════════════════════════════════════
║ ⚠ WARNING: UNAUTHORIZED ACCESS IS STRICTLY PROHIBITED ⚠ ║
═══════════════════════════════════════════════════════════════════════════
- Python 3.8 or higher
- pip (Python package manager)
# Clone the repository
git clone https://github.com/YOUR_USERNAME/password-manager.git
cd password_manager
# Install dependencies
pip install -r requirements.txt
# Run the application
python main.py- Create Master PIN - This is your main password (minimum 4 characters)
- Set Security Questions - Choose 3 questions for identity verification
- Save Recovery Key - Store this key safely! It's your only way to recover access
┌─────────────────────────────────────┐
│ MENU UTAMA │
├─────────────────────────────────────┤
│ [1] 📋 View All Passwords │
│ [2] ➕ Add New Password │
│ [3] 🔍 Search Password │
│ [4] 🗑️ Delete Password │
│ [5] 🔄 Change Master PIN │
│ [6] 🚪 Exit │
└─────────────────────────────────────┘
| Command | Description |
|---|---|
1 |
Display all stored passwords in a table |
2 |
Add a new password entry (Service, Username, Password) |
3 |
Search passwords by service name or username |
4 |
Delete a password entry |
5 |
Change your Master PIN |
6 |
Exit the application |
┌─────────────────────────────────────────────────────────────┐
│ USER INPUT │
│ (Master PIN) │
└─────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PBKDF2HMAC │
│ • Algorithm: SHA-256 │
│ • Iterations: 480,000 (OWASP 2023 Standard) │
│ • Salt: 32 bytes cryptographically random │
└─────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ FERNET ENCRYPTION │
│ • AES-128-CBC for confidentiality │
│ • HMAC-SHA256 for authentication │
└─────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ data.vault │
│ (Encrypted Binary File) │
└─────────────────────────────────────────────────────────────┘
- Zero-Knowledge: Passwords are encrypted locally; even if someone gets your vault file, they can't read it without the PIN
- Key Derivation: Uses PBKDF2 with 480,000 iterations to resist brute-force attacks
- Authenticated Encryption: Fernet provides both encryption and authentication
- Secure Recovery: Two-factor recovery using both Recovery Key and Security Questions
- Run
python main.py - Type
Rwhen prompted for PIN - Enter your Recovery Key (format:
XXXX-XXXX-XXXX-XXXX-XXXX) - Answer at least 2 out of 3 security questions correctly
- Create a new PIN or view your current PIN
- ✅ Write it on paper and store in a safe
- ✅ Store in a different password manager
- ✅ Keep in a physical vault
- ❌ Don't store on the same computer
- ❌ Don't share with anyone
- ❌ Don't take photos with unsecured devices
password-manager/
├── main.py # Entry point
├── requirements.txt # Dependencies
├── README.md # Documentation
├── .gitignore # Git ignore rules
│
└── password_manager/ # Main package
├── __init__.py # Package metadata
├── config.py # Configuration & constants
├── crypto.py # Encryption & key derivation
├── storage.py # Database operations
├── auth.py # Authentication
├── recovery.py # Recovery system
├── menu.py # Menu handlers
├── ui.py # User interface
└── styles.py # Colors & ASCII art
| Module | Purpose |
|---|---|
config.py |
Constants, paths, security settings |
crypto.py |
Encryption, decryption, hashing, key derivation |
storage.py |
CRUD operations for vault files |
auth.py |
Login and vault creation |
recovery.py |
Security questions and recovery process |
menu.py |
Handler for each menu option |
ui.py |
Display functions and formatting |
styles.py |
ANSI colors and ASCII art |
| File | Description |
|---|---|
data.vault |
Your encrypted passwords |
salt.key |
Unique salt for encryption |
recovery.vault |
Encrypted recovery data |
security.vault |
Encrypted security questions |
These files are already in .gitignore and should NEVER be committed to version control.
- Use a strong Master PIN - Combine letters, numbers, and symbols
- Keep backups - Copy your
.vaultand.keyfiles to secure locations - Store Recovery Key safely - This is your only way to recover if you forget the PIN
- Don't share files - Each installation should have its own vault
cryptography>=41.0.0# Run the application
python main.py- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- cryptography - Python cryptographic library
- Fernet - Symmetric encryption recipe
- PBKDF2 - Password-Based Key Derivation Function
Made with ❤️ for secure password management