SensorGuard-RV: Sensor-to-Register Data Protection for Resource-Constrained RISC-V Devices
arXiv:2611.08380
Abstract
Sensor readings in embedded systems pass through a hardware-firmware stack where an attacker can intercept, overwrite, or fabricate them. At worst, this may cause downstream systems, e.g., flight and industrial controllers, to behave unsafely. Existing defences, e.g., TEEs and trusted I/O paths, depend heavily on trusted software and correctly configured access control, which remain fragile in practice. In response, we present SensorGuard-RV, a hardware-first approach that delivers sensor samples into processor registers without trusting intermediate software, buses, or memory. After configuration, a write-once ownership switch hands the sensor to a fixed-function controller that performs hardware-level authenticated encryption of sensor samples under a key that is inaccessible to software. We develop a new RISC-V instruction that directs the CPU to decrypt and write the sample to a register only after verifying its tag and rejecting replays, including across resets. We implemented SensorGuard-RV on an Artix-7 FPGA with a NEORV32 core and an ADXL362 SPI accelerometer. At 100 MHz, a protected sample reaches a register in 5,191 cycles (51.9 s), sustaining 19,015 transactions/s (5.3% above a software-driven SPI baseline). The added logic (3,155 LUTs and 2,215 registers; 5.0% and 1.7% of the FPGA) is dominated by the Ascon engine and preserves the 100 MHz clock, while the estimated power consumption rises from 118 to 368 mW.
arXiv commentAccepted at the 42nd ACM/SIGAPP Symposium on Applied Computing (SAC '27)