mirror of
https://github.com/ruvnet/RuView.git
synced 2026-08-31 04:25:54 +00:00
Assemble `wifi-veil/` as an extraction-ready standalone repository for the WiFi Veil privacy shield, decoupled from the RuView monorepo. The RuView copies under v2/, harness/, firmware/, and docs/ are left untouched; this is an additive, self-contained tree that can be split out to its own repo (e.g. ruvnet/wifi-veil). Optimized for a standalone identity, with all monorepo coupling removed: - Rust crate at the repo root: renamed `wifi-veil` (lib `wifi_veil`, bin `veil`), workspace-metadata inheritance inlined, own `[workspace]` root, release profile. Dependency-free and WASM-ready — it builds and tests OFFLINE, unlike the monorepo copy (which needs sibling submodules). Code is byte-identical, so the deterministic proof witness is unchanged. - Portable C shield core + per-provider firmware scaffolds (openwifi/openwrt/ nexmon/esp32) under firmware/; host C-core test passes. - npm harness renamed `wifi-veil-harness`; its guidance paths/commands repointed to the standalone layout; manifest SHA-256 digests regenerated and verified. - Docs: ADR-288/289/290 and the privacy-shield research bundle; research build commands/links normalized to the standalone crate. - Root scaffolding: product README, dual LICENSE-MIT / LICENSE-APACHE, .gitignore, CHANGELOG, CONTRIBUTING, and a GitHub Actions CI workflow (Rust test/clippy/fmt + wasm build, C-core host test, harness smoke). Validated locally: cargo fmt --check, cargo clippy --all-targets -D warnings, cargo test (43 tests + witness), cargo build --lib --target wasm32-unknown-unknown, make -C firmware/core test, and `node harness/bin/cli.js guidance` — all green. No telemetry, build artifacts, or lockfile committed. All defense figures remain SYNTHETIC / L0; compliant waveform controls only, never jamming. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
5.1 KiB
5.1 KiB
WiFi Veil ↔ mac80211 / driver integration map
SYNTHETIC / L0— BUILD-ONLY, UNTESTED ON HARDWARE. These are hook-point designs derived from public API/source, not validated on silicon. Function and attribute names are real (verified against in-treelinux/nl80211.hand public hostapd/driver docs); where a hook does not exist upstream it is markedTODO(hw)with what a patch would have to add. Compliant controls only.
Legend: US = userspace-reachable today · DP = needs driver patch · FW = needs firmware patch (blob-blocked).
1. TX antenna-map perturbation — US (feasible)
- Daemon:
veil_set_tx_antenna_mask()inveil_shieldd.c. - Kernel path:
nl80211→cfg80211_ops.set_antenna()→ driver.set_antenna(e.g.mt7915_set_antenna,ath9kset_antenna). - Attributes:
NL80211_CMD_SET_WIPHY,NL80211_ATTR_WIPHY_ANTENNA_TX,NL80211_ATTR_WIPHY_ANTENNA_RX. - Constraints: many drivers require the phy DOWN and accept only symmetric masks; validate per driver. Coarse static spatial-mapping change, not the keyed rotation. Fully standards-compliant.
2. NDP sounding-cadence jitter — US (indirect)
- Daemon:
veil_randomize_sounding_cadence()/veil_next_cadence_ms(). The schedule is derived from the session key via the core SplitMix64 so the paired receiver can anticipate it (not random spraying). - Real lever: hostapd
ctrl_iface(UNIX socket/var/run/hostapd/<iface>):SET he_su_beamformer …/ rewritevht_capab[SOUNDING-DIMENSION-n]/ toggle[SU-BEAMFORMER], thenRECONFIGURE. Config keys documented inhostapd.conf. TODO(hw): there is nonl80211"set sounding interval" command; the per-NDP timer is in driver/firmware. We can only jitter the offered cadence. Thectrl_ifacewrite itself is not yet wired (function currently only computesms).
3. MU-MIMO group shuffling — FW (blob-blocked)
- Daemon:
veil_shuffle_mumimo_groups()— explicit-ENOTSUPno-op. - Where it lives: MU group formation + per-group steering matrices are computed in the WiFi MCU firmware on mt76 (mt7915) and all ath1x parts.
TODO(hw): would requireNL80211_CMD_VENDORwith a driver-specificNL80211_ATTR_VENDOR_ID/NL80211_ATTR_VENDOR_SUBCMD/NL80211_ATTR_VENDOR_DATAthat upstream mt76/ath do not define, plus a firmware change to honor an externally supplied grouping. Not reachable without both a driver and firmware patch.
4. Per-packet keyed unitary (the core WiFi Veil transform) — FW (blob-blocked)
- Daemon:
veil_apply_keyed_rotation()→veil_shield_apply(fine, n, key, passes)from the portable core. Orthogonal / energy-preserving (the "not jamming" invariant, checked viaveil_l2_normbefore/after). - What a full path must touch:
- mt76 (mt7915): the MCU firmware stage that builds the compressed
beamforming report (φ/ψ angles) or applies the steering/precoder Q to the
LTF spatial mapping. A firmware patch would call the rotation on the fine
subspace before the report is emitted / precoder applied. The driver
(
mt7915/mcu.c) would ferry the key/passes down via a new MCU command. - ath9k (DP, best open case): the static spatial-mapping matrix is set via
AR_PHY_*registers in the open PHY init; a driver patch could apply a keyed static Q there. This is coarser than a true per-packet report edit but is the most credible OpenWRT-adjacent route (older 802.11n hardware only). - ath10k/ath11k/ath12k: report generation + precoder are entirely firmware-side with no open firmware (ath11k/ath12k) — not patchable.
- mt76 (mt7915): the MCU firmware stage that builds the compressed
beamforming report (φ/ψ angles) or applies the steering/precoder Q to the
LTF spatial mapping. A firmware patch would call the rotation on the fine
subspace before the report is emitted / precoder applied. The driver
(
TODO(hw): on OpenWRT there is no userspace/mac80211hook that hands the pre-precoder V/steering buffer to the daemon before TX. Reaching it needs the driver+firmware patch above, or use the openwifi (FPGA) / Nexmon (Broadcom) adapters, which expose the datapath. The daemon only proves the math is invariant; nothing goes on air.
5. Sensing-solicitation (NDPA) detection — US/DP (partial)
- Daemon:
veil_event_cb()onNL80211_CMD_FRAME. - Real path:
NL80211_CMD_REGISTER_FRAMEto subscribe to specific management action categories, delivered asNL80211_CMD_FRAMEwithNL80211_ATTR_FRAME. Classify VHT/HE compressed beamforming action (categories 21 / 30) and NDP Announcement to measure cadence. TODO(hw): commodity drivers do not forward raw NDPA to userspace by default; honest external-solicitation detection needs monitor-mode capture or a driver notification that is not guaranteed upstream. Frame parsing is stubbed.
Summary of the effort boundary
| Control | Effort to reach full WiFi Veil fidelity |
|---|---|
| TX antenna map | Ready now (US), coarse only |
| Sounding cadence jitter | Wire hostapd ctrl_iface (US), coarse only |
| Static spatial Q | ath9k driver patch (DP) |
| MU grouping | driver vendor subcmd + firmware (FW) |
| Per-packet keyed rotation | mt76/ath firmware patch, or openwifi/Nexmon adapter (FW) |
| NDPA detection | frame registration + likely driver patch (US/DP) |