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 !
Who is Participating?
imladrisConnect With a Mentor Commented:
OK, I'll grant that is a serious application that you need serious random numbers for. Here is a link that might be helpful:


This is a researched and analyzed random number generator that is fast and has a verified lack of patterns.
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?
TSchockAuthor Commented:
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 ;) )
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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?
TSchockAuthor Commented:
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"
TSchockAuthor Commented:
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?.....)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.