A fast cryptosystem using reversible cellular automata

This article defines a new algorithm for a secret key cryptosystem using cellular automata which is a promising approach to cryptography. Our algorithm is based on cellular automata built on a set of reversible rules which have the ability to construct unpredictable secret keys using MARGOLUS neighborhood. To prove the feasibility of the algorithm, we present some tests of encryption, decryption and diffusion; a CPU time comparison with an encryption algorithm by blocks as for instance AES-256 is established. On the other hand, the security of the algorithm is proved and the implemented algorithm resists against a brute force attack.


INTRODUCTION
Cryptographic algorithms are used to secure computer networks, electronic transactions or information exchanges. They are implemented in security protocols, electronic chips, etc. Otherwise, and since its appearance, the field of cryptography has experienced a great evolution, mainly in the design of many methods of encryption based on public or secret keys.
The methods of modern cryptography can be divided into two main categories: symmetric and asymmetric cryptography. Each cryptosystem uses keys to generate from the clear text a cipher text. The most known symmetric cryptography systems are DES, AES, RC4 and RC5, [1]. They are used in a secure communication protocols as TLS. Unlike symmetric cryptography, the asymmetric cryptography uses public and secret keys for encryption and decryption. The best known algorithm is RSA [1]; it is implemented in the SSL protocol.
Our work is part of a new approach to cryptosystems based on cellular automata (CA) which presents a promising approach to cryptography. CA gives a secret key for the encryption which cannot be predicted since it evolves a chaotic and complex system starting from an initial state [8][9][10]. A Brief history of CA can be found in [4].
In one dimension, many encryption concepts based on CA was studied, the most known ones belong to Wolfram [13][14]. In two dimension, some cryptosystems based on CA have been constructed for public and secret keys [9], [11], [15]; for example, CA were used to construct cryptosystem based on Vernam cipher and generated keys with a pseudo-random numbers sequence; CA were also used for block cipher. Concerning our work, we aim to design and to implement a novel two dimensional secret key cryptosystem based on reversible CA using MARGOLUS neighborhood [2]. We remind however that reversibility concept has been used for block encryption in one dimension; for more details, see [8].
This paper is organized as follows. The first section consists on a brief review of symmetric and asymmetric cryptographic methods based on secret and public keys. Section 2 outlines CA and section 3 focuses on MARGOLUS neighborhood. Section 4 describes our cryptosystem. To prove its feasibility, a simulation will be presented in section 5; it holds on the diffusion and performance tests where a comparison with the AES algorithm is established. Section 6 concludes the paper.

II.
CELLULAR AUTOMATA AND REVERSIBILITY A cellular automaton (CA) is a dynamic system defined by the following 4-tuple: dimension, set of finite states, neighborhood and set of rules. Dimension defines number of cells. Cells are updated accordingly to some rule. Such rule is based on the state of the cell and the neighborhood.
More precisely, let be a cellular automaton defined by where:  S is a finite set of states,  is the set of integers,  d is the size of the automaton,  is the space of the automaton,  is the rule (transition function), is the set of neighborhood, .
We call configuration the allocation of the state of each automaton cell. To illustrate, we present the following test:


, two states, (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 5, No. 5, 2014 208 | P a g e www.ijacsa.thesai.org  (the neighbors of the cell i are i-1, i+0, i+1),  is defined by the following box: Let the configuration at time : At time +1 the configuration will be: 0 According to the definition table of we have in binary 00100101 which are worth 37 in decimal, we are talking about the rule 37. In total, there are rules. For an automaton of dimension where the set of states is we can use rules.
In this work, we use a reversible cellular automaton according to this definition: the automaton with the evolution function is reversible if there is an automaton with the evolution function such that for each configuration . For more details, we can refer to the works published in [3][4][5][6]. For the one-dimensional CA, it is possible to check if the automaton is reversible [7]. For the CA of other dimensions, the reversibility is undecidable [6].

III. MARGOLUS NEIGHBORHOODS
We construct two-dimensional CA by blocks based on MARGOLUS neighborhood. We remind that if we consider two-dimensional grid then it is possible to define different kinds of neighborhoods; the most common ones are Von Neumann (related to four neighborhoods), Moore (associated to nine neighborhoods) or MARGOLUS [4],[9], [12]. To justify our choice, MARGOLUS neighborhood allows creation of reversible CA and this reversibility gives more security to the encryption procedure.
For MARGOLUS neighborhood, the automaton cell is divided into blocks of n cells (four cells for example), we applied the transition function to each block. To create reversibility, we use the reversible transition function that can be built by creating a mapping between the set of states.
To illustrate, let be a cellular automaton of dimension 2, with two states S = {0, 1}, we construct a block of four cells as indicated in Figure 1. The arrow indicates the conventional sense. Therefore, to construct a reversible rule, we just need to take a bijective application . Figure 2 explains the concept of the MARGOLUS neighborhood. First, we take the original automaton « », then we partition into blocks of n cells (4 cells in this case). Second, we partition starting with the first index (even partitioning on Figure 2).
Finally, we redo the odd partitioning starting with an odd index , see Figure 2.

IV. PROPOSED CRYPTO-SYSTEM
The proposed cryptosystem is based on two-dimensional reversible CA using MARGOLUS neighborhood, its secret key is the transition rule of the cellular automaton.

M=PRule(K,M) M=IRule(K,M) End
 Group the bits of the matrix M to obtain the encrypted data.

Decryption step
As already mentioned, the proposed system is symmetric; for the decryption, we use the same key as in the encryption step.

B. Transformation PRule() and IRule()
Consider the following data presented in Figure 3: PRule(), IRule() are the functions that evolve the cellular automaton, they use the MARGOLUS neighborhood described above.
PRule() applies on the even blocks (the red blocks in the graph), in opposite, IRule() applies on the odd blocks (the green blocks in the graph).

C. Security of the algorithm
The security of this algorithm is based on the choice of CA parameters: we can increase or decrease the neighborhood size or/and the number of states.
Let be the neighborhood size and the number of states. The maximum possible number of keys is which making impossible to apply a brute force attack with an exhaustive search of keys; for example, if =2 and then we have to try =256! combinations that are impossible to achieve within a reasonable time.
To make the encrypted data readable, we used the Base64 encoding.

A. Diffusion application
The diffusion calculates the influence to change the bits in the clear message (plain text) onto the encrypted message keeping constant the key. Figure 4 gives diffusion tests of CA cryptosystem and AES algorithm by taking a plain text of size 256-bits with a key of 256-bits. It is observed that diffusion levels obtained by CA cryptosystem are better than AES.

B. Performance test
We compare our CA cryptosystem with a block algorithm as for instance AES-256. This is illustrated in Figure 5. The comparison focuses on the performance tests (CPU time in ms). The encryption using CA is faster than AES algorithm VI. CONCLUSION In this paper, we presented a brief review of symmetric and asymmetric cryptographic methods; we introduced the concept of cellular automata as a promising approach to cryptography allowing creation of unpredictable cryptosystem keys born through a chaotic and complex system. We outlined also the neighborhood concept that is linked to the creation of cellular automaton and we described Margolus neighborhood which we selected to build our two-dimensional reversible CA. We constructed a fast secret key cryptosystem and we demonstrated its feasibility.
We realized a test of diffusion and a CPU time comparison with a block cipher algorithm; the comparison shows that the proposed algorithm is faster than AES-256. The security is proved and the implemented algorithm resists against a brute force attack. We remind that some new research works focus on network sensor security and use encryption algorithms to improve the security of data and energy consumption [16][17][18]; in this context, we aim to implement our CA cryptosystem as a lightweight security protocol.