Skip to content

lextpf/seal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

331 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

seal

AES-256-GCM credential manager with Qt6 GUI

πŸ›‘οΈ Features | πŸš… Quick Start | πŸ“— Documentation | 🀝 Contributing

AES-256-GCM QR Browser Autofill No Telemetry Qt6 CMake License
Quality Gate Status Maintainability Rating Reliability Rating Codacy Badge
build tests
Sponsor

An encryption and credential manager built with C++23 and powered by OpenSSL AES-256-GCM. It pairs a Qt6 interface, where credentials are stored encrypted and only decrypted on demand, with a streaming CLI that slots into pipes and scripts. seal can encrypt individual files, entire directories, or inline text, and fills credentials directly into applications or websites via its auto-fill controller. Under the hood, every secret sits in hardened memory - locked pages, guard pages, canary sentinels and the clipboard is scrubbed automatically if used.

Warning

seal is designed to protect sensitive information, but it is provided as is and used entirely at your own risk.
the author and contributors are not liable for security incidents or other damages arising from its use.


Preview

Important

Windows 10/11 Only - seal enforces Windows-specific security mitigations and will not build on other platforms.

  • For best protection, enable SeLockMemoryPrivilege via Group Policy (gpedit.msc -> Local Policies -> User Rights Assignment -> Lock pages in memory).
  • UI icons use Font Awesome Pro 7.2 SVGs, which are not included in this repository due to their commercial license. You must supply your own assets/svgs/ from a valid Font Awesome Pro subscription.
/*  ============================================================================================  *
 *                                                            ⠀⣠⑀⠀⒀⣀⣀⑀⠀⠀⠀⠀⣦⑀⠀⠀⠀⠀⠀⠀
 *                                                            β €β ˜β ƒβ ˆβ’Ώβ‘β ‰β ‰β €β’€β£€β£°β£Ώβ£Ώβ‘„β €β €β €β €β’€
 *           ::::::::  ::::::::::     :::     :::             ⠀⠀⠀⠀⠀Ⓓ⠀⠀⠀⣸⣿⑿⠉⠿⣿⑆⠀⠰⠿⣿
 *          :+:    :+: :+:          :+: :+:   :+:             β €β €β €β €β €β’€β£ β Ύβ Ώβ Ώβ Ώβ €β’°β£„β ˜β’Ώβ €β €β €β ž
 *          +:+        +:+         +:+   +:+  +:+             β’²β£Άβ£Άβ‘‚β β’‰β£€β£€β£Άβ£Άβ‘¦β €β ˆβ£Ώβ£¦β ˆβ €β£Ύβ‘†β €
 *          +#++:++#++ +#++:++#   +#++:++#++: +#+             ⠀⠀⠿⣿⑇⠀⠀⠀⠙Ⓙ⣧⠀⠳⣿⣿⑀⠸⣿⣿⠀
 *                 +#+ +#+        +#+     +#+ +#+             β €β €β β‘Ÿβ β €β €β’€β£΄β£Ώβ ›β “β €β£‰β£Ώβ£Ώβ’ β‘ˆβ’»β‘‡
 *          #+#    #+# #+#        #+#     #+# #+#             ⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣆⠀Ⓓ⣿⣿⣷⑀⠁Ⓒ⑇
 *           ########  ########## ###     ### ##########      β €β €β €β €β €β €β ˜β ›β ›β ‰β €β €β ˆβ ™β ›β Ώβ’Ώβ£Άβ£Όβ ƒ
 *                                                            β €β €β €β’°β£§β£€β €β –β ‚β €β €β €β €β €β €β €β €β €β €β €
 *
 *                                  << P A S S   M A N A G E R >>
 *
 *  ============================================================================================  */
seal/
|-- src/                                # C++23 core + CLI + Qt ViewModels (grouped by subsystem)
|   |-- main.cpp                        # Entry point; parses argv into a Mode, dispatches
|   |-- Cryptography.*                  # AES-256-GCM packets, scrypt KDF, hardening
|   |-- CryptoConfig.hpp                # KDF params, AAD framing, decode-cap constants
|   |-- CryptoGuards.hpp                # DPAPIGuard + EVP-context scoped RAII guards
|   |-- ScopedDpapiUnprotect.hpp        # RAII unprotect/reprotect window for a secret
|   |-- Vault.*                         # .seal load/save, rekey, credential crypto
|   |-- VaultRecord.hpp                 # Vault record + decrypted-credential structs
|   |-- FileOperations.*                # File / directory / stream encryption, batch I/O
|   |-- CredentialCsv.*                 # Chrome CSV import parser + seal CSV writer
|   |-- PasswordGen.*                   # Rejection-sampled random password generator
|   |-- Clipboard.*                     # Clipboard TTL-scrub + secure wipe helpers
|   |-- Utils.*                         # String, hex, base64, path, UTF-8/16 helpers
|   |-- SecureString.hpp                # Locked secure_string + RWGuard + triplet
|   |-- LockedAllocator.hpp             # VirtualLock allocator, guard pages + canary
|   |-- CredentialSession.*             # Sole owner of the master password (DPAPI-guarded)
|   |-- CredentialWorkspace.*           # Owns vault records + generation counter
|   |-- AsyncRunner.*                   # Thread-pool worker, GUI-thread marshalling
|   |-- CancellationToken.hpp           # Read-only cooperative cancellation flag
|   |-- AutoLockPolicy.hpp              # Pure idle auto-lock decision (unit-tested)
|   |-- AutoLockController.*            # Idle + WTS session-lock auto-lock trigger
|   |-- QmlMain.*                       # GUI composition root; wires 5 context props
|   |-- AppViewModel.*                  # Hub ViewModel: vault UI (QML: AppViewModel)
|   |-- CliPanelViewModel.*             # Embedded terminal-panel ViewModel (QML: Cli)
|   |-- BridgeViewModel.*               # Browser-companion enable/diagnose (QML: Bridge)
|   |-- TypeController.*                # Auto-fill surface over FillController (QML: Fill)
|   |-- WindowController.*              # Win32 window chrome/theme/motion (QML: WindowVM)
|   |-- VaultModel.*                    # Filtered, masked vault list model for QML
|   |-- IFillControl.hpp                # DI seam: arm / cancel the auto-fill engine
|   |-- IPasswordGate.hpp               # DI seam: master-password gate (FIFO defer)
|   |-- IUiFeedback.hpp                 # DI seam: status / loading / busy sink
|   |-- BrandIconResolver.*             # Platform label -> bundled brand-SVG path
|   |-- WindowChrome.*                  # Win32 frameless title bar + DWM theming
|   |-- NativeDialogs.*                 # Win32 file / folder picker dialogs
|   |-- FillController.*                # Global-hook fill state machine + typeSecret
|   |-- FusionDecider.*                 # Fuses probe results into a field verdict
|   |-- Probe.hpp                       # IProbe interface + ProbeContext / Result
|   |-- Win32StyleProbe.*               # Tier-1 ES_PASSWORD native edit-style probe
|   |-- UiaIsPasswordProbe.*            # Tier-1 MSAA / UIA IsPassword probe
|   |-- UiaMetadataProbe.*              # Tier-2 UIA metadata / form-context probe
|   |-- UiaCommon.*                     # Shared UIA tree-walk + hint-scan helpers
|   |-- ImeStateProbe.*                 # Tier-2 IME-absent weak-signal probe
|   |-- BrowserBridgeProbe.*            # Tier-1 browser-extension bridge probe
|   |-- StagingController.*             # Zero-gesture navigation-staged auto-fill
|   |-- AutoStagePolicy.hpp             # Pure site->record resolver + per-visit latches
|   |-- UrlBinding.hpp                  # Tiered host / registrable-name matching
|   |-- BrowserBridge.*                 # Per-run named-pipe server + peer hardening
|   |-- BridgeMessage.*                 # Bounded JSON parser for bridge messages
|   |-- ProcessPin.hpp                  # RAII process-handle pin vs PID recycling
|   |-- SignerUtils.hpp                 # WinVerifyTrust + SPKI-thumbprint checks
|   |-- QrCapture.*                     # Webcam QR decode into locked secure memory
|   |-- CameraSelector.*                # Enumerate, score, and open the best camera
|   |-- CliModes.*                      # gen/shred/hash/verify/list/get/... CLI modes
|   |-- CliDispatch.*                   # CLI file/dir/hex/base64 crypto dispatch
|   |-- CliHandler.*                    # CLI builtins + masked credential console
|   |-- Console.*                       # Masked console UI + password prompts
|   |-- ConsoleStyle.*                  # Semantic tone-coloured console output
|   |-- Diagnostics.*                   # logfmt field builders (joinFields / kv)
|   |-- Logging.*                       # Qt logging categories + stderr handler
|   +-- Version.hpp                     # Version-number macros + version string
|-- qml/                                # Qt6 QML UI (dumb views bound to the 5 ViewModels)
|   |-- Main.qml                        # Frameless app window: chrome, ambient, dialogs
|   |-- Theme.qml                       # Singleton theme: colors, HiDPI px, fonts, icons
|   |-- HeaderBar.qml                   # Title bar: logo, theme toggle, vault buttons
|   |-- SearchBar.qml                   # Debounced vault search + match count
|   |-- AccountsGrid.qml                # Credential-chip grid with empty states
|   |-- AccountChip.qml                 # Credential pill: brand icon or monogram
|   |-- AccountsToolbar.qml             # Grid header: account count + sort dropdown
|   |-- AccountDialog.qml               # Add / edit credential popup with validation
|   |-- PasswordDialog.qml              # Master-password prompt with QR-scan option
|   |-- RekeyDialog.qml                 # Master-password change dialog
|   |-- ConfirmDialog.qml               # Reusable confirm / info / error dialog
|   |-- BridgeSettings.qml              # Bridge status chips + auto-fill toggle
|   |-- CliPanel.qml                    # Embedded terminal: output + command input
|   |-- StatusFooter.qml                # Status bar: state, file, count, fill dot
|   |-- ActionBar.qml                   # Add / edit / delete / fill action buttons
|   |-- LoadingOverlay.qml              # Unseal sonar + success / break animation
|   |-- Ambient.qml                     # Singleton background-animation clock
|   |-- DialogBlobs.qml                 # Decorative blurred blobs behind dialogs
|   |-- RippleEffect.qml                # Masked button-press ripple animation
|   |-- TintedButton.qml                # Themed gradient button + icon + ripple
|   +-- SvgIcon.qml                     # DPI-aware recolorable SVG icon
|-- host/browser/                       # Native-messaging host -> seal-browser.exe
|   |-- main.cpp                        # stdio <-> named-pipe relay; no payload parsing
|   |-- BridgePipe.*                    # Locates + signer-verifies seal's bridge pipe
|   |-- MessageFraming.*                # 4-byte length framing over stdio + pipe
|   |-- HandleVerification.*            # Proves stdio pipes are from the browser
|   |-- LaunchOrigin.*                  # argv[1] native-messaging origin gate
|   |-- ExitLog.*                       # Best-effort exit diagnostics to file/stderr
|   +-- NtApi.hpp                       # Runtime-resolved ntdll for handle walk
|-- extensions/browser/                 # MV3 WebExtension companion (Chrome + Firefox)
|   |-- manifest.json                   # MV3 Chrome manifest: pinned key + host
|   |-- background.js                   # Service worker: connectNative, hashes path
|   |-- content.js                      # Classifies clicked field + reports nav
|   |-- firefox/manifest.json           # Firefox MV3 variant (gecko id, UUID)
|   +-- icons/                          # Extension icons (16 / 48 / 128 px)
|-- tests/                              # GoogleTest suites over the Qt-free cores
|   |-- test_*.cpp                      # crypto, vault, fusion, bridge, csv, ...
|   |-- test_helpers.hpp                # Shared fixtures: temp dirs + vault builders
|   +-- fixtures/                       # Sample Chrome CSVs for import tests
|-- cmake/                              # vcpkg overlay triplets (msvc143 release / static)
|-- scripts/                            # Doxide / MkDocs doc post-processing (Python)
|-- assets/                             # Bundled assets - NOT included; provide your own 
|-- CMakeLists.txt                      # seal + seal_browser targets + QML module
|-- CMakePresets.json                   # default / static / ci / compile-db presets
|-- vcpkg.json                          # Dependency manifest (Qt6, OpenSSL, OpenCV)
|-- build.bat                           # Full pipeline: format -> tidy -> build -> docs
|-- test.bat                            # Configure + build + run seal_tests
|-- doxide.yml                          # Doxide API-doc generator config
|-- mkdocs.yml                          # MkDocs documentation-site config
|-- sonar-project.properties            # SonarCloud analysis config
|-- qt.conf                             # Qt plugin search paths
|-- .clang-format / .clang-tidy         # Formatting + lint / naming rules
|-- .clangd                             # clangd LSP config (compile-db sidecar)
|-- .github/                            # CI workflows (build / test / sonar) + templates
|-- CONTRIBUTING.md                     # Contribution guide
|-- LICENSE.md                          # License
+-- README.md                           # Project overview (this file)

Features

Interface

seal ships with a Qt6 QML graphical manager and a streaming CLI for scripts and automation.

---
config:
  look: handDrawn
  theme: mc
  themeVariables:
    fontSize: 18px
  layout: elk
---
graph LR
    classDef gui fill:#134e3a,stroke:#10b981,color:#e2e8f0
    classDef cli fill:#1e3a5f,stroke:#3b82f6,color:#e2e8f0
    classDef core fill:#2e1f5e,stroke:#8b5cf6,color:#e2e8f0

    subgraph GUI["πŸ–₯️ Qt6 GUI"]
        Vault["πŸ” Vault Manager"]:::gui
        AutoFill["⌨️ Auto-Fill"]:::gui
        QR["πŸ“· Webcam QR"]:::gui
    end

    subgraph CLI["⚑ Command Line"]
        Stream["πŸ“‘ Stream Mode"]:::cli
        Interactive["πŸ’¬ Interactive"]:::cli
        Import["πŸ“₯ Batch Import"]:::cli
    end

    subgraph Core["πŸ›‘οΈ Crypto Engine"]
        AES["πŸ”‘ AES-256-GCM"]:::core
        Memory["🧱 Hardened Memory"]:::core
        Clipboard["πŸ“‹ Clipboard Scrub"]:::core
    end

    GUI --> Core
    CLI --> Core
Loading

Memory Protection

---
config:
  look: handDrawn
  theme: mc
  themeVariables:
    fontSize: 18px
  layout: elk
---
graph LR
    classDef lock fill:#7c2d12,stroke:#f97316,color:#fef3c7
    classDef guard fill:#4c1d95,stroke:#e879f9,color:#e2e8f0
    classDef wipe fill:#064e3b,stroke:#34d399,color:#e2e8f0
    classDef canary fill:#713f12,stroke:#facc15,color:#fef9c3

    V["πŸ”’ VirtualLock"]:::lock
    G["🚧 Guard Pages"]:::guard
    S["🧹 SecureZeroMemory"]:::wipe
    C["🐀 0xD0 Canary"]:::canary

    V --- G --- S --- C
Loading
  • πŸ”’ VirtualLock - Locks sensitive pages to prevent swapping to disk
  • 🚧 Guard Pages - PAGE_NOACCESS regions flanking every allocation detect overflows
  • 🧹 Secure Wiping - SecureZeroMemory scrubs data before deallocation
  • 🐀 Canary Protection - 0xD0 sentinel at the tail of every buffer catches overruns
  • πŸ“‹ Clipboard Scrubbing - Auto-wipes copied credentials after a configurable TTL
  • πŸ” DPAPI In-Memory Encryption - Master password is wrapped with CryptProtectMemory while at rest
  • πŸ”‘ Scrypt KDF - Master password stretched with scrypt before AES key generation

Anti-Tamper

  • πŸ›‘οΈ Debugger Detection - Three-layer check terminates on detection
  • πŸ’₯ Crash Dump Suppression - Windows Error Reporting disabled
  • 🧱 Process Access DACL - Restrictive SDDL blocks external processes from reading memory
  • πŸ”₯ Heap Hardening - HeapEnableTerminationOnCorruption terminates the process immediately on heap corruption
  • πŸ”‘ SeLockMemoryPrivilege - Requested at startup to support large-page VirtualLock
  • ⌨️ Keyboard Hook Detection - Timing-based heuristic detects keylogger hooks before auto-type

Vault System

Credentials are stored in .seal files using on-demand decryption - each record stays encrypted until the moment you need it.

Component Description
Platform AES-256-GCM encrypted, displayed as search index
Credential username:password blob, decrypted only on access

Additional Capabilities

  • πŸ“· Webcam QR - Scan master password from a QR code via the built-in webcam capture
  • ⌨️ Auto-Fill - Type credentials directly into target application fields
  • πŸ“ Batch Processing - Encrypt/decrypt entire directories recursively
  • πŸ“‘ Stream Mode - Pipe-friendly stdin/stdout encryption for scripting

Technology Stack

Component Technology
Language C++20
GUI Framework Qt6 (QML + Quick)
Cryptography OpenSSL 3.x
Build System CMake 3.20+
Package Manager vcpkg
Testing Google Test
Documentation Doxide + MkDocs
QR Capture OpenCV QRCodeDetector
Platform Windows 10/11 (64-bit)

Quick Start

Prerequisites

  • Windows 10/11 (64-bit)
  • Visual Studio 2022 (MSVC v143, C++23)
  • CMake 3.20+
  • vcpkg with the toolchain at a known path
  • Python 3 (for documentation post-processing)
  • Font Awesome Pro 7.2 SVGs in assets/svgs/ (not included, requires license)
  • doxide + mkdocs (optional, for API docs generation)

Building

# 1. Clone the repository
git clone https://github.com/lextpf/seal.git
cd seal

# 2. Build (configure + compile + docs)
.\build.bat

# 3. Run
.\build\bin\Release\seal.exe

Output: build/bin/Release/seal.exe

Architecture

---
config:
  look: handDrawn
  theme: mc
  themeVariables:
    fontSize: 18px
  layout: elk
---
graph LR
    classDef core fill:#1e3a5f,stroke:#3b82f6,color:#e2e8f0
    classDef gui fill:#134e3a,stroke:#10b981,color:#e2e8f0
    classDef vault fill:#4a3520,stroke:#f59e0b,color:#e2e8f0
    classDef crypto fill:#2e1f5e,stroke:#8b5cf6,color:#e2e8f0

    Main["πŸš€ main.cpp"]:::core

    subgraph GUI["πŸ–₯️ GUI Layer"]
        Backend["βš™οΈ Backend"]:::gui
        QML["🎨 QML Views"]:::gui
        Fill["⌨️ FillController"]:::gui
    end

    subgraph Vault["πŸ—„οΈ Vault Layer"]
        VaultModel["πŸ“‹ VaultListModel"]:::vault
        VaultIO["πŸ’Ύ Vault I/O"]:::vault
    end

    subgraph Crypto["πŸ” Crypto Layer"]
        Cryptography["πŸ”‘ Cryptography"]:::crypto
        FileOps["πŸ“ FileOperations"]:::crypto
        Clipboard["πŸ“‹ Clipboard"]:::crypto
    end

    Main --> GUI
    Main --> Vault
    GUI --> Vault
    Vault --> Crypto
    GUI --> Crypto
Loading

Documentation

API documentation is generated via a three-stage pipeline:

# 1. Generate markdown from C++ headers
doxide build

# 2. Post-process (strip noise, fix formatting, add icons)
python scripts/clean_docs.py

# 3. Build the documentation site
mkdocs build

The site is output to site/ and can be served locally with mkdocs serve.

Troubleshooting

Problem Solution
SeLockMemoryPrivilege Enable via gpedit.msc -> Local Policies -> User Rights Assignment
Remote Desktop blocked Intended - seal refuses to run over RDP for security
vcpkg ninja crash Known issue with bundled ninja 1.13.2, retry or use system ninja
Qt plugins not found Ensure windeployqt ran during build, check qt.conf paths

Contributing

Contributions are welcome! Please read the Contributing Guidelines before submitting pull requests.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and ensure the build passes
  5. Commit with descriptive messages
  6. Push to your fork and open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

A hardened encryption and credential manager for Windows built with C++23, Qt6 QML, AES-256-GCM, DPAPI, and webcam QR code entry.

Resources

License

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors