Date: Mon, 6 Jun 2016 12:31:46 +0200 From: Ulrich Grey <usenet@ulrich-grey.de> To: Ulrich Grey <usenet@ulrich-grey.de> Cc: Jia-Shiun Li <jiashiun@gmail.com>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: Random number generator on rpi Message-ID: <20160606123146.532e0bc3862047107f2c10e2@ulrich-grey.de> In-Reply-To: <20160606120302.bea809ad2b9b89d66c34ebfe@ulrich-grey.de> References: <CAHNYxxP8fqEdXsL2Jwu-=P4g9_w5P2pnJ-yOvtU1ssEP4ZpqCQ@mail.gmail.com> <20160606120302.bea809ad2b9b89d66c34ebfe@ulrich-grey.de>
next in thread | previous in thread | raw e-mail | index | archive | help
But there is no device in /dev like sudo cat /dev/hwrng | rngtest -c 1000 See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=19334&p=273944&hilit=hwrng#p273944 ------------------------------------------ On Mon, 6 Jun 2016 12:03:02 +0200 Ulrich Grey <usenet@ulrich-grey.de> wrote: > Hello, > > I have tested it on RPI-B and it shows up in dmesg. > > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2016 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 11.0-ALPHA2 #0 r301458M: Mon Jun 6 09:01:49 UTC 2016 > root@wqtest:/usr/obj/usr/src/sys/RPI-B arm > FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) > VT: init without driver. > sema_sysinit > CPU: ARM1176JZ-S rev 7 (ARM11J core) > Supported features: ARM_ISA THUMB2 JAZELLE ARMv4 Security_Ext > WB enabled LABT branch prediction disabled > 16KB/32B 4-way instruction cache > 16KB/32B 4-way write-back-locking-C data cache > real memory = 503312384 (479 MB) > avail memory = 481800192 (459 MB) > random: entropy device external interface > kbd0 at kbdmux0 > ofwbus0: <Open Firmware Device Tree> > simplebus0: <Flattened device tree simple bus> mem 0x20000000-0x20ffffff on ofwbus0 > cpulist0: <Open Firmware CPU Group> on ofwbus0 > cpu0: <Open Firmware CPU> on cpulist0 > bcm2835_cpufreq0: <CPU Frequency Control> on cpu0 > intc0: <BCM2835 Interrupt Controller> mem 0xb200-0xb3ff on simplebus0 > bcmrng0: <BCM2708/2835 random number generator> mem 0x104000-0x10400f on simplebus0 > systimer0: <BCM2835 System Timer> mem 0x3000-0x3fff on simplebus0 > Event timer "BCM2835-3" frequency 1000000 Hz quality 1000 > Timecounter "BCM2835-3" frequency 1000000 Hz quality 1000 > bcmwd0: <BCM2708/2835 Watchdog> mem 0x10001c-0x100027 on simplebus0 > gpio0: <BCM2708/2835 GPIO controller> mem 0x200000-0x2000af on simplebus0 > ... > ---------------------------------------- > On Mon, 6 Jun 2016 12:49:27 +0800 > Jia-Shiun Li <jiashiun@gmail.com> wrote: > > > Hi all, > > > > I occasionally found that RPi has a mysterious undocumented random number > > generator and Linux has a driver for it. [1] > > > > Out of curiosity I wrote a simple driver according to the Linux one. It is > > simple enough for me without prior rng knowledge to make it work. Or so it > > appears. Patch is attached. > > > > (Note you need to have the updated dtb file by copying > > {OBJDIR}/{SRCDIR}/sys/{KERNCONF}/modules/{SRCDIR}/sys/modules/dtb/rpi/rpi{,2}.dtb > > to your /boot/msdos) > > > > Once booted the kernel will output the following line indicating it is > > working: > > > > bcmrng0: <BCM2708/2835 random number generator> mem 0x104000-0x10400f on > > simplebus0 > > > > I only tested it on RPi2. Guess it will work fine on RPi too. > > > > I tried to compile rndtest(4) together into the kernel, and it did not > > output or complain about anything. According to the man page this should > > mean the rng works fine, right? Or is there any other tools to verify the > > quality of a rng? > > > > > > [1]: > > http://scruss.com/blog/2013/06/07/well-that-was-unexpected-the-raspberry-pis-hardware-random-number-generator/ > > > > -Jia-Shiun. > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160606123146.532e0bc3862047107f2c10e2>