Skip to main content

A secure local password manager

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 lives in the docs/ folder:

  • Current status: docs/current_status.md
  • Architecture: docs/architecture.md
  • Database: docs/database.md
  • Security model: docs/security.md
  • Development guide: docs/development.md
  • Roadmap: docs/roadmap.md

๐Ÿ› ๏ธ 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

  1. Clone the repository:

    git clone https://github.com/ArcheWizard/password-manager.git
    cd password-manager
    
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate   # On Windows: venv\Scripts\activate
    
  3. Install the package in development mode:

    pip install -e .
    

๐Ÿ›ก๏ธ Requirements

  • Python 3.8+
  • Core dependencies (installed automatically):
    • cryptography: For secure encryption
    • PyQt5: For the GUI interface
    • zxcvbn: For password strength analysis
    • pillow: For image processing
    • Additional dependencies as listed in requirements.txt

๐Ÿ“‚ Project Structure

The project is organized into modules for maintainability and separation of concerns:

password-manager/
โ”œโ”€โ”€ apps/                  # Application code
โ”‚   โ”œโ”€โ”€ __init__.py        # Package initialization
โ”‚   โ”œโ”€โ”€ app.py             # CLI application entry point
โ”‚   โ””โ”€โ”€ gui.py             # GUI application entry point
โ”œโ”€โ”€ 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
โ”‚   โ”œโ”€โ”€ security_analyzer.py # Breach checking
โ”‚   โ”œโ”€โ”€ security_audit.py  # Security auditing
โ”‚   โ”œโ”€โ”€ two_factor.py      # 2FA implementation
โ”‚   โ””โ”€โ”€ ui.py              # UI formatting
โ”œโ”€โ”€ tests/                 # Unit & integration tests
โ””โ”€โ”€ README.md              # Project documentation

๐Ÿ“ธ Screenshots

Home Screen

Home Screen

Adding a Password

Add Password

Editing a Password

Edit Password

Security Audit

Security Audit

Backup Options

Backup

Exporting Passwords

Export

Importing Passwords

Import

๐Ÿ”’ How It Works

Security Model

This Password Manager uses a multi-layered security approach:

  1. 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.

  2. Encryption: All passwords are encrypted using Fernet symmetric encryption (AES-128-CBC + HMAC integrity, via cryptography).

  3. Key Management: The encryption key is stored locally and is used for encrypting/decrypting the stored passwords.

  4. Database: Passwords are stored in a local SQLite database, with the password values stored as encrypted binary data.

  5. Backup Protection: When exporting passwords, the entire backup file is encrypted using the same strong encryption.

Data Flow

  1. When adding a password:

    • Password is encrypted using the local key
    • Encrypted data is stored in the SQLite database
  2. When viewing passwords:

    • Encrypted data is retrieved from the database
    • Each password is decrypted for display
  3. 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.key using 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

๐Ÿ“„ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secure_password_manager-1.8.1.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secure_password_manager-1.8.1-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file secure_password_manager-1.8.1.tar.gz.

File metadata

  • Download URL: secure_password_manager-1.8.1.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for secure_password_manager-1.8.1.tar.gz
Algorithm Hash digest
SHA256 8554871ab8b7f17867fc747fdf4bf088fc1bed887d3ca75177b5d31e74880692
MD5 af91f6ede50562b9bbd4314f673793ba
BLAKE2b-256 4ad6813782be2892e6171abd2189e90ab038895fd01d003606e1f2bcb914e271

See more details on using hashes here.

File details

Details for the file secure_password_manager-1.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for secure_password_manager-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86e0447ea9cc0ec6272adc95150a5825d05ac28da78cb6b88cb123b5011760ff
MD5 0b9e0147c2d0465f98b2b0920537efa6
BLAKE2b-256 9ce2eb8e5942933fcf46d799f49a12906f8d84831f41e115c18b58b5d1edf58b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page