Security

Security architecture

Rust/Tauri stack, .rkvey v5 format, compartments, lazy decryption, and threat model.

QubKey security is built on a layered architecture and the principle of defense in depth: the file system, .rkvey v5 format, cryptography, and Rust application core work together to protect your secrets at every step — from storage to unlock.

Each layer provides a complementary guarantee. If a system protection is missing (for example, no disk encryption), the application and cryptographic layers still protect your vault contents. With the v5 format, an entry's secrets are decrypted only when you reveal or copy them — not when the vault opens or when you browse the list.

UI

Interfadësen (React + Tauri)

  • Coffre
  • Dossieren
  • Recherche
  • Generateur
  • Coven den à usage unique
  • Tableum de bord
  • Synchronisatioun
  • Deelen
  • Erweiderung Browser
Core

Cœur Rust (QubKey Core)

  • Format .rkvey v5
  • Argon2id Ofleedung
  • Verschlësselung authentifié
  • Index de Sich
  • Späicherens sûrs
  • Späicher-Erläsche
  • Erhuelung duerno interruption
Storage

Datei .rkvey v5 op den système de Dateien

  • Preambel
  • Verschlësselten Header
  • Verschlësselten Index
  • Compartiments secrets
  • Unhäng
  • Historidatt ven den commits

Security layers

Unlock flow

Unlock follows a strict pipeline: the master password enters the Rust core, Argon2id derives the master key, then subkeys decrypt the header and B-Tree index. Entry compartments (secrets, attachments) stay encrypted and are read only on demand. On lock, all keys and secrets are wiped from memory.

Passwuert maître + Salt

Préambuden .rkvey (non chiffré)

  • Saisie an den cœur Rust (IPC Tauri) — ni exposée um WebView
  • Salt aléatoire persisté an den préambuden (16 bytes)
KDF

Argon2id

  • 64 MB RAM · 3 iter · p=4 (Standard `KdfParams`)
  • Résistandësen GPU / ASIC
  • Calibré ~250–500 ms no d’plateforme

Master-Schlëssel

256 bits · `KeyManager::derive_master_key`

Dérivation ven den sous-clés

HKDF-SHA256(master, salt=file∥entry, info=kind)

header_key

Secure Header

index_key

Index B-Tree

compartment_key

Compartiments

DéVerschlësselung AEAD

  • AES-256-GCM oder XChaCha20-Poly1305
  • Header · Index · Compartiments (à d’demande)

Späicher duerno déverrouillage

  • Lëscht / Vue: nëmmen Metadonnéeën
  • Secrets a PJ déchiffrés uniquement à d’demande

Verrouillage

  • `KeyManager::clear_keys()` + zeroize
  • Effacement ven den secrets a vidage presse-papiers

Threat model

QubKey is designed to address the most common threat scenarios for a local manager. The table below describes the attack vector and the corresponding measure built into the product (.rkvey v5 format).

ThreatVectorQubKey response
Unauthorized file accessTheft or copy of .rkveyAEAD encryption + Argon2id derivation
Network exfiltrationCloud interception / MITMLocal-first: QubKey does not upload your secrets
Data corruptionCrash during writeValidated append-only commits + recovery on startup
Vault tamperingManual file modificationPer-compartment AEAD authentication + checksums
Memory dump (browsing)Vault open, list / viewSecrets stay encrypted until you reveal them
Weak master passwordOffline attemptsCalibrated Argon2id (~500 ms) + entropy meter
Password reuseLeaks on other sitesSecurity dashboard (local detection)
Clipboard leaksCopying a secretClipboard timeout (30 s) + wipe on lock
Side-channel attackTiming on crypto opsConstant-time implementations (RustCrypto)

Best practices

This model covers threats QubKey addresses directly through its architecture. For optimal protection, combine QubKey with system best practices: disk encryption enabled, up-to-date OS, and a strong master password.

Built-in protection

DomainHow QubKey protects your data
Data at restAEAD encryption (AES-256-GCM / XChaCha20), Argon2id-derived key, unique keys per compartment
Vault integrityValidated append-only commits, checksums, and atomic writes
ConfidentialityZero-knowledge model: your secrets stay encrypted on your device
Lazy decryptionList and view without secrets; reveal / copy only on demand
Key derivationCalibrated Argon2id (~500 ms, 64 MB) to strengthen master password protection
ApplicationIsolated Rust core, UI via Tauri IPC, zeroization on lock
Browser extensionLocal Native Messaging — extension never receives the master password
SyncOpt-in encrypted multi-device sync (QubKey cloud — self-hosting coming soon) or encrypted .rkvey file (cloud, USB, NAS)

Trust architecture

Zero-knowledge

QubKey organizes trust across complementary levels:

  1. You control access — The master password and, if saved, the recovery key control vault access. QubKey cannot read or reset them on your behalf.

  2. System integration — QubKey leverages your OS security: file permissions, disk encryption (FileVault, BitLocker, LUKS), secure storage (Keychain, Credential Manager), and process isolation.

  3. Rust / UI separation — All cryptography runs in the Rust core with compile-time memory safety. The React UI communicates via Tauri IPC; the WebView never has direct access to the master password.

  4. Careful memory handling (v5) — On unlock, only the header and index are decrypted. Secrets and attachments stay encrypted until an explicit action (reveal, copy, download). On lock, secrets are wiped (zeroization) and the clipboard is cleared.

  5. Browser extension — Local Native Messaging communication; the extension never receives the master password.

Protection features

Auto-lock

Vault locked after a configurable inactivity period (default: 5 min). Triggers zeroization and clipboard wipe.

Lazy decryption

An entry's secrets are decrypted only when you reveal or copy them. The list and view screens do not expose protected fields.

Zeroization

Secrets wiped from RAM on lock (Rust zeroize crate); caches cleared, ephemeral on-demand decryption only.

Clipboard timeout

Clipboard cleared automatically after 30 seconds. Configurable in vault settings.