#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    51
    Rep Power
    55

    Zx8 Stream Cipher: Bit Statistic Test Results


    Below some results running several bit statistic tests on zx8 (ps).

    These including tests for bias, a bit analysis testing for 1/0 ratio and
    deviance from unity, the ENT test and finally Maurer's Universal
    Statistical Test.


    Here now some example results:

    Code:
    ****************************************************
    * SUMMARY OF TEST RESULTS (Bit Statistics Test)    *
    ****************************************************
    Balanced       = 0
    Chi Square     = 0
    Bit            = 1 (likely non-uniform)
    Bit            = 0 (almost certainly non-uniform)
    Overall        = 0 (likely non-uniform)
    Overall        = 5 (might be non-uniform)
    SIGMA          = 0
    
    ---------------------------------------------------
    Start time   : Fr Okt 19 16:40:18 GMT 2012
    Finished time: Fr Okt 19 16:45:13 GMT 2012
    
    ====================================================
    
    Test Parameters
    
     ./zx8_bitstat_TestSeries.sh 100 25 256 65432912
    
     Bit values
     2**25 bit file size
     256 bit key
     
     PRNG Start Parameters
     Seed = 65432912
     
    ---------------------------------------------------
    Tests in Total      = 100
    Tests passed        = 94
    Tests not passed    = 6
    
    
    ####################################################
    
    Test No.: 1
    ----------------------------------------------------
    stdin contains 4194304 bytes (33554432 bits)
    
             BIT ANALYSIS
    
    Value     Count    Percentage
    -----     -----    ----------
      one  16777356     50.000416
     zero  16777076     49.999584
    
      Bit     Count    Percentage
      ---     -----    ----------
    msb 7   2095831     49.968506
        6   2096704     49.989319
        5   2097777     50.014900
        4   2097656     50.012016
        3   2097546     50.009392
        2   2096672     49.988556
        1   2098375     50.029160
    lsb 0   2096795     49.991489
    
    1/0 ratio            1.000017
    Deviance from unity  0.000017
    
    
    ####################################################
    
    ENT
    
    Test No.: 1
    ----------------------------------------------------
    Entropy = 7.999960 bits per byte.
    
    Optimum compression would reduce the size
    of this 4194304 byte file by 0 percent.
    
    Chi square distribution for 4194304 samples is 234.65, and randomly
    would exceed this value 81.50 percent of the times.
    
    Arithmetic mean value of data bytes is 127.5153 (127.5 = random).
    Monte Carlo value for Pi is 3.140118733 (error 0.05 percent).
    Serial correlation coefficient is 0.000256 (totally uncorrelated = 0.0).
    
    
    ####################################################
    
    Maurer Test
    
    Test No.: 1
    ----------------------------------------------------
    L=8 256 258560 -- Expected value for L=8 is 7.1836656
    7.1778 *********************************************************
    7.1837 *********************************************************
    7.1840 *********************************************************
    7.1810 *********************************************************
    7.1855 *********************************************************
    7.1882 **********************************************************
    7.1827 *********************************************************
    7.1839 *********************************************************
    7.1875 *********************************************************
    7.1856 *********************************************************
    7.1838 *********************************************************
    7.1864 *********************************************************
    7.1805 *********************************************************
    7.1830 *********************************************************
    7.1849 *********************************************************
    7.1796 *********************************************************
    EOF; read 95745 blocks.
    7.1799 *********************************************************
    
    
    ####################################################
    The source code for running these tests and some test results can be downloaded here
    http://www.freecx.co.uk/zx8/bitstat/
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    51
    Rep Power
    55
    Just additionally for the records some test results from files with 2**27 byte (128MB) using George Marsaglia DIEHARD can be found here

    http://www.freecx.co.uk/zx8/diehard/

    and some test results from files with 2**27 byte (128MB) using TestU01 (Rabbit, AlphaBit, BlockAlphabit) can be found here

    http://www.freecx.co.uk/zx8/TestU01/

IMN logo majestic logo threadwatch logo seochat tools logo