A secure wallet application using Dear ImGui with advanced post-quantum cryptography for password protection and encrypted file storage.
- Post-Quantum Cryptography: Uses Kyber-768 algorithm from liboqs
- Enhanced Security v2.0: Multi-layer encryption with AES-256-GCM + Kyber
- Quantum-Safe: Resistant to attacks from quantum computers
- Encrypted Storage: All passwords encrypted with Scrypt key derivation
- Multi-User Support: Each user has unique quantum-safe key pairs
- Encrypted Archives: Secure file storage with post-quantum encryption
- Authentication Tags: Integrity verification prevents file tampering
- Restrictive Permissions: File system level protection (600/700 permissions)
- β GUI application with Dear ImGui (docking branch)
- β ENHANCED: Multi-layer security implementation (v2.0)
- β First-time setup for password creation with strong key derivation
- β Kyber-768 + AES-256-GCM encryption implementation
- β Login authentication with enhanced encrypted passwords
- β Multi-user support with dropdown selection
- β WORKING: Encrypted archives for secure file storage
- β NEW: Multiple archives support per user
- β VERIFIED: Archive selection and creation functionality
- β IMPROVED: ImGuiFileDialog integration for file browsing
- β NEW: Advanced font management system with custom fonts
- β SECURITY: Legacy attack tools neutralized
- β Cross-platform compatibility (Linux tested, Windows/macOS supported)
- Multiple Font Support: System fonts and custom font loading
- Real-time Font Switching: Change fonts without restart
- Dynamic Font Sizing: Adjust font size from 8px to 32px
- Live Preview: See changes before applying
- Font Auto-Detection: Automatically finds system fonts
- Custom Font Directory: Load fonts from
fonts/
folder
- System Integration: DejaVu Sans, Liberation Sans, Ubuntu fonts
- Custom Fonts: Support for TTF font files
- Font Preview: Real-time text preview with multiple samples
- Accessibility: Adjustable sizing for better readability
- Cross-Platform: Works on Linux, macOS, and Windows
- Key Derivation: Scrypt with strong parameters (N=32768, r=8, p=1)
- Secret Key Protection: AES-256-GCM encryption of Kyber secret keys
- Double Password Encryption: Kyber + AES layers for maximum security
- Authentication Tags: Integrity verification prevents tampering
- Random Salt & IV: Unique cryptographic parameters per user
- File Permissions: Restrictive OS-level access control
Feature | Version 1.0 | Version 2.0 |
---|---|---|
Secret Key Storage | β Plaintext | β AES-256-GCM Encrypted |
Password Encryption | β XOR only | β Kyber + AES-256-GCM |
Key Derivation | β None | β Scrypt (Strong params) |
Integrity Check | β None | β Authentication Tags |
Salt/IV | β None | β Random per user |
File Permissions | β Default | β Restrictive (600/700) |
Legacy Tools | β Working | β Neutralized |
PQC Wallet uses quantum-resistant algorithms to protect your data:
- Login: Your password is protected with quantum-safe encryption
- File Storage: Archives use hybrid encryption (classical + post-quantum)
- Data Protection: All sensitive data is encrypted with multiple layers
User Password β Scrypt β AES-256-GCM + Kyber768
- Scrypt: Key derivation function resistant to hardware attacks
- AES-256-GCM: 256-bit authenticated encryption (quantum-vulnerable but still strong)
- Kyber768: NIST-selected post-quantum key encapsulation mechanism
Archive Files β AES-256-CTR β Kyber768 KEM β Secure Storage
- AES-256-CTR: Fast file encryption for large data
- Kyber768: Protects the AES keys against quantum attacks
- Authentication: HMAC-SHA256 for data integrity
Kyber768 (Post-Quantum):
- Security Level: 192-bit (equivalent to AES-192)
- Key Size: 2400 bytes (public), 2400 bytes (secret)
- Ciphertext Size: 1088 bytes
- Based on: Module Learning With Errors (M-LWE) problem
- Quantum Resistance: β Proven secure against quantum computers
Scrypt (Key Derivation):
- Parameters: N=32768, r=8, p=1
- Output: 256-bit derived key
- Memory Cost: ~32MB (prevents ASIC attacks)
- Time Cost: Configurable difficulty
AES-256-GCM (Symmetric):
- Key Size: 256 bits
- Block Size: 128 bits
- Authentication: Built-in AEAD (Authenticated Encryption)
- IV Size: 128 bits (randomly generated)
Component | Classical Security | Quantum Security |
---|---|---|
Kyber768 | 192-bit | 192-bit β |
AES-256 | 256-bit | 128-bit |
Scrypt | Configurable | Memory-hard β |
HMAC-SHA256 | 256-bit | 128-bit |
Legend:
- β = Quantum-resistant
β οΈ = Quantum-vulnerable but computationally infeasible
Future quantum computers will break current encryption:
- RSA: Vulnerable to Shor's algorithm
- ECC: Vulnerable to Shor's algorithm
- AES: Strength halved by Grover's algorithm
- Kyber: Immune to known quantum attacks
PQC Wallet protects your data today and in the quantum future.
- CMake 3.16+
- OpenGL development libraries
- OpenSSL development libraries (for enhanced security)
- GLFW libraries and headers
- C++17 compatible compiler
- liboqs (automatically installed by setup script)
See the detailed installation guide below for instructions on installing all dependencies.
# Clone repository with all submodules
git clone --recursive https://github.com/SimedruF/PQCWallet-Core.git
cd PQCWallet
# Make setup script executable and run it
chmod +x setup.sh
./setup.sh
# Clone repository with all submodules
git clone --recursive https://github.com/SimedruF/PQCWallet-Core.git
cd PQCWallet
# Option 1: Use the setup wrapper (recommended)
setup_windows.bat
# Option 2: Run specific scripts manually
build\scripts\setup_dependencies_windows.bat
build\scripts\build_windows.bat
For detailed Windows build instructions, see: build/docs/BUILD_WINDOWS.md
./run.sh
# From build directory
build\PQCWallet.exe
# Or using the wrapper script
setup_windows.bat
# (select option 2 to build and run)
# Create desktop shortcut after building the application
./create_desktop_shortcut.sh
This creates:
- Desktop shortcut for easy access
- Applications menu entry
- Proper file associations
# Create desktop shortcut after building the application
create_desktop_shortcut_windows.bat
# Or use the wrapper script
setup_windows.bat
# (select option 5 to create shortcut)
This creates a desktop shortcut with proper Windows integration.
# Generate a professional PQC-themed icon
./generate_icon.sh
# Create a simple SVG-based icon (no ImageMagick required)
./create_simple_icon.sh
Both scripts create multiple icon sizes and formats for optimal cross-platform compatibility.
For additional fonts, download popular font packages:
# Download and install popular fonts
./download_fonts.sh
# Or manually add TTF fonts to fonts/ directory
cp your-font.ttf fonts/
Access font settings via View β Font Settings
in the application.
For existing users, migrate to enhanced security:
# Compile and run the migration tool
g++ -std=c++17 -I. migrate_security.cpp src/PasswordManager.cpp -loqs -lssl -lcrypto -o migrate_security
./migrate_security
# Test security improvements
./demo_security.sh
PQCWallet/
βββ src/
β βββ main.cpp # Application entry point
β βββ LoginWindow.cpp/.h # Login interface with user selection
β βββ WalletWindow.cpp/.h # Main wallet interface with archive management
β βββ PasswordManager.cpp/.h # Enhanced Kyber+AES encryption manager
β βββ CryptoArchive.cpp/.h # Multi-archive encrypted storage manager
β βββ ArchiveWindow.cpp/.h # Archive GUI interface with file management
β βββ FontManager.cpp/.h # Font management and customization system
β βββ FirstTimeSetupWindow.cpp/.h # Initial setup interface
βββ third_party/
β βββ ImGuiFileDialog/ # File dialog library for intuitive browsing
βββ fonts/ # Custom fonts directory (TTF files)
βββ users/ # Enhanced encrypted password storage (v2.0)
βββ archives/ # Multiple encrypted file archives per user
βββ build/ # Build artifacts
βββ tools/ # Security analysis and migration tools
βββ docs/ # Documentation and guides
βββ setup.sh # Enhanced installation script
βββ run.sh # Application launcher
βββ download_fonts.sh # Font download script
βββ migrate_security.cpp # Security migration tool
βββ demo_security.sh # Security demonstration script
βββ README.md # This file
βββ FONT_GUIDE.md # Font management guide
βββ SECURITY_IMPROVEMENTS.md # Detailed security analysis
βββ PASSWORD_EXTRACTION_GUIDE.md # Security research documentation
βββ USAGE.md # Detailed usage instructions
βββ EXAMPLES.md # Code examples
βββ ARCHIVE_GUIDE.md # Archive usage guide
βββ IMGUI_FILE_DIALOG_GUIDE.md # File dialog integration guide
βββ TEST_RESULTS.md # Test verification results
- Primary Algorithm: Kyber-768 (NIST PQC standardized)
- Secondary Encryption: AES-256-GCM for additional protection
- Library: liboqs (Open Quantum Safe) + OpenSSL
- Key Derivation: Scrypt with parameters N=32768, r=8, p=1
- Key Sizes: 1184 bytes public key, 2400 bytes secret key
- Security Level: Equivalent to AES-192 against quantum attacks + classical protection
- File Format: Enhanced binary encrypted files (~4.8KB per user)
- Storage: Passwords never stored in plaintext
- Key Derivation: Scrypt with random 256-bit salt
- Primary Encryption: XOR with Kyber-derived shared secret
- Secondary Encryption: AES-256-GCM with authentication tags
- Secret Key Protection: Kyber secret keys encrypted with AES-256-GCM
- Verification: Multi-layer decryption-based authentication
- Integrity: Authentication tags prevent file tampering
- File Permissions: Restrictive OS-level protection (600 for files, 700 for directories)
- Framework: Dear ImGui with docking support
- Graphics: OpenGL 3.0+ with GLFW
- Windows: Enhanced Login, FirstTimeSetup, Wallet, and Archive interfaces
- Archive Management: Multiple archives per user with intuitive switching
- File Operations: Graphical file browser with ImGuiFileDialog
- User Experience: Settings moved to TopBar, improved navigation
- Styling: Custom dark theme with modern appearance
- First Run: Application detects no users and shows setup window
- User Creation: Enter username and password, encrypted with enhanced Kyber+AES
- Key Derivation: Scrypt generates strong encryption keys from password
- Secure Storage: All cryptographic material stored with authentication tags
- Login: Select user from dropdown and enter password
- Authentication: Multi-layer password verification using Kyber+AES
- Wallet Access: Main wallet interface opens upon successful login
- Archive Management: Access multiple encrypted archives per user
- Settings Access: Use TopBar settings button for configuration
- Automatic Detection: System detects old format files
- Secure Migration: Backup and upgrade to enhanced security
- Verification: Confirm migration success before removing backup
- Tool Neutralization: Old extraction tools no longer work
- Post-Quantum Encryption: Files encrypted with Kyber-768 + AES-256-GCM
- Multiple Archives: Create and manage multiple archives per user
- Archive Switching: Seamlessly switch between different archives
- File Management: Add, extract, preview, and remove files securely
- Integrity Verification: SHA-256 hash verification for each file
- User Isolation: Each user has their own encrypted archive collection
- Graphical File Browser: Enhanced ImGuiFileDialog for intuitive file selection
- Debug Capabilities: Comprehensive diagnostic tools for troubleshooting
- Create Archives: Create new archives with custom names
- Archive Selection: Choose from available archives in dropdown list
- Add Files: Import files using enhanced graphical file picker
- Extract Files: Export files using improved folder selection dialog
- File Preview: View text files and basic image information
- Archive Statistics: View total files, size, and last modified time
- Password Management: Change archive passwords securely
- Archive Diagnostics: Built-in repair and diagnostic tools
- Archive Creation: Create new archives for better organization
- Archive Listing: View all available archives for current user
- Default Archive: "img" archive created automatically for new users
- Archive Switching: Load different archives without restarting application
- Isolated Storage: Each archive has independent encryption and file storage
- Archive Naming: Custom names for better organization (e.g., "Documents", "Photos", "Work")
- Visual Navigation: Browse filesystem with improved interface
- File Type Filtering: Advanced filtering by file extensions
- Path Validation: Automatic path validation and correction
- Multi-platform Support: Consistent experience across operating systems
- Drag & Drop: Enhanced drag and drop support (implementation in progress)
- Folder Selection: Dedicated folder picker for extract operations
- Recent Paths: Remember frequently used paths
# After successful login, select from your archives in the main interface
# Choose from available archives or create new ones via the menu
# Click "Add Files" and use the enhanced file browser
# Files stored in archives/username_archivename.enc
# Use "Extract Selected" with improved folder picker
# Switch between archives using the archive selection interface
Each user can create and manage multiple archives for better file organization:
archives/username_archivename.enc
Examples:
archives/john_img.enc # Default "img" archive for user "john"
archives/john_documents.enc # "documents" archive for user "john"
archives/john_photos.enc # "photos" archive for user "john"
archives/john_work.enc # "work" archive for user "john"
- After authentication, you'll see the list of available archives
- Select the desired archive from the list
- Click "Open Selected Archive" to open the selected archive
- Or click "Create New Archive" to create a new archive
- Enter a name for the new archive and confirm
Each archive is independent and can contain its own set of files, all protected by the same user password.
- Independent Storage: Each archive maintains separate file storage and metadata
- Seamless Switching: Switch between archives without application restart
- Custom Organization: Group files by purpose, project, or category
- Shared Security: All archives use the same user authentication
- Scalable Design: No limit on number of archives per user
- Efficient Navigation: Quick archive selection from dropdown interface
# Test enhanced security migration
./migrate_security
# Demonstrate security improvements
./demo_security.sh
# Verify old tools are neutralized
./extract_password # Should fail with enhanced format
cd build && cmake .. && make -j$(nproc)
# Test enhanced password encryption
./test_encryption_v2
# Test legacy compatibility
./test_legacy_support
# Test multiple archives functionality
./test_multi_archives
# Test archive switching
./test_archive_switching
# Test complete application
./run.sh
# Test with multiple users
./test_multi_user
See TEST_RESULTS.md
for complete test verification.
- Multi-Layer Encryption: Kyber-768 + AES-256-GCM verified working
- Enhanced Key Derivation: Scrypt with strong parameters (N=32768, r=8, p=1)
- Authenticated Encryption: AES-GCM provides both encryption and authentication
- Legacy Tool Neutralization: Old extraction tools confirmed non-functional
- File Permissions: Restrictive OS-level permissions (600/700) enforced
- Migration Safety: Secure upgrade path from v1.0 to v2.0 format
- Quantum Resistance: Kyber-768 provides security against quantum attacks
- Encrypted Files: All password data encrypted with enhanced security
- Encrypted Archives: User files stored in quantum-safe archives
- Unique Keys: Each user has independent cryptographic material
- Access Control: Enhanced file-based user isolation
- No Plaintext: Passwords never stored or transmitted in plaintext
- Integrity Protection: Authentication tags prevent file tampering
- Migration Tool:
migrate_security.cpp
- Safely upgrade legacy users - Security Demo:
demo_security.sh
- Demonstrate security improvements - Analysis Tools: Various tools for security research and validation
- README.md: This comprehensive guide
- SECURITY_IMPROVEMENTS.md: Detailed security analysis and improvements
- PASSWORD_EXTRACTION_GUIDE.md: Security research documentation
- USAGE.md: Detailed usage instructions
- EXAMPLES.md: Code examples and API documentation
- TEST_RESULTS.md: Complete test verification results
- ARCHIVE_GUIDE.md: Multi-archive usage instructions
- IMGUI_FILE_DIALOG_GUIDE.md: File dialog integration details
- Analysis of security vulnerabilities in v1.0
- Detailed implementation of security improvements in v2.0
- Migration procedures and compatibility considerations
- Security testing methodologies and results
- OpenGL 3.0+ (graphics rendering)
- GLFW 3.3+ (window management)
- OpenSSL 3.0+ (enhanced cryptographic operations)
- liboqs 0.8+ (post-quantum cryptography)
- Dear ImGui (included as submodule)
- ImGuiFileDialog (included as submodule)
- stb_image (included in third_party)
- CMake 3.16+
- C++17 compatible compiler (GCC 8+, Clang 10+, MSVC 2019+)
- OpenGL development headers
- GLFW development headers
- OpenSSL development headers (required for enhanced security)
- pkg-config (for dependency resolution)
# Update package lists
sudo apt update
# Install base build tools
sudo apt install -y build-essential git cmake
# Install OpenGL dependencies
sudo apt install -y libgl1-mesa-dev libglu1-mesa-dev
# Install GLFW dependencies
sudo apt install -y libglfw3-dev
# Install OpenSSL
sudo apt install -y libssl-dev
# Install pkg-config (needed by build system)
sudo apt install -y pkg-config
# Install base build tools
sudo dnf install -y gcc g++ git cmake make
# Install OpenGL dependencies
sudo dnf install -y mesa-libGL-devel mesa-libGLU-devel
# Install GLFW
sudo dnf install -y glfw-devel
# Install OpenSSL
sudo dnf install -y openssl-devel
# Install pkg-config
sudo dnf install -y pkgconf
# Install base build tools
sudo pacman -S base-devel git cmake
# Install OpenGL dependencies
sudo pacman -S mesa
# Install GLFW
sudo pacman -S glfw-x11 # or glfw-wayland for wayland users
# Install OpenSSL
sudo pacman -S openssl
# Install pkg-config
sudo pacman -S pkgconf
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install base build tools
brew install cmake
# Install GLFW
brew install glfw
# Install OpenSSL
brew install openssl
# Create symlinks for OpenSSL (required for finding OpenSSL during build)
brew link openssl --force
The setup script will install liboqs automatically, but if you want to install it manually:
# Clone liboqs repository
git clone --branch main https://github.com/open-quantum-safe/liboqs.git
# Create build directory
cd liboqs && mkdir build && cd build
# Configure with CMake
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON ..
# Build
make -j $(nproc)
# Install (requires root privileges)
sudo make install
# Update dynamic linker
sudo ldconfig
# Clone the repository with all submodules
git clone --recursive https://github.com/SimedruF/PQCWallet-Core.git
# If you already cloned without --recursive:
cd PQCWallet
git submodule update --init --recursive
If you prefer to build the project manually instead of using the setup script:
# Create and enter build directory
mkdir -p build && cd build
# Configure with CMake
cmake ..
# Build the project
make -j$(nproc)
# Return to project root
cd ..
You can customize the build using the following CMake options:
# Build with debug symbols
cmake -DCMAKE_BUILD_TYPE=Debug ..
# Specify custom liboqs installation path
cmake -Dliboqs_DIR=/path/to/liboqs/lib/cmake/liboqs ..
# Specify custom OpenSSL path
cmake -DOPENSSL_ROOT_DIR=/path/to/openssl ..
# Build with sanitizers (for development only)
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZERS=ON ..
If CMake cannot find liboqs, you may need to specify the path manually:
cmake -Dliboqs_DIR=/usr/local/lib/cmake/liboqs ..
On some systems, you may need to specify the OpenSSL path:
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl .. # For macOS with Homebrew
If you encounter GLFW-related errors:
# For Ubuntu/Debian
sudo apt install libglfw3-dev xorg-dev
# For macOS
brew install glfw
If you get linker errors about missing libraries:
# Update dynamic linker cache
sudo ldconfig
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β GUI Layer β β Authentication β β Crypto Layer β
β (Dear ImGui) βββββΊβ (Login/Setup) βββββΊβ (Kyber/liboqs) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Main Loop β β PasswordManagerβ β File Storage β
β (Application) βββββΊβ (Encryption) βββββΊβ (users/*.enc) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Additional PQC Algorithms: Support for Dilithium signatures
- Hardware Security: Integration with hardware security modules
- Network Security: Quantum-safe network protocols
- Blockchain Integration: Post-quantum blockchain interactions
- Multi-Factor Authentication: Combine with biometric security
- Cross-Platform: Windows and macOS support
This project demonstrates post-quantum cryptography implementation. Contributions welcome:
- Fork the repository
- Create a feature branch
- Test thoroughly
- Submit pull request
Open source project for educational and development purposes.
For issues or questions:
- Open an issue on GitHub for support or bug reporting
Note: This implementation provides quantum-safe password storage using the Kyber algorithm. The cryptographic implementation follows NIST PQC standards and uses the liboqs library for quantum-resistant security.