Difference between revisions of "STM32 Random Number Generator"

From Stm32World Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
[[Category:C]][[Category:STM32 Development]][[Category:STM32 HAL]][[Category:STM32CubeMX]][[Category:STM32CubeIde]][[Category:Embedded]][[Category:STM32]][[Category:Work in progress]] {{metadesc|Random number generator on STM32}}
 
[[Category:C]][[Category:STM32 Development]][[Category:STM32 HAL]][[Category:STM32CubeMX]][[Category:STM32CubeIde]][[Category:Embedded]][[Category:STM32]][[Category:Work in progress]] {{metadesc|Random number generator on STM32}}
== Testing ==
+
== Dieharder Testing ==
 
To establish a baseline the random generators of the Linux kernel was tested with ''dieharder''
 
To establish a baseline the random generators of the Linux kernel was tested with ''dieharder''
  
Line 399: Line 399:
 
</pre>
 
</pre>
  
== STM32 RNG ==  
+
=== STM32 RNG ===
  
 
<pre>
 
<pre>

Revision as of 02:43, 24 September 2024

Dieharder Testing

To establish a baseline the random generators of the Linux kernel was tested with dieharder

Linux /dev/urandom

dd if=/dev/urandom of=tmp/urandom.dat bs=10K count=1000K status=progress
lth@ncpws04:~$ dieharder -f tmp/urandom.dat -g 201 -a
#=============================================================================#
#            dieharder version 3.31.1 Copyright 2003 Robert G. Brown          #
#=============================================================================#
   rng_name    |           filename             |rands/second|
 file_input_raw|                 tmp/urandom.dat|  4.46e+07  |
#=============================================================================#
        test_name   |ntup| tsamples |psamples|  p-value |Assessment
#=============================================================================#
   diehard_birthdays|   0|       100|     100|0.85148765|  PASSED  
      diehard_operm5|   0|   1000000|     100|0.36158689|  PASSED  
  diehard_rank_32x32|   0|     40000|     100|0.19235819|  PASSED  
    diehard_rank_6x8|   0|    100000|     100|0.73153207|  PASSED  
   diehard_bitstream|   0|   2097152|     100|0.33413757|  PASSED  
        diehard_opso|   0|   2097152|     100|0.80138421|  PASSED  
        diehard_oqso|   0|   2097152|     100|0.41464611|  PASSED  
         diehard_dna|   0|   2097152|     100|0.77342197|  PASSED  
diehard_count_1s_str|   0|    256000|     100|0.26194352|  PASSED  
diehard_count_1s_byt|   0|    256000|     100|0.26024222|  PASSED  
 diehard_parking_lot|   0|     12000|     100|0.36948334|  PASSED  
    diehard_2dsphere|   2|      8000|     100|0.91598724|  PASSED  
    diehard_3dsphere|   3|      4000|     100|0.40635801|  PASSED  
     diehard_squeeze|   0|    100000|     100|0.05386421|  PASSED  
        diehard_sums|   0|       100|     100|0.00155920|   WEAK   
        diehard_runs|   0|    100000|     100|0.65301623|  PASSED  
        diehard_runs|   0|    100000|     100|0.06399268|  PASSED  
       diehard_craps|   0|    200000|     100|0.16924752|  PASSED  
       diehard_craps|   0|    200000|     100|0.24596907|  PASSED  
# The file file_input_raw was rewound 1 times
 marsaglia_tsang_gcd|   0|  10000000|     100|0.88583219|  PASSED  
 marsaglia_tsang_gcd|   0|  10000000|     100|0.16819094|  PASSED  
# The file file_input_raw was rewound 1 times
         sts_monobit|   1|    100000|     100|0.09420096|  PASSED  
# The file file_input_raw was rewound 1 times
            sts_runs|   2|    100000|     100|0.48630702|  PASSED  
# The file file_input_raw was rewound 1 times
          sts_serial|   1|    100000|     100|0.11959076|  PASSED  
          sts_serial|   2|    100000|     100|0.04603001|  PASSED  
          sts_serial|   3|    100000|     100|0.12200595|  PASSED  
          sts_serial|   3|    100000|     100|0.80969741|  PASSED  
          sts_serial|   4|    100000|     100|0.07838883|  PASSED  
          sts_serial|   4|    100000|     100|0.14268430|  PASSED  
          sts_serial|   5|    100000|     100|0.00943842|  PASSED  
          sts_serial|   5|    100000|     100|0.34939985|  PASSED  
          sts_serial|   6|    100000|     100|0.18024085|  PASSED  
          sts_serial|   6|    100000|     100|0.50932766|  PASSED  
          sts_serial|   7|    100000|     100|0.41902895|  PASSED  
          sts_serial|   7|    100000|     100|0.07440290|  PASSED  
          sts_serial|   8|    100000|     100|0.61167995|  PASSED  
          sts_serial|   8|    100000|     100|0.69452949|  PASSED  
          sts_serial|   9|    100000|     100|0.65695056|  PASSED  
          sts_serial|   9|    100000|     100|0.31934371|  PASSED  
          sts_serial|  10|    100000|     100|0.40962901|  PASSED  
          sts_serial|  10|    100000|     100|0.25781306|  PASSED  
          sts_serial|  11|    100000|     100|0.47110407|  PASSED  
          sts_serial|  11|    100000|     100|0.37171407|  PASSED  
          sts_serial|  12|    100000|     100|0.62296326|  PASSED  
          sts_serial|  12|    100000|     100|0.92450747|  PASSED  
          sts_serial|  13|    100000|     100|0.78732283|  PASSED  
          sts_serial|  13|    100000|     100|0.90548337|  PASSED  
          sts_serial|  14|    100000|     100|0.24572937|  PASSED  
          sts_serial|  14|    100000|     100|0.14229025|  PASSED  
          sts_serial|  15|    100000|     100|0.77306080|  PASSED  
          sts_serial|  15|    100000|     100|0.18669347|  PASSED  
          sts_serial|  16|    100000|     100|0.26152361|  PASSED  
          sts_serial|  16|    100000|     100|0.10723628|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   1|    100000|     100|0.20567033|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   2|    100000|     100|0.97756506|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   3|    100000|     100|0.87310602|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   4|    100000|     100|0.61554409|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   5|    100000|     100|0.34699765|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   6|    100000|     100|0.70054743|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   7|    100000|     100|0.95797379|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   8|    100000|     100|0.85447991|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   9|    100000|     100|0.97315970|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  10|    100000|     100|0.07551501|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  11|    100000|     100|0.02806740|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  12|    100000|     100|0.90312101|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   2|     10000|    1000|0.72195925|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   3|     10000|    1000|0.98801454|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   4|     10000|    1000|0.49907419|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   5|     10000|    1000|0.18432754|  PASSED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   2|    100000|     100|0.32461006|  PASSED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   3|    100000|     100|0.82934484|  PASSED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   4|    100000|     100|0.83975351|  PASSED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   5|    100000|     100|0.27076663|  PASSED  
# The file file_input_raw was rewound 1 times
      rgb_lagged_sum|   0|   1000000|     100|0.41373955|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   1|   1000000|     100|0.76783623|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   2|   1000000|     100|0.01154601|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   3|   1000000|     100|0.96949933|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   4|   1000000|     100|0.99060610|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   5|   1000000|     100|0.58013154|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   6|   1000000|     100|0.55260299|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   7|   1000000|     100|0.35878201|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   8|   1000000|     100|0.95568689|  PASSED  
# The file file_input_raw was rewound 4 times
      rgb_lagged_sum|   9|   1000000|     100|0.42992479|  PASSED  
# The file file_input_raw was rewound 4 times
      rgb_lagged_sum|  10|   1000000|     100|0.01048571|  PASSED  
# The file file_input_raw was rewound 4 times
      rgb_lagged_sum|  11|   1000000|     100|0.84407767|  PASSED  
# The file file_input_raw was rewound 5 times
      rgb_lagged_sum|  12|   1000000|     100|0.87042410|  PASSED  
# The file file_input_raw was rewound 5 times
      rgb_lagged_sum|  13|   1000000|     100|0.69430023|  PASSED  
# The file file_input_raw was rewound 6 times
      rgb_lagged_sum|  14|   1000000|     100|0.52936159|  PASSED  
# The file file_input_raw was rewound 7 times
      rgb_lagged_sum|  15|   1000000|     100|0.49236453|  PASSED  
# The file file_input_raw was rewound 7 times
      rgb_lagged_sum|  16|   1000000|     100|0.00956599|  PASSED  
# The file file_input_raw was rewound 8 times
      rgb_lagged_sum|  17|   1000000|     100|0.52760754|  PASSED  
# The file file_input_raw was rewound 9 times
      rgb_lagged_sum|  18|   1000000|     100|0.52313251|  PASSED  
# The file file_input_raw was rewound 9 times
      rgb_lagged_sum|  19|   1000000|     100|0.89894945|  PASSED  
# The file file_input_raw was rewound 10 times
      rgb_lagged_sum|  20|   1000000|     100|0.07486173|  PASSED  
# The file file_input_raw was rewound 11 times
      rgb_lagged_sum|  21|   1000000|     100|0.31468816|  PASSED  
# The file file_input_raw was rewound 12 times
      rgb_lagged_sum|  22|   1000000|     100|0.65555903|  PASSED  
# The file file_input_raw was rewound 13 times
      rgb_lagged_sum|  23|   1000000|     100|0.61063599|  PASSED  
# The file file_input_raw was rewound 14 times
      rgb_lagged_sum|  24|   1000000|     100|0.99012152|  PASSED  
# The file file_input_raw was rewound 15 times
      rgb_lagged_sum|  25|   1000000|     100|0.35491357|  PASSED  
# The file file_input_raw was rewound 16 times
      rgb_lagged_sum|  26|   1000000|     100|0.76869968|  PASSED  
# The file file_input_raw was rewound 17 times
      rgb_lagged_sum|  27|   1000000|     100|0.53874540|  PASSED  
# The file file_input_raw was rewound 18 times
      rgb_lagged_sum|  28|   1000000|     100|0.93392617|  PASSED  
# The file file_input_raw was rewound 19 times
      rgb_lagged_sum|  29|   1000000|     100|0.44204121|  PASSED  
# The file file_input_raw was rewound 20 times
      rgb_lagged_sum|  30|   1000000|     100|0.70565245|  PASSED  
# The file file_input_raw was rewound 22 times
      rgb_lagged_sum|  31|   1000000|     100|0.46219747|  PASSED  
# The file file_input_raw was rewound 23 times
      rgb_lagged_sum|  32|   1000000|     100|0.91054220|  PASSED  
# The file file_input_raw was rewound 23 times
     rgb_kstest_test|   0|     10000|    1000|0.20926709|  PASSED  
# The file file_input_raw was rewound 23 times
     dab_bytedistrib|   0|  51200000|       1|0.59814792|  PASSED  
# The file file_input_raw was rewound 23 times
             dab_dct| 256|     50000|       1|0.74212677|  PASSED  
Preparing to run test 207.  ntuple = 0
# The file file_input_raw was rewound 23 times
        dab_filltree|  32|  15000000|       1|0.28984573|  PASSED  
        dab_filltree|  32|  15000000|       1|0.63562855|  PASSED  
Preparing to run test 208.  ntuple = 0
# The file file_input_raw was rewound 23 times
       dab_filltree2|   0|   5000000|       1|0.16660978|  PASSED  
       dab_filltree2|   1|   5000000|       1|0.17854561|  PASSED  
Preparing to run test 209.  ntuple = 0
# The file file_input_raw was rewound 23 times
        dab_monobit2|  12|  65000000|       1|0.25711145|  PASSED

Linux /dev/random

dd if=/dev/random of=tmp/random.dat bs=10K count=1000K status=progress
lth@ncpws04:~$ dieharder -f tmp/random.dat -g 201 -a
#=============================================================================#
#            dieharder version 3.31.1 Copyright 2003 Robert G. Brown          #
#=============================================================================#
   rng_name    |           filename             |rands/second|
 file_input_raw|                  tmp/random.dat|  5.52e+06  |
#=============================================================================#
        test_name   |ntup| tsamples |psamples|  p-value |Assessment
#=============================================================================#
   diehard_birthdays|   0|       100|     100|0.30569157|  PASSED  
      diehard_operm5|   0|   1000000|     100|0.79310463|  PASSED  
  diehard_rank_32x32|   0|     40000|     100|0.71208691|  PASSED  
    diehard_rank_6x8|   0|    100000|     100|0.97867978|  PASSED  
   diehard_bitstream|   0|   2097152|     100|0.86249269|  PASSED  
        diehard_opso|   0|   2097152|     100|0.02160443|  PASSED  
        diehard_oqso|   0|   2097152|     100|0.98581063|  PASSED  
         diehard_dna|   0|   2097152|     100|0.48650702|  PASSED  
diehard_count_1s_str|   0|    256000|     100|0.75209448|  PASSED  
diehard_count_1s_byt|   0|    256000|     100|0.17837688|  PASSED  
 diehard_parking_lot|   0|     12000|     100|0.94949259|  PASSED  
    diehard_2dsphere|   2|      8000|     100|0.36485895|  PASSED  
    diehard_3dsphere|   3|      4000|     100|0.93986302|  PASSED  
     diehard_squeeze|   0|    100000|     100|0.19452526|  PASSED  
        diehard_sums|   0|       100|     100|0.01995686|  PASSED  
        diehard_runs|   0|    100000|     100|0.09188102|  PASSED  
        diehard_runs|   0|    100000|     100|0.53871746|  PASSED  
       diehard_craps|   0|    200000|     100|0.25685734|  PASSED  
       diehard_craps|   0|    200000|     100|0.96426919|  PASSED  
# The file file_input_raw was rewound 1 times
 marsaglia_tsang_gcd|   0|  10000000|     100|0.74298823|  PASSED  
 marsaglia_tsang_gcd|   0|  10000000|     100|0.99978398|   WEAK   
# The file file_input_raw was rewound 1 times
         sts_monobit|   1|    100000|     100|0.93584876|  PASSED  
# The file file_input_raw was rewound 1 times
            sts_runs|   2|    100000|     100|0.11110760|  PASSED  
# The file file_input_raw was rewound 1 times
          sts_serial|   1|    100000|     100|0.05134440|  PASSED  
          sts_serial|   2|    100000|     100|0.10270479|  PASSED  
          sts_serial|   3|    100000|     100|0.68896893|  PASSED  
          sts_serial|   3|    100000|     100|0.53412877|  PASSED  
          sts_serial|   4|    100000|     100|0.48321688|  PASSED  
          sts_serial|   4|    100000|     100|0.08122913|  PASSED  
          sts_serial|   5|    100000|     100|0.98557394|  PASSED  
          sts_serial|   5|    100000|     100|0.11542520|  PASSED  
          sts_serial|   6|    100000|     100|0.83161081|  PASSED  
          sts_serial|   6|    100000|     100|0.54198557|  PASSED  
          sts_serial|   7|    100000|     100|0.51815714|  PASSED  
          sts_serial|   7|    100000|     100|0.66903355|  PASSED  
          sts_serial|   8|    100000|     100|0.88264438|  PASSED  
          sts_serial|   8|    100000|     100|0.24498381|  PASSED  
          sts_serial|   9|    100000|     100|0.10147405|  PASSED  
          sts_serial|   9|    100000|     100|0.40851153|  PASSED  
          sts_serial|  10|    100000|     100|0.43509347|  PASSED  
          sts_serial|  10|    100000|     100|0.71086346|  PASSED  
          sts_serial|  11|    100000|     100|0.78362981|  PASSED  
          sts_serial|  11|    100000|     100|0.93497738|  PASSED  
          sts_serial|  12|    100000|     100|0.80417387|  PASSED  
          sts_serial|  12|    100000|     100|0.98471731|  PASSED  
          sts_serial|  13|    100000|     100|0.27357998|  PASSED  
          sts_serial|  13|    100000|     100|0.61578251|  PASSED  
          sts_serial|  14|    100000|     100|0.28499678|  PASSED  
          sts_serial|  14|    100000|     100|0.41170163|  PASSED  
          sts_serial|  15|    100000|     100|0.92992758|  PASSED  
          sts_serial|  15|    100000|     100|0.71162405|  PASSED  
          sts_serial|  16|    100000|     100|0.39694783|  PASSED  
          sts_serial|  16|    100000|     100|0.72410157|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   1|    100000|     100|0.90309500|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   2|    100000|     100|0.17520362|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   3|    100000|     100|0.58069963|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   4|    100000|     100|0.82782027|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   5|    100000|     100|0.22617856|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   6|    100000|     100|0.67063048|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   7|    100000|     100|0.41805685|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   8|    100000|     100|0.07938579|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   9|    100000|     100|0.47174218|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  10|    100000|     100|0.98797185|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  11|    100000|     100|0.07840839|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  12|    100000|     100|0.82921574|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   2|     10000|    1000|0.07469035|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   3|     10000|    1000|0.70501039|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   4|     10000|    1000|0.16386422|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   5|     10000|    1000|0.34023761|  PASSED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   2|    100000|     100|0.93595427|  PASSED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   3|    100000|     100|0.99759547|   WEAK   
# The file file_input_raw was rewound 1 times
    rgb_permutations|   4|    100000|     100|0.55339221|  PASSED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   5|    100000|     100|0.58904886|  PASSED  
# The file file_input_raw was rewound 1 times
      rgb_lagged_sum|   0|   1000000|     100|0.42360380|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   1|   1000000|     100|0.49983005|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   2|   1000000|     100|0.00982819|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   3|   1000000|     100|0.62683977|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   4|   1000000|     100|0.36489699|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   5|   1000000|     100|0.79417318|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   6|   1000000|     100|0.72645798|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   7|   1000000|     100|0.50307864|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   8|   1000000|     100|0.47477318|  PASSED  
# The file file_input_raw was rewound 4 times
      rgb_lagged_sum|   9|   1000000|     100|0.46139962|  PASSED  
# The file file_input_raw was rewound 4 times
      rgb_lagged_sum|  10|   1000000|     100|0.70358990|  PASSED  
# The file file_input_raw was rewound 4 times
      rgb_lagged_sum|  11|   1000000|     100|0.73486144|  PASSED  
# The file file_input_raw was rewound 5 times
      rgb_lagged_sum|  12|   1000000|     100|0.74496268|  PASSED  
# The file file_input_raw was rewound 5 times
      rgb_lagged_sum|  13|   1000000|     100|0.48993417|  PASSED  
# The file file_input_raw was rewound 6 times
      rgb_lagged_sum|  14|   1000000|     100|0.95034007|  PASSED  
# The file file_input_raw was rewound 7 times
      rgb_lagged_sum|  15|   1000000|     100|0.96217597|  PASSED  
# The file file_input_raw was rewound 7 times
      rgb_lagged_sum|  16|   1000000|     100|0.04047459|  PASSED  
# The file file_input_raw was rewound 8 times
      rgb_lagged_sum|  17|   1000000|     100|0.06315529|  PASSED  
# The file file_input_raw was rewound 9 times
      rgb_lagged_sum|  18|   1000000|     100|0.93594601|  PASSED  
# The file file_input_raw was rewound 9 times
      rgb_lagged_sum|  19|   1000000|     100|0.26721037|  PASSED  
# The file file_input_raw was rewound 10 times
      rgb_lagged_sum|  20|   1000000|     100|0.98744897|  PASSED  
# The file file_input_raw was rewound 11 times
      rgb_lagged_sum|  21|   1000000|     100|0.70007444|  PASSED  
# The file file_input_raw was rewound 12 times
      rgb_lagged_sum|  22|   1000000|     100|0.02384813|  PASSED  
# The file file_input_raw was rewound 13 times
      rgb_lagged_sum|  23|   1000000|     100|0.91388563|  PASSED  
# The file file_input_raw was rewound 14 times
      rgb_lagged_sum|  24|   1000000|     100|0.70144484|  PASSED  
# The file file_input_raw was rewound 15 times
      rgb_lagged_sum|  25|   1000000|     100|0.21661174|  PASSED  
# The file file_input_raw was rewound 16 times
      rgb_lagged_sum|  26|   1000000|     100|0.37681995|  PASSED  
# The file file_input_raw was rewound 17 times
      rgb_lagged_sum|  27|   1000000|     100|0.31221588|  PASSED  
# The file file_input_raw was rewound 18 times
      rgb_lagged_sum|  28|   1000000|     100|0.98533685|  PASSED  
# The file file_input_raw was rewound 19 times
      rgb_lagged_sum|  29|   1000000|     100|0.39443217|  PASSED  
# The file file_input_raw was rewound 20 times
      rgb_lagged_sum|  30|   1000000|     100|0.02233341|  PASSED  
# The file file_input_raw was rewound 22 times
      rgb_lagged_sum|  31|   1000000|     100|0.14403935|  PASSED  
# The file file_input_raw was rewound 23 times
      rgb_lagged_sum|  32|   1000000|     100|0.99576691|   WEAK   
# The file file_input_raw was rewound 23 times
     rgb_kstest_test|   0|     10000|    1000|0.75312176|  PASSED  
# The file file_input_raw was rewound 23 times
     dab_bytedistrib|   0|  51200000|       1|0.36826016|  PASSED  
# The file file_input_raw was rewound 23 times
             dab_dct| 256|     50000|       1|0.97086341|  PASSED  
Preparing to run test 207.  ntuple = 0
# The file file_input_raw was rewound 23 times
        dab_filltree|  32|  15000000|       1|0.94680649|  PASSED  
        dab_filltree|  32|  15000000|       1|0.43155992|  PASSED  
Preparing to run test 208.  ntuple = 0
# The file file_input_raw was rewound 23 times
       dab_filltree2|   0|   5000000|       1|0.35573687|  PASSED  
       dab_filltree2|   1|   5000000|       1|0.50852842|  PASSED  
Preparing to run test 209.  ntuple = 0
# The file file_input_raw was rewound 23 times
        dab_monobit2|  12|  65000000|       1|0.85750776|  PASSED

STM32 RNG

dd if=/dev/sde of=trng.dat status=progress
lth@ncpws04:~$ dieharder -f tmp/trng.dat -g 201 -a
#=============================================================================#
#            dieharder version 3.31.1 Copyright 2003 Robert G. Brown          #
#=============================================================================#
   rng_name    |           filename             |rands/second|
 file_input_raw|                    tmp/trng.dat|  3.36e+07  |
#=============================================================================#
        test_name   |ntup| tsamples |psamples|  p-value |Assessment
#=============================================================================#
   diehard_birthdays|   0|       100|     100|0.86716671|  PASSED  
      diehard_operm5|   0|   1000000|     100|0.00000000|  FAILED  
  diehard_rank_32x32|   0|     40000|     100|0.00000000|  FAILED  
    diehard_rank_6x8|   0|    100000|     100|0.00000000|  FAILED  
   diehard_bitstream|   0|   2097152|     100|0.00000000|  FAILED  
        diehard_opso|   0|   2097152|     100|0.00000000|  FAILED  
        diehard_oqso|   0|   2097152|     100|0.00000000|  FAILED  
         diehard_dna|   0|   2097152|     100|0.00000000|  FAILED  
diehard_count_1s_str|   0|    256000|     100|0.00000000|  FAILED  
diehard_count_1s_byt|   0|    256000|     100|0.00000000|  FAILED  
 diehard_parking_lot|   0|     12000|     100|0.00000000|  FAILED  
    diehard_2dsphere|   2|      8000|     100|0.00000000|  FAILED  
    diehard_3dsphere|   3|      4000|     100|0.00000000|  FAILED  
     diehard_squeeze|   0|    100000|     100|0.00000000|  FAILED  
        diehard_sums|   0|       100|     100|0.00000000|  FAILED  
        diehard_runs|   0|    100000|     100|0.00000000|  FAILED  
        diehard_runs|   0|    100000|     100|0.00000000|  FAILED  
       diehard_craps|   0|    200000|     100|0.00000000|  FAILED  
       diehard_craps|   0|    200000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
 marsaglia_tsang_gcd|   0|  10000000|     100|0.00000000|  FAILED  
 marsaglia_tsang_gcd|   0|  10000000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         sts_monobit|   1|    100000|     100|0.15917403|  PASSED  
# The file file_input_raw was rewound 1 times
            sts_runs|   2|    100000|     100|0.22657503|  PASSED  
# The file file_input_raw was rewound 1 times
          sts_serial|   1|    100000|     100|0.13110565|  PASSED  
          sts_serial|   2|    100000|     100|0.00005328|   WEAK   
          sts_serial|   3|    100000|     100|0.00000000|  FAILED  
          sts_serial|   3|    100000|     100|0.00000001|  FAILED  
          sts_serial|   4|    100000|     100|0.00000000|  FAILED  
          sts_serial|   4|    100000|     100|0.00000000|  FAILED  
          sts_serial|   5|    100000|     100|0.00000000|  FAILED  
          sts_serial|   5|    100000|     100|0.00000000|  FAILED  
          sts_serial|   6|    100000|     100|0.00000000|  FAILED  
          sts_serial|   6|    100000|     100|0.00000000|  FAILED  
          sts_serial|   7|    100000|     100|0.00000000|  FAILED  
          sts_serial|   7|    100000|     100|0.00000000|  FAILED  
          sts_serial|   8|    100000|     100|0.00000000|  FAILED  
          sts_serial|   8|    100000|     100|0.00000000|  FAILED  
          sts_serial|   9|    100000|     100|0.00000000|  FAILED  
          sts_serial|   9|    100000|     100|0.00000000|  FAILED  
          sts_serial|  10|    100000|     100|0.00000000|  FAILED  
          sts_serial|  10|    100000|     100|0.00000000|  FAILED  
          sts_serial|  11|    100000|     100|0.00000000|  FAILED  
          sts_serial|  11|    100000|     100|0.00000000|  FAILED  
          sts_serial|  12|    100000|     100|0.00000000|  FAILED  
          sts_serial|  12|    100000|     100|0.00000000|  FAILED  
          sts_serial|  13|    100000|     100|0.00000000|  FAILED  
          sts_serial|  13|    100000|     100|0.00000000|  FAILED  
          sts_serial|  14|    100000|     100|0.00000000|  FAILED  
          sts_serial|  14|    100000|     100|0.00000000|  FAILED  
          sts_serial|  15|    100000|     100|0.00000000|  FAILED  
          sts_serial|  15|    100000|     100|0.00000000|  FAILED  
          sts_serial|  16|    100000|     100|0.00000000|  FAILED  
          sts_serial|  16|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   1|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   2|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   3|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   4|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   5|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   6|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   7|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   8|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|   9|    100000|     100|0.05007678|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  10|    100000|     100|0.87310726|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  11|    100000|     100|0.72810968|  PASSED  
# The file file_input_raw was rewound 1 times
         rgb_bitdist|  12|    100000|     100|0.70564980|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   2|     10000|    1000|0.19474549|  PASSED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   3|     10000|    1000|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   4|     10000|    1000|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
rgb_minimum_distance|   5|     10000|    1000|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   2|    100000|     100|0.00000731|   WEAK   
# The file file_input_raw was rewound 1 times
    rgb_permutations|   3|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   4|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
    rgb_permutations|   5|    100000|     100|0.00000000|  FAILED  
# The file file_input_raw was rewound 1 times
      rgb_lagged_sum|   0|   1000000|     100|0.12379128|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   1|   1000000|     100|0.86631662|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   2|   1000000|     100|0.32622812|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   3|   1000000|     100|0.59479748|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   4|   1000000|     100|0.50469069|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   5|   1000000|     100|0.69129764|  PASSED  
# The file file_input_raw was rewound 2 times
      rgb_lagged_sum|   6|   1000000|     100|0.49712373|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   7|   1000000|     100|0.82077863|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   8|   1000000|     100|0.87208278|  PASSED  
# The file file_input_raw was rewound 3 times
      rgb_lagged_sum|   9|   1000000|     100|0.56197242|  PASSED  
# The file file_input_raw was rewound 4 times
      rgb_lagged_sum|  10|   1000000|     100|0.52194577|  PASSED  
# The file file_input_raw was rewound 4 times
      rgb_lagged_sum|  11|   1000000|     100|0.51799608|  PASSED  
# The file file_input_raw was rewound 5 times
      rgb_lagged_sum|  12|   1000000|     100|0.82735537|  PASSED  
# The file file_input_raw was rewound 5 times
      rgb_lagged_sum|  13|   1000000|     100|0.02839364|  PASSED  
# The file file_input_raw was rewound 6 times
      rgb_lagged_sum|  14|   1000000|     100|0.71425270|  PASSED  
# The file file_input_raw was rewound 6 times
      rgb_lagged_sum|  15|   1000000|     100|0.45663788|  PASSED  
# The file file_input_raw was rewound 7 times
      rgb_lagged_sum|  16|   1000000|     100|0.60432715|  PASSED  
# The file file_input_raw was rewound 8 times
      rgb_lagged_sum|  17|   1000000|     100|0.72445463|  PASSED  
# The file file_input_raw was rewound 8 times
      rgb_lagged_sum|  18|   1000000|     100|0.18390861|  PASSED  
# The file file_input_raw was rewound 9 times
      rgb_lagged_sum|  19|   1000000|     100|0.39048124|  PASSED  
# The file file_input_raw was rewound 10 times
      rgb_lagged_sum|  20|   1000000|     100|0.23540655|  PASSED  
# The file file_input_raw was rewound 11 times
      rgb_lagged_sum|  21|   1000000|     100|0.13098080|  PASSED  
# The file file_input_raw was rewound 12 times
      rgb_lagged_sum|  22|   1000000|     100|0.32777534|  PASSED  
# The file file_input_raw was rewound 13 times
      rgb_lagged_sum|  23|   1000000|     100|0.65321403|  PASSED  
# The file file_input_raw was rewound 14 times
      rgb_lagged_sum|  24|   1000000|     100|0.07552613|  PASSED  
# The file file_input_raw was rewound 14 times
      rgb_lagged_sum|  25|   1000000|     100|0.78582210|  PASSED  
# The file file_input_raw was rewound 15 times
      rgb_lagged_sum|  26|   1000000|     100|0.06047805|  PASSED  
# The file file_input_raw was rewound 17 times
      rgb_lagged_sum|  27|   1000000|     100|0.95027995|  PASSED  
# The file file_input_raw was rewound 18 times
      rgb_lagged_sum|  28|   1000000|     100|0.80974270|  PASSED  
# The file file_input_raw was rewound 19 times
      rgb_lagged_sum|  29|   1000000|     100|0.83321074|  PASSED  
# The file file_input_raw was rewound 20 times
      rgb_lagged_sum|  30|   1000000|     100|0.45757849|  PASSED  
# The file file_input_raw was rewound 21 times
      rgb_lagged_sum|  31|   1000000|     100|0.83015146|  PASSED  
# The file file_input_raw was rewound 22 times
      rgb_lagged_sum|  32|   1000000|     100|0.15668660|  PASSED  
# The file file_input_raw was rewound 22 times
     rgb_kstest_test|   0|     10000|    1000|0.00000000|  FAILED  
# The file file_input_raw was rewound 22 times
     dab_bytedistrib|   0|  51200000|       1|0.25593476|  PASSED  
# The file file_input_raw was rewound 22 times
             dab_dct| 256|     50000|       1|0.00000000|  FAILED  
Preparing to run test 207.  ntuple = 0
# The file file_input_raw was rewound 22 times
        dab_filltree|  32|  15000000|       1|0.00000000|  FAILED  
        dab_filltree|  32|  15000000|       1|0.00000000|  FAILED  
Preparing to run test 208.  ntuple = 0
# The file file_input_raw was rewound 22 times
       dab_filltree2|   0|   5000000|       1|0.00000000|  FAILED  
       dab_filltree2|   1|   5000000|       1|0.00000000|  FAILED  
Preparing to run test 209.  ntuple = 0
# The file file_input_raw was rewound 22 times
        dab_monobit2|  12|  65000000|       1|1.00000000|  FAILED

Oops - more investigation is necessary.

Miscellaneous Links