April 2014
S M T W T F S
« Oct    
 12345
6789101112
13141516171819
20212223242526
27282930  

Recent Posts

DiceLock-x 8.0.0.1 for Linux, HC256 class (HC 256 stream cipher algorithm) verified with test Set 4 and PhysicalCryptoRandomStream class (memory pages kept in RAM, not swapped to file)

DiceLock-x 8.0.0.1 for Linux is the cryptographic architecture that ensures that ciphertext it’s not just encrypted but also randomized.

DiceLock cipher architecture presents two main configurations:
Dicelock Digested, and
Dicelock Indexed.

DiceLock encryption architecture improves symmetric ciphers like block cipher as Advanced Encryption Standard, Camellia, Serpent, Twofish (128, 192 and 256 bit key lengths) with different block cipher operation modes (like CBC, CFB, OFB and XTS) and stream ciphers as HC 128, HC 256, Rabbit, Salsa 20/20, Sosemanuk and others.

DiceLock (both configurations) makes use of the following random number tests: Frequency Test, Block Frequency Test, Cumulative Sum Forward Test, Cumulative Sum Reverse Test, Runs Test, Longest Run Of Ones Test, Rank Test, Universal Test, Approximate Entropy Test, Serial Test and Discrete Fourier Transform Test.

Additionally DiceLock Digested configuration makes use currently of following hash digest algorithms: Sha 1, Sha 224, Sha 256, Sha 384, Sha 512, Ripemd 128, Ripemd 160, Ripemd 256, Ripemd 320, Md2, Md4 and Md5.

Previous version DiceLock-x 7.0.0.1 for Linux incorporated XTS-AES (XEX-based tweaked-codebook mode with ciphertext stealing XTS block cipher operation mode algorithm) for Advanced Encryption Algorithm (AES) for 128 and 256 bit symmetric keys.

New version DiceLock-x 8.0.0.1 for Linux has made significant improvements:
- added block encryption ciphers like Camellia, Serpent and Twofish with all accepted key lengths of 128, 192 and 256 bits,
- added stream ciphers like Rabbit, Salsa 20/20 with 128 and 256 bit key lengths, and general Sosemanuk, as well as Sosemanuk with 128 and 256 bit key lengths,
- added old hash algorithms like Message Digest 2, Message Digest 4 and Message Digest 5,
- modified DiceLockIndexed and DiceLockDigested classes to be used with encryption ciphers that does not make use of initialization vector (IV),
- created DiceLockIVDigested and DiceLockIVIndexed classes to be used with encryption ciphers that makes use of initialization vector (IV),
- extended DiceLockXTSDigested and DiceLockXTSIndexed classes to be use with newly added Camellia, Serpent and Twofish block ciphers and all three key lengths (128, 192 and 256 bit key lengths),
- added old encryption ciphers like DEA (Data Encryption Algorithm), TDEA (Triple Data Encryption Algorithm), and ARC4 (alleged RC4) for compatibillity reasons.

As the new version DiceLock-x 8.0.0.1 for Linux is developed, all individual components must be tested and verified, and in this article we verify HC 256 class (computing HC 256 stream cipher algorithm).

At the bottom of the post you can find C++ source code being used to perform this test.


Verified DiceLock-x 8.0.0.1 for Linux

Verification components:

– Stream encryption cipher algorithm: HC256 class
– Test set number: 4
– Bit stream memory management: PhysicalCryptoRandomStream class (memory pages kept in RAM, not swapped to file)

Memory characteristic used in this test:

PhysicalCryptoRandomStream class makes use of AWE (Address Windowing Extensions) that uses physical nonpaged memory, so memory is not swapped to hard disk.
In order to use PhysicalCryptoRandomStream class, which works with AWE it requires that “Lock Pages In Memory” Windows security setting policy permission must be granted in “Local Policy Settings” to the account executing the program, and in some versions the program must have “Run this program as an administrator” “Privilege Level” option checked.

 

Once computed we’ve got the following results:

Set 4, vector# 0

Input plaintext: 131072 zero bytes
Key: 0053a6f94c9ff24598eb3e91e4378add3083d6297ccf2275c81b6ec11467ba0d
Initial vector: 0000000000000000000000000000000000000000000000000000000000000000
From byte 0 to byte 63
Expected 1c43efa7a2ca90f5e8f9a4f09d4c9077d5abd79341fd75bb2df9f13ca0b1cd6e065fa86938d971d8fac8a3c34d08ca2d1ba08be56d633951bd0338a227321caf
Computed 1c43efa7a2ca90f5e8f9a4f09d4c9077d5abd79341fd75bb2df9f13ca0b1cd6e065fa86938d971d8fac8a3c34d08ca2d1ba08be56d633951bd0338a227321caf
Result: OK
From byte 65472 to byte 65535
Expected 428908b703282e38e1bfde62c6b0d8a1bd2ab1f5117c85703e9b656fdead26604b7b8eaae16423a3bfe542ab13748dc835d81f981cd344015e0df47bd180541a
Computed 428908b703282e38e1bfde62c6b0d8a1bd2ab1f5117c85703e9b656fdead26604b7b8eaae16423a3bfe542ab13748dc835d81f981cd344015e0df47bd180541a
Result: OK
From byte 65536 to byte 65599
Expected 9d6d72f46c846d9bbf3aeeb463b9ef42f84915d664a20fb78ad94b61feb7d63e5411a81d1e8f32be3044e109c68b9eb5ec0bf180ef18bf3191d933f86045036b
Computed 9d6d72f46c846d9bbf3aeeb463b9ef42f84915d664a20fb78ad94b61feb7d63e5411a81d1e8f32be3044e109c68b9eb5ec0bf180ef18bf3191d933f86045036b
Result: OK
From byte 131008 to byte 131071
Expected e462cd92492726928381769ff205dc17ae7d31e1b82810f3ccb541b58c5f58d138db708c5f5bf07a0432868a1aa40a07601fcd1a07de3071e8ce082833f0b02d
Computed e462cd92492726928381769ff205dc17ae7d31e1b82810f3ccb541b58c5f58d138db708c5f5bf07a0432868a1aa40a07601fcd1a07de3071e8ce082833f0b02d
Result: OK
xor-digest
Expected cdca2f92bf75499e49b586bda7d9306c12f111d1a9f183a83b5a07549d5f976e815f96bd716ccac7178282ca8beff4f585dafa9bdddf8e6420dfdba2573f0494
Computed cdca2f92bf75499e49b586bda7d9306c12f111d1a9f183a83b5a07549d5f976e815f96bd716ccac7178282ca8beff4f585dafa9bdddf8e6420dfdba2573f0494
Result: OK
DECIPHERING Checking deciphered text with input plaintext: OK

 

Set 4, vector# 1

Input plaintext: 131072 zero bytes
Key: 0558abfe51a4f74a9df04396e93c8fe23588db2e81d4277acd2073c6196cbf12
Initial vector: 0000000000000000000000000000000000000000000000000000000000000000
From byte 0 to byte 63
Expected 4f7d4e56036a57a303a9c7d978290216297ac26c187e4f07678ec0069c34f93e072d734dba239d81e566d1e6dcd09b5ca132714291631c227e391ec0385a3a64
Computed 4f7d4e56036a57a303a9c7d978290216297ac26c187e4f07678ec0069c34f93e072d734dba239d81e566d1e6dcd09b5ca132714291631c227e391ec0385a3a64
Result: OK
From byte 65472 to byte 65535
Expected c508ddd76c070f712faba944bcb0f5ceeb645825c520197867623ed5263e22b56270f0a878ac7fe03145dd2bf528e1ad784086fefaa0d82f0f3571ceedd3341b
Computed c508ddd76c070f712faba944bcb0f5ceeb645825c520197867623ed5263e22b56270f0a878ac7fe03145dd2bf528e1ad784086fefaa0d82f0f3571ceedd3341b
Result: OK
From byte 65536 to byte 65599
Expected b10cf49fe9266bbca007c8db526e760e79aa4d6a3b29fe82b8698c732fbb81ad1a27b2aeb06d05f3cf17e875bc0bbac567762275ee650d03f62b29529f3c3e23
Computed b10cf49fe9266bbca007c8db526e760e79aa4d6a3b29fe82b8698c732fbb81ad1a27b2aeb06d05f3cf17e875bc0bbac567762275ee650d03f62b29529f3c3e23
Result: OK
From byte 131008 to byte 131071
Expected 42b4f20ebafb2c792006bd163064ec7cf363dd996cdf839cce61e739c3817b4e36d311a4c94c7918e82f5158d3a75844a5603742e33d7fc3af018660e6b1185c
Computed 42b4f20ebafb2c792006bd163064ec7cf363dd996cdf839cce61e739c3817b4e36d311a4c94c7918e82f5158d3a75844a5603742e33d7fc3af018660e6b1185c
Result: OK
xor-digest
Expected fb3eda7c75e0aacedd95b625f7eeda623ddc94983a9b084645253c0bc72fbf9a67072228194f96c1e81004cb438d6381a5c7e9e7d134fb8b67def27462ad3335
Computed fb3eda7c75e0aacedd95b625f7eeda623ddc94983a9b084645253c0bc72fbf9a67072228194f96c1e81004cb438d6381a5c7e9e7d134fb8b67def27462ad3335
Result: OK
DECIPHERING Checking deciphered text with input plaintext: OK

 

Set 4, vector# 2

Input plaintext: 131072 zero bytes
Key: 0a5db00356a9fc4fa2f5489bee4194e73a8de03386d92c7fd22578cb1e71c417
Initial vector: 0000000000000000000000000000000000000000000000000000000000000000
From byte 0 to byte 63
Expected 23de914d641dc0dcb4f818c687803858a6673e284f8323787756dac9352be03128bc6149a59785f6aadf92fc68761e8a862aedf29e851bf5422a83ee5eabfee3
Computed 23de914d641dc0dcb4f818c687803858a6673e284f8323787756dac9352be03128bc6149a59785f6aadf92fc68761e8a862aedf29e851bf5422a83ee5eabfee3
Result: OK
From byte 65472 to byte 65535
Expected d12e0c470a955ddaa7e851f43da35b0815d442dbbedeece3ade18fabf08b444377acfe9f138f8725cea27b0f0eccb4e2e5d6e476f88cab4743e8e43ce2d48f4b
Computed d12e0c470a955ddaa7e851f43da35b0815d442dbbedeece3ade18fabf08b444377acfe9f138f8725cea27b0f0eccb4e2e5d6e476f88cab4743e8e43ce2d48f4b
Result: OK
From byte 65536 to byte 65599
Expected 26635796620003de67406bf741b93d68318f9a23fe823b2374e8bd8008edd7be2f750707a3835bba7dac45e06537df8e53dfcdb928ea34cc08d2841fe3e492c3
Computed 26635796620003de67406bf741b93d68318f9a23fe823b2374e8bd8008edd7be2f750707a3835bba7dac45e06537df8e53dfcdb928ea34cc08d2841fe3e492c3
Result: OK
From byte 131008 to byte 131071
Expected d3dfce281fdc69f7800e765cb0b33d788bbdc17dfd11f929295c26ab7ecf21b67d4b4efcc18ecdb8134175a7f198eb12f7913daf22d73a4139d5b807c18310a9
Computed d3dfce281fdc69f7800e765cb0b33d788bbdc17dfd11f929295c26ab7ecf21b67d4b4efcc18ecdb8134175a7f198eb12f7913daf22d73a4139d5b807c18310a9
Result: OK
xor-digest
Expected bb2c8e7bb894defd1d5a7d37c01e8ee5fd4e052cdf1ddf5fda90c9818de71b3e34392ec3858adf718f463808abf841b690f49d35a51be5067b162e72d0101f97
Computed bb2c8e7bb894defd1d5a7d37c01e8ee5fd4e052cdf1ddf5fda90c9818de71b3e34392ec3858adf718f463808abf841b690f49d35a51be5067b162e72d0101f97
Result: OK
DECIPHERING Checking deciphered text with input plaintext: OK

 

Set 4, vector# 3

Input plaintext: 131072 zero bytes
Key: 0f62b5085bae0154a7fa4da0f34699ec3f92e5388bde3184d72a7dd02376c91c
Initial vector: 0000000000000000000000000000000000000000000000000000000000000000
From byte 0 to byte 63
Expected 818c35d2fd72d12115f91bfd32f843e7ed4d7110d1adf517226be797e037af93c190025a5e82fa0341667d68fc09e23849d5a7a9526ca142d60f71c3aee3a106
Computed 818c35d2fd72d12115f91bfd32f843e7ed4d7110d1adf517226be797e037af93c190025a5e82fa0341667d68fc09e23849d5a7a9526ca142d60f71c3aee3a106
Result: OK
From byte 65472 to byte 65535
Expected f011e9cee99d94bdd4484408a0ff91deefdc8d8c04ed2b86c51f21058e912c11f19890e174018308962f5827d2fc1e2b82ba65688c111aab5c749d8abaec022c
Computed f011e9cee99d94bdd4484408a0ff91deefdc8d8c04ed2b86c51f21058e912c11f19890e174018308962f5827d2fc1e2b82ba65688c111aab5c749d8abaec022c
Result: OK
From byte 65536 to byte 65599
Expected ec2ef21014aacb6215083f784e3ed65d774124fe60188930e1a90405eafc8f1ce75d54aa7d81400e026d799ce06ef5328002bcf5a10d43e6fb6f80a9d72634e1
Computed ec2ef21014aacb6215083f784e3ed65d774124fe60188930e1a90405eafc8f1ce75d54aa7d81400e026d799ce06ef5328002bcf5a10d43e6fb6f80a9d72634e1
Result: OK
From byte 131008 to byte 131071
Expected 80bc6f7f6b0a7a357f770e7690d94a9db8cba32ea36e124fdcc66ece8786f95c22263f09645864087ff4af97944a226acb63dad316f8cfef96504ad306c512be
Computed 80bc6f7f6b0a7a357f770e7690d94a9db8cba32ea36e124fdcc66ece8786f95c22263f09645864087ff4af97944a226acb63dad316f8cfef96504ad306c512be
Result: OK
xor-digest
Expected cb8d4c35d79ccf1d741b9da09eda305f5fa43f9ae9d0e1f576d5c59afb8471f97822c6acaa197ff01347e397c0382195865afaf5f1690b373aa2603c39a13cc0
Computed cb8d4c35d79ccf1d741b9da09eda305f5fa43f9ae9d0e1f576d5c59afb8471f97822c6acaa197ff01347e397c0382195865afaf5f1690b373aa2603c39a13cc0
Result: OK
DECIPHERING Checking deciphered text with input plaintext: OK

 

DiceLock-x 8.0.0.1 for Linux C++ source code used in this test:

DiceLock-x 8.0.0.1 for Linux

DiceLockCipher.h
cryptoRandomStreams.h
baseCryptoRandomStream.h
baseCryptoRandomStream.cpp
physicalCryptoRandomStream.h
physicalCryptoRandomStream.cpp
symmetricCiphers.h
baseSymmetricCipher.h
baseSymmetricCipher.cpp
symmetricStreamers.h
symmetricStreamerSpecialTypes.h
baseSymmetricStreamer.h
baseSymmetricStreamer.cpp
baseSymmetricStreamer_with_IV.h
baseSymmetricStreamer_with_IV.cpp
streamCiphers.h
baseStreamCipher_with_IV.h
baseStreamCipher_with_IV.cpp
HC256.h
HC256.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 Self-corrector randomisation-encryption and method, european patent EP1182777 granted 08/21/2003 and US patent US7508945 granted 03/24/2009.

Leave a Reply