Embedded systems & hardware security · PhD, University of Huddersfield (2026)
I build and test low-power embedded systems: firmware, PCBs and the measurements that show whether they really work. My PhD developed hardware-rooted device authentication for LoRaWAN IoT nodes, combining SRAM Physical Unclonable Functions with RF fingerprinting on ARM Cortex-M0+ hardware. Alongside it I build embedded security projects end to end, from bootloader to radio link, each with host-side tests and its evidence kept in the repository. I verify small digital designs in two hardware description languages, and I check the tests themselves by breaking the circuits on purpose. I also test machine learning for small devices, with evaluation designed so that the test data cannot flatter the result.
- Embedded: C on ARM Cortex-M (STM32L0, SAMD21) · FreeRTOS (tasks, queues, mutexes, watchdog, tickless idle) · Zephyr RTOS (ztest, CMSIS-DSP, west) · SPI / I²C / UART · fixed-point control (PID with anti-windup and a sensor-fault supervisor), run on a real RC circuit · JTAG/SWD + GDB · CMake / arm-none-eabi-gcc
- Embedded security: secure boot (SHA-256, ECDSA P-256, anti-rollback, power-fail-safe updates) · flash write protection and read-out protection · AES-128-CTR / AES-CMAC link security · hardware secure element (ATECC608) · authenticated BLE pairing (LE Secure Connections, bonds in flash) · MCUboot on Zephyr (signed images, boot-time slot check) · SBOM (SPDX) and vulnerability triage against OSV · key provisioning and backup · threat modelling (STRIDE) · reading a built binary in Ghidra · timing side-channel measurement
- Testing: host-side unit tests · known-answer vectors (FIPS-197, RFC 4493, RFC 6979) · simulated power-cut tests · Zephyr ztest on native_sim · cocotb (Python testbenches for Verilog and VHDL) · mutation checks (breaking a design on purpose to see whether the tests notice) · undefined-behaviour sanitiser · measurements on real hardware compared with a model's predictions · GitHub Actions CI (unit tests + firmware build + simulation)
- Hardware: KiCad schematic & PCB layout · board bring-up · oscilloscope validation · DFM review and DFMEA of my own PCB
- Wireless & RF: LoRa/LoRaWAN · BLE (GATT, secure pairing) · RTL-SDR capture · carrier-frequency-offset analysis
- Digital design: VHDL · Verilog · UART, SPI master and a clock-domain-crossing asynchronous FIFO (Gray-coded pointers), simulated with Icarus Verilog and GHDL · Intel Quartus · ModelSim
- Analysis: Python (NumPy, pandas, scikit-learn, matplotlib)
- Connectivity: MQTT (Mosquitto broker; MQTT 5, last will, retained status, per-topic permissions) · a serial-to-MQTT bridge in Python with CI
- Edge ML: evaluation without leakage (cross-validation grouped by volunteer; held-out recording sessions and fault sizes) · decision trees and random forests · decision-tree-to-C export with float thresholds, flash size measured on Cortex-M0+ and M4F · feature extraction in C checked against Python · the whole chain (resampling, features, random forest) running on the SparkFun Edge (Apollo3) · live accuracy measured on a new session: 0.967 (one person, one board) · int8 quantisation with LiteRT Micro on the Nano 33 BLE, board output checked against the PC
- 📄 Complementary failure modes of SRAM-PUF and RF fingerprinting under compound thermal–distance stress, Ad Hoc Networks (Elsevier), 2026, open access
- 📊 Open dataset: Zenodo 10.5281/zenodo.19592147 · IEEE DataPort 10.21227/fecz-fe94
- 🔬 5,488 validated authentication attempts across 27.4–56.1 °C on a 2×2 cross-platform hardware testbed
These projects were built with AI assistance (Claude). I set the requirements, ran the hardware and the tests, and checked the results; each repository says what was tested and what was not.
Finished
- 🔐 STM32L0 FreeRTOS sensor node with a custom secure bootloader: FreeRTOS LoRa node with an AES-CTR/CMAC link and replay protection. Own bootloader that checks an ECDSA P-256 signature, refuses downgrades and installs updates safely (power cut simulated at 1,682 points of an install). Bootloader write-protected, read-out protection Level 1, and a boot-time check that halts if the protection is weakened. Limitations written up honestly.
- 🔎 Attacker's view of my own bootloader: I read the built bootloader binary in Ghidra to see what an attacker holding only the binary learns: the boot order, the option-byte check, and the trusted public key, which matches the source byte for byte. Findings are marked as read from the binary or inferred. Static analysis only, nothing run on hardware; Claude helped me interpret the disassembly.
- 🔑 MKR WAN 1310 secure-element LoRa node: link keys held in an ATECC608 that never reveals them. AES-CTR and CMAC are built from the chip's single-block AES: byte-identical to my software implementation on 2,000 random packets and accepted by the unchanged receiver. Hardware counter as frame counter, and a comparison with SRAM PUFs.
- 📡 Zephyr BLE vibration monitor on the Arduino Nano 33 BLE: 400 Hz accelerometer sampling, CMSIS-DSP FFT for the dominant frequency, BLE notifications readable only after authenticated pairing (passkey on the USB console, bonds kept in flash), 44 ztest cases on native_sim, and GitHub Actions CI that runs them and builds the firmware on every push. Verified on the board with an iPhone.
- 🛡️ mcuboot-lab: MCUboot as a second-stage bootloader on the Arduino Nano 33 BLE under Zephyr 4.4.2, kept behind the board's own Arduino bootloader so USB flashing and recovery still work. Signed with my own key, because MCUboot's default key is public. Boot-time tests on the board: a flipped bit in the app was accepted until I turned on the slot-0 check, and then the app did not start; an intact image signed with a different key did not start either. Compared with my own bootloader in the README. On the overwrite-only build, an update placed in slot 1 installed and a downgrade was refused (inferred from the board's output). An update interrupted by timed resets from a second board (a reset as a stand-in for a power cut, not a brownout); the results are in the README. I also added an SPDX SBOM generated from the real build, a checker that asks OSV about each component, seven MCUboot advisories triaged with a reason each, and a security policy. Not tested: swap-based updates with rollback.
- 🧩 RTL verification lab: a UART (transmitter, receiver, loopback), an SPI master (all four modes) and an asynchronous FIFO between two unrelated clocks, each written twice, in Verilog and in VHDL, and checked by one shared set of Python (cocotb) tests on Icarus Verilog and GHDL: 30 simulator runs on every push in GitHub Actions. The SPI tests use a slave built from the published table of the four modes, not from my own circuit. The tests are checked by breaking the circuits on purpose: 48 bugs, each in both languages (96 broken circuits), of which the ordinary tests catch 90; the other 6 (three cases that ordinary RTL simulation cannot see) are caught by three white-box checks of the design's structure, so all 96 are caught. Those checks show structure, not metastability. For the FIFO, a test stand-in for the synchroniser that lets changing bits arrive at random times shows that Gray-coded pointers survive, while the same design with plain binary pointers passes an ordinary simulation and is caught only by that stand-in. Simulation only: no FPGA board.
- 🎛️ pid-control-lab: a fixed-point PID controller and a sensor-fault supervisor in C for the Cortex-M0+ (no floating-point unit). Seven closed-loop requirements were written down as numbers before the results (step response, 27 different plants, sensor noise, a load disturbance, windup, a failed sensor), checked by 181 tests built with the undefined-behaviour sanitiser, so an integer overflow fails the test that causes it. The gains come from a measured plant model, not from guessing. Then the same controller ran on an Adafruit Feather M0 (SAMD21) driving a real circuit, a DAC into a 100 kΩ and 100 nF filter read back by the ADC, with the loop sped up to match the faster plant. The PC model predicted a time constant of 10 ms and the board measured 10.5 ms; the closed-loop step to 2000 counts settled in 41 ms with an average error of −0.07 counts from the target, which meets the requirement scaled for the faster plant. The first capture was a floating input (50 Hz mains hum), which exposed and fixed a weakness in my plant-fitting tool; the real captures, the generated predicted-against-measured table and the tests that tie the documentation to the data are in the repository. Built with AI assistance (Claude); I wired and ran the hardware, captured and analysed the measurements, and chose the gains from them. Limits, stated in the repository: an electrical stand-in, not a heater; one board and one circuit; a port to an STM32 not done.
- ⏱️ timing-lab: timing side-channel measurements on a Feather M0 (Cortex-M0+) and a Nano 33 BLE (Cortex-M4F), comparing a constant-time compare with an early-exit loop and the library memcmp, including unaligned buffers. Predictions were written before each run and the misses are kept in a scorecard. Limits are in the README. Built with AI assistance (Claude).
- 📐 dsp-lab: fixed-point biquad and FIR filters in C and C++, checked bit for bit against a Python model (227 tests), with cycle counts on both boards and predictions written first. Limits are in the README. Built with AI assistance (Claude).
- 🏭 puf-shield-dfm: a self-directed manufacturing review of my own research PCB: a DFM review, a DFMEA of 16 failure modes and a costed bill of materials. A desk exercise: no manufacturer reviewed it, and the scores are my judgement, not field data. The BOM is partly done (3 of 7 fitted lines priced). Built with AI assistance (Claude).
- 📉 litert_quant: float against int8 versions of three small models (digits, UCI activity data, CWRU bearing faults) run with LiteRT Micro on the Arduino Nano 33 BLE. int8 was 1.6 to 3.0 times faster by cycle count and 1.9 to 2.6 times smaller in model size, and the board matched the PC on every test input. My first int8 build gave wrong outputs (14 of 360 predictions differed) because of per-channel dense weights; I fixed it at export and added a regression test. 157 tests in GitHub Actions. Limits, stated in the repository: one seed, one board, test subsets on the board, an assumed 64 MHz clock, and a bearing task where a plain RMS baseline scores almost the same as the autoencoder. Built with AI assistance (Claude).
- 🐧 yocto-qemu-lab: a small Yocto Linux image built and booted in QEMU, with its SBOM and vulnerability report compared with my hand-made MCUboot SBOM. All 145 Unpatched matches in the report have a status and a reason: 73 affected, 40 not affected, 32 unknown. They are leads, not findings: "affected" means the code is built in and in range, not that it is exploitable. One image, one machine, no real hardware. Built with AI assistance (Claude).
- 🧷 Merged fix in the Zephyr RTOS: two wrong register constants in the MII driver headers. I asked the maintainer first, wrote a test that failed before the fix and passed after it, and followed the project's rules on sign-off and AI disclosure. A two-line fix, approved by three maintainers.
In progress
-
🧪 tinyml-edge-lab: tested building blocks for machine learning on my own boards, with evaluation designed not to flatter the model.
- Held-out results. UCI activity data (cross-validation grouped by volunteer, the nine test volunteers used once per model): a 33-node decision tree scores 0.834 macro-F1 and a 2,186-node random forest 0.877. CWRU bearings: a forest scores 0.989 on a random split of windows, 0.943 holding out a motor load and 0.332 (chance) holding out a fault size, reported as it came out. My own SparkFun Edge recordings (5 desk gestures, 3 sessions, 465 windows): a forest scores 0.918 on a session it never saw, against 1.000 on a random split.
- On the device. Decision trees export to C with float thresholds that keep every split exact; a 33-node tree is 744 bytes of flash on a Cortex-M0+ (measured with the ARM compiler). The gesture features in C take 1.5 KB of flash and match the Python ones: no trained model changed an answer on any of the 465 windows. The whole chain (resampling to 50 Hz, windows, features, a 100-tree forest) runs on the Edge at 3.8 ms per window, measured on the chip; the repository has the firmware, a serial monitor and a host-side simulation of the firmware's loop.
- Live accuracy on the board. A new sitting, recorded after the model was trained: 15 shuffled blocks of one gesture each (7 minutes), with the board's own predictions scored against the gesture shown. 0.967 accuracy and 0.967 macro-F1 over 180 windows (95 % interval 0.922 to 1.000, resampling whole blocks; chance is 0.200). Weakest gesture: circle, recall 0.889 (4 of 36 windows read as tilt). The same model type scored 0.918 when a whole session was held out offline.
- Microphone (a mixed result). Three sound classes (quiet, speech, knock) from per-window summary numbers, tested by training on some recording sittings and testing once on a sitting never seen. Knock held up in every test (recall 0.83 to 1.00). Quiet detection failed whenever the test sitting's room noise level differed from the training sittings, so the macro-F1 ranged from 0.51 to 0.95 depending on which sittings were used. I tested the laptop's power state (plugged in against battery) with a rule written before the test; it made no difference, so the cause is still unexplained. A calibration step helped on one held-out sitting but is not confirmed on a fresh one. Five different sittings, one person, one board; the repository has the figures and the limits.
- Limits, stated in the repository: one person, one board and one live sitting, so the numbers say little about others, and the interval is wide because there are only three blocks per gesture. The board also reported one overwritten sensor sample, which I have not explained.
-
📨 edge-mqtt-bridge: a serial-to-MQTT bridge for the Edge's microphone logger, with a checker that verifies every message against a written format. 44 tests, many of them against a real Mosquitto broker in CI, and the tests were checked by breaking the code on purpose (32 deliberate bugs, each caught; one of my own security tests was vacuous until that check exposed it). It has users, passwords and per-topic permissions (the bridge may write only its own device's topics), and TLS: it verifies the broker's certificate and name, trusts only the authority I name, and refuses anything older than TLS 1.2. Running it for real on my board found two things the automated tests had missed: a refused QoS 0 measurement gets no reply, so the bridge ran silently with nothing arriving (it now checks its first message and stops with an error); and Python 3.13 rejected my first certificate authority because it did not declare that it may sign certificates (the script is fixed and CI now runs 3.12 and 3.13). Limits, stated in the repository: no client certificates, one device, no latency or long-run measurement. Built with AI assistance (Claude).
Planned
- 🎛️ A hardware-in-the-loop test runner for the control loop, on the Feather M0 setup I already have
