Pages: [1]
|
 |
|
Author
|
Topic: random seed generator. (Read 11969 times)
|
hutch--
Administrator
Member
    
Posts: 12013
Mnemonic Driven API Grinder
|
Unless you have access to a reliable real world random source (microphone in Antarctica, Kylie singing etc ....) you are stuck with trying to pick something useful out of a running computer. This algo takes serialised samples from RDTSC, converts them to string, reverses the string them converts it back to a number. With the two samples it xorres the result and produces a DWORD seed.
The technique of taking two serialised samples from RDTSC relies on no 2 computers running an identical load so the spacing between samples would not be easy to reproduce and will tend to be very different with the post number processing.
The idea of the algo is to allow reasonably fast re-seeding for random number generators so that redundancies that appear with a very long sequence from a random generator don't occur.
To run the test, run the batch file, it runs the exe, writes a 1 million byte random pad then runs ENT to analyse the results.
|
|
|
Logged
|
|
|
|
Tedd
Procrastinator Extraordinaire
Member
    
Posts: 2210
Reality Bytes
|
I made a random seed generator too 
|
|
|
Logged
|
No snowflake in an avalanche feels responsible.
|
|
|
|
|
dedndave
|
those guys are here to make you look good, Hutch  (p.s. it seems to be working)
|
|
|
Logged
|
|
|
|
Gunther
Member
    
Gender: 
Posts: 184
Assembly Language Dinosaur
|
Hutch, what's your suggestion if one has access to Kylie singing? Hard question, I know.  Gunther
|
|
|
Logged
|
Forgive your enemies, but never forget their names.
|
|
|
hutch--
Administrator
Member
    
Posts: 12013
Mnemonic Driven API Grinder
|
 Gunther, Get an old unreliable RAND() function, load Kylie into memory, work out the pad size you need then use the old RAND() to pick an offset in the Kylie data. Its random noise quality will exceed that of radioactive decay. 
|
|
|
Logged
|
|
|
|
Gunther
Member
    
Gender: 
Posts: 184
Assembly Language Dinosaur
|
Hutch, I knew that you could figure out that complicated question. load Kylie into memory That's the trick; I can see it now very clear.  Gunther
|
|
|
Logged
|
Forgive your enemies, but never forget their names.
|
|
|
hutch--
Administrator
Member
    
Posts: 12013
Mnemonic Driven API Grinder
|
Here is a test piece for a random pad generator that uses the random seed algo above. It targets two things, use of the monotonous incrementing of the value that RDTSC accesses to try for a wide range of different random seeds and producing a reasonable random sequence in the output that is not a routine task to reproduce.
Run the EXE and it will create a pad then call ENT to analyse the results.
|
rpg.zip (47.99 KB - downloaded 315 times.)
|
|
Logged
|
|
|
|
dedndave
|
i dunno why you guys are down on poor Kylie she's kinda hot, if you ask me
|
|
|
Logged
|
|
|
|
hutch--
Administrator
Member
    
Posts: 12013
Mnemonic Driven API Grinder
|
Nah,
We are not down on Kylie, its just common knowledge to recognise random noise.
I knew this guy years ago who used to frequent a pub I went to and if the kids started playing too much crap on the juke box he would put enough money into the juke box to play Kylie 10 times to shut the racket up.
|
|
|
Logged
|
|
|
|
Gunther
Member
    
Gender: 
Posts: 184
Assembly Language Dinosaur
|
We are not down on Kylie, its just common knowledge to recognise random noise. Right.  Everyone should know that Hutch and me are very hot fans of Kylie since a long time. Gunther
|
|
|
Logged
|
Forgive your enemies, but never forget their names.
|
|
|
dedndave
|
well - i don't listen to her music - lol i have just seen pics of her, is all she seems to have parts in all the right places 
|
|
|
Logged
|
|
|
|
Gunther
Member
    
Gender: 
Posts: 184
Assembly Language Dinosaur
|
i have just seen pics of her There's a German TV station, which uses Kylie as a stopgap. I'm sure that you could receive the station as an internet stream. Anyway, Steve's random seed generator is good stuff  . Gunther
|
|
|
Logged
|
Forgive your enemies, but never forget their names.
|
|
|
|
Pages: [1]
|
|
|
 |