DiceLock Security - DiceLock Research - Time Analysis - Discrete Fourier Transform Test
Tuesday, 22 May 2012
  DiceLock improves symmetric ciphers like AES (Advanced Encryption Standard) and others.
  Providing maximum information security privacy with little time.
Discrete Fourier Transform Test

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

As performance execution is an important issue to encryption we need to know time performance relation between Discrete Fourier Transform random number test and the symmetric key ciphers implemented in DiceLock.

In this page we show the test performed to get bit stream length and execution time relation. We all know that real execution performance in computers is altered through system interruptions and third party software.

For this analysis we've stopped any third party software like antivirus or software updaters and disconnected the computer from Internet.

At the end of this page you can find the evaluated relevant DiceLock cipher C++ source code used.

Shortcuts
Execution output
Plot with RapidMiner
Linear regression with RapidMiner
Linear regression with Excel
Line fit plot with Excel
Relevant C++ Source Code used
Execution environment

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:
- initializing random number test,
- setting alpha value to 0.01 (99% conffidence), and
- execute random number test.

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.

Execution output:

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.

Plot with RapidMiner

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

Linear regression

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:

time = - 0.769393893506044000 + 0.000015673062787996 * length

intercept = - 0.769393893506044000,

and the slope = 0.000015673062787996,

with a Standard Coefficient of:

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 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.

Linear regression

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:

time = - 0,769393893506049 + 0,000015673062787997 * length

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

Multiple R = 0,37951138141032

R Square = 0,144028888619969

Adjusted R Square = 0,143943282948264

Standard Error = 3,53024488430859

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.

Relevant C++ Source Code used

baseCryptoRandomStream.h
baseCryptoRandomStream.cpp (1)
baseCryptoRandomStream.cpp (2)
defaultCryptoRandomStream.h
defaultCryptoRandomStream.cpp
baseRandomTest.h
baseRandomTest.cpp
mathematicalFunctions.h
mathematicalFunctions.cpp
discreteFourierTransformTest.h
discreteFourierTransformTest (1).cpp
discreteFourierTransformTest (2).cpp
counterTime.h
counterTime.cpp

Execution environment:

Hardware:
Dell Precision M65
Intel Core 2 CPU T7200 @ 2.00GHz 2.00 GHZ
2,00 GB RAM

Software:
Windows Vista Ultimate Service Pack 2
32 bits Operating System

Developed with:
Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM
Microsoft .NET Framework Version 3.5 SP1
Installed Edition: Professional Microsoft Visual C++ 2008 91605-130-0262317-60659
DiceLock release version: Optimization: Maximize Speed (/O2), Favor Fast Code (/Ot)

 
Cart
Your Cart is currently empty.

ECB Converter
Customer Login

Newsletter Subscription

Subscribe to our Newsletter. If you want to know the purpose of our Newsletter, click here !!!