Skip to content

About

πŸ” Secure offline password manager for Windows built with .NET 8 & WPF. Features Argon2id + AES-GCM encryption, secure memory handling, password generator, multi-language support (EN/RU), audit logging, and auto-lock. MVVM architecture with modern dark theme UI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

CipherVault

Secure, offline password manager for Windows with modern cryptography.

.NET C# License Platform Release Readme


Main Application

Main vault screen with credential list and details panel.


Features

  • AES-256-GCM authenticated encryption for all vault data
  • Argon2id key derivation (128 MiB memory, 3 iterations, 4 threads)
  • Single derived key β€” the Argon2id output is the AES key
  • Decrypt-to-verify unlock β€” a wrong password simply fails to decrypt the vault
  • Self-contained vault.dat β€” the Argon2id salt lives in the file header
  • Secure in-memory buffers β€” VirtualAlloc + VirtualLock + CryptProtectMemory, zeroed on dispose
  • Anti-screen-capture via SetWindowDisplayAffinity (WDA_EXCLUDEFROMCAPTURE, WDA_MONITOR fallback)
  • Clipboard protection β€” auto-clear after 10 s, excluded from Win+V history and cloud clipboard
  • Auto-lock after 1 minute of inactivity
  • Brute-force protection β€” per-vault exponential backoff (up to ~34 min), persisted with DPAPI
  • Cryptographic password generator with entropy and crack-time analysis
  • Audit logging (optional, disabled by default)
  • Multi-vault support with import/export as ZIP and safe deletion
  • Multi-language UI (English / Russian)
  • Dark theme with custom WPF controls and subtle animations
  • Self-contained single-file publish β€” no runtime required

Security & Threat Model

Protected against Notes
Master password brute-force Argon2id (128 MiB, 3 iter) + exponential backoff after 5 failures, persisted per vault
Memory dump extraction VirtualLock pins pages in RAM; CryptProtectMemory encrypts buffers; everything is zeroed on release
Wrong password / ciphertext tampering AES-GCM authentication tag rejects modified vaults; a wrong key fails to decrypt
Screen capture WDA_EXCLUDEFROMCAPTURE on all app windows (WDA_MONITOR fallback on older builds)
Clipboard history & cloud sync Secrets are excluded from Win+V history and cloud clipboard before copying
Process hardening (Release builds) Single-instance mutex (Global), anti-debugger checks, forced ASLR relocation, remote/low-integrity image blocking and a strict child-process ban. No external process can be spawned. Debug builds skip all of it
Not covered Reason
Keylogger / formgrabbing The OS is assumed trusted; no magic bullet for user-side malware
Compromised OS If the attacker controls the system, all in-process protection is bypassable
Physical access with memory freezer Cold boot attacks are out of scope for a desktop app

Argon2id parameters

Parameter Value
Algorithm Argon2id
Memory 128 MiB
Iterations 3
Parallelism 4 threads
Salt 32 bytes (random per vault, stored in the vault header)
Output 32 bytes (the AES-256 key)

Tech Stack

.NET 8.0  β€’  WPF  β€’  C# 12
Library / API Purpose
System.Security.Cryptography AES-256-GCM, RNG, constant-time ops
argon2.dll (P/Invoke) Argon2id KDF β€” P-H-C reference implementation, wipes its internal memory
System.Security.Cryptography.ProtectedData DPAPI sealing for per-vault lockout state
kernel32.dll (P/Invoke) VirtualAlloc, VirtualLock
crypt32.dll (P/Invoke) CryptProtectMemory
user32.dll (P/Invoke) SetWindowDisplayAffinity (screen-capture protection)
System.Text.Json Vault data & settings serialization
System.IO.Compression Vault import/export

argon2.dll is built from the vendored sources in native/argon2 (P-H-C phc-winner-argon2, tag 20190702, commit 62358ba) by native/argon2/build.ps1, which needs Visual Studio with the C++ workload. The build is deterministic; the committed DLL has SHA-256 51EAAE65F68E12BD0C404F499BF18A52765A18E9DFD78BB962E8C661DE29CA09.


Getting Started

Requirements

  • Windows 10 (build 19041+) for full screen-capture exclusion
  • .NET 8 Desktop Runtime (not needed if using the self-contained build)

Build from source

git clone https://github.com/J1zeee/CipherVault.git
cd CipherVault
dotnet publish -c Release -r win-x64 --self-contained true
.\bin\Release\net8.0-windows10.0.26100.0\win-x64\publish\CipherVault.exe

Download release

Download the latest version from Releases, extract and run CipherVault.exe.


Usage

1. Create a vault β€” set a master password (Argon2id derives the encryption key).

Login screen

2. Add credentials β€” title, username, email, password, website, notes. Generate strong passwords with the built-in generator.

Add credential

3. Lock & unlock β€” the vault locks after 1 minute of inactivity. The master key is held in protected memory (SecureBuffer) and wiped on lock.

Settings


Architecture

Master password  +  Random salt
          β”‚
          β–Ό
      Argon2id  (128 MiB / 3 iter / 4 threads)
          β”‚
          β–Ό
  Encryption key  (32 bytes, held in SecureBuffer)
          β”‚
          β–Ό
 AES-256-GCM Encrypt / Decrypt
          β”‚
          β–Ό
  vault.dat  (salt + nonce + ciphertext + tag)
  • vault.dat is self-contained: [salt 32][nonce 12][ciphertext][tag 16]. The salt is generated once at creation and stored in plaintext as the header (it is not secret); it is reused for every re-encryption so the key can be re-derived at the next login. There is no config.json.
  • The Argon2id output is the encryption key (no HKDF split). Unlocking reads the salt from the header, derives the key from the typed password, and attempts to decrypt the vault: a correct password validates the authentication tag, a wrong one fails.
  • The key exists only in process memory inside a SecureBuffer (VirtualAlloc + CryptProtectMemory) and is wiped on lock.

Data at rest

File Location Contents
vault.dat %LOCALAPPDATA%\CipherVault\VaultName\ Salt + nonce + ciphertext + tag (self-contained)
settings.json %APPDATA%\CipherVault\ Vaults root path, logging toggle, capture protection, language
vaults.json %APPDATA%\CipherVault\ Vault registry (name, path, timestamps)
lockout.dat beside vault.dat DPAPI-sealed failed-attempt counter (never exported)
audit_yyyyMMdd.log %APPDATA%\CipherVault\Logs\ Optional audit log (daily, 10 MB rotation)

Roadmap

  • Have I Been Pwned integration (k-anonymity API)
  • Browser auto-fill extension
  • Android / macOS / Linux support (Avalonia / MAUI)

Contributing

PRs are welcome. For major changes, open an issue first to discuss.


License

Apache 2.0

About

πŸ” Secure offline password manager for Windows built with .NET 8 & WPF. Features Argon2id + AES-GCM encryption, secure memory handling, password generator, multi-language support (EN/RU), audit logging, and auto-lock. MVVM architecture with modern dark theme UI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages