{"id":49892029,"url":"https://github.com/nikitasmen/password-manager-","last_synced_at":"2026-05-15T21:22:43.096Z","repository":{"id":165226418,"uuid":"640583544","full_name":"nikitasmen/password-manager-","owner":"nikitasmen","description":"password manager in c++","archived":false,"fork":false,"pushed_at":"2025-08-31T13:18:59.000Z","size":495,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T15:23:54.865Z","etag":null,"topics":["aes","cmake","cpp","fltk-gui-library","lfsr","password-manager","rsa"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikitasmen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-14T15:16:35.000Z","updated_at":"2025-08-31T13:19:03.000Z","dependencies_parsed_at":"2025-02-09T13:26:56.177Z","dependency_job_id":"981da7ab-da75-473a-95ac-a8d16e5b8e75","html_url":"https://github.com/nikitasmen/password-manager-","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/nikitasmen/password-manager-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitasmen%2Fpassword-manager-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitasmen%2Fpassword-manager-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitasmen%2Fpassword-manager-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitasmen%2Fpassword-manager-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikitasmen","download_url":"https://codeload.github.com/nikitasmen/password-manager-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitasmen%2Fpassword-manager-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33080777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes","cmake","cpp","fltk-gui-library","lfsr","password-manager","rsa"],"created_at":"2026-05-15T21:22:42.494Z","updated_at":"2026-05-15T21:22:43.090Z","avatar_url":"https://github.com/nikitasmen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Password Manager\n\nA secure, cross-platform password management tool written in C++17 with unified executable supporting both GUI and CLI modes, advanced encryption, and automatic update capabilities.\n\n## Features\n\n- **Unified Application**: Single executable that can run in both GUI and CLI modes\n- **Secure Local Storage**: All credentials are stored locally in encrypted JSON format with automatic backups\n- **Advanced Encryption System**:\n  - Multiple encryption backends (AES-256, LFSR, RSA)\n  - Pluggable encryption architecture with factory pattern\n  - Salt-based encryption for enhanced security\n  - Seamless encryption algorithm migration\n- **Robust Storage System**:\n  - Automatic file backups with timestamps\n  - RAII-based resource management\n  - Transaction-safe operations with rollback capability\n  - DRY principles with common utility modules\n- **Multiple User Interfaces**:\n  - Modern graphical UI (GUI) using FLTK with update dialogs\n  - Text-based UI (TUI) for terminal environments\n  - Shared core API for consistent functionality\n- **Auto-Update System**:\n  - GitHub integration for checking latest releases\n  - Automatic download and installation with progress tracking\n  - Cross-platform update support (Windows, macOS, Linux)\n  - Secure update process with backup and rollback\n- **Security Enhancements**:\n  - Secure clipboard operations with auto-clear\n  - Command injection prevention in system calls\n  - Memory-safe operations with smart pointers\n  - Comprehensive error handling and logging\n- **Configuration Management**:\n  - File-based configuration system (.config)\n  - Configurable GitHub repository settings\n  - Flexible UI mode selection\n  - User-customizable security settings\n\n## Architecture\n\nThe project follows a modular architecture with these key components:\n\n- **Core**: Core functionality shared across all interfaces\n  - `api.cpp/h`: Main credentials management API\n  - `json_storage.cpp/h`: JSON-based credential storage\n  - `file_system.cpp/h`: File system operations\n  - `UIManager`: Interface for UI components\n  - `ConfigManager`: Application configuration\n\n- **Crypto**: Encryption subsystem\n  - `encryption_interface.h`: Base interface for all encryption backends\n  - `aes_encryption.cpp/h`: AES encryption implementation\n  - `lfsr_encryption.cpp/h`: LFSR stream cipher implementation\n  - `salted_encryption.h`: Salt-based encryption wrapper\n  - `encryption_factory.cpp/h`: Factory for creating encryption instances\n  - `cipher_context_raii.cpp/h`: RAII wrapper for encryption contexts\n\n- **Terminal UI**: Text-based interface\n  - `tui_main.cpp`: Entry point for terminal application\n  - `terminal_ui.cpp/h`: Terminal UI components\n  - `cli_ui.cpp/h`: Command handling and application controllers\n\n- **Graphical UI**: FLTK-based interface\n  - `gui_main.cpp`: Entry point for graphical application\n  - `gui.cpp/h`: GUI components and event handlers\n  - `dialogs/`: Various dialog implementations\n\n- **Configuration**:\n  - `GlobalConfig.cpp/h`: Shared configuration settings\n  - `MigrationHelper.cpp/h`: Handles data migration between versions\n\n## Project Structure\n\n```plaintext\npassword-manager/\n├── build.sh                       # Build script for all components\n├── CMakeLists.txt                 # CMake configuration\n├── password_manager               # Unified executable (generated)\n├── data/                          # Application data directory\n│   └── secure_storage.json        # Encrypted credentials database\n├── include/                       # Third-party headers\n│   └── nlohmann/\n│       └── json.hpp\n├── src/\n│   ├── main.cpp                   # Unified application entry point\n│   ├── gui_main.cpp               # GUI mode implementation\n│   ├── tui_main.cpp               # Terminal UI mode implementation\n│   ├── cli/                       # Command-line interface components\n│   │   ├── TerminalUIManager.cpp\n│   │   └── TerminalUIManager.h\n│   ├── config/                    # Configuration settings\n│   │   ├── GlobalConfig.cpp\n│   │   ├── GlobalConfig.h\n│   │   ├── MigrationHelper.cpp\n│   │   └── MigrationHelper.h\n│   ├── core/                      # Core functionality\n│   │   ├── api.cpp\n│   │   ├── api.h\n│   │   ├── base64.cpp\n│   │   ├── base64.h\n│   │   ├── clipboard.cpp\n│   │   ├── clipboard.h\n│   │   ├── credential_data.h\n│   │   ├── encryption.cpp\n│   │   ├── encryption.h\n│   │   ├── json_storage.cpp\n│   │   ├── json_storage.h\n│   │   ├── terminal_ui.cpp\n│   │   ├── terminal_ui.h\n│   │   ├── UIManager.cpp\n│   │   ├── UIManager.h\n│   │   ├── UIManagerFactory.cpp\n│   │   └── UIManagerFactory.h\n│   ├── crypto/                    # Encryption subsystem\n│   │   ├── aes_encryption.cpp\n│   │   ├── aes_encryption.h\n│   │   ├── cipher_context_raii.cpp\n│   │   ├── cipher_context_raii.h\n│   │   ├── encryption_factory.cpp\n│   │   ├── encryption_factory.h\n│   │   ├── encryption_interface.h\n│   │   ├── lfsr_encryption.cpp\n│   │   ├── lfsr_encryption.h\n│   │   ├── rsa_encryption.cpp\n│   │   └── rsa_encryption.h\n│   ├── gui/                       # Graphical user interface\n│   │   ├── fl_main.cpp\n│   │   ├── password_gui.cpp\n│   │   ├── password_gui.h\n│   │   └── [other GUI files]\n│   ├── updater/                   # Auto-update system\n│   │   ├── AppUpdater.cpp\n│   │   ├── AppUpdater.h\n│   │   ├── GitHubAPI.cpp\n│   │   ├── GitHubAPI.h\n│   │   ├── system_utils.cpp\n│   │   └── system_utils.h\n│   └── utils/                     # Common utilities (DRY compliance)\n│       ├── filesystem_utils.cpp\n│       ├── filesystem_utils.h\n│       ├── error_utils.cpp\n│       ├── error_utils.h\n│       ├── backup_utils.cpp\n│       └── backup_utils.h\n├── tests/                         # Test files\n│   └── base64_test.cpp\n├── .gitignore\n├── LICENSE\n└── README.md\n```\n\n\n\n### Security Enhancements\n\n## Usage\n\nThe application provides a unified executable with both GUI and CLI modes.\n\n### Command Line Arguments\n\n```bash\n# Run in GUI mode (default)\n./password_manager\n./password_manager -g\n./password_manager --gui\n\n# Run in CLI/Terminal mode\n./password_manager -t\n./password_manager --terminal\n\n# Show help\n./password_manager --help\n```\n\n### Graphical User Interface (GUI)\n\nThe GUI mode provides a user-friendly desktop experience:\n\n```bash\n./password_manager -g\n```\n\nGUI features include:\n- Modern FLTK-based interface with dialogs\n- Login dialog for master password protection\n- List view of all stored platforms\n- Add/view credential forms with secure input\n- Credential deletion with confirmation\n- Auto-update notifications and progress dialogs\n\n### Terminal User Interface (CLI)\n\nFor a text-based interactive experience:\n\n```bash\n./password_manager -t\n```\n\nCLI features include:\n- Menu-driven interface with numbered options\n- Secure master password handling\n- Interactive credential management\n- Platform listing and search\n- Command injection prevention\n\nAvailable CLI operations:\n1. Change Master Password\n2. Add New Platform Credentials\n3. Retrieve Platform Credentials\n4. Delete Platform Credentials\n5. Show All Stored Platforms\n\n## Build Instructions\n\n### Using the Build Script\n\nThe easiest way to build the unified executable:\n\n```bash\n./build.sh\n```\n\nThis creates the single `password_manager` executable with both GUI and CLI modes.\n\n### Using CMake Directly\n\n```bash\nmkdir -p build\ncd build\ncmake ..\nmake\n```\n\nThis produces a single `password_manager` executable that can run in either GUI or CLI mode based on command-line arguments.\n\n### Build Output\n\nAfter building, you'll have:\n- `password_manager` - Unified executable supporting both modes\n- Test executables (if enabled)\n- Data directory structure\n\n## Security Features\n\nThis password manager implements multiple layers of security:\n\n1. **Multiple Encryption Backends**:\n   - AES-256 for strong cryptographic protection\n   - LFSR (Linear Feedback Shift Register) for lightweight encryption\n   - Pluggable architecture for future encryption algorithms\n\n2. **Secure Key Management**:\n   - Master password hashing with salt\n   - Secure key derivation\n   - Encryption context management with RAII\n\n3. **Data Protection**:\n   - Salt-based encryption to prevent rainbow table attacks\n   - Secure memory handling\n   - Automatic data migration between encryption types\n\n4. **Operational Security**:\n   - Automatic backups before critical operations\n   - Secure file handling\n   - Transaction-safe storage operations\n5. **Secure File Handling**: Proper file resource management with immediate closing after operations\n6. **Memory Management**: Smart pointers to prevent memory leaks\n7. **Error Handling**: Comprehensive exception handling throughout the codebase\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n### Build Script Options\n\n```bash\n./build.sh --direct\n\n# Clean and rebuild everything\n./build.sh --clean\n\n# Build CLI and terminal UI only\n./build.sh --cli --tui\n```\n\nFor all available options, run:\n\n```bash\n./build.sh --help\n```\n\n## Dependencies\n\n- C++17 or later\n- CMake 3.10+ (for building)\n- FLTK 1.3+ (for the GUI version)\n\n## Recent Improvements\n\nThe codebase has undergone significant improvements:\n\n- **Optimized File Handling**: Every data operation now properly opens and closes files\n- **Enhanced Error Recovery**: Better error handling during file operations\n- **Code Refactoring**: Applied DRY principles with helper methods\n- **GUI Stability**: Fixed crashes when viewing credentials multiple times\n- **Resource Management**: Proper cleanup of FLTK widgets and buffers\n- **Standardized Dialogs**: Consistent patterns for all user interactions\n- **Auto-Update System**: Added GitHub integration for automatic updates\n\n## Auto-Update System\n\nThe GUI version includes a built-in update system that allows you to:\n\n- **Check for Updates**: Access via the Help menu → Check for Updates\n- **Automatic Download**: Download and install updates with progress reporting\n- **Version Comparison**: Compare current version with latest GitHub release\n- **Release Notes**: View what's new in each version\n- **Cross-Platform**: Works on Windows, macOS, and Linux\n- **Secure Updates**: Downloads from official GitHub releases\n\n### How to Use Updates\n\n1. Open the GUI application (`./password_manager -g`)\n2. Go to Help → Check for Updates\n3. Click \"Check for Updates\" to see if a new version is available\n4. If an update is found, click \"Download Update\" to install it\n5. Restart the application when prompted\n\nThe updater will:\n\n- Download the latest release from the GitHub repository\n- Create a backup of your current version\n- Replace the executable with the new version\n- Maintain all your existing data and settings\n\n## Architecture Improvements\n\nThis codebase follows DRY (Don't Repeat Yourself) principles with:\n\n- **Common Utilities**: Shared filesystem, error handling, and backup utilities in `src/utils/`\n- **Unified Architecture**: Single executable supporting both GUI and CLI modes\n- **Modular Design**: Factory patterns for encryption backends and UI managers\n- **Resource Management**: RAII patterns for secure resource handling\n- **Error Consistency**: Standardized error logging and exception handling\n\n## Future Enhancements\n\nPotential future improvements to consider:\n\n- Password strength checker with entropy analysis\n- Auto-generation of strong passwords with customizable policies\n- Import/export functionality for credential migration\n- Configurable encryption options with user selection\n- Search functionality for large credential sets\n- Credential expiration notifications and alerts\n- Password history tracking and audit logs\n- Multi-factor authentication support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikitasmen%2Fpassword-manager-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikitasmen%2Fpassword-manager-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikitasmen%2Fpassword-manager-/lists"}