This is actually not as simple as I first thought.
In the absence of a hardware RNG, what is the best way to seed a Mersenne Twister?
Or should I say, what is an acceptable way to seed a a Mersenne Twister RNG that is used to generate UUID’s?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a nice discussion of pseudo-random number generators here including a section on the proper seeding of PRNGs (see rule 3), which uses
md5sumand/dev/randomor/dev/urandomto generate seeds.This also includes a number of PRNG alogrithms which are a lot easier to code up (< 10 lines of code) than the MT but are arguably just as good (long periods and pass all of the Dieharder tests for randomness).
Further Reading: