High-Level Architecture
PWDnow relies strictly on a Two-Layer architecture, establishing a concrete boundary between cryptographic isolated processes and the zero-knowledge frontend interface.
The Two-Layer Model
Layer 1: Vault Daemon
Rust (systemd)- Operating Modes: Runs strictly offline, bound directly to the local machine.
- Storage Backend: Uses SQLite integrated with the SQLCipher extension for encrypted on-disk persistence.
- Memory Protection: Vault Master Key (VMK) is kept inside a
LockedKeystruct. Implementsmlock()to stop paging andmprotect(PROT_NONE)to seal idle memory pages. - Cryptography: AES-256-GCM, Argon2id KDF, and Post-Quantum hybrid algorithms (ML-KEM-1024, ML-DSA-87).
Layer 2: Web Interface
React / Express- Zero-Knowledge UI: The frontend never observes plaintext Master Keys, KEK, VMK, or DEK schemas. It trades inputs for opaque blobs.
- Session Management: Ephemeral
session_tokenvalues held exclusively in memory via JS private class fields, aggressively nullified on visibility exits. - Server Proxy: Node.js proxies IPC calls directly via WebSockets, enforcing strictly randomized per-request CSP headers to block injection.
Inter-Process Communication (IPC)
/run/vault-daemon/vault.sockCommunication passes over an isolated Unix Domain Socket bridging the WebSocket proxy and the Rust Daemon engine.
Every data transaction is mapped safely through strongly-typed Request/Response enumerations utilizing MessagePack binary framing layers.
The P2W Format (Vault Export)
P2W is PWDnow's proprietary export format, engineered meticulously to deter offline tampering and evade traffic analysis through exponential structural padding.
| Suite 0x02 Spec | Implementation Detail |
|---|---|
| Key Derivation | Argon2id (m=256 MiB, t=3, p=1). Subkeys expanded via HKDF-SHA3-512 domain tags. |
| Double AEAD Encryption | Inner enveloping uses AES-256-GCM. Outer enveloping secures it via XChaCha20-Poly1305. Plaintext headers bound to AAD. |
| Exponential Padding (F-02) | Fills payload using random padding items targeting exponential layout targets (64 KB, 256 KB, 1 MB+) to obscure factual vault volume metrics. |
| Meta Obfuscation (F-07) | Plaintext headers conceal timestamp and size fields entirely—access allowed only after successfully processing PRF payload decrypts. |
Threat Mitigations & Capabilities
Replay Attacks (MFA)
TOTP verification leverages a localized used-token memory cache structure that instantly drops consumed values to circumvent re-use within drift periods.
Active Forensic Wipe
In coercion configurations, presenting a WIPE_TICKET_KEY executes a 7-pass overwrite destruction protocol inside the daemon layer abruptly concluding execution.
SLA P1 Sentinel
Companion pwdnow-monitor tracks RAM leakage, forcing CRITICAL restarts on monotonic memory bounds breaches shielding persistence engines.