9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] bcm2835 random number generator
@ 2014-03-28 17:19 Bakul Shah
  2014-03-28 21:09 ` erik quanstrom
  0 siblings, 1 reply; 5+ messages in thread
From: Bakul Shah @ 2014-03-28 17:19 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I have put an initial version of raspberryPi hardware RNG
driver on sources.  Supposedly bcm2835 uses a reverse bias
transistor as a noise source (though I couldn't find anything
a definitive source for this). FWIW, I ran the output through
rngtest (does FIPS 140-2 tests) and the failure rate is about
the same as FreeBSD's (about 1 out of 1000).  rngtest tests at
a minimum 2*10^6 bits and plan9's stock /dev/random seems far
too slow so I didn't bother testing it.

Just copy /n/sources/contrib/bakul/random.c to sys/src/9/bcm
and rebuild 9pi.

Arguably this should be a new device, /dev/hrng or something,
but plan9's /dev/random code is very simple compared to the
elaborate versions on *BSD's. I have kept this one simple too.
If you are concerned about the quality of RNG or paranoid
about bcm2835's unpublic algorithm, feel free to complexify!



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-29  0:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 17:19 [9fans] bcm2835 random number generator Bakul Shah
2014-03-28 21:09 ` erik quanstrom
2014-03-28 21:39   ` Bakul Shah
2014-03-28 23:51     ` erik quanstrom
2014-03-29  0:11       ` Bakul Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).