A secure local password manager with strong encryption
Project description
๐ Secure Password Manager
A local-first Password Manager built with Python that securely stores your passwords using strong encryption.
Current version: see VERSION.txt (v1.8.0)
๐ What's New in v1.8.0:
- KDF versioning for future-proof key derivation
- Optional key protection with master password (encrypt
secret.key) - Export integrity HMAC to detect tampering
- Bulk import transactions for faster, lock-free restore
- See v1.8.0 improvements for details
๐ 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
๐ Documentation
Comprehensive project documentation is organized in the docs/ folder:
For Users
- Documentation Index - Complete documentation overview
For Developers
- Architecture - System architecture and design
- Security Model - Security implementation details
- Database Schema - Database structure
- Contributing Guide - Development guide
- Roadmap - Future plans
Build Documentation
- Build Guide - Building from source
- Linux Build - Linux-specific instructions
๐ ๏ธ Installation
Option 1: Install from PyPI (Recommended)
The simplest way to install Secure Password Manager:
pip install secure-password-manager
After installation, you can run the application with:
# For the command-line interface
password-manager
# For the graphical interface
password-manager-gui
Option 2: Install from Source
-
Clone the repository:
git clone https://github.com/ArcheWizard/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 the package in development mode:
pip install -e .
-
If upgrading from an older version, run the migration script:
python scripts/migrate_to_new_structure.pyThis will move existing data files to the new
.data/directory.
๐ก๏ธ Requirements
- Python 3.8+
- Core dependencies (installed automatically):
cryptography: For secure encryptionPyQt5: For the GUI interfacezxcvbn: For password strength analysispillow: For image processing- Additional dependencies as listed in
requirements.txt
๐ Project Structure
The project follows PEP 517 src/ layout for better packaging and distribution:
password-manager/
โโโ src/ # Source code (PEP 517 layout)
โ โโโ secure_password_manager/
โ โโโ __init__.py # Package initialization
โ โโโ apps/ # Application entry points
โ โ โโโ app.py # CLI application
โ โ โโโ gui.py # GUI application
โ โโโ utils/ # Core utilities
โ โโโ auth.py # Authentication
โ โโโ backup.py # Import/export
โ โโโ crypto.py # Encryption/decryption
โ โโโ database.py # Database operations
โ โโโ interactive.py # CLI input utilities
โ โโโ logger.py # Logging facilities
โ โโโ password_analysis.py # Password evaluation
โ โโโ paths.py # Path management (XDG)
โ โโโ security_analyzer.py # Breach checking
โ โโโ security_audit.py # Security auditing
โ โโโ two_factor.py # 2FA implementation
โ โโโ ui.py # UI formatting
โโโ tests/ # Unit & integration tests
โโโ docs/ # Documentation
โ โโโ development/ # Technical documentation
โ โโโ build/ # Build instructions
โ โโโ releases/ # Release notes
โโโ scripts/ # Build and utility scripts
โโโ assets/ # Static assets
โ โโโ icons/ # Application icons
โ โโโ screenshots/ # UI screenshots
โโโ .data/ # Development data (gitignored)
โโโ pyproject.toml # Project configuration
Data Storage
The application uses XDG Base Directory Specification for organized data storage:
Development Mode (when running from source):
- All data stored in
.data/directory in project root
Production Mode (when installed via pip):
- Data files:
~/.local/share/secure-password-manager/ - Config files:
~/.config/secure-password-manager/ - Cache files:
~/.cache/secure-password-manager/ - Log files:
~/.local/share/secure-password-manager/logs/
๐ธ Screenshots
First Time Setup
Login
Home Screen
Password Management
Categories
Security Audit
Backup & Restore
Settings & Logs
๐ 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-CBC + HMAC integrity, via
cryptography). -
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
๐งช Testing
pytest -q
Notes:
- Integration tests use temporary databases and patch
DB_FILE - Network-dependent breach checks are limited and resilient to failures
- SQLite can lock under concurrent operations; tests include small delays/workarounds
๐บ๏ธ Roadmap (excerpt)
See docs/roadmap.md for the full plan. Highlights:
- Derive or protect
secret.keyusing the master password (or OS keyring) - Stronger KDF defaults (Argon2id/scrypt) with parameter versioning
- Improved import/restore reliability and integrity verification
- Clipboard auto-clear and additional UX hardening
๐ Changelog
See CHANGELOG.md for release notes.
๐ Future Improvements (historical)
- โ Master Password authentication
- โ Password strength evaluation and generator
- โ Unit tests for critical functions
- โ Backup and restore functionality
- โ Search
- โ Categories/tags
- โ Password expiration notifications
- โ GUI version (PyQt)
- โ Package available on PyPI
- โ Two-factor authentication (TOTP)
- Password history tracking
- Cross-platform desktop application (PyInstaller)
- Docker support
๐จโ๐ป Author
- ArcheWizard โ GitHub Profile
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
For security considerations and design details, start with docs/security.md and docs/architecture.md.
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.8.3.tar.gz.
File metadata
- Download URL: secure_password_manager-1.8.3.tar.gz
- Upload date:
- Size: 52.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01a1661387bd58a82dfbc7e30b64cac56dce46c9d9a96b9b46b1a80c6f7cde7d
|
|
| MD5 |
d020df5b6b323daea0d6894ea7d54b82
|
|
| BLAKE2b-256 |
e909f446eb283b0a4fa0bc6ebf1bb92508040279053966cfcac149a2d419d2db
|
File details
Details for the file secure_password_manager-1.8.3-py3-none-any.whl.
File metadata
- Download URL: secure_password_manager-1.8.3-py3-none-any.whl
- Upload date:
- Size: 50.0 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 |
be07c16ffffad1b7757038f3eac7483fab04b5ae9696a9a5fc2dac80d3b1161e
|
|
| MD5 |
ef7b61089c470b0301547f7cc05f9453
|
|
| BLAKE2b-256 |
6922cc3c06f606ad3eb4dcc1e1e5f0299de394191cc1e381acabe36a76e448d9
|