A secure local password manager
Project description
๐ Password Manager
A secure Password Manager built with Python that securely stores your passwords locally using strong encryption.
๐ Features
- Secure Storage: All passwords encrypted with Fernet symmetric encryption
- Password Management: Add, view, edit, and delete passwords
- Security Analysis: Password strength evaluation and suggestions
- Password Generator: Create strong, random passwords
- Master Password: Protect access with a master password
- Two-Factor Authentication: Additional security with TOTP (Time-based One-Time Password)
- Categorization: Organize passwords by category
- Security Audit: Find weak, reused, expired, or breached passwords
- Backup & Restore: Export/import functionality
- Password Expiration: Set expiry dates for passwords
- Command-Line Interface: User-friendly CLI with color formatting
- GUI Interface: Optional PyQt5 graphical interface
- Activity Logging: Track all important actions
๐ Project Structure
The project is organized into modules for maintainability and separation of concerns:
password-manager/
โโโ [app.py](http://_vscodecontentref_/4) # CLI application entry point
โโโ [gui.py](http://_vscodecontentref_/5) # GUI application entry point
โโโ [initialize.py](http://_vscodecontentref_/6) # Setup script
โโโ [migrate_db.py](http://_vscodecontentref_/7) # Database migration tool
โโโ [requirements.txt](http://_vscodecontentref_/8) # Python dependencies
โโโ [setup.py](http://_vscodecontentref_/9) # Packaging configuration
โโโ utils/ # Core utilities
โ โโโ [auth.py](http://_vscodecontentref_/10) # Authentication
โ โโโ [backup.py](http://_vscodecontentref_/11) # Import/export
โ โโโ [crypto.py](http://_vscodecontentref_/12) # Encryption/decryption
โ โโโ [database.py](http://_vscodecontentref_/13) # Database operations
โ โโโ [interactive.py](http://_vscodecontentref_/14) # CLI input utilities
โ โโโ [logger.py](http://_vscodecontentref_/15) # Logging facilities
โ โโโ [password_analysis.py](http://_vscodecontentref_/16) # Password evaluation
โ โโโ [security_analyzer.py](http://_vscodecontentref_/17) # Breach checking
โ โโโ [security_audit.py](http://_vscodecontentref_/18) # Security auditing
โ โโโ [two_factor.py](http://_vscodecontentref_/19) # 2FA implementation
โ โโโ [ui.py](http://_vscodecontentref_/20) # UI formatting
โโโ tests/ # Unit & integration tests
โ โโโ [test_crypto.py](http://_vscodecontentref_/21)
โ โโโ [test_database.py](http://_vscodecontentref_/22)
โ โโโ [test_integration.py](http://_vscodecontentref_/23)
โ โโโ [test_password_analysis.py](http://_vscodecontentref_/24)
โโโ [README.md](http://_vscodecontentref_/25) # Project documentation
๐ ๏ธ Installation
-
Clone the repository:
git clone https://github.com/yourusername/password-manager.git cd password-manager
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
๐ก๏ธ Requirements
- Python 3.8+
- Libraries:
cryptographycolorama
Install them via:
pip install -r requirements.txt
๐ธ Screenshots
Home Screen
Adding a Password
Editing a Password
Security Audit
Backup Options
Exporting Passwords
Importing Passwords
๐ Future Improvements
- โ Add a Master Password authentication
- โ Password strength evaluation and generator
- โ Unit tests for critical functions
- โ Backup and restore functionality
- โ Add a search function for passwords
- โ Add password categories/tags
- โ Add password expiration notifications
- โ GUI version (PyQT)
- Two-factor authentication
- Password history tracking
- Cross-platform desktop application (using PyInstaller)
- Docker support
๐ How It Works
Security Model
This Password Manager uses a multi-layered security approach:
-
Master Password: Access to the application is protected by a master password that is never stored directly. Instead, a salted hash is stored using PBKDF2 with 100,000 iterations.
-
Encryption: All passwords are encrypted using Fernet symmetric encryption (AES-128 in CBC mode with PKCS7 padding).
-
Key Management: The encryption key is stored locally and is used for encrypting/decrypting the stored passwords.
-
Database: Passwords are stored in a local SQLite database, with the password values stored as encrypted binary data.
-
Backup Protection: When exporting passwords, the entire backup file is encrypted using the same strong encryption.
Data Flow
-
When adding a password:
- Password is encrypted using the local key
- Encrypted data is stored in the SQLite database
-
When viewing passwords:
- Encrypted data is retrieved from the database
- Each password is decrypted for display
-
When exporting passwords:
- All passwords are decrypted
- The entire password list is serialized to JSON
- The JSON is encrypted and written to a file
๐จโ๐ป Author
- ArcheWizard โ GitHub Profile
Create a MIT license file
curl https://opensource.org/licenses/MIT > LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file secure_password_manager-1.5.0.tar.gz.
File metadata
- Download URL: secure_password_manager-1.5.0.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed0cf93700594831bf9e4518beaf1f5116e09a94f94a4efe4da29169008937aa
|
|
| MD5 |
952ca55c662aed4d9e8ff6085f04b3d3
|
|
| BLAKE2b-256 |
0bda1deea65e6d862fa237b25228a55d6a426ca7288b803071fff7a88d941b3b
|
File details
Details for the file secure_password_manager-1.5.0-py3-none-any.whl.
File metadata
- Download URL: secure_password_manager-1.5.0-py3-none-any.whl
- Upload date:
- Size: 41.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9802b369cc03c3ceb86dca54ca9c110f06b71aea9278e145917ab26c293409c1
|
|
| MD5 |
ddf6bc2a3c369954c42ec6e359f108f0
|
|
| BLAKE2b-256 |
20479725da224ddb4ef93adbafb33c490872a631a1622e1220ccb2445289b3a5
|