A completely random idea
Interesting discovery of the day: It seems that if you short pins 15(FWH2) and 16(GND) together on an Intel 82802AB firmware hub, the built-in random number generator goes from producing really, really good random data to producing a bunch of 0xFBFBFBFB.
deathjestr@euclid-bridge:~$ dd if=/dev/hwrng of=randdata bs=128k count=1 && ./ent randdata
1+0 records in
1+0 records out
131072 bytes (131 kB) copied, 39.714 seconds, 3.3 kB/s
Entropy = 7.998767 bits per byte.
Optimum compression would reduce the size
of this 131072 byte file by 0 percent.
Chi square distribution for 131072 samples is 224.82, and randomly
would exceed this value 91.36 percent of the times.
Arithmetic mean value of data bytes is 127.6602 (127.5 = random).
Monte Carlo value for Pi is 3.135729000 (error 0.19 percent).
Serial correlation coefficient is 0.000313 (totally uncorrelated = 0.0).
deathjestr@euclid-bridge:~$ dd if=/dev/hwrng of=randdata_shorted bs=128k count=1 && ./ent randdata_shorted
1+0 records in
1+0 records out
131072 bytes (131 kB) copied, 26.4054 seconds, 5.0 kB/s
Entropy = 0.000000 bits per byte.
Optimum compression would reduce the size
of this 131072 byte file by 100 percent.
Chi square distribution for 131072 samples is 33423360.00, and randomly
would exceed this value less than 0.01 percent of the times.
Arithmetic mean value of data bytes is 251.0000 (127.5 = random).
Monte Carlo value for Pi is 0.000000000 (error 100.00 percent).
Serial correlation coefficient is undefined (all values equal!).
deathjestr@euclid-bridge:~$ hexdump randdata_shorted
0000000 fbfb fbfb fbfb fbfb fbfb fbfb fbfb fbfb
*
0020000
Of course, it doesn't surprise me in the least that, given physical access, the hardware random number generator can be attacked. What does surprise me is how easy it is.
0 Comments:
Post a Comment
<< Home