LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-11-2008, 02:35 AM   #1
zazem
LQ Newbie
 
Registered: May 2008
Posts: 9

Rep: Reputation: 0
how to implement random number generator according to mouse move and type keyboard


Hi,

I implementing a RSA cyptographic program. But I am not going to use the SecureRandom that Java supplied. Do I have alternative way to generate a random number based on mouse moving or inputing keyboard?

Looking for your help,

Thank you very much
 
Old 08-11-2008, 02:41 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Linux's PRNG already uses keyboard and mouse inputs as seed values; among other activity (such as disk access). Keyboard and mouse values are not terribly good sources of entropy however, as the English language doesn't have a lot of randomness to it and mouse movement is going to be regulated by whatever task the user is performing.
 
Old 08-11-2008, 08:50 AM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Do not write your own PRNG!!!

Most of the time it's done completely incorrectly, and they're very, very, very easy to screw up and get wrong, leading to very weak keys being generated. Use a vetted PRNG from a commercial security vendor (like, ahem, RSA) or use the operating system's built-in PRNG device. Make sure you do a lot of testing of the OS's PRNG device to ensure that it always generates a sufficient amount of entropy.
 
Old 08-11-2008, 11:57 AM   #4
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
The only system that i have seen to be extremely random used 2 microphones as the entropy source. 1 in the server room and 1 outside of the building listening to the environment. 2 completely different sources and non predictable.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sea Monkey Random Number Generator jschiwal General 2 02-23-2007 10:27 PM
LXer: Safend Finds Weakness in Linux Random Number Generator LXer Syndicated Linux News 0 05-01-2006 02:54 PM
Random number generator inside kernel space zirtik Programming 2 12-26-2005 04:02 PM
does GNU's g77 come with a random number generator? terrence Programming 1 08-30-2005 09:29 PM
Random number generator for linux Steve_Taylor Programming 12 09-30-2001 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration