Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

programmatically using Hardware Random number generator

I'm working on a desktop application and would love to use any hardware random number generators that happen to be available, though I don't want the user to have to do any confusing setup to use it. its Java/Clojure based so something in the java world would be nice though I'm willing to work with just about anything. Know of any programs that do this well? are they cross platform?

like image 571
Arthur Ulfeldt Avatar asked Feb 28 '23 11:02

Arthur Ulfeldt


2 Answers

You should use the Java SecureRandom class. The user can override the default algorithm selection with a hardware RNG by setting its preference order. This then applies to all Java applications, including yours.

like image 90
bdonlan Avatar answered Mar 07 '23 11:03

bdonlan


It depends on the quality of random numbers you need to generate. Specifically, how much entropy do you need?

If you really need some hardcore random numbers that aren't dependent on a predictable clock, you might want to check out the 3rd party generators available.

http://en.wikipedia.org/wiki/Hardware_random_number_generator

Some of these use thermal heat, etc... to increase the entropy of each bit.

like image 26
Robert Greiner Avatar answered Mar 07 '23 09:03

Robert Greiner