≡ Menu

Testing availability of entropy & quality of randomness on Linux

Fig.01: Testing availability of entropy & quality of randomness on Linux

You can test availability of entropy & quality of randomness on Linux with the following two command.

List the available entropy on Linux

$ cat /proc/sys/kernel/random/entropy_avail
Sample outputs:

42

Anything below 1000 is bad for you.

Testing availability of entropy & quality of random data generation

Type the following command:
$ cat /dev/random | rngtest -c 1000
Sample outputs:

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=241.246; avg=678.003; max=894.944)Kibits/s
rngtest: FIPS tests speed: (min=33.521; avg=82.296; max=93.958)Mibits/s
rngtest: Program run time: 29039041 microseconds

Please note that rngtest command is part of rng-tools (Debian/Ubuntu) or rng-utils (RHEL/CentOS/Fedora Linux).

Share this on:

Examples and usage: How to speed up OpenSSL/GnuPG Entropy For Random Number Generation On Linux

{ 0 comments… add one }
Security: Are you a robot or human?