Is it possible to reverse a pseudo random number generator?

12,363

This is absolutely possible - you just have to create a PRNG which suits your purposes. It depends on exactly what you need to accomplish - I'd be happy to offer more advice if you describe your situation in more detail.

For general background, here are some resources for inverting a Linear Congruential Generator: Reversible pseudo-random sequence generator

pseudo random distribution which guarantees all possible permutations of value sequence - C++

And here are some for inverting the mersenne twister: http://www.randombit.net/bitbashing/2009/07/21/inverting_mt19937_tempering.html http://b10l.com/reversing-the-mersenne-twister-rng-temper-function/

Share:
12,363
Cenregoth
Author by

Cenregoth

Updated on June 05, 2022

Comments

  • Cenregoth
    Cenregoth almost 2 years

    Is it possible to reverse a pseudo random number generator? For example, take an array of generated numbers and get the original seed. If so, how would this be implemented?

  • Andrew
    Andrew over 4 years
    Are there any of these for which if you knew the index and a few characters you would still not be able to reverse it?
  • Andrew
    Andrew over 4 years
    Ah: en.wikipedia.org/wiki/… "CSPRNG requirements fall into two groups: first, that they pass statistical randomness tests; and secondly, that they hold up well under serious attack, even when part of their initial or running state becomes available to an attacker."