I have an algorithm that encrypts large text. I want to test this algorithm on statistical tests. The ciphertext contains ~10,000,000
bits. I decided to test the algorithm in two different ways, I took the ciphertext and passed it to the input of statistical tests:
- The first parameters were as follows:
/assess 1000000
andHow many bitstreams? 10
- The second parameters were as follows:
/assess 100000
andHow maney bitstreams? 100
In firt scenario i got following results:
------------------------------------------------------------------------------
RESULTS FOR THE UNIFORMITY OF P-VALUES AND THE PROPORTION OF PASSING SEQUENCES
------------------------------------------------------------------------------
generator is <data/encode.txt>
------------------------------------------------------------------------------
C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 P-VALUE PROPORTION STATISTICAL TEST
------------------------------------------------------------------------------
0 1 1 1 0 2 2 2 0 1 0.739918 10/10 Frequency
0 1 1 0 0 2 2 3 0 1 0.350485 10/10 BlockFrequency
0 1 1 0 1 1 1 1 2 2 0.911413 10/10 CumulativeSums
0 1 0 1 1 4 1 1 1 0 0.213309 10/10 CumulativeSums
1 1 0 0 0 1 2 1 3 1 0.534146 10/10 Runs
2 0 1 1 1 0 2 1 1 1 0.911413 10/10 LongestRun
1 2 1 1 0 1 0 0 2 2 0.739918 10/10 Rank
1 4 0 0 1 0 2 1 0 1 0.122325 10/10 FFT
1 1 0 2 0 0 1 3 0 2 0.350485 10/10 NonOverlappingTemplate
2 0 1 0 2 1 1 1 0 2 0.739918 9/10 NonOverlappingTemplate
a lot of passed tests...
1 0 0 2 2 1 2 1 1 0 0.739918 10/10 NonOverlappingTemplate
0 0 1 0 7 1 0 0 1 0 0.000003 * 10/10 NonOverlappingTemplate
1 4 1 0 1 2 1 0 0 0 0.122325 10/10 NonOverlappingTemplate
a lot of passed tests...
0 0 0 3 0 0 3 1 1 2 0.122325 10/10 NonOverlappingTemplate
0 1 3 0 0 2 1 1 1 1 0.534146 10/10 OverlappingTemplate
1 0 0 3 2 1 1 0 1 1 0.534146 9/10 Universal
0 0 1 2 2 3 0 0 1 1 0.350485 10/10 ApproximateEntropy
1 0 0 0 1 1 2 1 1 1 ---- 8/8 RandomExcursions
0 1 1 1 0 1 1 1 2 0 ---- 8/8 RandomExcursions
1 0 1 1 0 2 1 1 0 1 ---- 7/8 RandomExcursions
0 1 2 1 2 1 1 0 0 0 ---- 8/8 RandomExcursions
0 3 0 0 0 1 1 0 1 2 ---- 8/8 RandomExcursions
0 2 0 0 0 0 1 1 2 2 ---- 8/8 RandomExcursions
0 0 1 2 3 0 1 0 0 1 ---- 8/8 RandomExcursions
1 1 1 0 1 1 1 1 1 0 ---- 8/8 RandomExcursions
2 0 0 3 0 0 0 0 1 2 ---- 8/8 RandomExcursionsVariant
2 1 1 0 1 0 0 1 1 1 ---- 8/8 RandomExcursionsVariant
0 1 3 0 0 1 0 2 1 0 ---- 8/8 RandomExcursionsVariant
0 1 1 1 0 3 1 0 0 1 ---- 8/8 RandomExcursionsVariant
0 0 0 4 2 1 1 0 0 0 ---- 8/8 RandomExcursionsVariant
0 2 0 1 1 1 0 3 0 0 ---- 8/8 RandomExcursionsVariant
1 0 2 0 0 0 0 0 1 4 ---- 8/8 RandomExcursionsVariant
0 1 0 2 2 0 1 0 0 2 ---- 8/8 RandomExcursionsVariant
1 0 2 0 1 0 1 1 0 2 ---- 8/8 RandomExcursionsVariant
2 0 1 1 0 1 0 0 1 2 ---- 8/8 RandomExcursionsVariant
0 2 1 2 0 1 2 0 0 0 ---- 8/8 RandomExcursionsVariant
1 0 2 2 1 1 1 0 0 0 ---- 8/8 RandomExcursionsVariant
0 2 3 1 0 0 0 0 1 1 ---- 8/8 RandomExcursionsVariant
0 1 3 1 1 0 0 1 1 0 ---- 8/8 RandomExcursionsVariant
0 3 1 0 0 2 0 0 0 2 ---- 8/8 RandomExcursionsVariant
1 2 0 1 0 0 0 1 2 1 ---- 8/8 RandomExcursionsVariant
2 1 0 0 1 1 1 0 2 0 ---- 8/8 RandomExcursionsVariant
2 1 0 1 0 0 1 2 1 0 ---- 7/8 RandomExcursionsVariant
1 1 0 0 2 3 0 1 1 1 0.534146 10/10 Serial
0 1 0 1 4 1 0 2 1 0 0.122325 10/10 Serial
2 0 1 1 0 2 1 0 2 1 0.739918 10/10 LinearComplexity
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The minimum pass rate for each statistical test with the exception of the
random excursion (variant) test is approximately = 8 for a
sample size = 10 binary sequences.
The minimum pass rate for the random excursion (variant) test
is approximately = 7 for a sample size = 8 binary sequences.
For further guidelines construct a probability table using the MAPLE program
provided in the addendum section of the documentation.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
In the second scenario i got following results:
------------------------------------------------------------------------------
RESULTS FOR THE UNIFORMITY OF P-VALUES AND THE PROPORTION OF PASSING SEQUENCES
------------------------------------------------------------------------------
generator is <data/encode.txt>
------------------------------------------------------------------------------
C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 P-VALUE PROPORTION STATISTICAL TEST
------------------------------------------------------------------------------
9 11 9 10 8 7 11 10 11 14 0.946308 100/100 Frequency
10 8 10 10 11 10 15 10 8 8 0.924076 100/100 BlockFrequency
9 9 9 7 8 13 11 15 8 11 0.779188 100/100 CumulativeSums
6 12 7 12 11 12 9 11 8 12 0.851383 100/100 CumulativeSums
8 11 15 8 6 15 10 4 8 15 0.122325 100/100 Runs
9 10 14 14 11 11 4 7 9 11 0.514124 99/100 LongestRun
9 13 12 9 13 9 8 11 12 4 0.637119 100/100 Rank
14 6 11 10 6 8 8 13 10 14 0.514124 100/100 FFT
9 7 12 11 13 8 9 11 12 8 0.924076 99/100 NonOverlappingTemplate
a lot of passed tests...
8 16 16 3 10 9 12 11 6 9 0.096578 99/100 NonOverlappingTemplate
6 12 6 11 12 11 7 11 14 10 0.657933 98/100 OverlappingTemplate
100 0 0 0 0 0 0 0 0 0 0.000000 * 0/100 * Universal
8 11 7 12 10 12 9 13 12 6 0.816537 100/100 ApproximateEntropy
1 0 0 0 2 1 1 2 2 3 0.350485 12/12 RandomExcursions
0 1 1 2 1 0 2 1 2 2 0.739918 12/12 RandomExcursions
1 0 0 2 2 0 1 2 1 3 0.350485 12/12 RandomExcursions
0 3 1 1 1 1 1 1 0 3 0.350485 12/12 RandomExcursions
2 1 1 2 0 0 2 1 2 1 0.739918 11/12 RandomExcursions
2 0 0 2 2 2 0 1 1 2 0.534146 12/12 RandomExcursions
3 3 0 1 1 2 1 1 0 0 0.213309 12/12 RandomExcursions
3 1 0 2 2 1 0 3 0 0 0.122325 11/12 RandomExcursions
2 0 0 1 0 2 2 1 2 2 0.534146 12/12 RandomExcursionsVariant
2 0 1 0 1 0 3 2 1 2 0.350485 12/12 RandomExcursionsVariant
2 1 0 1 2 0 4 0 1 1 0.122325 12/12 RandomExcursionsVariant
2 0 2 0 2 1 1 3 0 1 0.350485 12/12 RandomExcursionsVariant
1 1 1 0 1 3 0 0 0 5 0.004301 12/12 RandomExcursionsVariant
0 1 2 1 0 2 1 1 1 3 0.534146 12/12 RandomExcursionsVariant
0 0 1 2 1 0 3 3 1 1 0.213309 12/12 RandomExcursionsVariant
0 0 1 0 2 3 1 2 0 3 0.122325 12/12 RandomExcursionsVariant
0 1 0 1 3 2 1 4 0 0 0.035174 12/12 RandomExcursionsVariant
1 2 1 2 2 1 0 1 2 0 0.739918 11/12 RandomExcursionsVariant
2 3 0 1 2 1 2 0 0 1 0.350485 11/12 RandomExcursionsVariant
3 2 0 1 0 1 1 1 2 1 0.534146 11/12 RandomExcursionsVariant
3 2 1 1 0 2 0 0 2 1 0.350485 12/12 RandomExcursionsVariant
2 3 1 0 1 0 3 1 0 1 0.213309 12/12 RandomExcursionsVariant
1 1 3 0 1 1 4 0 0 1 0.066882 12/12 RandomExcursionsVariant
1 0 3 1 1 3 0 0 1 2 0.213309 12/12 RandomExcursionsVariant
1 0 3 0 1 3 2 1 0 1 0.213309 12/12 RandomExcursionsVariant
1 2 0 1 1 2 3 0 2 0 0.350485 12/12 RandomExcursionsVariant
11 10 14 11 9 9 8 12 9 7 0.924076 100/100 Serial
15 5 11 8 9 12 6 14 13 7 0.275709 100/100 Serial
12 11 5 10 12 11 5 13 7 14 0.401199 98/100 LinearComplexity
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The minimum pass rate for each statistical test with the exception of the
random excursion (variant) test is approximately = 96 for a
sample size = 100 binary sequences.
The minimum pass rate for the random excursion (variant) test
is approximately = 10 for a sample size = 12 binary sequences.
For further guidelines construct a probability table using the MAPLE program
provided in the addendum section of the documentation.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
How could it happen that when testing the same text, the algorithm failed two different tests? In the first case algorithm failed some NonOverlappingTemplate. In the second case algorithm passed all of the NonOverlappingTemplates, but failed Universal test.
Thank for yout help!