/dev/random and linux security issues (kinda long)
aluminumsulfate at earthlink.net
aluminumsulfate at earthlink.net
Sun May 15 12:55:01 EDT 2005
From: aluminumsulfate at earthlink.net
Date: Sun, 15 May 2005 10:18:30 -0400
<snip>
Anyhow, I've gotten a jar and put 128 pennies in it. I'll be sure to
let you know if I find any patterns in the data from that, too. ;)
Dave
Well, I've flipped 512 pennies & run them through my base 95 analyzer. :)
dave at bat$ cat flips.txt | ./bin2dec.pl | ./dec2base95.pl
7xW#mknuHpMRM*Mp\9R CRM/99HpMz%f>>Hf\Rf/faf9WRpWHH%a\a W4Wu a>zzuppRWa94f\9f4O
It's hard to believe the result: it, too, looks non-random. Maybe
this is one of those completely "cranial" problems.... Perhaps I'm
seeing shapes in the clouds, here. But, just to make sure, I wrote a
script to generate *pseudorandom* base 95 integers...
#!/usr/bin/perl
# output a random integer in base 95
for ($i=0; $i < $ARGV[0]; $i++) {
print chr(rand(95)+32);
}
print "\n";
# end
dave at bat$ ./rand95.pl 79
`J/q.?Hneq(&7A?S}y[c(%R<{6J4n3KiS.mb5.m(%SQBNX:1RCG$8/?x$MRzsS`}D$$%U#T;W]|7Ig3
dave at bat$ ./rand95.pl 79
y}=<.'+4J"I.Us}s/B(:+b4=jh=ws-'FVj[t[r1>Y2:(YS?Ol)m&7??$z}}J~X%`f8>i]y1,D!'vKOw
dave at bat$ ./rand95.pl 79
aP8*;_6[ead2h78xb_J$(PRaX at rQ=k`j=z1%3G at Vi`xv jSL!{+H&#t%#fQ'Y (gl1^)zE+or^6K^;B
dave at bat$ ./rand95.pl 79
UpQ[8IwJs_cJ<RL"|+/~V>~lbS=Zi&{;kjp;Mx]b[EXp$i3W"fy<fjy6A at s=:Y+hltpJ~y_~ZkA 0l)
These strings look as I would expect them to. They appear much more random
that those from /dev/random and /dev/pennies. What in the world?? Have I
discovered some new law of nature here? Is base 95 the language of God or
something? Why would a PRNG generate output that looks more random than a
truly random source?
Sincerely yours,
Confused
More information about the gnhlug-discuss
mailing list