This is a modification of RandPi. The diffrence is that here the data transport is done via ssh forwarding instead of a custom http service.
See the C't article Mit dem Raspberry Pi Zufallszahlen erzeugen und verteilen for more information (in german).
In a nutshell: The Raspberry Pi can be used as an entropy server. Clients get
access to the Pi random number generator by forwarding the server's
/dev/hwrng
over ssh and making use of rngd
locally to add the forwarded
random source to /dev/random
.
These instructions are tested in archlinux (both for client and server).
No special configuration is required on the server (your raspi). To configure the client, follow these steps:
-
Install rng-tools
-
Create a pipe named
/dev/hwrng
, which is the name of the device used by default byrngd
# mkfifo /dev/hwrng
-
Forward read requests to the actual
/dev/hwrng
on the server# ssh root@myraspi 'cat /dev/hwrng' > /dev/hwrng &
-
Start
rngd
# rngd
$ cat /dev/random | rngtest -c 1000
rngtest 5
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
rngtest: starting FIPS tests...
rngtest: bits received from input: 20000032
rngtest: FIPS 140-2 successes: 1000
rngtest: FIPS 140-2 failures: 0
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 0
rngtest: FIPS 140-2(2001-10-10) Long run: 0
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=17.403; avg=230.809; max=9765625.000)Kibits/s
rngtest: FIPS tests speed: (min=14.004; avg=55.461; max=128.875)Mibits/s
rngtest: Program run time: 84967236 microseconds
As this is a statistical test, one failure or two are probable. If you see an
average speed around 230 Kbits/s then rngd
is pumping randomness from your raspi correctly.