Date: Sun, 17 Jul 2016 15:27:51 +0300 From: "Jukka A. Ukkonen" <jau789@gmail.com> To: Jia-Shiun Li <jiashiun@gmail.com> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: Random number generator on rpi Message-ID: <790435eb-f3fc-8d4c-4231-e3cfbf93157b@gmail.com> In-Reply-To: <CAHNYxxPQtyXZU4%2ByNAVEDPu60mpK87O-4xcCuniCW576-meY0g@mail.gmail.com> References: <CAHNYxxP8fqEdXsL2Jwu-=P4g9_w5P2pnJ-yOvtU1ssEP4ZpqCQ@mail.gmail.com> <5d8ec4d4-4c36-139d-6102-4fdb200fdf65@gmail.com> <CAHNYxxPQtyXZU4%2ByNAVEDPu60mpK87O-4xcCuniCW576-meY0g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07/15/16 07:32, Jia-Shiun Li wrote: > sorry for replying so late. Turns out I need to attach rndtest device to > hook it on. Updated patch attached. Also commented some code lines in > rndtest to print report messages. You should be able to see repeated > kernel messages like below: > > bcmrng0: rndtest: runs pass zeros interval 1 (2343 < 2543 < 2657) > bcmrng0: rndtest: runs pass zeros interval 2 (1135 < 1255 < 1365) > bcmrng0: rndtest: runs pass zeros interval 3 (542 < 624 < 708) > bcmrng0: rndtest: runs pass zeros interval 4 (251 < 301 < 373) > bcmrng0: rndtest: runs pass zeros interval 5 (111 < 158 < 201) > bcmrng0: rndtest: runs pass zeros interval 6 (111 < 149 < 201) > bcmrng0: rndtest: runs pass ones interval 1 (2343 < 2535 < 2657) > bcmrng0: rndtest: runs pass ones interval 2 (1135 < 1265 < 1365) > bcmrng0: rndtest: runs pass ones interval 3 (542 < 576 < 708) > bcmrng0: rndtest: runs pass ones interval 4 (251 < 315 < 373) > bcmrng0: rndtest: runs pass ones interval 5 (111 < 185 < 201) > bcmrng0: rndtest: runs pass ones interval 6 (111 < 153 < 201) > bcmrng0: rndtest: chi^2(4): pass (sum 1570182) > bcmrng0: rndtest: longruns pass (15 ones, 12 zeros) > > > by the rndtest result, guess I can safely conclude the hardware rng > working correctly? > > > On Thu, Jun 9, 2016 at 3:53 PM, Jukka A. Ukkonen <jau789@gmail.com > <mailto:jau789@gmail.com>> wrote: > > > So, does this somehow indicate that fortuna has attached the > new random device as a source of true randomness? > > root@rpi2:~ # sysctl kern.random > kern.random.fortuna.minpoolsize: 64 > kern.random.harvest.mask_symbolic: > [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED > kern.random.harvest.mask_bin: 00111111111 > kern.random.harvest.mask: 511 > kern.random.random_sources: > > > The mask only reports environmental sources, not hardware rng sources. I kind of guessed that. I tested the modified patch yesterday. Now I see the following couple of lines during a verbose boot... bcmrng0: <BCM2708/2835 random number generator> mem 0x104000-0x10400f on simplebus0 random: harvesting attach, 8 bytes (4 bits) from bcmrng0 So, at least random claims it tries to use bcmrng as a source of randomness. Thanks. --jau
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790435eb-f3fc-8d4c-4231-e3cfbf93157b>