feat: add strix devlog post

This commit is contained in:
randogoth 2026-10-26 15:43:07 +02:00
parent c5f7d24914
commit e6c4871c67

View file

@ -0,0 +1,30 @@
Title: STRIX: A 360 Ring Oscillator Pocket TRNG
Date: 2026-10-26 15:43
Category: RANDOM
Slug: strix
Summary: STRIX is a portable true random number generator on an Arduino MKR Vidor 4000, four FPGA generators of 90 ring oscillators each, served over USB, WiFi and Bluetooth LE, and the power budget it took to keep the radio and the rings from resetting the board.
Tags: fpga, arduino, trng, strix
STRIX (*Satellite True Random Information eXtractor*, and also Latin for a screech owl) is a true random number generator small enough to carry around. It runs on an *Arduino MKR Vidor 4000*, which puts a *Cyclone 10 LP* FPGA with 15,408 logic cells, a *SAMD21* microcontroller and a *NINA* WiFi module on one small board. Plugged into a computer it talks USB, on a charger it opens its own WiFi access point with an HTTP API, and on battery it advertises itself over Bluetooth LE.
The entropy comes from ring oscillators: short loops of logic cells that invert their own output and run as fast as the silicon allows. No two of them run at same speed, and none of them runs at the same speed twice, and that timing jitter is the random part. STRIX has four independent generators of 90 rings each. On every tick of a 120 MHz clock a generator XORs its 90 rings into one bit, then XORs five of those bits in a row into one output bit, which comes to about 24 Mbps per generator. There is no pseudo-random post-processing anywhere in the chain.
The number of rings is sized from the predictability of single rings, measured on the Vidor itself and multiplied out, never from statistics of the finished output, since a stream that looks good says very little about how much entropy actually went into it.
## An owl with a bias
The other half of STRIX is for mind-matter experiments, the same territory as [voidcat]({filename}20240410_voidcat.md), which it can feed with hex entropy. It runs per-second trials in the *Global Consciousness Project* format, and a random-walk or majority-vote bias amplifier on top of the raw stream, with a von Neumann extractor that can be switched in as a control.
## The ruler was bent
Every generator runs the NIST SP 800-90B repetition count and adaptive proportion tests on the FPGA, plus a monitor for dead rings, and a generator that fails drops out of the combined stream. For the output itself I reached for my own [onod3000]({filename}20250118_onod3000.md), and its Kolmogorov-Smirnov test failed 8 of 16 STRIX runs. It also failed 3 of 6 runs on `/dev/urandom`, and gave a different p-value for the same file every time, because it compared the data against a PRNG sample seeded from the clock (inherited from the Java original). The board was fine. The test wasn't. With the KS test fixed, all four generators pass 15 of 15 tests in every run, and a 16 MB capture through QNGmeter landed every test in range.
## Power
The hardest bug had nothing to do with randomness. On my laptop's USB socket, running the access point and any generator at the same time reset the microcontroller, probably supply droop or noise getting into the reset line, since either one alone was stable. The first WiFi build was worse: it locked the board in a reset loop that even blocked the bootloader, and the only way out was holding reset while plugging it in.
Bluetooth LE first needed newer firmware on the WiFi module than the 1.0.0 the board shipped with, flashed through a pass-through sketch that forwards reliably at 115200 baud and not at 460800. Then, on the charger, streaming entropy every 20 ms with all four generators running hung the board after about six seconds, and it didn't come back up.
The fix is a power budget. While a radio runs, only two generators take part, and notifications go out every 50 ms instead of 20. That held through a three-minute soak: 3,600 of 3,600 notifications, 1.28 KB/s, 49.93% ones, every generator healthy, no reset.
So STRIX works on a laptop and on a charger, and my phone reads entropy off it over WiFi. The mode it was actually built for, an owl in a pocket running on battery, hasn't been tested yet. That is next.