Score:0

Does processing a trully random seed though a non-cryptographic PRNG will result in a unpredictable stream?

pf flag

I have been studying C/C++ and I read that if one wants unpredictable random data in a program, it is needed that a random generation function be supplied with truly and unpredictable random data (as of /dev/hwrng).

But this confused me because for cryptographic things a normal and non-cryptographic PRNG should be avoided.

Does supplying a truly random and unpredictable seed to a non-cryptographic PRNG (such as MT19937) will result in a unpredictable stream?

Score:3
sa flag

No. Let's say the PRNG of period $N$ has linear complexity $L,$ where for LFSRs and LFSR derived PRNGs with nonlinear mixing functions we have $L=n^c$ for some constant $c\geq 1.$ The Mersenne Twister itself is predictable, given a long enough output of bits, namely $624$ bits, while its period is $N=2^{19937} − 1.$

So the output stream is definitely predictable.

Paul Uszak avatar
cn flag
And what if we only output 500 bits per seeding?
Score:0
gn flag

No, it does not guarantee security.

For PRNG, to be secure, it surely needs a random seed and good probability properties. However, it is also required to have predictable values (both future and previous).

For example Mersene-Twister algorithm you mentioned, generates linearly dependent random outputs. With enough data you can solve a linear equation of next output.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.