Home Forums TrueRNG Hardware random number generator TrueRNG Math Discussion TrueRNG Fails Dieharder rgb_lagged_sum Tests

This topic contains 2 replies, has 2 voices, and was last updated by  euler357 2 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1171

    N8KH
    Member

    Test still running after a week, but TrueRNG has failed the rgb_lagged_sum tests.

    $ date ; cat /dev/TrueRNG0 | dieharder -a -g 200 ; date
    Fri Feb 13 14:16:57 EST 2015
    #=============================================================================#
    #            dieharder version 3.31.1 Copyright 2003 Robert G. Brown          #
    #=============================================================================#
       rng_name    |rands/second|   Seed   |
    stdin_input_raw|  1.15e+04  |3251224920|
    #=============================================================================#
            test_name   |ntup| tsamples |psamples|  p-value |Assessment
    #=============================================================================#
       diehard_birthdays|   0|       100|     100|0.76074872|  PASSED  
          diehard_operm5|   0|   1000000|     100|0.28591731|  PASSED  
      diehard_rank_32x32|   0|     40000|     100|0.53563348|  PASSED  
        diehard_rank_6x8|   0|    100000|     100|0.15287128|  PASSED  
       diehard_bitstream|   0|   2097152|     100|0.70158933|  PASSED  
            diehard_opso|   0|   2097152|     100|0.13312681|  PASSED  
            diehard_oqso|   0|   2097152|     100|0.97906310|  PASSED  
             diehard_dna|   0|   2097152|     100|0.46946021|  PASSED  
    diehard_count_1s_str|   0|    256000|     100|0.00996795|  PASSED  
    diehard_count_1s_byt|   0|    256000|     100|0.22558826|  PASSED  
     diehard_parking_lot|   0|     12000|     100|0.79360041|  PASSED  
        diehard_2dsphere|   2|      8000|     100|0.25312873|  PASSED  
        diehard_3dsphere|   3|      4000|     100|0.96037773|  PASSED  
         diehard_squeeze|   0|    100000|     100|0.24190225|  PASSED  
            diehard_sums|   0|       100|     100|0.56494472|  PASSED  
            diehard_runs|   0|    100000|     100|0.09266816|  PASSED  
            diehard_runs|   0|    100000|     100|0.93677595|  PASSED  
           diehard_craps|   0|    200000|     100|0.00711268|  PASSED  
           diehard_craps|   0|    200000|     100|0.45191242|  PASSED  
     marsaglia_tsang_gcd|   0|  10000000|     100|0.13561482|  PASSED  
     marsaglia_tsang_gcd|   0|  10000000|     100|0.79699372|  PASSED  
             sts_monobit|   1|    100000|     100|0.48182314|  PASSED  
                sts_runs|   2|    100000|     100|0.34923637|  PASSED  
              sts_serial|   1|    100000|     100|0.60690594|  PASSED  
              sts_serial|   2|    100000|     100|0.30807672|  PASSED  
              sts_serial|   3|    100000|     100|0.73461117|  PASSED  
              sts_serial|   3|    100000|     100|0.56779024|  PASSED  
              sts_serial|   4|    100000|     100|0.88613858|  PASSED  
              sts_serial|   4|    100000|     100|0.66962522|  PASSED  
              sts_serial|   5|    100000|     100|0.58514718|  PASSED  
              sts_serial|   5|    100000|     100|0.97319596|  PASSED  
              sts_serial|   6|    100000|     100|0.47255010|  PASSED  
              sts_serial|   6|    100000|     100|0.05125402|  PASSED  
              sts_serial|   7|    100000|     100|0.83400191|  PASSED  
              sts_serial|   7|    100000|     100|0.25904789|  PASSED  
              sts_serial|   8|    100000|     100|0.80074465|  PASSED  
              sts_serial|   8|    100000|     100|0.49472266|  PASSED  
              sts_serial|   9|    100000|     100|0.19176579|  PASSED  
              sts_serial|   9|    100000|     100|0.07575143|  PASSED  
              sts_serial|  10|    100000|     100|0.32331736|  PASSED  
              sts_serial|  10|    100000|     100|0.18580681|  PASSED  
              sts_serial|  11|    100000|     100|0.08933747|  PASSED  
              sts_serial|  11|    100000|     100|0.08338237|  PASSED  
              sts_serial|  12|    100000|     100|0.30159595|  PASSED  
              sts_serial|  12|    100000|     100|0.98849649|  PASSED  
              sts_serial|  13|    100000|     100|0.54447733|  PASSED  
              sts_serial|  13|    100000|     100|0.60626804|  PASSED  
              sts_serial|  14|    100000|     100|0.28052309|  PASSED  
              sts_serial|  14|    100000|     100|0.53563167|  PASSED  
              sts_serial|  15|    100000|     100|0.19318442|  PASSED  
              sts_serial|  15|    100000|     100|0.60914111|  PASSED  
              sts_serial|  16|    100000|     100|0.25893511|  PASSED  
              sts_serial|  16|    100000|     100|0.49116654|  PASSED  
             rgb_bitdist|   1|    100000|     100|0.51360212|  PASSED  
             rgb_bitdist|   2|    100000|     100|0.62570657|  PASSED  
             rgb_bitdist|   3|    100000|     100|0.33919466|  PASSED  
             rgb_bitdist|   4|    100000|     100|0.90355930|  PASSED  
             rgb_bitdist|   5|    100000|     100|0.21064611|  PASSED  
             rgb_bitdist|   6|    100000|     100|0.26278813|  PASSED  
             rgb_bitdist|   7|    100000|     100|0.88270172|  PASSED  
             rgb_bitdist|   8|    100000|     100|0.53802833|  PASSED  
             rgb_bitdist|   9|    100000|     100|0.82465825|  PASSED  
             rgb_bitdist|  10|    100000|     100|0.36147111|  PASSED  
             rgb_bitdist|  11|    100000|     100|0.89496392|  PASSED  
             rgb_bitdist|  12|    100000|     100|0.37583485|  PASSED  
    rgb_minimum_distance|   2|     10000|    1000|0.99378953|  PASSED  
    rgb_minimum_distance|   3|     10000|    1000|0.49468831|  PASSED  
    rgb_minimum_distance|   4|     10000|    1000|0.03447174|  PASSED  
    rgb_minimum_distance|   5|     10000|    1000|0.43775903|  PASSED  
        rgb_permutations|   2|    100000|     100|0.31362089|  PASSED  
        rgb_permutations|   3|    100000|     100|0.45250910|  PASSED  
        rgb_permutations|   4|    100000|     100|0.49810790|  PASSED  
        rgb_permutations|   5|    100000|     100|0.35657033|  PASSED  
          rgb_lagged_sum|   0|   1000000|     100|0.04893067|  PASSED  
          rgb_lagged_sum|   1|   1000000|     100|0.00057796|   WEAK   
          rgb_lagged_sum|   2|   1000000|     100|0.00390002|   WEAK   
          rgb_lagged_sum|   3|   1000000|     100|0.00049385|   WEAK   
          rgb_lagged_sum|   4|   1000000|     100|0.00032149|   WEAK   
          rgb_lagged_sum|   5|   1000000|     100|0.00486740|   WEAK   
    
    #1172

    N8KH
    Member
    
          rgb_lagged_sum|   6|   1000000|     100|0.09301798|  PASSED  
          rgb_lagged_sum|   7|   1000000|     100|0.00011486|   WEAK   
    
    #1173

    euler357
    Member

    This is a lot faster if you capture 1GB (or 10GB since 1G will give a few rewinds) with dd from the TrueRNG and then run dieharder on the file. By reading from a stream, you are running each test on a different set of data.

    dd if=/dev/TrueRNG of=FILENAME bs=1k count=1M iflag=fullblock
    dieharder -a -g 201 -k 2 -s 1 -f FILENAME &> OUTPUTFILENAME

    The rgb_lagged_sums are only WEAK (not FAILED) and even an occasional FAILED due to a statistical anomaly isn’t a bad thing for a hardware random number generator.

    From the dieharder man page (http://manpages.ubuntu.com/manpages/precise/man1/dieharder.1.html)

    The null hypothesis for random number generator testing is “This
    generator is a perfect random number generator, and for any choice of
    seed produces a infinitely long, unique sequence of numbers that have
    all the expected statistical properties of random numbers, to all
    orders”. Note well that we know that this hypothesis is technically
    false for all software generators as they are periodic and do not have
    the correct entropy content for this statement to ever be true.
    However, many hardware generators fail a priori as well, as they
    contain subtle bias or correlations due to the deterministic physics
    that underlies them. Nature is often unpredictable but it is rarely
    random and the two words don’t (quite) mean the same thing!

    The TrueRNG has a non-complex (combination of multiple sample streams using XOR) whitening algorithm that may have a some slight bias due to the hardware (small analog-to-digital converter non-linearity).

    This small bias is extremely negligible for crypographic purposes but if you need a more whitened stream for scientific purposes, you can XOR the stream with a PRNG such as Mersenne Twister.

    Chris

    • This reply was modified 2 years, 9 months ago by  euler357.
    • This reply was modified 2 years, 9 months ago by  euler357.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.