Unpredictable random numbers are mandatory for cryptographic operations in many cases (ref). There are cryptographically secure pseudorandom number generators (CSPRNG) but the usage of a hardware random number generator (TRNG) is something I am especially interested in since many years. While there are many proprietary TRNGs (list) with different prices, I had a look at two cheap solutions: the Raspberry Pi’s hardware random number generator as well as an application that uses a DVB-T/RTL/SDR stick for gathering some noise.
I have tested both of them with various options and ran them against the dieharder test suite. In this post I am listing the CLI commands to get the random data from those source and I am listing the results of the tests.
What’s my use case? I am searching for a true random password generator instead of the KeePass Password Generator I am using currently. Furthermore I would like to have an online pre-shared key generator for site-to-site VPNs. Just two ideas.
Sources
These are the random sources I used for my tests. From each source I saved 8 GB (!) full of random data. Just to have a big basis to test with.
Raspi TRNG
I came along this blogpost: “Well, that was unexpected…”: The Raspberry Pi’s Hardware Random Number Generator. Not much to say about that. You can simply read out random data from the /dev/hwrng source with root privileges such as:
1 |
sudo cat /dev/hwrng | tr -dc 'a-zA-Z0-9' |
(I have not installed the rng-tools here because I was not interested in routing the /dev/hwrng to /dev/random at this point. I’ll cover that in another blogpost.)
To copy the 8 GB into a file I used the following command. Some information about that here: How to read in N random characters from /dev/urandom?
1 |
sudo dd if=/dev/hwrng iflag=fullblock of=$HOME/hwrng8.bin bs=1M count=8192 |
rtl-entropy
I also came across this post: Hardware RNG Through an rtl-sdr Dongle which refers to the GitHub project rtl-entropy which in turn refers to the rtl-sdr project. Since I am using these DVB-T sticks for some other projects as well I already had some of them. My complete installation procedure was as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#prerequisites sudo apt-get install libusb-1.0-0-dev cmake libcap-dev openssl pkg-config git clone git://git.osmocom.org/rtl-sdr.git cd rtl-sdr/ mkdir build cd build cmake ../ -DDETACH_KERNEL_DRIVER=ON make sudo make install sudo ldconfig #rtl-entropy git clone https://github.com/pwarren/rtl-entropy/ cd rtl-entropy mkdir build cd build cmake ../ make sudo make install |
A first try without any options did not succeed at all:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
sudo rtl_entropy | tr -dc 'a-zA-Z0-9' Failed: FIPS 140-2(2001-10-10) Monobit Failed: FIPS 140-2(2001-10-10) Poker Failed: FIPS 140-2(2001-10-10) Runs Failed: FIPS 140-2(2001-10-10) Long run Failed: FIPS 140-2(2001-10-10) Monobit Failed: FIPS 140-2(2001-10-10) Poker Failed: FIPS 140-2(2001-10-10) Runs Failed: FIPS 140-2(2001-10-10) Long run Failed: FIPS 140-2(2001-10-10) Monobit Failed: FIPS 140-2(2001-10-10) Poker Failed: FIPS 140-2(2001-10-10) Runs Failed: FIPS 140-2(2001-10-10) Long run Failed: FIPS 140-2(2001-10-10) Monobit Failed: FIPS 140-2(2001-10-10) Poker Failed: FIPS 140-2(2001-10-10) Runs |
while setting the sample rate to 2.4M immediately displayed random data. (To be honest: I do not exactly know what the sample rate is for. No one ever replied to my question at GitHub.)
1 |
sudo rtl_entropy -s 2.4M | tr -dc 'a-zA-Z0-9' |
In order to use the FIFO file you must start rtl_entropy in daemon mode:
1 2 |
sudo rtl_entropy -s 2.4M -b tail -f /var/run/rtl_entropy.fifo | tr -dc 'a-zA-Z0-9' |
For my test files I copied 8 GB again with this command:
1 |
tail -f /var/run/rtl_entropy.fifo | dd iflag=fullblock of=$HOME/rtl_entropy8.bin bs=1M count=8192 |
I also tried some other variants with this DVB-T dongle such as the -e option for “Kaminsky debiasing” (???) which worked without any failures, as well as the default sample rate of 3.2 Mhz again (without any options) which did not work. I got many errors such as [877551.761758] usb 1-1.3: usbfs: usb_submit_urb returned -121 .
Furthermore the author of rtl_entropy states: “If you’re serious about the cryptographic security of your entropy source, you should probably short, or put a 75 Ohm load on the antenna port, and put the whole assembly in a shielded box. Then you’re getting entropy from the thermal noise of the amplifiers which is much harder to interfere with than atmospheric radio”, GitHub. Hence I tried it with such a resistor terminator but nothing happened at all. No data was coming in so I threw that scenario away. Finally I put the antenna in aluminium foil into an empty energy drink can to generate some noise. That is, I had 3x 8 GB files: plain w/ antenna, -e w/ antenna, and energy drink. ;)
/dev/urandom
For the sake of completeness I have also used the urandom source. Please also read this very interesting article about urandom: Myths about /dev/urandom.
1 |
sudo dd if=/dev/urandom iflag=fullblock of=$HOME/urandom8.bin bs=1M count=8192 |
Throughput
As already noted: For each source I copied 8 GB with dd into a file. (Note that the size descriptions vary since 8 x 1024 x 1024 x 1024 = 8589934592 = 8 GiB = 8.6 GB.) These are the results of the random generation “speed” within my tests on a Raspberry Pi 3 B. Obviously /dev/urandom was the fastest one:
- /dev/hwrng: 8.6 GB copied, 81585.4 s, 105 kB/s
- /dev/urandom: 8.6 GB copied, 2039.33 s, 4.2 MB/s
- rtl-entropy -s 2.4M: 8.6 GB copied, 54842 s, 157 kB/s
- rtl-entropy -s 2.4M -e: 8.6 GB copied, 54015.5 s, 159 kB/s
- rtl-entropy -s 2.4M energy drink: 8.6 GB copied, 31491 s, 273 kB/s
dieharder
“The diehard tests are a battery of statistical tests for measuring the quality of a random number generator”, Wikipedia. It is not easy to understand and interpret the results correctly. There are a few paragraphs on the dieharder man page about that.
For each generated random binary file as input source (-g 201 -f input-file) I ran dieharder with all test (-a), saved the output into a file (> filename) while running in background (&):
1 |
dieharder -a -g 201 -f hwrng4.bin > dieharder-hwrng4.bin & |
Following are the results. The main problem is the interpretation! All random sources have some WEAK assessments (p < 0.05% or p > 99.95%) while the majority has PASSED. Due to the man page “Scattered reports of weakness or marginal failure in a preliminary -a(ll) run should therefore not be immediate cause for alarm” I would say that all of them provide good random data. If you want to look at the mere results by yourself:
/dev/hwrng:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
#=============================================================================# # dieharder version 3.31.1 Copyright 2003 Robert G. Brown # #=============================================================================# rng_name | filename |rands/second| file_input_raw| hwrng8.bin| 3.23e+07 | #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 100|0.26588212| PASSED diehard_operm5| 0| 1000000| 100|0.58261653| PASSED diehard_rank_32x32| 0| 40000| 100|0.30744341| PASSED diehard_rank_6x8| 0| 100000| 100|0.55650716| PASSED diehard_bitstream| 0| 2097152| 100|0.94699828| PASSED diehard_opso| 0| 2097152| 100|0.39463329| PASSED diehard_oqso| 0| 2097152| 100|0.83000942| PASSED diehard_dna| 0| 2097152| 100|0.23139518| PASSED diehard_count_1s_str| 0| 256000| 100|0.88940957| PASSED diehard_count_1s_byt| 0| 256000| 100|0.96543106| PASSED diehard_parking_lot| 0| 12000| 100|0.39406997| PASSED diehard_2dsphere| 2| 8000| 100|0.35883564| PASSED diehard_3dsphere| 3| 4000| 100|0.98510461| PASSED diehard_squeeze| 0| 100000| 100|0.86638983| PASSED diehard_sums| 0| 100| 100|0.67674855| PASSED diehard_runs| 0| 100000| 100|0.82406977| PASSED diehard_runs| 0| 100000| 100|0.73774535| PASSED diehard_craps| 0| 200000| 100|0.99741761| WEAK diehard_craps| 0| 200000| 100|0.35632796| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.86500349| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.52854863| PASSED sts_monobit| 1| 100000| 100|0.52008318| PASSED sts_runs| 2| 100000| 100|0.55756669| PASSED sts_serial| 1| 100000| 100|0.09885669| PASSED sts_serial| 2| 100000| 100|0.34852479| PASSED sts_serial| 3| 100000| 100|0.18825322| PASSED sts_serial| 3| 100000| 100|0.67010195| PASSED sts_serial| 4| 100000| 100|0.33030108| PASSED sts_serial| 4| 100000| 100|0.20640159| PASSED sts_serial| 5| 100000| 100|0.41380633| PASSED sts_serial| 5| 100000| 100|0.15879585| PASSED sts_serial| 6| 100000| 100|0.77947567| PASSED sts_serial| 6| 100000| 100|0.84983861| PASSED sts_serial| 7| 100000| 100|0.99910396| WEAK sts_serial| 7| 100000| 100|0.99100525| PASSED sts_serial| 8| 100000| 100|0.82998039| PASSED sts_serial| 8| 100000| 100|0.83178041| PASSED sts_serial| 9| 100000| 100|0.64665158| PASSED sts_serial| 9| 100000| 100|0.85597969| PASSED sts_serial| 10| 100000| 100|0.18001543| PASSED sts_serial| 10| 100000| 100|0.86799859| PASSED sts_serial| 11| 100000| 100|0.23483992| PASSED sts_serial| 11| 100000| 100|0.95188611| PASSED sts_serial| 12| 100000| 100|0.72903987| PASSED sts_serial| 12| 100000| 100|0.79635205| PASSED sts_serial| 13| 100000| 100|0.24596842| PASSED sts_serial| 13| 100000| 100|0.07372293| PASSED sts_serial| 14| 100000| 100|0.18700980| PASSED sts_serial| 14| 100000| 100|0.77685840| PASSED sts_serial| 15| 100000| 100|0.04134234| PASSED sts_serial| 15| 100000| 100|0.11775372| PASSED sts_serial| 16| 100000| 100|0.72278727| PASSED sts_serial| 16| 100000| 100|0.53936847| PASSED rgb_bitdist| 1| 100000| 100|0.19569816| PASSED rgb_bitdist| 2| 100000| 100|0.37444078| PASSED rgb_bitdist| 3| 100000| 100|0.83358606| PASSED rgb_bitdist| 4| 100000| 100|0.80603344| PASSED rgb_bitdist| 5| 100000| 100|0.32336103| PASSED rgb_bitdist| 6| 100000| 100|0.70926541| PASSED rgb_bitdist| 7| 100000| 100|0.39367260| PASSED rgb_bitdist| 8| 100000| 100|0.26555102| PASSED rgb_bitdist| 9| 100000| 100|0.98339477| PASSED rgb_bitdist| 10| 100000| 100|0.31118778| PASSED rgb_bitdist| 11| 100000| 100|0.06450335| PASSED rgb_bitdist| 12| 100000| 100|0.94670861| PASSED rgb_minimum_distance| 2| 10000| 1000|0.54597417| PASSED rgb_minimum_distance| 3| 10000| 1000|0.13728825| PASSED rgb_minimum_distance| 4| 10000| 1000|0.97373323| PASSED rgb_minimum_distance| 5| 10000| 1000|0.20287415| PASSED rgb_permutations| 2| 100000| 100|0.12846579| PASSED rgb_permutations| 3| 100000| 100|0.78571841| PASSED rgb_permutations| 4| 100000| 100|0.99545753| WEAK rgb_permutations| 5| 100000| 100|0.98877360| PASSED rgb_lagged_sum| 0| 1000000| 100|0.99621464| WEAK rgb_lagged_sum| 1| 1000000| 100|0.14181663| PASSED rgb_lagged_sum| 2| 1000000| 100|0.10968911| PASSED rgb_lagged_sum| 3| 1000000| 100|0.69732761| PASSED rgb_lagged_sum| 4| 1000000| 100|0.21353998| PASSED rgb_lagged_sum| 5| 1000000| 100|0.56038762| PASSED rgb_lagged_sum| 6| 1000000| 100|0.17997416| PASSED rgb_lagged_sum| 7| 1000000| 100|0.32040452| PASSED rgb_lagged_sum| 8| 1000000| 100|0.68741259| PASSED rgb_lagged_sum| 9| 1000000| 100|0.51770395| PASSED rgb_lagged_sum| 10| 1000000| 100|0.75918942| PASSED rgb_lagged_sum| 11| 1000000| 100|0.18782174| PASSED rgb_lagged_sum| 12| 1000000| 100|0.96766217| PASSED rgb_lagged_sum| 13| 1000000| 100|0.75953901| PASSED rgb_lagged_sum| 14| 1000000| 100|0.15841592| PASSED rgb_lagged_sum| 15| 1000000| 100|0.27405938| PASSED rgb_lagged_sum| 16| 1000000| 100|0.63709358| PASSED rgb_lagged_sum| 17| 1000000| 100|0.65067325| PASSED rgb_lagged_sum| 18| 1000000| 100|0.99595683| WEAK rgb_lagged_sum| 19| 1000000| 100|0.12332174| PASSED rgb_lagged_sum| 20| 1000000| 100|0.60251469| PASSED rgb_lagged_sum| 21| 1000000| 100|0.86307978| PASSED rgb_lagged_sum| 22| 1000000| 100|0.73786039| PASSED rgb_lagged_sum| 23| 1000000| 100|0.81860574| PASSED rgb_lagged_sum| 24| 1000000| 100|0.72546667| PASSED rgb_lagged_sum| 25| 1000000| 100|0.98259042| PASSED rgb_lagged_sum| 26| 1000000| 100|0.85686668| PASSED rgb_lagged_sum| 27| 1000000| 100|0.87078148| PASSED rgb_lagged_sum| 28| 1000000| 100|0.22359689| PASSED rgb_lagged_sum| 29| 1000000| 100|0.92088156| PASSED rgb_lagged_sum| 30| 1000000| 100|0.27483940| PASSED rgb_lagged_sum| 31| 1000000| 100|0.14388153| PASSED rgb_lagged_sum| 32| 1000000| 100|0.28979916| PASSED rgb_kstest_test| 0| 10000| 1000|0.02949411| PASSED dab_bytedistrib| 0| 51200000| 1|0.64086230| PASSED dab_dct| 256| 50000| 1|0.88150470| PASSED Preparing to run test 207. ntuple = 0 dab_filltree| 32| 15000000| 1|0.72082427| PASSED dab_filltree| 32| 15000000| 1|0.00101573| WEAK Preparing to run test 208. ntuple = 0 dab_filltree2| 0| 5000000| 1|0.65218631| PASSED dab_filltree2| 1| 5000000| 1|0.32613264| PASSED Preparing to run test 209. ntuple = 0 dab_monobit2| 12| 65000000| 1|0.66515105| PASSED |
/dev/urandom:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
#=============================================================================# # dieharder version 3.31.1 Copyright 2003 Robert G. Brown # #=============================================================================# rng_name | filename |rands/second| file_input_raw| urandom8.bin| 1.69e+06 | #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 100|0.66892765| PASSED diehard_operm5| 0| 1000000| 100|0.70319064| PASSED diehard_rank_32x32| 0| 40000| 100|0.81009840| PASSED diehard_rank_6x8| 0| 100000| 100|0.55855403| PASSED diehard_bitstream| 0| 2097152| 100|0.50222247| PASSED diehard_opso| 0| 2097152| 100|0.92674322| PASSED diehard_oqso| 0| 2097152| 100|0.77265181| PASSED diehard_dna| 0| 2097152| 100|0.25467232| PASSED diehard_count_1s_str| 0| 256000| 100|0.18523658| PASSED diehard_count_1s_byt| 0| 256000| 100|0.45449353| PASSED diehard_parking_lot| 0| 12000| 100|0.69671967| PASSED diehard_2dsphere| 2| 8000| 100|0.35222182| PASSED diehard_3dsphere| 3| 4000| 100|0.66727997| PASSED diehard_squeeze| 0| 100000| 100|0.62727852| PASSED diehard_sums| 0| 100| 100|0.45972418| PASSED diehard_runs| 0| 100000| 100|0.97352034| PASSED diehard_runs| 0| 100000| 100|0.99218027| PASSED diehard_craps| 0| 200000| 100|0.01803519| PASSED diehard_craps| 0| 200000| 100|0.43421613| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.71875148| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.11730277| PASSED sts_monobit| 1| 100000| 100|0.10138158| PASSED sts_runs| 2| 100000| 100|0.60212277| PASSED sts_serial| 1| 100000| 100|0.77255626| PASSED sts_serial| 2| 100000| 100|0.06307603| PASSED sts_serial| 3| 100000| 100|0.01244802| PASSED sts_serial| 3| 100000| 100|0.45609437| PASSED sts_serial| 4| 100000| 100|0.02419055| PASSED sts_serial| 4| 100000| 100|0.01820724| PASSED sts_serial| 5| 100000| 100|0.08813565| PASSED sts_serial| 5| 100000| 100|0.72498131| PASSED sts_serial| 6| 100000| 100|0.92902527| PASSED sts_serial| 6| 100000| 100|0.23701091| PASSED sts_serial| 7| 100000| 100|0.58488516| PASSED sts_serial| 7| 100000| 100|0.92787860| PASSED sts_serial| 8| 100000| 100|0.21386869| PASSED sts_serial| 8| 100000| 100|0.77121643| PASSED sts_serial| 9| 100000| 100|0.92237118| PASSED sts_serial| 9| 100000| 100|0.74508097| PASSED sts_serial| 10| 100000| 100|0.24000419| PASSED sts_serial| 10| 100000| 100|0.10143119| PASSED sts_serial| 11| 100000| 100|0.30404079| PASSED sts_serial| 11| 100000| 100|0.57516476| PASSED sts_serial| 12| 100000| 100|0.10319048| PASSED sts_serial| 12| 100000| 100|0.07717826| PASSED sts_serial| 13| 100000| 100|0.64187907| PASSED sts_serial| 13| 100000| 100|0.14907731| PASSED sts_serial| 14| 100000| 100|0.29709967| PASSED sts_serial| 14| 100000| 100|0.77766194| PASSED sts_serial| 15| 100000| 100|0.23795548| PASSED sts_serial| 15| 100000| 100|0.63799311| PASSED sts_serial| 16| 100000| 100|0.23479560| PASSED sts_serial| 16| 100000| 100|0.98511297| PASSED rgb_bitdist| 1| 100000| 100|0.51839477| PASSED rgb_bitdist| 2| 100000| 100|0.97476376| PASSED rgb_bitdist| 3| 100000| 100|0.35228704| PASSED rgb_bitdist| 4| 100000| 100|0.89645462| PASSED rgb_bitdist| 5| 100000| 100|0.79438008| PASSED rgb_bitdist| 6| 100000| 100|0.17388347| PASSED rgb_bitdist| 7| 100000| 100|0.18280768| PASSED rgb_bitdist| 8| 100000| 100|0.86954929| PASSED rgb_bitdist| 9| 100000| 100|0.20774768| PASSED rgb_bitdist| 10| 100000| 100|0.96948313| PASSED rgb_bitdist| 11| 100000| 100|0.72089459| PASSED rgb_bitdist| 12| 100000| 100|0.92242670| PASSED rgb_minimum_distance| 2| 10000| 1000|0.77385510| PASSED rgb_minimum_distance| 3| 10000| 1000|0.37572283| PASSED rgb_minimum_distance| 4| 10000| 1000|0.82394156| PASSED rgb_minimum_distance| 5| 10000| 1000|0.07660153| PASSED rgb_permutations| 2| 100000| 100|0.11178273| PASSED rgb_permutations| 3| 100000| 100|0.41048070| PASSED rgb_permutations| 4| 100000| 100|0.57783847| PASSED rgb_permutations| 5| 100000| 100|0.88462523| PASSED rgb_lagged_sum| 0| 1000000| 100|0.46034499| PASSED rgb_lagged_sum| 1| 1000000| 100|0.41380683| PASSED rgb_lagged_sum| 2| 1000000| 100|0.61705822| PASSED rgb_lagged_sum| 3| 1000000| 100|0.76882587| PASSED rgb_lagged_sum| 4| 1000000| 100|0.95624458| PASSED rgb_lagged_sum| 5| 1000000| 100|0.67409617| PASSED rgb_lagged_sum| 6| 1000000| 100|0.26440145| PASSED rgb_lagged_sum| 7| 1000000| 100|0.20037289| PASSED rgb_lagged_sum| 8| 1000000| 100|0.30827418| PASSED rgb_lagged_sum| 9| 1000000| 100|0.76656466| PASSED rgb_lagged_sum| 10| 1000000| 100|0.78896101| PASSED rgb_lagged_sum| 11| 1000000| 100|0.12981085| PASSED rgb_lagged_sum| 12| 1000000| 100|0.19434468| PASSED rgb_lagged_sum| 13| 1000000| 100|0.92636353| PASSED rgb_lagged_sum| 14| 1000000| 100|0.87493447| PASSED rgb_lagged_sum| 15| 1000000| 100|0.99505555| WEAK rgb_lagged_sum| 16| 1000000| 100|0.97416476| PASSED rgb_lagged_sum| 17| 1000000| 100|0.47838313| PASSED rgb_lagged_sum| 18| 1000000| 100|0.35132351| PASSED rgb_lagged_sum| 19| 1000000| 100|0.46438460| PASSED rgb_lagged_sum| 20| 1000000| 100|0.99496574| PASSED rgb_lagged_sum| 21| 1000000| 100|0.46905565| PASSED rgb_lagged_sum| 22| 1000000| 100|0.91413192| PASSED rgb_lagged_sum| 23| 1000000| 100|0.29663009| PASSED rgb_lagged_sum| 24| 1000000| 100|0.38160476| PASSED rgb_lagged_sum| 25| 1000000| 100|0.43439578| PASSED rgb_lagged_sum| 26| 1000000| 100|0.15572150| PASSED rgb_lagged_sum| 27| 1000000| 100|0.25870893| PASSED rgb_lagged_sum| 28| 1000000| 100|0.59300823| PASSED rgb_lagged_sum| 29| 1000000| 100|0.78497682| PASSED rgb_lagged_sum| 30| 1000000| 100|0.41544505| PASSED rgb_lagged_sum| 31| 1000000| 100|0.90675685| PASSED rgb_lagged_sum| 32| 1000000| 100|0.93020655| PASSED rgb_kstest_test| 0| 10000| 1000|0.50722533| PASSED dab_bytedistrib| 0| 51200000| 1|0.84954245| PASSED dab_dct| 256| 50000| 1|0.47231834| PASSED Preparing to run test 207. ntuple = 0 dab_filltree| 32| 15000000| 1|0.89356430| PASSED dab_filltree| 32| 15000000| 1|0.05317058| PASSED Preparing to run test 208. ntuple = 0 dab_filltree2| 0| 5000000| 1|0.44947986| PASSED dab_filltree2| 1| 5000000| 1|0.59532228| PASSED Preparing to run test 209. ntuple = 0 dab_monobit2| 12| 65000000| 1|0.68622715| PASSED |
rtl_entropy:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
#=============================================================================# # dieharder version 3.31.1 Copyright 2003 Robert G. Brown # #=============================================================================# rng_name | filename |rands/second| file_input_raw| rtl_entropy8.bin| 4.85e+07 | #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 100|0.99529100| WEAK diehard_operm5| 0| 1000000| 100|0.09118211| PASSED diehard_rank_32x32| 0| 40000| 100|0.72728425| PASSED diehard_rank_6x8| 0| 100000| 100|0.88706808| PASSED diehard_bitstream| 0| 2097152| 100|0.27386072| PASSED diehard_opso| 0| 2097152| 100|0.76475292| PASSED diehard_oqso| 0| 2097152| 100|0.92085461| PASSED diehard_dna| 0| 2097152| 100|0.94852660| PASSED diehard_count_1s_str| 0| 256000| 100|0.76291305| PASSED diehard_count_1s_byt| 0| 256000| 100|0.85111229| PASSED diehard_parking_lot| 0| 12000| 100|0.96373014| PASSED diehard_2dsphere| 2| 8000| 100|0.28187880| PASSED diehard_3dsphere| 3| 4000| 100|0.98905607| PASSED diehard_squeeze| 0| 100000| 100|0.21145675| PASSED diehard_sums| 0| 100| 100|0.10565646| PASSED diehard_runs| 0| 100000| 100|0.82303554| PASSED diehard_runs| 0| 100000| 100|0.43011855| PASSED diehard_craps| 0| 200000| 100|0.10761669| PASSED diehard_craps| 0| 200000| 100|0.08058261| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.36663806| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.00345327| WEAK sts_monobit| 1| 100000| 100|0.33774072| PASSED sts_runs| 2| 100000| 100|0.24645229| PASSED sts_serial| 1| 100000| 100|0.50032224| PASSED sts_serial| 2| 100000| 100|0.48073276| PASSED sts_serial| 3| 100000| 100|0.71416020| PASSED sts_serial| 3| 100000| 100|0.98468491| PASSED sts_serial| 4| 100000| 100|0.25474421| PASSED sts_serial| 4| 100000| 100|0.22546308| PASSED sts_serial| 5| 100000| 100|0.06091104| PASSED sts_serial| 5| 100000| 100|0.17104878| PASSED sts_serial| 6| 100000| 100|0.24456209| PASSED sts_serial| 6| 100000| 100|0.99316985| PASSED sts_serial| 7| 100000| 100|0.97624388| PASSED sts_serial| 7| 100000| 100|0.51938118| PASSED sts_serial| 8| 100000| 100|0.22232030| PASSED sts_serial| 8| 100000| 100|0.22996447| PASSED sts_serial| 9| 100000| 100|0.24573158| PASSED sts_serial| 9| 100000| 100|0.53691470| PASSED sts_serial| 10| 100000| 100|0.37049481| PASSED sts_serial| 10| 100000| 100|0.91604405| PASSED sts_serial| 11| 100000| 100|0.20923637| PASSED sts_serial| 11| 100000| 100|0.92338826| PASSED sts_serial| 12| 100000| 100|0.68367565| PASSED sts_serial| 12| 100000| 100|0.91470745| PASSED sts_serial| 13| 100000| 100|0.60755152| PASSED sts_serial| 13| 100000| 100|0.53092845| PASSED sts_serial| 14| 100000| 100|0.84322355| PASSED sts_serial| 14| 100000| 100|0.03575303| PASSED sts_serial| 15| 100000| 100|0.23669230| PASSED sts_serial| 15| 100000| 100|0.52332722| PASSED sts_serial| 16| 100000| 100|0.63877888| PASSED sts_serial| 16| 100000| 100|0.99985624| WEAK rgb_bitdist| 1| 100000| 100|0.17117595| PASSED rgb_bitdist| 2| 100000| 100|0.63579633| PASSED rgb_bitdist| 3| 100000| 100|0.43511139| PASSED rgb_bitdist| 4| 100000| 100|0.36480297| PASSED rgb_bitdist| 5| 100000| 100|0.05369985| PASSED rgb_bitdist| 6| 100000| 100|0.01718937| PASSED rgb_bitdist| 7| 100000| 100|0.89123745| PASSED rgb_bitdist| 8| 100000| 100|0.75053174| PASSED rgb_bitdist| 9| 100000| 100|0.72840520| PASSED rgb_bitdist| 10| 100000| 100|0.68374144| PASSED rgb_bitdist| 11| 100000| 100|0.30434823| PASSED rgb_bitdist| 12| 100000| 100|0.46829649| PASSED rgb_minimum_distance| 2| 10000| 1000|0.45651674| PASSED rgb_minimum_distance| 3| 10000| 1000|0.49789481| PASSED rgb_minimum_distance| 4| 10000| 1000|0.01288176| PASSED rgb_minimum_distance| 5| 10000| 1000|0.65288512| PASSED rgb_permutations| 2| 100000| 100|0.52584330| PASSED rgb_permutations| 3| 100000| 100|0.75160026| PASSED rgb_permutations| 4| 100000| 100|0.11573316| PASSED rgb_permutations| 5| 100000| 100|0.30845556| PASSED rgb_lagged_sum| 0| 1000000| 100|0.40240029| PASSED rgb_lagged_sum| 1| 1000000| 100|0.99770345| WEAK rgb_lagged_sum| 2| 1000000| 100|0.99993357| WEAK rgb_lagged_sum| 3| 1000000| 100|0.09048355| PASSED rgb_lagged_sum| 4| 1000000| 100|0.14381310| PASSED rgb_lagged_sum| 5| 1000000| 100|0.90434818| PASSED rgb_lagged_sum| 6| 1000000| 100|0.83437407| PASSED rgb_lagged_sum| 7| 1000000| 100|0.30397415| PASSED rgb_lagged_sum| 8| 1000000| 100|0.36965149| PASSED rgb_lagged_sum| 9| 1000000| 100|0.34374563| PASSED rgb_lagged_sum| 10| 1000000| 100|0.88859709| PASSED rgb_lagged_sum| 11| 1000000| 100|0.11260173| PASSED rgb_lagged_sum| 12| 1000000| 100|0.54000356| PASSED rgb_lagged_sum| 13| 1000000| 100|0.54743672| PASSED rgb_lagged_sum| 14| 1000000| 100|0.72246694| PASSED rgb_lagged_sum| 15| 1000000| 100|0.97571265| PASSED rgb_lagged_sum| 16| 1000000| 100|0.77115446| PASSED rgb_lagged_sum| 17| 1000000| 100|0.63434807| PASSED rgb_lagged_sum| 18| 1000000| 100|0.48605354| PASSED rgb_lagged_sum| 19| 1000000| 100|0.13448662| PASSED rgb_lagged_sum| 20| 1000000| 100|0.45685908| PASSED rgb_lagged_sum| 21| 1000000| 100|0.24600702| PASSED rgb_lagged_sum| 22| 1000000| 100|0.29812767| PASSED rgb_lagged_sum| 23| 1000000| 100|0.86572040| PASSED rgb_lagged_sum| 24| 1000000| 100|0.78578566| PASSED rgb_lagged_sum| 25| 1000000| 100|0.72878334| PASSED rgb_lagged_sum| 26| 1000000| 100|0.85912671| PASSED rgb_lagged_sum| 27| 1000000| 100|0.25401170| PASSED rgb_lagged_sum| 28| 1000000| 100|0.75820541| PASSED rgb_lagged_sum| 29| 1000000| 100|0.14739182| PASSED rgb_lagged_sum| 30| 1000000| 100|0.72831333| PASSED rgb_lagged_sum| 31| 1000000| 100|0.64182532| PASSED rgb_lagged_sum| 32| 1000000| 100|0.50212407| PASSED rgb_kstest_test| 0| 10000| 1000|0.84867964| PASSED dab_bytedistrib| 0| 51200000| 1|0.60504973| PASSED dab_dct| 256| 50000| 1|0.40759921| PASSED Preparing to run test 207. ntuple = 0 dab_filltree| 32| 15000000| 1|0.32501606| PASSED dab_filltree| 32| 15000000| 1|0.52728503| PASSED Preparing to run test 208. ntuple = 0 dab_filltree2| 0| 5000000| 1|0.53763929| PASSED dab_filltree2| 1| 5000000| 1|0.01041810| PASSED Preparing to run test 209. ntuple = 0 dab_monobit2| 12| 65000000| 1|0.96281713| PASSED |
rtl_entropy -e:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
#=============================================================================# # dieharder version 3.31.1 Copyright 2003 Robert G. Brown # #=============================================================================# rng_name | filename |rands/second| file_input_raw| rtl_entropy-e8.bin| 2.47e+06 | #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 100|0.09820647| PASSED diehard_operm5| 0| 1000000| 100|0.91788139| PASSED diehard_rank_32x32| 0| 40000| 100|0.94648335| PASSED diehard_rank_6x8| 0| 100000| 100|0.47734237| PASSED diehard_bitstream| 0| 2097152| 100|0.77699762| PASSED diehard_opso| 0| 2097152| 100|0.32000356| PASSED diehard_oqso| 0| 2097152| 100|0.98307368| PASSED diehard_dna| 0| 2097152| 100|0.27259355| PASSED diehard_count_1s_str| 0| 256000| 100|0.67579991| PASSED diehard_count_1s_byt| 0| 256000| 100|0.92564258| PASSED diehard_parking_lot| 0| 12000| 100|0.96257187| PASSED diehard_2dsphere| 2| 8000| 100|0.33934695| PASSED diehard_3dsphere| 3| 4000| 100|0.32193489| PASSED diehard_squeeze| 0| 100000| 100|0.81682741| PASSED diehard_sums| 0| 100| 100|0.25838527| PASSED diehard_runs| 0| 100000| 100|0.95100405| PASSED diehard_runs| 0| 100000| 100|0.17554550| PASSED diehard_craps| 0| 200000| 100|0.73977378| PASSED diehard_craps| 0| 200000| 100|0.72101061| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.91523437| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.10956327| PASSED sts_monobit| 1| 100000| 100|0.94152291| PASSED sts_runs| 2| 100000| 100|0.87791812| PASSED sts_serial| 1| 100000| 100|0.93694378| PASSED sts_serial| 2| 100000| 100|0.83421979| PASSED sts_serial| 3| 100000| 100|0.74142624| PASSED sts_serial| 3| 100000| 100|0.83675075| PASSED sts_serial| 4| 100000| 100|0.96042107| PASSED sts_serial| 4| 100000| 100|0.43417383| PASSED sts_serial| 5| 100000| 100|0.02267694| PASSED sts_serial| 5| 100000| 100|0.01415026| PASSED sts_serial| 6| 100000| 100|0.15620893| PASSED sts_serial| 6| 100000| 100|0.86075323| PASSED sts_serial| 7| 100000| 100|0.85100081| PASSED sts_serial| 7| 100000| 100|0.78099629| PASSED sts_serial| 8| 100000| 100|0.20358639| PASSED sts_serial| 8| 100000| 100|0.02591644| PASSED sts_serial| 9| 100000| 100|0.12736378| PASSED sts_serial| 9| 100000| 100|0.92287188| PASSED sts_serial| 10| 100000| 100|0.98874170| PASSED sts_serial| 10| 100000| 100|0.72583807| PASSED sts_serial| 11| 100000| 100|0.63746884| PASSED sts_serial| 11| 100000| 100|0.19372997| PASSED sts_serial| 12| 100000| 100|0.60964783| PASSED sts_serial| 12| 100000| 100|0.86453968| PASSED sts_serial| 13| 100000| 100|0.82726538| PASSED sts_serial| 13| 100000| 100|0.99721452| WEAK sts_serial| 14| 100000| 100|0.55338208| PASSED sts_serial| 14| 100000| 100|0.41884508| PASSED sts_serial| 15| 100000| 100|0.83872323| PASSED sts_serial| 15| 100000| 100|0.80548912| PASSED sts_serial| 16| 100000| 100|0.73945880| PASSED sts_serial| 16| 100000| 100|0.97452369| PASSED rgb_bitdist| 1| 100000| 100|0.99641782| WEAK rgb_bitdist| 2| 100000| 100|0.67024954| PASSED rgb_bitdist| 3| 100000| 100|0.98556313| PASSED rgb_bitdist| 4| 100000| 100|0.33369284| PASSED rgb_bitdist| 5| 100000| 100|0.09567988| PASSED rgb_bitdist| 6| 100000| 100|0.79333602| PASSED rgb_bitdist| 7| 100000| 100|0.28702400| PASSED rgb_bitdist| 8| 100000| 100|0.37398963| PASSED rgb_bitdist| 9| 100000| 100|0.96878043| PASSED rgb_bitdist| 10| 100000| 100|0.76508957| PASSED rgb_bitdist| 11| 100000| 100|0.25502698| PASSED rgb_bitdist| 12| 100000| 100|0.95704240| PASSED rgb_minimum_distance| 2| 10000| 1000|0.96438436| PASSED rgb_minimum_distance| 3| 10000| 1000|0.11024058| PASSED rgb_minimum_distance| 4| 10000| 1000|0.80181156| PASSED rgb_minimum_distance| 5| 10000| 1000|0.03616543| PASSED rgb_permutations| 2| 100000| 100|0.35165457| PASSED rgb_permutations| 3| 100000| 100|0.47150140| PASSED rgb_permutations| 4| 100000| 100|0.63390153| PASSED rgb_permutations| 5| 100000| 100|0.99078393| PASSED rgb_lagged_sum| 0| 1000000| 100|0.75998549| PASSED rgb_lagged_sum| 1| 1000000| 100|0.18473991| PASSED rgb_lagged_sum| 2| 1000000| 100|0.71309981| PASSED rgb_lagged_sum| 3| 1000000| 100|0.60688289| PASSED rgb_lagged_sum| 4| 1000000| 100|0.99806142| WEAK rgb_lagged_sum| 5| 1000000| 100|0.94453818| PASSED rgb_lagged_sum| 6| 1000000| 100|0.68432489| PASSED rgb_lagged_sum| 7| 1000000| 100|0.42581639| PASSED rgb_lagged_sum| 8| 1000000| 100|0.02541022| PASSED rgb_lagged_sum| 9| 1000000| 100|0.86823290| PASSED rgb_lagged_sum| 10| 1000000| 100|0.40327088| PASSED rgb_lagged_sum| 11| 1000000| 100|0.85762180| PASSED rgb_lagged_sum| 12| 1000000| 100|0.47819219| PASSED rgb_lagged_sum| 13| 1000000| 100|0.53850512| PASSED rgb_lagged_sum| 14| 1000000| 100|0.51526999| PASSED rgb_lagged_sum| 15| 1000000| 100|0.49935772| PASSED rgb_lagged_sum| 16| 1000000| 100|0.20590714| PASSED rgb_lagged_sum| 17| 1000000| 100|0.75181967| PASSED rgb_lagged_sum| 18| 1000000| 100|0.88116442| PASSED rgb_lagged_sum| 19| 1000000| 100|0.64536172| PASSED rgb_lagged_sum| 20| 1000000| 100|0.92100607| PASSED rgb_lagged_sum| 21| 1000000| 100|0.90313212| PASSED rgb_lagged_sum| 22| 1000000| 100|0.26482599| PASSED rgb_lagged_sum| 23| 1000000| 100|0.66273744| PASSED rgb_lagged_sum| 24| 1000000| 100|0.64484898| PASSED rgb_lagged_sum| 25| 1000000| 100|0.67056704| PASSED rgb_lagged_sum| 26| 1000000| 100|0.90077257| PASSED rgb_lagged_sum| 27| 1000000| 100|0.28875123| PASSED rgb_lagged_sum| 28| 1000000| 100|0.94724306| PASSED rgb_lagged_sum| 29| 1000000| 100|0.97979197| PASSED rgb_lagged_sum| 30| 1000000| 100|0.80824092| PASSED rgb_lagged_sum| 31| 1000000| 100|0.47393672| PASSED rgb_lagged_sum| 32| 1000000| 100|0.52763816| PASSED rgb_kstest_test| 0| 10000| 1000|0.25314988| PASSED dab_bytedistrib| 0| 51200000| 1|0.78831369| PASSED dab_dct| 256| 50000| 1|0.90620322| PASSED Preparing to run test 207. ntuple = 0 dab_filltree| 32| 15000000| 1|0.04238359| PASSED dab_filltree| 32| 15000000| 1|0.12916421| PASSED Preparing to run test 208. ntuple = 0 dab_filltree2| 0| 5000000| 1|0.89498492| PASSED dab_filltree2| 1| 5000000| 1|0.47398555| PASSED Preparing to run test 209. ntuple = 0 dab_monobit2| 12| 65000000| 1|0.56572050| PASSED |
rtl_entropy energy drink:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
#=============================================================================# # dieharder version 3.31.1 Copyright 2003 Robert G. Brown # #=============================================================================# rng_name | filename |rands/second| file_input_raw| rtl_entropy-EnergyDrink8.bin| 1.82e+06 | #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 100|0.23255879| PASSED diehard_operm5| 0| 1000000| 100|0.53806967| PASSED diehard_rank_32x32| 0| 40000| 100|0.89676675| PASSED diehard_rank_6x8| 0| 100000| 100|0.92025519| PASSED diehard_bitstream| 0| 2097152| 100|0.33677047| PASSED diehard_opso| 0| 2097152| 100|0.01604366| PASSED diehard_oqso| 0| 2097152| 100|0.69621931| PASSED diehard_dna| 0| 2097152| 100|0.19840634| PASSED diehard_count_1s_str| 0| 256000| 100|0.92905342| PASSED diehard_count_1s_byt| 0| 256000| 100|0.38277924| PASSED diehard_parking_lot| 0| 12000| 100|0.96749733| PASSED diehard_2dsphere| 2| 8000| 100|0.03170390| PASSED diehard_3dsphere| 3| 4000| 100|0.09200513| PASSED diehard_squeeze| 0| 100000| 100|0.23134167| PASSED diehard_sums| 0| 100| 100|0.17377881| PASSED diehard_runs| 0| 100000| 100|0.49675163| PASSED diehard_runs| 0| 100000| 100|0.99458720| PASSED diehard_craps| 0| 200000| 100|0.99170256| PASSED diehard_craps| 0| 200000| 100|0.97591217| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.99762049| WEAK marsaglia_tsang_gcd| 0| 10000000| 100|0.56666217| PASSED sts_monobit| 1| 100000| 100|0.76827135| PASSED sts_runs| 2| 100000| 100|0.16526707| PASSED sts_serial| 1| 100000| 100|0.74263578| PASSED sts_serial| 2| 100000| 100|0.46998803| PASSED sts_serial| 3| 100000| 100|0.41558654| PASSED sts_serial| 3| 100000| 100|0.96380997| PASSED sts_serial| 4| 100000| 100|0.17325875| PASSED sts_serial| 4| 100000| 100|0.75668422| PASSED sts_serial| 5| 100000| 100|0.77815270| PASSED sts_serial| 5| 100000| 100|0.59324636| PASSED sts_serial| 6| 100000| 100|0.92175059| PASSED sts_serial| 6| 100000| 100|0.59021021| PASSED sts_serial| 7| 100000| 100|0.96166331| PASSED sts_serial| 7| 100000| 100|0.86885134| PASSED sts_serial| 8| 100000| 100|0.98228280| PASSED sts_serial| 8| 100000| 100|0.87344736| PASSED sts_serial| 9| 100000| 100|0.67778488| PASSED sts_serial| 9| 100000| 100|0.26731050| PASSED sts_serial| 10| 100000| 100|0.90979921| PASSED sts_serial| 10| 100000| 100|0.96720963| PASSED sts_serial| 11| 100000| 100|0.70589998| PASSED sts_serial| 11| 100000| 100|0.93942723| PASSED sts_serial| 12| 100000| 100|0.54145212| PASSED sts_serial| 12| 100000| 100|0.83112180| PASSED sts_serial| 13| 100000| 100|0.99093295| PASSED sts_serial| 13| 100000| 100|0.09971993| PASSED sts_serial| 14| 100000| 100|0.65275000| PASSED sts_serial| 14| 100000| 100|0.10047184| PASSED sts_serial| 15| 100000| 100|0.99140547| PASSED sts_serial| 15| 100000| 100|0.28835004| PASSED sts_serial| 16| 100000| 100|0.76301280| PASSED sts_serial| 16| 100000| 100|0.79941076| PASSED rgb_bitdist| 1| 100000| 100|0.81320062| PASSED rgb_bitdist| 2| 100000| 100|0.03352894| PASSED rgb_bitdist| 3| 100000| 100|0.98734715| PASSED rgb_bitdist| 4| 100000| 100|0.31009895| PASSED rgb_bitdist| 5| 100000| 100|0.97152686| PASSED rgb_bitdist| 6| 100000| 100|0.41202573| PASSED rgb_bitdist| 7| 100000| 100|0.66266305| PASSED rgb_bitdist| 8| 100000| 100|0.97733069| PASSED rgb_bitdist| 9| 100000| 100|0.56678644| PASSED rgb_bitdist| 10| 100000| 100|0.80004888| PASSED rgb_bitdist| 11| 100000| 100|0.99463511| PASSED rgb_bitdist| 12| 100000| 100|0.14775287| PASSED rgb_minimum_distance| 2| 10000| 1000|0.18615954| PASSED rgb_minimum_distance| 3| 10000| 1000|0.12003487| PASSED rgb_minimum_distance| 4| 10000| 1000|0.08843166| PASSED rgb_minimum_distance| 5| 10000| 1000|0.93921569| PASSED rgb_permutations| 2| 100000| 100|0.97525371| PASSED rgb_permutations| 3| 100000| 100|0.80411345| PASSED rgb_permutations| 4| 100000| 100|0.34686878| PASSED rgb_permutations| 5| 100000| 100|0.65194927| PASSED rgb_lagged_sum| 0| 1000000| 100|0.71735597| PASSED rgb_lagged_sum| 1| 1000000| 100|0.58455534| PASSED rgb_lagged_sum| 2| 1000000| 100|0.33797017| PASSED rgb_lagged_sum| 3| 1000000| 100|0.94244606| PASSED rgb_lagged_sum| 4| 1000000| 100|0.78162069| PASSED rgb_lagged_sum| 5| 1000000| 100|0.50551424| PASSED rgb_lagged_sum| 6| 1000000| 100|0.94171055| PASSED rgb_lagged_sum| 7| 1000000| 100|0.91440792| PASSED rgb_lagged_sum| 8| 1000000| 100|0.39140745| PASSED rgb_lagged_sum| 9| 1000000| 100|0.15479449| PASSED rgb_lagged_sum| 10| 1000000| 100|0.97749186| PASSED rgb_lagged_sum| 11| 1000000| 100|0.55387470| PASSED rgb_lagged_sum| 12| 1000000| 100|0.41772571| PASSED rgb_lagged_sum| 13| 1000000| 100|0.13972088| PASSED rgb_lagged_sum| 14| 1000000| 100|0.96632941| PASSED rgb_lagged_sum| 15| 1000000| 100|0.01116135| PASSED rgb_lagged_sum| 16| 1000000| 100|0.40821043| PASSED rgb_lagged_sum| 17| 1000000| 100|0.73170077| PASSED rgb_lagged_sum| 18| 1000000| 100|0.89474283| PASSED rgb_lagged_sum| 19| 1000000| 100|0.70499333| PASSED rgb_lagged_sum| 20| 1000000| 100|0.45223299| PASSED rgb_lagged_sum| 21| 1000000| 100|0.48450997| PASSED rgb_lagged_sum| 22| 1000000| 100|0.34246251| PASSED rgb_lagged_sum| 23| 1000000| 100|0.17731888| PASSED rgb_lagged_sum| 24| 1000000| 100|0.67761096| PASSED rgb_lagged_sum| 25| 1000000| 100|0.87833361| PASSED rgb_lagged_sum| 26| 1000000| 100|0.34369000| PASSED rgb_lagged_sum| 27| 1000000| 100|0.40476301| PASSED rgb_lagged_sum| 28| 1000000| 100|0.19118294| PASSED rgb_lagged_sum| 29| 1000000| 100|0.71459940| PASSED rgb_lagged_sum| 30| 1000000| 100|0.28411101| PASSED rgb_lagged_sum| 31| 1000000| 100|0.80944577| PASSED rgb_lagged_sum| 32| 1000000| 100|0.30229009| PASSED rgb_kstest_test| 0| 10000| 1000|0.28563059| PASSED dab_bytedistrib| 0| 51200000| 1|0.51280699| PASSED dab_dct| 256| 50000| 1|0.82154227| PASSED Preparing to run test 207. ntuple = 0 dab_filltree| 32| 15000000| 1|0.52676521| PASSED dab_filltree| 32| 15000000| 1|0.44023956| PASSED Preparing to run test 208. ntuple = 0 dab_filltree2| 0| 5000000| 1|0.52009372| PASSED dab_filltree2| 1| 5000000| 1|0.91027593| PASSED Preparing to run test 209. ntuple = 0 dab_monobit2| 12| 65000000| 1|0.98048540| PASSED |
Conclusion
While the rtl_entropy solution has some unsolved problems (as of 2018) and does not run very well the hardware RNG on the Raspberry Pi itself is quite easy to use and produces real random data. I won’t build high grade crypto protocols on it but will pick up my idea for generating pre-shared keys (PSKs) or passwords out of it. Why not?
Just for Fun: Full HD Wallpaper
Out of the /dev/hwrng random data from the Raspberry Pi I generated this Full HD wallpaper. (Not my idea, look here again.) Yes, it has about 6 MB (!) because it cannot be compressed due to its randomness.
Even More Links
- Co.Design: Cloudflares “Wall of Entropy”: The Hardest Working Office Design In America Encrypts Your Data–With Lava Lamps
- StackExchange: Testing a hardware random number generator
- Aaron Toponce: The Entropy of a Digital Camera CCD/CMOS Sensor
Featured image: “Dice” by Clancey Livingston is licensed under CC BY-NC 2.0.
A few thoughts:
1. You will get better performance out of /dev/urandom if you upgrade your Linux kernel to something beyond version 4.8, as from that point forward, it’s based on ChaCha20 as the cryptographic primitive, rather than SHA-1, which is much more efficient.
2. In practice, you should never need anything more than /dev/urandom. It’s indistinguishable from true random whitened noise. The only catch, of course, is that it needs to be seeded with true random white noise (IE: “entropy) before use. Thankfully, the kernel mixes in interrupts, and other sources of hardware-based entropy on most GNU/Linux installers, and saves to disk for seeding on first boot.
3. Randomness tests are interesting, but they don’t say anything about the security of the randomness function. They only state that the randomness function is passing statistical tests for randomness. Of course, cryptographically security random number generators should pass the tests with flying colors, but that doesn’t mean that a random number generator that does pass the test with flying colors is cryptographically secure. So, be careful there. But, it it worth a sanity check to make sure your CSPRNG is actually passing the statistical tests.
4. True random number generators are interesting, but if you can’t audit the hardware and the firmware microcode, I would take them with a very small grain of salt. Best Practice if you don’t trust the TRNG, would be to collect 512-bits of data from the TRNG, run the collected result through SHA-256, then use that output to seed your OS CSPRNG (EG: /dev/urandom), and use the OS CSPRNG from there. Personally, I wouldn’t use TRNG data directly unless I have personally vetted the hardware and firmware. #TinFoilHat