0.9.1

Thomas Roessler roessler at guug.de
Tue Jan 12 13:19:16 CET 1999


On Tue, Jan 12, 1999 at 08:46:14AM +0100, Werner Koch wrote:

>> slow random polling function was busily executing over and over
>> again (without finding too much randomness), and the program never
>> had enough. After some 10000 lines of debugging output, I stopped
>> it (and manually added things like "xwd -root" to the slow poll
>> command table,

> xwd -root yields more than one meg of data but I have some doubts that
> there is much random in it.

Other things I've seen to get randomness include:

- Hashing the system log files.
- Hashing the output of "ls -lu" [that's atime] for a couple of
  often-used system direcotries, like /bin, /usr/bin, /lib,
  /usr/lib, /etc, and the like.
- Hashing the contents of your mail folders
- Hashing the output of ps axwm
- Hashing the output of netstat

Note that most of this is from Markus Kuhn's one-time password
package.  From otpw/conf.h:

------------------------------
/*
 * List of shell commands that produce high entropy output.
 * The output of all these commands will be hashed together with
 * timing information to seed the random number generator
 */

#define ENTROPY_CMDS \
"head -c 20 /dev/random 2>&1", \
"ls -lu /etc/. /tmp/. / /usr/. /bin/. /usr/bin/.", \
"PATH=/usr/ucb:/bin:/usr/bin;ps lax", \
"last | head -50", \
"uptime;netstat -n;hostname;date;w", \
"cd $HOME; cat .pgp/randseed.bin .ssh/random_seed .otpw 2>&1", \
"PATH=/usr/bin/X11/;xwd -root -silent 2>&1||xwd -root 2>&1"

/*
 * Environment variable settings for the entropy generating
 * shell commands
 */

#define ENTROPY_ENV \
"PATH=/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc:/usr/ucb"
------------------------------

tlr
-- 
Thomas Roessler · 74a353cc0b19 · dg1ktr · http://home.pages.de/~roessler/
     2048/CE6AC6C1 · 4E 04 F0 BC 72 FF 14 23 44 85 D1 A1 3B B0 73 C1
> Hi!  I'm Signature Virus 99!  Copy me into your signature and join the fun!




More information about the Gnupg-devel mailing list