July 2017
« Nov    

Recent Posts

DiceLock-x for Linux, ARC4_Discarding class (ARC 4 Discarding stream cipher algorithm) verified with IETF RFC 6229, 64 bit key, set 2 and PhysicalCryptoRandomStream class (memory pages kept in RAM, not swapped to file)

DiceLock-x 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 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 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 for Linux is developed, all individual components must be tested and verified, and in this article we verify ARC 4 Discarding class (computing ARC 4 Discarding stream cipher algorithm).

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

Verified DiceLock-x for Linux

Verification components:

– Stream encryption cipher algorithm: ARC4_Discarding class
– Discarded initial bytes: 512
– Test set: IETF RFC 6229, 64 bit key, set 2
– 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.


Input plaintext: 4112 zero bytes
Key: 641910833222772a

Once computed we’ve got the following results:

Byte offset: 0
Expected 8d3e9e1caefcccb3fbf8d18f64120b32
Computed 8d3e9e1caefcccb3fbf8d18f64120b32
Result: OK
Byte offset: 240
Expected 942337f8fd76f0fae8c52d7954810672
Computed 942337f8fd76f0fae8c52d7954810672
Result: OK
Byte offset: 256
Expected b8548c10f51667f6e60e182fa19b30f7
Computed b8548c10f51667f6e60e182fa19b30f7
Result: OK
Byte offset: 496
Expected 0211c7c6190c9efd1237c34c8f2e06c4
Computed 0211c7c6190c9efd1237c34c8f2e06c4
Result: OK
Byte offset: 512
Expected bda64f65276d2aacb8f90212203a808e
Computed bda64f65276d2aacb8f90212203a808e
Result: OK
Byte offset: 1008
Expected bd3820f732ffb53ec193e79d33e27c73
Computed bd3820f732ffb53ec193e79d33e27c73
Result: OK
Byte offset: 1024
Expected d0168616861907d482e36cdac8cf5749
Computed d0168616861907d482e36cdac8cf5749
Result: OK
Byte offset: 1520
Expected 97b0f0f224b2d2317114808fb03af7a0
Computed 97b0f0f224b2d2317114808fb03af7a0
Result: OK
Byte offset: 1536
Expected e59616e469787939a063ceea9af956d1
Computed e59616e469787939a063ceea9af956d1
Result: OK
Byte offset: 2544
Expected c47e0dc1660919c11101208f9e69aa1f
Computed c47e0dc1660919c11101208f9e69aa1f
Result: OK
Byte offset: 2560
Expected 5ae4f12896b8379a2aad89b5b553d6b0
Computed 5ae4f12896b8379a2aad89b5b553d6b0
Result: OK
Byte offset: 3568
Expected 6b6b098d0c293bc2993d80bf0518b6d9
Computed 6b6b098d0c293bc2993d80bf0518b6d9
Result: OK
Byte offset: 3584
Expected 8170cc3ccd92a698621b939dd38fe7b9
Computed 8170cc3ccd92a698621b939dd38fe7b9
Result: OK
DECIPHERING Checking deciphered text with input plaintext: OK

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

DiceLock-x for Linux


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