Link to home
Start Free TrialLog in
Avatar of TSchock
TSchock

asked on

Random Number Generator

I'm searching for a random number generator based on the movement of my mouse, on the windows messaging stack ...

shortly: i'm searching for a ready programmed java class for TRUE random numbers.

Thanks in advance !
Avatar of imladris
imladris
Flag of Canada image

I'm not clear on what you mean by TRUE random numbers. You may be able to find a good random seed (for a pseudo random number generator) by inspecting mouse movement or the messages it generates, but I doubt mouse movement in general is going to be random. Mouse movement is deliberate and geared to specific effects and actions. And the messaging activity that result will likely exhibit patterns as well. Java does provide a fine pseudo-random number generator. Are you sure that won't be sufficient? What are you trying to accomplish?
Avatar of TSchock
TSchock

ASKER

hmmm, it's funny ... the better way is AS TRUE AS possible
really TRUE random numbers are based on radioactivity, on radiation, on some other phyisical bases.
devices to produce really good random numbers are expensive ( and not easy to handle ( radioacivity ))
I'm searching a method to generate very good random numbers
you can use different sources to avoid patterns:
1. mouse movement
2. hard disk activity
3. network traffic
4. windows messages
5. etc.
then hash these with md5 or idea and you have really good random numbers ( without patterns i hope ;) )
Yes, radioactivity would produce TRUE random numbers. The question remains though, are you sure you need this level of "randomness". Even programs that simulate plasma flows manage with pseudo random number generators. Are you sure you'd be able to tell the difference between the output stream of a reasonable pseudo random number generator, and a "real" one. How are you planning on verifying that this "true" random number generator doesn't have hidden patterns? Eyeball it? Do you have a specific need for this? Or is it an idle research project?
Avatar of TSchock

ASKER

we do have an idea to implement these random numbers as a seed for a blowfish encryption
we want to build a secure channel over internet and we have to avoid patterns in the key sequence
we have to build somewhat more than 3000 secure channels without patterns in the key ...
maybe a "normal" pseudo generator is secure enough, but how can i proove it ?
maybe, it is impossible to test the real rng, but what is "enough"
ASKER CERTIFIED SOLUTION
Avatar of imladris
imladris
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TSchock

ASKER

great ...

this link is a good root to search more ...
http://nicewww.cern.ch/~hoschek/colt/index.htm is very good.
Thanks imladris a friend of mine wanted this for some financial stuff (heard of Risk Analysis?.....)