altf4 / untwister

Seed recovery tool for PRNGs
GNU General Public License v3.0
359 stars 42 forks source link

Support for auto-identification of PRNG algorithm #10

Open altf4 opened 10 years ago

altf4 commented 10 years ago

At first, I didn't think this was going to be possible, but it actually will be in many cases. Turns out that different PRNGs produce numbers with distinctive features. Notably modulo size.

glibc rand() makes 31 bit integers windows libc rand() makes 16 bit integers MT makes 32 bit integers

Different MT variants will appear the same, but that's still useful. Especially since the detection is so easy.