Thursday, June 15, 2017

[jszknfox] PRNG with large seed

To create a random number generator with a large seed that depends on every bit of that seed, break the seed in to small parts, seed a separate random number generator (e.g., stream cipher) with each part then combine the outputs, for example with XOR.  If using XOR, need to make sure no two seed parts are the same, or else they cancel each other out.

Another way is to take the large seed and (lossy) compress it into a cryptographic digest (e.g., SHA) then used the digest as a key or seed for the RNG.  This technique has the advantage or disadvantage that the internal state of the generator or at least starting state, is much smaller than the large original seed.

No comments :