Andrew "bunnie" Huang's Reconfigurable RISC-V Precursor Gets a True Random Number Generation Upgrade
Phone form factor RISC-V gadget now demonstrably more secure, thanks to improvements to an already well-thought-out TRNG.
Work continues on the RISC-V-powered phone form factor Precursor, with creator Andrew "bunnie" Huang detailing a new upgrade which enhances the true random number generator (TRNG) block in the device.
Unveiled last year, the Precursor is a combination device. It's partly a gadget for those looking to develop high-security mobile devices and software, and grew out of a project for precisely that; it's partly a gadget for those looking to work with the free and open source RISC-V architecture; and it's partly a gadget for those experimenting with defining their own hardware on its built-in field-programmable gate array (FPGA).
"Because Precursor uses an FPGA for its SoC [system on chip], we can add new features to the hardware 'on the fly,'" Huang explains. "In this case, we’re going to add some improvements to our basic managed TRNG block."
Given its origins in a project for high-security trustworthy mobile communication, it's no surprise to know that the Precursor includes a carefully thought-out pair of true random number generators (TRNGs): An avalanche noise source and a ring oscillator noise source. However, while both passed a months-long characterization process, Huang found there was room for improvement.
"The system is still missing two features that are generally considered to be best practice," Huang notes. "Independent, on-line health monitors of the raw TRNG outputs. It’s important that the health monitoring happens before any conditioning or mixing of the raw data happens, and significantly, there is no one-size-fits-all health monitor for a TRNG: it’s advised (NIST SP 800-90B sec 4.4) to have tests that are tailored to the noise source."
"Conditioning of the raw data. Despite best efforts to make TRNGs unbiased and flawless, they are really hard to get right. Furthermore, they are only capable of producing high-quality entropy at a limited data rate. Thus, most practical systems take a TRNG output and run it through a cryptographic stream cipher to generate a final datastream; this simultaneously protects against minor flaws in the TRNG while improving the availability of random numbers."
Huang has published two guides to the project wiki, one for the on-line health monitors and the other for raw data conditioning, detailing the implementation, addition, and debugging of both features. "I spent a lot of time," he writes, "to check a box that few people care about, but I've come to realize that's mainly what writing OS code and firmware is about."
Existing pre-orders for the Precursor are experiencing a delay to fulfilment owing to a shortage of required FPGAs, expected to be resolved in November; new orders from the Crowd Supply campaign page, meanwhile, aren't expected to ship until late February 2022.