| | |
True Random Number Generator
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
> A computer is only able to generate pseudo-random numbers, if you want real random numbers: just let the user move the mouse across the screen (in a completely random way
)
> From the mouse movement you can generate a (real?) random number
)> From the mouse movement you can generate a (real?) random number
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
there's your problem: nothing is truly random. some things are just less predictable than others.
the fact is, you're never goign to generate truly random numbers, even if something like that existed. so be happy with the commercially available pseudo-random number generators, like the rest of the world.
if you're doing something that needs more than that, then you're working for the NSA and shouldnt be trolling Daniweb for your answers.
the fact is, you're never goign to generate truly random numbers, even if something like that existed. so be happy with the commercially available pseudo-random number generators, like the rest of the world.
if you're doing something that needs more than that, then you're working for the NSA and shouldnt be trolling Daniweb for your answers.
•
•
Join Date: Nov 2007
Posts: 390
Reputation:
Solved Threads: 39
An example of this would be to measure the amount of electrical energy in the air at any given point using some sort of analog device, which then converts this into a voltage difference, which is then converted to a digital value (usually between 0 and 4096) to represent the voltage in the air, within a given limit. This value is real world, and while not random, will fluctuate seemingly randomly (if measured in a small enough scale ie micro volts). If used as a seed for a pre-existing random function (like rand() ) this will generate the most random numbers a person can hope to generate via electrons. Using a sound file is overkill in this sense, as the direct input voltage value from the microphone should suffice, and save you a fair bit of math/sonic calculating.
•
•
•
•
An example of this blah blah blah at any given point using some sort of analog device
or you could just say fook it, and thow Schroedinger's cat into a lorenz attractor and save yourself a fair bit of math/sonic calculating, and call it 50/50.
.
Last edited by jephthah; Apr 28th, 2009 at 7:17 pm.
>...then you're working for the NSA...
That's it! (see my the 1st post in the thread above
.
"Unpredictable" or "non-reproducible" sequences (it's not the same as "random") are used for generating of forgery-resistant keys in cryptography (as usually with special external devices). In actual fact an ordinar desktop computer can generate some kind of (low-quality) "unpredictable" sequences. However it's not so simple work.
I think for non-critical applications (like OP
) no need in methods like soundtrecks and other exotics. Get keystrokes trace (with millisecond oprecision intervals), calc SHA1 digest of this trace - that's 160 "unpredictable" bytes. Take into account that OP did not define any "randomness" criteria so any one solution is not worse that any others
...
Let me repeat myself: more advanced methods are a valued know-how and Daniweb is not the best place to discuss them
...
That's it! (see my the 1st post in the thread above
."Unpredictable" or "non-reproducible" sequences (it's not the same as "random") are used for generating of forgery-resistant keys in cryptography (as usually with special external devices). In actual fact an ordinar desktop computer can generate some kind of (low-quality) "unpredictable" sequences. However it's not so simple work.
I think for non-critical applications (like OP
) no need in methods like soundtrecks and other exotics. Get keystrokes trace (with millisecond oprecision intervals), calc SHA1 digest of this trace - that's 160 "unpredictable" bytes. Take into account that OP did not define any "randomness" criteria so any one solution is not worse that any others
...Let me repeat myself: more advanced methods are a valued know-how and Daniweb is not the best place to discuss them
... •
•
Join Date: Apr 2009
Posts: 39
Reputation:
Solved Threads: 0
•
•
•
•
An example of this would be to measure the amount of electrical energy in the air at any given point using some sort of analog device, which then converts this into a voltage difference, which is then converted to a digital value (usually between 0 and 4096) to represent the voltage in the air, within a given limit. This value is real world, and while not random, will fluctuate seemingly randomly (if measured in a small enough scale ie micro volts). If used as a seed for a pre-existing random function (like rand() ) this will generate the most random numbers a person can hope to generate via electrons. Using a sound file is overkill in this sense, as the direct input voltage value from the microphone should suffice, and save you a fair bit of math/sonic calculating.
•
•
Join Date: Apr 2009
Posts: 39
Reputation:
Solved Threads: 0
•
•
•
•
or maybe you could sprinkle some magic fairy dust, and use some "sort of analog device" to aggregate the quantum velocities of the fairies at any given point according to Heisenfairy's Uncertainty Principle.
or you could just say fook it, and thow Schroedinger's cat into a lorenz attractor and save yourself a fair bit of math/sonic calculating, and call it 50/50.
.
•
•
Join Date: Nov 2007
Posts: 390
Reputation:
Solved Threads: 39
•
•
•
•
or maybe you could sprinkle some magic fairy dust, and use some "sort of analog device" to aggregate the quantum velocities of the fairies at any given point according to Heisenfairy's Uncertainty Principle.
or you could just say fook it, and thow Schroedinger's cat into a lorenz attractor and save yourself a fair bit of math/sonic calculating, and call it 50/50.
.
and kelechi96,
don't get discouraged too much, some of the people around here can be a little ignorant at times, but will usually help you out if you are willing to tolerate it.
>>An example of this would be to measure the amount of electrical energy in
>>the air at any given point using some sort of analog device, which then
>>converts this into a voltage difference, which is then converted to a digital
>>value (usually between 0 and 4096) to represent the voltage in the air, within
>> a given limit.
Thanks for enlighting our minds. But could do tell how will you implement this 'magical' apparatus.
>>See this is the awnser I was looking for THANK YOU +rep but how do i do this ?
Wow, were you?
Ask him. I am no magician.
I doubt if you need that extreme randomness.
>>Umm...What point was made, exactly, with that post?
The same point which you made by yours. He just increased the randomness by a million times.
>>the air at any given point using some sort of analog device, which then
>>converts this into a voltage difference, which is then converted to a digital
>>value (usually between 0 and 4096) to represent the voltage in the air, within
>> a given limit.
Thanks for enlighting our minds. But could do tell how will you implement this 'magical' apparatus.
>>See this is the awnser I was looking for THANK YOU +rep but how do i do this ?
Wow, were you?
Ask him. I am no magician.
I doubt if you need that extreme randomness.
>>Umm...What point was made, exactly, with that post?
The same point which you made by yours. He just increased the randomness by a million times.
Last edited by siddhant3s; Apr 28th, 2009 at 8:18 pm.
Siddhant Sanyam
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
![]() |
Similar Threads
- C++ Program using Stacks, and Random Number Generator. Please Help.... (C++)
- Random Parralel Array (C++)
- Random number generation (C)
- random numbers, and 2 dimensional array (C++)
- C++ Random Numbers (C++)
- using random number generator "globally" in a c++ class (C++)
- choose a random element from a sequence (C++)
- random function generator (C)
- generating random numbers into an array.. (Java)
Other Threads in the C++ Forum
- Previous Thread: API to get CPU utilization
- Next Thread: need help..want to input only alphabets
| Thread Tools | Search this Thread |
api array beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion count data database delete desktop developer directshow dll download dynamic email encryption error file forms fstream function functions game getline google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text text-file tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






