From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Fri, 28 Mar 2014 17:09:43 -0400 To: 9fans@9fans.net Message-ID: <51844d0013c4336e5793156d18a91b3e@ladd.quanstro.net> In-Reply-To: <20140328171930.EB2BCB827@mail.bitblocks.com> References: <20140328171930.EB2BCB827@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] bcm2835 random number generator Topicbox-Message-UUID: d23fe93c-ead8-11e9-9d60-3106f5b1d025 On Fri Mar 28 13:21:35 EDT 2014, bakul@bitblocks.com wrote: > 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! i have not had luck with this. i get data aborts when booting from flash, and hangs when rebooting via /dev/reboot. - erik