Project

Measuring, Auditing, and Improving Bitcoin-Core’s Kitchen Sink Random Number Generator

Copyright

Courtesy of LogRocket

Courtesy of LogRocket

Bitcoin Core's internal Random Number Generator (RNG) continuously seeds itself from many different sources of entropy including the operating system's RNG, hardware RNGs, and environmental sources of randomness. Along with the DCI, Bitcoin Core contributor Ethan Heilman is building a hardware lab to test Bitcoin’s RNG by measuring and quantifying the observed randomness of each of these sources. This hardware lab is currently using a custom instrumentation framework to record and tag randomness as it enters and exits Core’s RNG, as well as collecting data across a wide range of operating systems, compilers, hardware configurations—a critical step because the sources of randomness on which Bitcoin Core depends differs across configures.

In addition to determining which sources offer the most and least randomness, Ethan is attempting to determine how resilient Bitcoin actually is to various failures in the underlying randomness sources or other critical subsystems. The hope is that his work can help spot vulnerabilities early, as well as upgrade Bitcoin’s security by improving the built-in RNG.