Fordan — Threat Model

This document describes the security assets Fordan protects, the adversaries it is designed to resist, and — equally important — the threats it explicitly does not defend against. Honesty about scope is part of the security design.


1. Assets Under Protection

1.1 Vault Master Key

The key material derived from the user's passphrase via Argon2. Compromise of the master key gives an attacker full access to every file in the vault. The key lives only in process memory during an active session and is never written to disk, logged, or sent over a network.

1.2 Plaintext File Contents

The actual bytes of files imported from the source disk — photos, documents, source code, personal records. At rest, every artifact is protected by an AEAD cipher (ChaCha20-Poly1305 or AES-GCM). Plaintext exists only in memory during import, encryption, and recovery operations.

1.3 File Names and Directory Structure

Metadata — the names of files, directory hierarchies, and timestamps — can reveal sensitive information even without the file contents. Fordan encrypts the vault payload including path metadata; the on-disk layout of vault entries does not expose the original file names or directory tree to an observer who lacks the master key.

1.4 Source Disk Integrity

The original data on the foreign NTFS/FAT32 disk. Accidental writes to a source drive can corrupt irreplaceable files. Fordan treats preserving source integrity as a first-class security property, not merely a UX concern.


2. Design Principles That Shape the Model

read-only-first

Filesystem access to foreign and source volumes is structurally read-only. The SourceVolume handle (and any equivalent abstraction) exposes no write, move, rename, or delete methods. The Rust type system enforces this at compile time; there is no runtime flag to bypass it. A foreign disk is untrusted input we only ever read.

Tamper-evidence guarantee

Every encrypted artifact in the vault carries an AEAD authentication tag. There are no unauthenticated ciphertext blobs. The verify subcommand re-checks every authentication tag on every artifact and fails loudly if any tag does not verify. A vault that cannot be fully verified is treated as corrupt — there is no "partially valid" state. This means any modification of vault bytes by a third party is detected before plaintext is ever returned.

No network in core

The fordan-core library and the fordan CLI binary contain zero network calls. Keys and plaintext never reach a server under any code path. An attacker with only network access cannot reach vault contents.


3. Adversaries and Scenarios

3.1 Lost or Stolen Laptop

Scenario: An attacker has physical possession of the machine on which a Fordan vault is stored, but the machine is locked or powered off at the time of theft.

What they see: Encrypted ciphertext blobs with AEAD tags. Without the passphrase they cannot derive the master key or recover plaintext. The encrypted vault is safe to store on a laptop, an external drive, or a cloud-synced folder.

Defence: Argon2 key derivation with tunable memory and time cost raises the cost of brute-force attacks against the passphrase. The strength of the defence is proportional to passphrase quality (see Section 4).

3.2 Malicious or Untrusted Foreign Disk

Scenario: The user plugs in a disk of unknown provenance — a drive found at a garage sale, borrowed from an untrusted party, or intentionally crafted to exploit a parser vulnerability.

What could go wrong: A malformed NTFS/FAT32 filesystem could trigger bugs in the volume parser, potentially allowing arbitrary code execution or path traversal during scanning.

Defence: The scanner uses a vetted, read-only parsing crate (ntfs, fatfs) with no write-back capability. Fordan never executes content found on the foreign disk (no autorun, no script evaluation, no DLL loading). All paths returned by the scanner are normalised and validated before being used as output destinations.

3.3 Ransomware-style Mass Encryption of the Vault

Scenario: Malware running on the host machine attempts to encrypt or destroy the vault directory while Fordan is not running.

Defence: Fordan does not defend the vault directory at the filesystem level — that is the operating system's job (backups, snapshots, filesystem permissions). What Fordan does guarantee is tamper evidence: if ransomware encrypts vault files and then the user recovers a backup, the verify subcommand will detect any byte-level corruption before returning plaintext.

3.4 Cloud-Sync Snooping

Scenario: The user stores the vault directory in a synced folder (Dropbox, iCloud, OneDrive). The cloud provider — or an attacker who compromises the provider — reads the uploaded files.

Defence: All vault contents are encrypted before they ever reach the local filesystem. The cloud provider sees only ciphertext and AEAD tags. File names and directory structure within the vault are also encrypted, so the provider cannot infer what the user rescued.

3.5 Offline Attack on the Vault

Scenario: An attacker exfiltrates the vault (e.g. from a cloud backup or a stolen drive) and runs a dictionary or brute-force attack against the master key offline, without time pressure.

Defence: Argon2id is tuned to make each password-check expensive in both time and memory. The security margin is directly proportional to passphrase entropy. Users should be advised to choose a strong passphrase; Fordan cannot enforce this.


4. What We DO Defend Against


5. What We Do NOT Defend Against


6. Summary Table

ThreatDefended?Mechanism
Laptop theft (machine off/locked)YesArgon2 + AEAD encryption
Malicious foreign disk (parser exploit)YesRead-only vetted parsers
Cloud-sync provider reads vaultYesAll contents encrypted at rest
Offline brute-force of master keyPartialArgon2id (depends on passphrase)
Ransomware encrypts vault filesPartialTamper evidence detects corruption
Malware on unlocked machine (live session)NoOut of scope — OS problem
Weak user passphraseNoCannot be enforced by the tool
Secure-delete on SSD/CoW filesystemNoStorage layer — out of scope
Hiding vault existence (steganography)NoExplicitly out of scope
Source disk write corruptionYesCompile-time read-only enforcement
Silent vault tamperingYesAEAD tag verification on every read