Files
ruvnet--RuView/firmware/privshield/openwrt/Makefile
T
Claude b827dc40b1 feat(privshield): E2E hardware program — validated C core + multi-provider firmware scaffolds
Take VEIL from the synthetic Rust reference model toward real WiFi silicon
across multiple hardware providers, around one shared, host-validated core.
Answers the questions "can OpenWRT / open WiFi software implement this?" and
"can ESP32 help scramble signals?" with an honest per-platform feasibility map.

Portable C shield core (firmware/privshield/core/) — VALIDATED (host test):
- veil_shield.{h,c}: keyed Givens-rotation obfuscation of the identity-bearing
  "fine" subspace, C99, no malloc / no libc I/O, only <math.h>. SplitMix64 key
  schedule byte-identical to the Rust crate, so on-air behavior is consistent
  everywhere and every adapter links the same math.
- make test passes: energy conservation (orthogonal => "not jamming"),
  reversibility (recover inverts apply), wrong-key-fails, and PRNG stream parity
  with the Rust crate. This is build/host evidence, NOT silicon.

Per-provider adapters (all SYNTHETIC / L0, build-only, TODO(hw) markers):
- openwifi/  grade B (ceiling A, effort D): only open PHY/MAC (FPGA) that can
  host the full keyed rotation + inverse; needs new HDL + 2nd TX chain. Carries
  the P5 measurement protocol (MEASUREMENT.md) for the first MEASURED result.
- openwrt/   grade C: per-packet keyed unitary is blob-blocked on commodity APs;
  coarse compliant knobs (TX antenna map, sounding-cadence jitter) reachable
  from userspace/hostapd; ath9k is the one credible driver-patch route.
- nexmon/    grade C: reading the compressed-BF angles is solved (nexmon_csi /
  Wi-BFI); shaping the transmitted report is research-grade (D11 ucode-adjacent).
- esp32/     grade F (self) / B (supporting): cannot shape its own BF feedback
  (closed esp-phy-lib blob); legitimate as a sensing detector and external-RIS
  controller — the honest way ESP32 "helps scramble", via an external surface.

Docs:
- firmware/privshield/README.md: architecture, layout, and the feasibility matrix.
- ADR-290: the E2E hardware program, PROOF discipline, and per-provider decision;
  added to docs/adr/README.md index.

Compliant waveform controls only, never jamming. No adapter has run on silicon;
no MEASURED claim is made (that is roadmap P5, gated on a captured log).

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

45 lines
1.6 KiB
Makefile

# SPDX-License-Identifier: MIT OR Apache-2.0
#
# Host build-CHECK for the OpenWRT/mac80211 VEIL adapter.
# STATUS: SYNTHETIC / L0 — build-only, UNTESTED ON HARDWARE.
#
# Two targets:
# make core - compile+link the portable core only (always works,
# no libnl needed) — proves the rotation math builds.
# make daemon - build veil_shieldd against libnl-genl-3 (needs the
# dev headers: `pkg-config libnl-genl-3.0`). On OpenWRT
# the package build uses libnl-tiny instead (see openwrt.mk).
#
# This Makefile does NOT flash, run on, or validate any radio.
CC ?= cc
COREDIR := ../core
CFLAGS ?= -std=c99 -Wall -Wextra -O2 -I$(COREDIR)
LDLIBS ?= -lm
NL_CFLAGS := $(shell pkg-config --cflags libnl-genl-3.0 2>/dev/null)
NL_LIBS := $(shell pkg-config --libs libnl-genl-3.0 2>/dev/null)
.PHONY: all core daemon clean
all: core
# Always-buildable: the core object, no netlink dependency.
core: $(COREDIR)/veil_shield.c $(COREDIR)/veil_shield.h
$(CC) $(CFLAGS) -c $(COREDIR)/veil_shield.c -o veil_shield.o
@echo "core built (rotation math OK). Nothing was run on hardware."
# Full daemon: requires libnl-genl-3 dev headers on the host.
daemon: veil_shieldd.c core
ifeq ($(strip $(NL_LIBS)),)
@echo "SKIP daemon: libnl-genl-3.0 not found (pkg-config)."
@echo " Install libnl-3-dev + libnl-genl-3-dev, or build via openwrt.mk."
@exit 0
else
$(CC) $(CFLAGS) $(NL_CFLAGS) -o veil_shieldd \
veil_shieldd.c veil_shield.o $(NL_LIBS) $(LDLIBS)
@echo "veil_shieldd linked (BUILD-ONLY; untested on silicon)."
endif
clean:
rm -f veil_shield.o veil_shieldd