DiceLockIVDigestedOMCheck is a Linux C++ program to verify that DiceLockIVDigested class implementing one of DiceLock different architectures is working as expected.
DiceLockIVDigested class is the class that implements DiceLock architecture with the following characteristics:
– base encryption cipher/decipher is any symmetric cipher (stream cipher or block cipher operation mode) working with symmetric key, and initialization vector (IV) are needed,
– any hash digest algorithm is used to generate message hash digest from plaintext to be encrypted,
– ciphertext plus ciphered hash digest of plaintext is checked for random number test properties,
– any function that is able to change original symmetric key with new values,
– bit random number tests that can verify that encrypted ciphertext is at random.
Current algorithm classes that can be used with DiceLockIVDigested architecture are:
– as base encryption cipher/decipher:

– hash digest algorithms: Sha 1, Sha 224, Sha 256, Sha 384, Sha 512, Ripemd 128, Ripemd 160, Ripemd 256, Ripemd 320, Md 2, Md 4 and Md5,
– symmetric key changers: IncreaseKeyModifier_6_0_0_1 and DecreaseKeyModifier_6_0_0_1,
– random number tests: Frequency, Block Frequency, Cumulative Sum Forward, Cumulative Sum Reverse, Runs, Longest Run Of Ones, Rank, Universal, Approximate Entropy, Serial, Discrete Fourier Transform tests and random number test Suite with any or all previous enumerated random number tests.
Because of so many alternative encryption/decryption engines can be used, we have split DiceLockIVDigested class tests in two main C++ program tests:
– DiceLockIVDigestedNoOMCheck C++ Source Code program making use of stream ciphers, and
– DiceLockIVDigestedOMCheck C++ Source Code program making use of block cipher operation modes with multiple block ciphers.
In this test we verify DiceLockIVDigestedOMCheck C++ Source Code program making use of block ciphers and block cipher operation modes with the configuration shown below.
In this test we have selected this DiceLock configuration:
DiceLock class: DiceLockIVDigested
Encryption block cipher operation mode: CBC Cipher Block Chaining operation mode
Encryption block cipher: AES 128 block cipher
Hash algorithm: Sha 384 hash digest algorithm
Random number test: Frequency
Random number test: Block Frequency
Random number test: Cumulative Sum Forward
Random number test: Longest Run of Ones
Random number test: Runs
All random number test significance level: Alpha = 0.001 (confidence level of 99.9 %)
Symmetric key modifier class: DecreaseKeyModifier_6_0_0_1 key modifier
Bit stream class: DefaultCryptoRandomStream bit data stream
DefaultCryptoRandomStream class makes use of default virtual memory where the system can move pages of physical memory to and from swap file on disk (manipulation of physical memory by the system is completely transparent to applications).
With CBC operation mode all three implemented crypto pad systems (ANSI X.923, ISO/IEC 97971 and PKCS7) are used. They are selected on a random basis and such election is logged only when a recipher is performed over the text being randomizedencrypted.
At post bottom there are C++ Source Code links to all DiceLock cipher files being used to perform this configuration test.
Execution call has been:
– sh ./DiceLockIVDigestedOMCheck.sh 00310 DiceLockx8001DiceLockIVDigestedCBCModeAES128Sha384FrequencyBlockFrequencyCuSumForwardLongestRunOfOnesRunsDecrKeyDefaultmemory.log
In the following post you can find DiceLockIVDigestedOMCheck C++ source code that has been executed where you can see how DiceLockIVDigested class can work with all different options:
– DiceLockIVDigestedOMCheck C++ Source Code program
And the result we’ve gotten is:
Verified:

DiceLockx8001DiceLockIVDigestedCBCModeAES128Sha384FrequencyBlockFrequencyCuSumForwardLongestRunOfOnesRunsDecrKeyDefaultmemory.log
Number of streams tested: 62500
From length of shorter stream tested in bits: 8
Up to length of larger stream tested in bits: 500000
Number of correct streams deciphered: 62500
Number of incorrect streams deciphered: 0
Incorrect deciphered streams = 0 ==> OK
Total encrypted streams reciphered at least once: 235
Maximum number of reciphers performed over one stream being reciphered: 2
File with reciphered stream data:
DiceLockx8001DiceLockIVDigestedCBCModeAES128Sha384FrequencyBlockFrequencyCuSumForwardLongestRunOfOnesRunsDecrKeyDefaultmemory.log.reciphered
Original output log file from DiceLockIVDigestedOMCheck execution:
DiceLockx8001DiceLockIVDigestedCBCModeAES128Sha384FrequencyBlockFrequencyCuSumForwardLongestRunOfOnesRunsDecrKeyDefaultmemory.log
From log file we can see that all randomizedencrypted text sequences have been correctly deciphered.
While DiceLockIVDigestedOMCheck was executed a log file of reciphered (plaintext sequences being ciphered more than one time in order to get sequences at random) text sequences has been stored.
DiceLockIVDigestedOMCheck reciphers log file using CBC operation mode is composed of rows, and each row shows hexadecimal value for each byte of symmetric key, initialization vector and plaintext, plaintext length in bits, crypto pad system (as numbered enumeration) used and number of reciphers executed with such plaintext and symmetric key.
Reciphers log file:
DiceLockx8001DiceLockIVDigestedCBCModeAES128Sha384FrequencyBlockFrequencyCuSumForwardLongestRunOfOnesRunsDecrKeyDefaultmemory.log.reciphered
This output file will allow us to extract statistical information and to verify DiceLock cipher architecture execution between different operating system environments.
List of C++ source code file links upon which DiceLockIVDigested class with this selection relies on:
– DiceLockx 8.0.0.1 for Linux
– DiceLockCipher.h
– cryptoRandomStreams.h
– baseCryptoRandomStream.h
– baseCryptoRandomStream.cpp
– defaultCryptoRandomStream.h
– defaultCryptoRandomStream.cpp
– diceLocks.h
– DiceLock.h
– DiceLock.cpp
– DiceLockIV.h
– DiceLockIV.cpp
– DiceLockIVDigested.h
– DiceLockIVDigested.cpp
– symmetricCiphers.h
– baseSymmetricCipher.h
– baseSymmetricCipher.cpp
– symmetricStreamers.h
– symmetricStreamerSpecialTypes.h
– baseSymmetricStreamer.h
– baseSymmetricStreamer.cpp
– blockCipherOperationModes.h
– baseBlockCipherOperationMode_with_IV.h
– baseBlockCipherOperationMode_with_IV.cpp
– CBC_Mode.h
– CBC_Mode.cpp
– cryptoPads.h
– baseCryptoPad.h
– baseCryptoPad.cpp
– ANSI_X_923.h
– ANSI_X_923.cpp
– ISO_IEC_9797_1.h
– ISO_IEC_9797_1.cpp
– PKCS7.h
– PKCS7.cpp
– blockCiphers.h
– baseBlockCipher.h
– baseBlockCipher.cpp
– baseAES.h
– baseAES.cpp
– AES128.h
– AES128.cpp
– hashes.h
– baseHash.h
– baseHash.cpp
– sha512.h
– sha512.cpp
– sha384.h
– sha384.cpp
– baseKeyModifier.h
– baseKeyModifier.cpp
– decreaseKeyModifier_6_0_0_1.h
– decreaseKeyModifier_6_0_0_1.cpp
– randomTests.h
– randomTestErrors.h
– baseRandomTest.h
– baseRandomTest.cpp
– mathematicalErrors.h
– mathematicalFunctions.h
– mathematicalFunctions.cpp
– frequencyTest.h
– frequencyTest.cpp
– blockFrequencyTest.h
– blockFrequencyTest.cpp
– cumulativeSumForwardTest.h
– cumulativeSumForwardTest.cpp
– longestRunOfOnesTest.h
– longestRunOfOnesTest.cpp
– runsTest.h
– runsTest.cpp
– randomTestSuite.h
– randomTestSuite.cpp
So, DiceLock cipher test and analysis can go on …
DiceLock is a trademark or registered trademark of his owner where applies. DiceLock research is the research to implement Selfcorrector randomisationencryption and method, european patent EP1182777 granted 08/21/2003 and US patent US7508945 granted 03/24/2009.
Leave a Reply
You must be logged in to post a comment.