# Cryptography

#### Powerful Encryption for Secure Information in a New World

**Cryptographic Algorithms:**

**Chameleon Polymorphic Cipher**

The Chameleon Cipher-192 is a polymorphic cipher that utilizes a variable word size and variable-size user’s key. In the preprocessing stage, the user key is extended into a larger table or bit-level S-box using a specially developed hash-function. The generated table is used in a special configuration to substantially increase the substitution addressing space. Accordingly, we call this table the S-orb. We show that the proposed cipher provides concepts of a key-dependent number of rotations, key-dependent number of rounds and key-dependent addresses of substitution tables. Moreover, the parameters used to generate the different Sorb words are likewise key-dependent.

We establish that the self-modifying proposed cipher, based on the aforementioned key dependencies, provides an algorithm polymorphism and adequate security. The ideas incorporated in the development of this cipher may pave the way for key-driven encryption rather than merely using the key for a sub-key generation. The cipher is adaptable to both hardware and software implementations.

**Stone Metamorphic Cipher**

The Stone Cipher-192 is a metamorphic cipher that utilizes a variable word size and variable-size user’s key. In the preprocessing stage, the user key is extended into a larger table or bit-level S-box using a specially developed one-way function. However, for added security, the user key is first encrypted using the cipher encryption function with agreed-upon initial values. The generated table is used in a special configuration to considerably increase the substitution addressing space. Accordingly, we call this table the S-orb. Four bit-balanced operations are pseudorandomly selected to generate the sequence of operations constituting the cipher. These operations are XOR, INV, ROR, NOP for bitwise xor, invert, rotate right and no operation respectively. The resulting keystream is used to generate the bits required to select these operations. We show that the proposed cipher furnishes concepts of a key-dependent pseudo-random sequence of operations that even the cipher designer cannot predict in advance. In this approach, the sub-keys act as program instructions not merely as a data source. Moreover, the parameters used to generate the different S-orb words are likewise key-dependent.

We establish that the self-modifying proposed cipher, based on the aforementioned key-dependencies, provides an algorithm metamorphism and adequate security with a simple parallelizable structure. The ideas incorporated in the development of this cipher may pave the way for key-driven encryption rather than merely using the key for a sub-key generation. The cipher is adaptable to both hardware and software implementations. Potential applications include voice and image encryption.

**Pyramids Cipher**

The “PYRAMIDS” Block Cipher is a symmetric encryption algorithm of a 64, 128, 256-bit plaintext block, that accepts a variable key length of 128, 192, 256 bits. The algorithm is an iterated cipher consisting of repeated applications of simple round transformations with different operations and different sequences in each round.

**A Metamorphic Enhanced Twofish Cipher**

The Metamorphic-Enhanced Twofish Cipher is a metamorphic cipher that uses a variable word size and variable-size user’s key. The cipher merged two ciphers by defining a new function using four bit-balanced operations. These operations are XOR, INV, ROR, NOP for bitwise xor, invert, rotate right and no operation respectively. The new function replaces the h-function, previously used in the Twofish Cipher, and thus creating a Meta h-function. The aim of this alteration is to provide an improvement to the Twofish cipher that introduces high confusion into the enhanced Twofish without disturbing the linear and differential diffusion criteria. In this work, we discuss the Metamorphic-Enhanced Twofish Cipher and provide a Field Programmable Gate Array (FPGA) hardware implementation of the enhanced algorithm.

**Twofish**

Twofish is Counterpane Systems’ AES submission. Designed by the Counterpane Team (Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson), Twofish has undergone extensive analysis by the Counterpane Team. There is a paper available from the Twofish web page and source is provided in optimized C and assembly.

**Blowfish**

Blowfish is a block cipher designed by Bruce Schneier, author of Applied Cryptography. Blowfish combines a Feistel network, key-dependent S-Boxes, and a non-invertible F function to create what is perhaps one of the most secure algorithms available. Schneier’s paper is available here. Blowfish is also described in the Concepts of Cryptography page. The only known attacks against Blowfish are based on its weak key classes.

**DES**

Designed at IBM during the 1970s and officially adopted as the NIST standard encryption algorithm for unclassified data in 1976, DES has become the bastion of the cryptography market. However, DES has since become outdated, its long reign as official NIST algorithm ending in 1997. Though DES accepts a 64-bit key, the key setup routines effectively discard 8 bits, giving DES a 56-bit effective key length. DES remains widely in use. During the design of DES, the NSA provided secret S-Boxes. After differential cryptanalysis had been discovered outside the closed fortress of the NSA, it was revealed that the DES S-boxes were designed to be resistant to differential cryptanalysis. DES is becoming weaker and weaker over time; modern computing power is fast approaching the computational horsepower needed to easily crack DES. DES was designed to be implemented only in hardware and is therefore extremely slow in software. A recent successful effort to crack DES took several thousand computers several months. The EFF has sponsored the development of a crypto chip named “Deep Crack” that can process 88 billion DES keys per second and has successfully cracked 56 bit DES in less than 3 days.

**GOST**

GOST is a cryptographic algorithm from Russia that appears to be the Russian analog to DES both politically and technologically. Its designers took no chances, iterating the GOST algorithm for 32 rounds and using a 256-bit key. Although GOST’s conservative design inspires confidence, John Kelsey has discovered a key-relation attack on GOST, described in a post to sci.crypt on 10 February 1996. There are also weak keys in GOST, but there are too few to be a problem when GOST is used with its standard set of S-boxes. You can read the official GOST algorithm description (translated from Russian) here. There is also a description of the GOST algorithm here.

**Rijndael**

Rijndael is an AES winner by Joan Daemen and Vincent Rijmen. The cipher has a variable block and key length, and the authors have demonstrated how to extend the block length and key length by multiples of 32 bits. The design of Rijndael was influenced by the SQUARE algorithm. The authors provide a Rijndael specification and a more theoretical paper on their design principles. The authors have vowed to never patent Rijndael.

Attribute | Chameleon Polymorphic (CC-192) | AES |

Algorithm | Polymorphic (changes with user key) | Fixed Algorithm |

Known Attacks | No Known Attacks | Broken |

Key-dependent Polymorphic Algorithm | Yes (key-dependent algorithm) | No (Fixed Algorithm) |

S-box | User-key dependent S-ORB | Fixed S-box (public) |

Variable word size (by the user) | Yes | No |

Variable Minimum Number of rounds (by the user) | Yes | No |

Number of rounds are key-dependent | Yes | No |

Key Size | Variable 192 bits | Variable 128, 192, 256 bits |

Key Set-up Time | 1849 ( This relatively large set-up time while the user will not even feel it, yet it is important to prevent Brute Force Attacks since the attacker will spend almost double the time of AES trying to find the key) | 850 cycles |

Encryption Time | 28 cycles per byte with a total of 672 cycles | 440 cycles |

Execution time (0n Intel Core2 Duo CPU E6550 @ 2.33 GHz, 4 GB RAM, 32-bit operating system) (on Processor Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2.601 Ghz, 2 Core(s), 4 Logical Processor(s), Installed Physical Memory (RAM) 8.00 GB, 64-bit operating system) | 171-203 milli- seconds (depending on word size) 16 milli seconds | 88-101 milli seconds (Estimate) 8.2 milli seconds (Estimate) |

Hardware/software Implementation | Suitable | Suitable |

Probability of guessing the algorithm used | Much Less than 89.68 x 10^{-45} (user key-dependent and is smaller than brute force attack using 128-bit key) | Well-known algorithm (Probability =1.0) |

Passed all NIST Tests | Yes | Yes |

Statistical Parameters of cipher text available to user after encryption | Yes | No |

Variable throughput depending on word size | Yes | No |

Security | Very High | High (Broken) |

Modes for multimedia applications | Can be used in any mode including the default ECB (no information leakage) | Requires other modes beyond ECB ( with ECB information leakage is possible) |

*The cipher was implemented using C# language under MS window operating system. This is a brief comparison between CC-192 and AES; other features such as ASM language, device performance dependency, and other operating system implementations are not included.