| Discrete Fourier Transform Test |
During the program execution we saw that to get the same number of data than the other test, the program had to be running for a long time. As our approach is to get som indication between bit stream length and timer execution, some reduction had to be performed. The analysis of Discrete Fourier Transform random number test has been performed with 10.001 streams, from length going between 1.024 bits and 321.024 bits. With the test done we can see that the bigger execution time of Discrete Fourier Transform random number test took 25,6207322439025 seconds corresponding to the stream of length 320.288 bits. Just with this data we can assume that the use of Discrete Fourier Transform random number test in DiceLock will degrade DiceLock performance. Summary with Rapid Miner: time = - 0.769393893506044000 + 0.000015673062787996 * length, Coefficient = 0.379511381410323030 The Coefficient value indicates how well the model fits the data, it's closer to 0.0 than to 1.0, indicating that we have NOT accounted for almost all of the variability of time (0.379511381410323030) with bit stream length variable. with Excel: time = - 0,769393893506049 + 0,000015673062787997 * length, Multiple R = 0,37951138141032 Which confirms RapidMiner results with a negligible variation. With these results we'll be able to establish random number test algorithm relations with cipher, decipher algorithms and hash functions (all components of DiceLock). Data calculation We compute "time" in seconds depending of the length of the stream being checked for randomness. Computing "time" comprises the stages: In order to establish the relation between stream length in bits with execution time in seconds we have performed the following execution: - 10.001 streams with lengths from 1.024 bits to 321.024 bits, each stream 32 bits longer than the previous one,- computed random test execution time for each stream with CounterTime class, - saving to "DiscreteFourierTransformTest.csv" file the information: stream length in bits, random test time in seconds for all 10.001 tests performed, - finally, compute random number test with NIST FIPS 800-22 rev1a test file "data.e" with alpha set to 0.01. We can see that expected pvalue and computed pvalue match. We can see the last plain streams computed, the length of each bit stream and the time in seconds it took. At the end alpha is set to 0.01 and NIST "Data.e" is being tested and p-value evaluated. DiscreteFourierTransformTest.csv created file with stream length in bits and execution time in seconds RapidMiner plot With DiscreteFourierTransformTest.csv we can analyze if it's possible to establish some strong relationship between stream length and execution time in seconds. We've worked with RapidMiner software to see if we can extract some conclusion. The next step performed has been to plot just "time" (Y axis) against stream "length" (X axis). We can see that some relation can be established between "time" and "length", but the relation is not a fixed one, there exist patterns that must be analyzed with more detail. It's obvious that there exist relationships between length and execution time, but a unique and clear linear regression can NOT be obtained. LINEAR REGRESSION RapidMiner software allows to get models on data and establish relationaships between them. We have taken a two ways approach, establish the linear regression with RapidMiner and verify such linear regression with Microsoft Excel. RapidMiner linear regression analysis With the data regarding "time" and stream "length" we have perfomed the linear regression of "time" depending on stream "length". The result obtained is the following one: That is:
intercept = - 0.769393893506044000, and the slope = 0.000015673062787996, with a Standard Coefficient of:
The Coefficient value indicates how well the model fits the data, it's closer to 0.0 than to 1.0, indicating that we have NOT accounted for almost all of the variability of time (0.379511381410323030) with stream length variable. Excel linear regression analysis Microsoft Excel provides for data analysis. We perform the same Linear Regression of the same DiscreteFourierTransformTest.csv file in order to check that we get the same results. In Excel we analyze all 10.001 "time" and stream "length" data samples with Regression and we get the linear regression and ANOVA: That is:
intercept = - 0,769393893506049, (Excel result) intercept = - 0,769393893506044000, (RapidMiner result, negligible difference) slope = 0,000015673062787997, (Excel result) slope = 0,000015673062787996 (equals RapidMiner result) And the important statistical information
The Coefficient is closer to than to 1.0, indicating that we have NOT accounted for almost all of the variability of time (0,37951138141032) with stream length variable. coefficient = 0,37951138141032, (Excel result) coefficient = 0.379511381410323030, (RapidMiner result, negligible difference) Fit plot The fit plot of calculated "estimated values" with the linear regression formula (pink line) and the sample data (blue points) shows us that the linear regression formula doesn't adjust to real values. baseCryptoRandomStream.h Hardware: Software: Developed with: |


DiceLock cipher incorporates Discrete Fourier Transform random number test to produce randomized-encrypted sequences.