# Duress login plus vault wipe - Status: SHIPPED in C++ port - Spec: FR-08, FR-11 - Sources: `tosv.cpp` login plus `wipe_store`, `archive/tosv.py` legacy, `uploads/paste.txt` vision, elite report section 7 ## What it is A second login pair `duress:<8 hex>`, minted at bootstrap, whose only function is authenticated destruction. POSTing it audits `duress` with the peer IP, overwrites every blob up to 1MB with zeros, unlinks blobs, removes the DB, and replies `403 wiped`. The reply looks like any denial to a watcher over the shoulder. ## How TOSV does it The login handler checks the duress pair before bootstrap and store paths, so it works at any vault age. `wipe_store` walks the store recursively, opens each file read-write, writes zeros, unlinks, then removes `tosv_db.txt`; every step is exception-proofed so one bad file never aborts the rest. Legacy Python wrote `urandom` instead of zeros; the C++ port writes zeros for speed and determinism. ## What it protects against Coercion at the keyboard: robbery, border search, insider threat with a gun. It also covers verified-hostile-takeover: an operator who sees the alert can burn the vault remotely through the login. ## Attack realism Medium-high for the target user. Vault buyers name coercion explicitly (paste.txt asks for it by name), and rubber-hose attacks bypass all math. A duress path that is fast, total, and audited is the only honest answer. Realism limit: it needs network reach to the login at the bad moment, and a coerced operator must remember which pair is the burner. ## Pros One action, total effect. Audited before destruction, so forensics knows it was duress, not a crash. Indistinguishable reply shape. ## Cons and how the vault resolves them - Typo could wipe the vault. Resolved by 24-plus random chars that no one types in normal flow: store and bootstrap pairs look different (`store_`, `admin`), and the duress pair lives written down, not memorized for daily use. - SSD wear leveling keeps ghost blocks. M5 writes 3 passes (zeros, ones, random) plus unlink plus DB removal; ghosts stay possible on flash, full shred needs keyslot destruction in [future crypto](sec-future-crypto.md). - Wipe is local only, backups survive. Resolved by pairing duress with the backup runbook: restic retention plus documented `backup-prune` on duress alert. Remote copies are an operator decision, never silent. - No confirmation step. Deliberate: confirmation dialogs get read aloud under coercion. The randomness IS the confirmation. ## Residual risk Ghost blocks on SSD and surviving off-site backups. Both documented, both with tracked follow-ups, neither silent. M6: each file removal runs inside its own guarded step, so one stubborn file can no longer abort the rest of the wipe. ## See also - [Security index](security.md), [bootstrap](sec-bootstrap.md), [audit](sec-audit.md), [future crypto](sec-future-crypto.md)