# Is (1 bit HW signal) XOR (8 bits PRNG output) sufficient for a HWRNG?

This is really a follow up question to a comment made regarding How to roll a HWRNG

In the situation of whitening a hardware generated random bit stream, "XORing the two bitstreams should be fine for mixing, by the piling-up lemma" was said. The other bit stream was suggested to be one from a PRNG.

In signal sampling, it is rare to use the full range of ADC bits. This is to avoid clipping the signal or saturating downstream amplification stages. Amplifier internal noise is typically related linearly to the input signal level, so more signal, more stray noise of the unintended variety. So for example in extremis, the hardware may only be sampling with a 1 bit width.

The PRNG will in all likelihood be outputting standard octets.

So the question arises, is

(1 bit HW signal) XOR (8 bits PRNG output)

sufficient to whiten a hardware random number generator, simultaneously ensuring that it's still a hardware generator rather than just a pseudo generator?

Side question: would the PRNG have to be cryptographically secure or not? Consider that the system's numbers could still not be predicted with a simple RND() type generator due to the unpredictability of the hardware signal.

• How do you define "(1 bit) XOR (8 bits)"? For example, what is 1 XOR 01001110? Is it 01001111, 10110001, 1, or something else? Dec 18, 2015 at 1:05
• @IlmariKaronen Standard 8 bit boolean algebra. 1 XOR 01001110 = 1001111. You've hit the nail on the head. My formula only affects the least significant bit. Dec 18, 2015 at 1:33