Tuesday, 22 May 2012
  DiceLock improves symmetric ciphers like AES (Advanced Encryption Standard) and others.
  Providing maximum information security privacy with little time.
Sha 512

DiceLock cipher incorporates Sha 512 hash algorithm to implement one optional DiceLock's architecture.

As performance execution is an important issue to encryption we need to know time performance relation between Sha 512 hash algorithm and 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

Summary

with Rapid Miner:

time = 0.000003370993112137 + 0.000000024889809352 * length, Coefficient = 0.996636996292450300

The Coefficient value indicates how well the model fits the data, it's close to 1.0, indicating that we have accounted for almost all of the variability of time (0.996636996292450300) with bit stream length variable.

with Excel:

time = 0,000003370993112171 + 0,000000024889809352 * length, Multiple R = 0,996636996292458

Which confirms RapidMiner results with a negligible variation.

With these results we'll be able to establish hash function relations with cipher, decipher algorithms and random number test algorithms (all components of DiceLock).

Data calculation

We compute "time" in seconds depending of the length of the stream being hashed.

Computing "time" comprises the stages:
- initializing hash object,
- add stream to compute hash, and
- finalize hash computation.

In order to establish the relation between stream length in bits with execution time in seconds we have performed the following execution:

- 32.219 streams with lengths from 1.024 bits to 1.000.000 bits, each stream 32 bits longer than the previous one,
- computed hash execution time for each stream with CounterTime class,
- saving to "Sha512.csv" file the information: stream length in bits and hash time in seconds for all 32.219 tests performed,
- finally, compute hash of "abc" stream as per NIST FIPS 180-2 (Secure Hash Standard). We can see that expected hash value and computed hash value 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 "abc" stream hash is computed. Expected hash value and computed hash value match.

Sha512.csv created file with stream length in bits and execution time in seconds

RapidMiner plot

With Sha512.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). Although the majority of points are over a line, some points are outliers (they are above the line). We can think about these outliers as system interruptions.

It's obvious that execution time has a clear relationship with stream length and that linear regression can be obtained.

With this information we are able to establish a relationship between "time" and stream "length". A linear regression equation can be established to get a final relationship between hash algorithm and cipher algorithms.

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.000003370993112137 + 0.000000024889809352 * length

intercept = 0.000003370993112137,

and the slope = 0.000000024889809352,

with a Standard Coefficient of:

Coefficient = 0.996636996292450300

The Coefficient value indicates how well the model fits the data, it's close to 1.0, indicating that we have accounted for almost all of the variability of time (0.996636996292450300) with stream length variable.

Excel linear regression analysis

Microsoft Excel provides for data analysis. We perform the same Linear Regression of the same Sha512.csv file in order to check that we get the same results.

Linear regression

In Excel we analyze all 32.219 "time" and stream "length" data samples with Regression and we get the linear regression and ANOVA:

That is:

time = 0,000003370993112171 + 0,000000024889809352 * length

intercept = 0,000003370993112171, (Excel result)

intercept = 0.000003370993112137, (RapidMiner result, negligible difference)

slope = 0,000000024889809352, (Excel result)

slope = 0.000000024889809352 (equals RapidMiner result)

And the important statistical information

Multiple R = 0,996636996292458

R Square = 0,993285302378853

Adjusted R Square = 0,993285087281387

Standard Error = 0,000590187558343596

The Coefficient is close to 1.0, indicating that we have accounted for almost all of the variability of time (0,996636996292458) with stream length variable.

coefficient = 0,996636996292458, (Excel result)

coefficient = 0.996636996292450300, (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 adjust quite well to real values.

The linear regression formula can be used to estimate time relationships between Sha 512 hash algorithm with cipher algorithms.

Relevant C++ Source Code used

baseCryptoRandomStream.h
baseCryptoRandomStream.cpp (1)
baseCryptoRandomStream.cpp (2)
defaultCryptoRandomStream.h
defaultCryptoRandomStream.cpp
baseHash.h
baseHash.cpp
sha512.h
sha512.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 !!!