Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Seed, Noise and undoing pseudorandomization

  1. Jan 2, 2016 #1
    Okay, title doesn't give a lot of information so please bear with me here.

    Forget the why, I just need to figure out how.

    I would like, given an array of floats(such as those that would be generated by perlin noise) to be able to extract what seed would be used to generate said set of numbers. I only think this is possible because perlin noise uses pseudorandom number generation, and I assume since pseudorandom numbers are generated from a seed and a process it should be possible to reverse the process.

    However I understand if such a prospect is just not possible with the way modern computing works.
    Thank you for your time.
  2. jcsd
  3. Jan 3, 2016 #2

    jim mcnamara

    User Avatar

    Staff: Mentor

    In theory, yes. You can reverse engineer the output of a PRNG if you have a large sample, generally one which is larger than the cycle (period of the PRNG).
    In practice if the period of the PRNG is long enough, it becomes impractical to execute. rand() as implemented by the Knuth algorithm with RAND_MAX=32767 (on Solaris 10) has a very short period. GNU C (Linux) has a period for rand of 2147483647. Neither version is considered cryptographically sound, AFAIK.

    Here is a discussion on a not technical level.

    To answer your question - I do not know to crack your data stream a priori.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook