• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Truly Random Number Generator

 
Paul Cowan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
While working on a Perl project, I came across the Math::TrulyRandom library that claims to be able to generate truely random number from reading interrupt timing discrepancies. Sounds like a very cool idea, which leads me to wonder if this is possible in Java. Has anyone seen a Java library that can do this? Seems like if you can do it in Perl, you should be able to do it in Java, (or C and use JNI to access it.)
... Or on top of that, anyone know what an interrupt timing discrepancy is? :roll:
As an aside, I ran across a serial port device which generates random bits from "two independent analogue Zener diode based noise sources". Costs like $650. (I think... the site is in Europe).
http://valley.interact.nl/av/com/orion/rng/home.html
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, how random do you have to get? I've heard of some high end encryption systems using electronic noise or heat variations to seed their RN generators. Pretty wild.
 
Joe Ess
Bartender
Pie
Posts: 9266
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Cowan:
Hi,
... Or on top of that, anyone know what an interrupt timing discrepancy is? :roll:

Anything that triggers an interrupt (activity on the keyboard, mouse, disk, network and so on) is assumed to occur with a random period, so one compiles that information as it occurs for later use. On Linux, this pool is stored in /dev/random, so to use it in Java, just open that pool as you would any file.
 
Paul Cowan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh, very cool. Thanks! I always though /dev/random was more complicated than that.
 
Chris De Vries
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can obtain random number manually or automatically through a java program from Random.org. They accept HTTP or CORBA connections.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic