Offline password manager for Windows with Zero Trust architecture, built in Rust + WinUI 3.
- Zero Trust: Auto-lock, memory zeroization, access mediation
- Custom vault format (
.bitnet): Argon2id + AES-256-GCM + HMAC-SHA-256 (KDBX 4.x inspired) - TOTP: RFC 6238 authenticator (SHA-1 & SHA-256)
- Password Generator: CSPRNG-based with rejection sampling
- Autofill: Windows native + Browser extension (Chrome/Edge/Firefox)
- WinUI 3: Fluent Design, Acrylic/Mica, dark theme support
- Rust Core (
crates/): Crypto, KDBX, TOTP, Session Manager, FFI, Daemon - C# GUI (
BitNet.Desktop/): WinUI 3 frontend - Browser Extension (
browser-extension/): Manifest V3 + Native Messaging - CLI (
bitnet-cli/): Command-line MVP + daemon subcommands
cd BitNet
cargo build --release --workspaceNote: The repository is a single Cargo workspace rooted at
D:\BitNet\. There is nobitnet/bitnet/subdirectory anymore.
This produces:
target/release/bitnet-cli.exetarget/release/bitnet-native-host.exetarget/release/bitnet_ffi.dll
# Create a new vault
cargo run --release --bin bitnet-cli -- create C:\Users\You\vault.bitnet
# Unlock vault
cargo run --release --bin bitnet-cli -- unlock C:\Users\You\vault.bitnet
# List entries
cargo run --release --bin bitnet-cli -- list
# Get password (use --no-echo to avoid terminal scrollback)
cargo run --release --bin bitnet-cli -- get --no-echo <uuid>
# Generate password
cargo run --release --bin bitnet-cli -- generate --length 20
# Show vault fingerprint
cargo run --release --bin bitnet-cli -- info C:\Users\You\vault.bitnet
# Start background daemon (holds unlocked session for fast attach)
cargo run --release --bin bitnet-cli -- daemon
# Check if daemon is running
bitnet-cli pingPrerequisites: .NET 8 SDK + Windows App SDK
# Copy native binaries first
Copy-Item target\release\bitnet_ffi.dll BitNet.Desktop\Native\
Copy-Item target\release\bitnet-native-host.exe BitNet.Desktop\Native\
Copy-Item target\release\bitnet-cli.exe BitNet.Desktop\Native\
# Build and run
cd BitNet.Desktop
dotnet runOr use the build script:
.\scripts\build-desktop.ps1 -Configuration Release -Platform x64Chrome / Edge:
- Open
chrome://extensions/(oredge://extensions/) - Enable Developer Mode
- Click Load unpacked → select
browser-extension/folder - Register Native Host:
.\scripts\install-host.ps1 # or manually: .\install_host.bat
Firefox:
- Open
about:debugging#/runtime/this-firefox - Click Load Temporary Add-on → select
browser-extension/manifest-firefox.json - Register Native Host via
install-host.ps1(Firefox registry keys included)
# Rust unit tests (169+ tests across all crates)
cargo test --workspace
# Clippy (zero warnings policy)
cargo clippy --workspace -- -D warnings
# Format check
cargo fmt --all -- --check
# Fuzzing (requires Rust nightly)
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly
cargo +nightly install cargo-fuzz
cargo +nightly fuzz run kdbx_deserialize -- -max_total_time=60cd tests/e2e
npm install
npx playwright install chromium
npm testPrerequisites: Inno Setup 6+
# Build everything + create installer
.\scripts\build-desktop.ps1 -Configuration Release -Platform x64 -CreateInstaller
# Installer output:
# target/installer/BitNet-Setup-0.1.0.exe# Using PFX
.\scripts\sign-binaries.ps1 -CertificatePath "C:\Certs\bitnet.pfx"
# Using Windows Certificate Store thumbprint
.\scripts\sign-binaries.ps1 -CertificateThumbprint "A1B2C3D4..."See docs/CODE_SIGNING.md for details.
BitNet can run as a long-lived background daemon (bitnet-cli daemon)
that holds an unlocked vault session in memory. Subsequent CLI calls and
the Desktop app attach to the daemon instead of re-deriving the key
on every operation.
# Terminal 1 — start the daemon (blocks)
bitnet-cli daemon
# Terminal 2 — check health
bitnet-cli ping # exit 0 if alive, 1 if notThe Desktop app auto-launches the daemon on startup via
DaemonLauncher.cs (resolves bitnet-cli.exe from its own install
directory, preventing PATH-hijack attacks).
See docs/PHASE_3_DESIGN.md for the full
protocol specification (JSON-RPC 2.0, HMAC-SHA-256 auth, replay
protection, IPC transport).
- docs/THREAT_MODEL.md — Detailed threat model, trust boundaries, and ASVS mapping (including accepted risks such as native host origin verification).
- SECURITY_AUDIT.md — Security audit findings and their fixes.
- docs/SECURITY_NOTES.md — Accepted security limitations and platform-specific considerations (.NET managed-heap strings, terminal scrollback, etc.).
| Property | Implementation |
|---|---|
| Memory zeroization | Zeroizing<String> (Rust), CryptographicOperations.ZeroMemory() (C#) |
| Locking | Mutex-based SessionManager — no writer starvation |
| Password derivation | Argon2id (t=3, m=64 MB, p=4) |
| Encryption | AES-256-GCM with unique nonce per vault |
| Integrity | HMAC-SHA-256 over vault header |
| Comparison | Constant-time subtle::ConstantTimeEq for TOTP and HMAC |
| Path hardening | validate_vault_path() enforces .bitnet and rejects .. |
MIT OR Apache-2.0