Commit Graph

7 Commits

Author SHA1 Message Date
Claude 0cb348da72 docs(privshield): clearly explain how VEIL protects against unauthorized WiFi surveillance
Plain-language "how it protects you" for non-experts, in both surfaces:

- README: new "How this protects you from unauthorized WiFi surveillance"
  section — the silent device-free threat, the per-session keyed-twist defense
  (own router undoes it, outside listener can't average it back → identity guess
  collapses to chance; ~98% throughput; compliant/not-jamming), and honest
  limits (defends vs. third-party sniffers not the AP; SYNTHETIC/L0).
- UI (ui/veil-console.html): a new always-visible "How this protects you" card
  (Threat / Shield / Kept honest) plus a deeper `protect` explainer dialog.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
2026-08-09 15:52:37 +00:00
Claude aea8c8c66a docs(privshield): add veil TUI walkthrough GIF, ship the web console in-repo
- docs/veil-tui.gif: an animated walkthrough of the `veil` terminal harness
  (shield off/on, 32 passes → out-of-spec, 96 → pass, ward preset, optimize,
  witness check), embedded at the top of the harness section in the crate README.
- ui/veil-console.html: the self-contained VEIL Console web dashboard now lives
  in the repo (no build/network), linked from the README.
- veil: honor CLICOLOR_FORCE so piped captures keep ANSI color (standard flag).
- veil-console.html footer now points at the `veil` terminal harness/TUI.

Validated: 38 tests + doctest pass, clippy --all-targets -D warnings clean,
rustfmt clean. GIF is 800×520, ~113 KB, verified to decode/animate in a browser.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
2026-08-09 15:39:01 +00:00
Claude cb67be117a feat(privshield): add veil custom terminal harness + TUI (ADR-288 §harness)
A dependency-free native binary (`src/bin/veil.rs`) — the in-repo counterpart to
the npm metaharness — that drives the same crate API the tests use:

- Interactive ANSI dashboard (TUI): live status, re-ID off/on vs chance,
  throughput, compliance (energy 1.000× / not jamming), a block-sparkline
  collapse curve, config, and PASS/OUT-OF-SPEC verdict. Command-driven redraw
  loop (std-only, no crossterm/ratatui): on/off, passes/bits/n/snr,
  metric euclid|cosine, preset scif|board|ward|hotel, optimize, proof.
- Scriptable subcommands: report, sweep, optimize, adaptive <N>, proof, doctor
  (exit 0 = healthy). Auto-picks TUI on a terminal, one-shot report when piped;
  honors NO_COLOR.

Std-only, so it builds with no extra deps and runs in any pipe/CI. The wasm leaf
story is unchanged (validated with `--lib`; the bin is native-only). All
readouts are SYNTHETIC/L0 and never relabeled.

Validated: 38 tests + doctest pass, clippy --all-targets -D warnings clean,
rustfmt clean, wasm --lib builds; all subcommands + a scripted TUI session
exercised. Documented in the crate README and ADR-288.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
2026-08-09 15:26:07 +00:00
Claude 80b1715cb8 docs(privshield): add VEIL Console landscape banner to top of crate README
Adds a rendered screenshot of the VEIL management console (dark theme, shield
engaged: the room's WiFi identity clusters collapsed to the chance floor, re-ID
4.7%, PROTECTED) as a banner at the top of the crate README. Captured at a 16:11
landscape viewport (2400x1752, 2x).

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
2026-08-09 15:07:41 +00:00
Claude 18060b9c77 Add per-deployment adaptive optimization + VEIL npm metaharness (ADR-289)
Two additions on top of the hyper-optimized VEIL shield.

1) Adaptive optimization (v2/crates/wifi-densepose-privshield/src/optimize.rs):
   - optimal_bits_across_snr / model_optimal_bits_for_snr: the throughput-
     optimal feedback resolution shifts with SNR (unconstrained optimum 4 bits
     at 5-10 dB, 3 bits at 20-40 dB); within the spec {5,7,9} set it stays 5,
     which is why the shipped shield is SNR-stable.
   - adaptive_shield / min_passes_for_n: derive a shield for a specific
     deployment. Finding: the collapse budget is N-independent in this model
     (48 passes collapses N in {8,64} alike) — it is set by the fine-subspace
     dimension, not the candidate count. Defaults unchanged, so the proof
     witness is untouched. 38 tests + doctest pass; clippy -D warnings clean.

2) npm metaharness harness/wifi-densepose-privshield/ (ADR-289), mirroring
   wifi-densepose-sar-harness (ADR-286) with two improvements:
   - @metaharness/* imported dynamically inside the commands that need them, so
     `guidance` and `--help` run with ZERO dependencies installed (offline / pre
     `npm install`).
   - a dependency-free VEIL `guidance` command: a source-cited, evidence-
     labelled, read-only capability map (topics: overview, threat,
     countermeasure, compliance, optimization, experiment).
   Standard router + flywheel (SYNTHETIC) + Darwin wiring, tailored to VEIL
   task axes and policy levers. Tests: smoke + router + flywheel (need install)
   and guidance (offline). .harness manifest generated with real per-file
   hashes. Validated offline: cli syntax, --help, guidance topics, exit codes,
   graceful degradation when deps are absent.

Docs: research bundle 08 gains a per-deployment adaptivity section; 07 and the
crate README point at the harness; ADR-289 added and indexed.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
2026-08-09 14:23:12 +00:00
Claude 006a66ca20 Hyper-optimize VEIL shield: derive the optimal config instead of hand-picking it
Adds an `optimize` module that replaces the hand-picked shield config with a
derived, robustness-verified optimum, and hardens the experiment so the
collapse is proven to be signal-level, not classifier-level.

Model changes:
- throughput.rs: add a feedback-airtime term (cost rises with feedback bits)
  alongside the falling quantization residual, giving a genuine interior
  throughput optimum in feedback resolution.
- attacker.rs: add a selectable distance metric (Euclidean + Cosine) so the
  optimizer can require the collapse to hold under multiple classifiers.
- experiment.rs: thread the attacker metric through; build the channel once.

optimize.rs:
- optimal_feedback_bits / spec_optimal_feedback_bits: throughput-best resolution
  (3 bits unconstrained, matching DySPAN-2026; 5 bits within the 802.11 {5,7,9}
  set).
- min_givens_passes: smallest mixing budget that collapses re-ID robustly across
  both metrics AND N in {16,32}.
- pareto_frontier and hyper_optimize.

Findings and adopted defaults:
- Proven-minimum robust passes = 48; the hand-picked 112 was 2.3x over-
  provisioned. Rotation mixing is keyed (never signaled), so extra passes are
  throughput-free -> ship 96 (2x margin).
- Feedback resolution 5 bits (spec-optimal), down from 7.
- ShieldConfig::default() now equals hyper_optimize()'s output; a test guards
  against drift.

Net vs. the original: strictly better on BOTH privacy and throughput.
Reference (SYNTHETIC/L0, N=16): re-ID 100% shield-off -> 4.7% shield-on
(chance 6.25%, below chance), throughput 97.6%, energy ratio 1.000000. 35 tests
+ doctest pass; clippy -D warnings clean; builds for wasm32.

Docs: new docs/research/privacy-shield/08-optimization.md; updated bundle
README/03/05/07 and ADR-288 with the derived operating point.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
2026-08-09 14:08:46 +00:00
Claude 16b2a629d1 Add VEIL privacy shield: compliant-waveform defense against WiFi sensing (ADR-288)
VEIL (Verifiable Emission-shaping for Identity-Leakage prevention) is the
countermeasure counterpart to BFLD (ADR-118/121): where BFLD detects when
beamforming feedback becomes identifying, VEIL shapes a node's own outgoing
feedback so an unauthorized passive sniffer cannot re-identify people, while
a legitimate receiver that shares the per-session key sees an unchanged link.

Mechanism: identity leaks through the fine cross-subcarrier phase structure of
a compressed beamforming report; throughput rides the dominant beam direction.
These are (mostly) separable subspaces. VEIL composes extra keyed Givens
rotations (the report's native primitive) over the fine subspace only. The
rotation is orthogonal (energy-preserving -> not jamming), keyed per session
(the AP inverts it -> throughput preserved), and fresh each session (a sniffer
cannot average it back -> re-identification collapses to chance).

Contents:
- v2/crates/wifi-densepose-privshield: deterministic, dependency-free,
  WASM-ready pure-compute leaf implementing the attacker-vs-protector
  experiment, the four compliant controls, a throughput model, a
  machine-checkable "not jamming" compliance audit, and a pinned witness.
  29 tests + doctest pass; clippy -D warnings clean; builds for
  wasm32-unknown-unknown.
- docs/research/privacy-shield: 8-file research bundle (SOTA, threat model,
  design, compliance/regulatory, experiment protocol, market, roadmap).
- docs/adr/ADR-288: formal decision record.

Reference results (SYNTHETIC / L0, N=16 identities): passive re-ID accuracy
100% shield-off -> 7.8% shield-on (chance 6.25%); modeled throughput ratio
98.0%; emission energy ratio 1.000000 (compliant). All defense numbers are
SYNTHETIC until a two-node hardware capture with a witness exists.

Compliant waveform controls only; never jamming (47 U.S.C. 333/302a analysis
in the bundle).

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
2026-08-09 13:51:12 +00:00