I have constructed a quintessential two transistor noise generator typical of what might be found when doing an internet search for such circuits. After laborious tuning I have it adjusted to about the best it's going to get from the analog/circuitry side.
Over relatively short and choice stretches of frequency (say 300kHz to 400kHz), the noise seems reasonably flat/white (-50.5dBV to -48.5dBV). The problem is over the full length of what I can see with my scope, it is - in all actuality - producing what appears to be 1/f noise, AKA pink noise.
That is to say, the physical hardware appears to fundamentally produce pink noise. And there doesn't appear to be anything I can do about that.
I have a healthy level of cryptographic paranoia, so reading that the usual hardware noise sources for cryptography are only ever described as "white noise sources," and knowing that my source isn't strictly white has made me question how to proceed. (I am assuming of course that no further improvements to the circuit can be made, which may not hold true.)
According to the wiki article on white noise however... (emphasis my own)
An infinite-bandwidth white noise signal is a purely theoretical construction. The bandwidth of white noise is limited in practice by the mechanism of noise generation, by the transmission medium and by finite observation capabilities. Thus, random signals are considered "white noise" if they are observed to have a flat spectrum over the range of frequencies that are relevant to the context.
It would seem from the above defining characteristic that my noise generator can be made to work without modification; that the issue isn't whether or not a circuit/hardware can ever be made to produce purely white noise, but rather, the specifics on how one processes the noise.
In other words, how should one process such a noise source while avoiding harm from the potential biases of a pink nature?
We can assume that we are getting the noise into numeric form using an analog to digital converter with an as of yet unknown sample rate and an as of yet unknown number of bits per sample.
With that, I would also assume that the answer to this question resides in specifying these as of yet unknowns, with the possible addition of some whitening.
(Note: The ultimate intention I have is to feed entropy into libhydrogen.)
hydro_random_init()
in libhydrogen. Looking it over, it appears that it only collects 256 bits of entropy and uses that as seed forhydro_hash_update()
. So it appears that "a small fraction of that" is the correct answer and my particular noise source is overkill for this use case. – Charlie Jan 04 '24 at 16:50