# PRNG XOR Pipeline

For an OTP I need the 'best' random data I can acquire.

Please check if my thinking for stacking PRNGs together in a pipeline can only make the output statistically better, never worse?!

So take a hardware USB PRNG that uses some 'technique' to produce random data, the data may look pretty random - but we may never know if there way a flaw / backdoor / determinicity etc.

What I propose is to take N PRNGs from different manufacturers and XOR data produced in a predefined order, say by jumbling them up in a bag and picking them like lottery numbers. N below is 3, but I'd likely use N=10

PRNG1 ⊕ PRNG2 ⊕ PRNG3 = Output


If any PRNG is 'flawed' - say it produces all 0 bits, it's not a problem since the output of the XOR is no less random than it already was - therefore we can ONLY make the data MORE random / uniform?

e.g.

PRNG1 ⊕ 0 ⊕ PRNG3 = Still Random Output


and if the flawed PRNG exhibits any randomness even in part, again it contributes to the randomness.

e.g. all 0's except 1 bit which seems random;

PRNG1 ⊕ 00010000 ⊕ PRNG3 = Still Random Output


If that is true then it should be possible to interleave my own private data into the PRNG pipeline, say holiday pictures passed through AES! It really doesn't matter as long as it's data that nobody has access to them, it can only hide any non randomness or non uniformity, it reduces any risk of different PRNG manufacturers colluding, or sharing a technique or taking a flawed or deterministic approach;

PRNG1 ⊕ PIC1 ⊕ PRNG2 ⊕ PIC2 ⊕ PRNG3 = Output

• This is really the same as combining stream ciphers, see e.g. my answer here and indicate if that answers your question. Dec 20, 2019 at 14:36