enstropy

Providing USB access to the Nucleo-L053R8's TRNG

enstropy

This firmware provides full-speed USB access to the Nucleo-L053R8’s TRNG. Single buffering combined with only tx’ing one 32-bit random number at a time gives us a 900kbps TRNG data stream.

We’ve checked the resulting TRNG stream against the NIST and Dieharder RNG statistical test suites. Contrary to ST’s own test results mentioned in AN4230, the STM32L053’s TNRG failed both tests on our setup, see the output below. We have not pinpointed the root cause of this issue yet. We welcome any review of our code base, especially the RNG init code, as well as re-running the statistical test suites.