A New Cipher Based on Feistel Structure and Chaotic Maps

: Chaotic systems have been proved to be useful and effective for cryptography. Through this work, a new Feistel cipher depend upon chaos systems and Feistel network structure with dynamic secret key size according to the message size have been proposed. Compared with the classical traditional ciphers like Feistel-based structure ciphers, Data Encryption Standards (DES), is the common example of Feistel-based ciphers, the process of confusion and diffusion, will contains the dynamical permutation choice boxes, dynamical substitution choice boxes, which will be generated once and hence, considered static, While using chaotic maps, in the suggested system, called C haotic-based P roposed F eistel C ipher S ystem (CPFCS), we made the confusion and diffusion in dynamical behavior based on Standard and Lorenz maps. The first is used for substitution, and the second one for permutation operations .A proposed cryptographic system uses the same work (the same way) for both enciphering and deciphering. The proposed cipher operates on more than 500 bytes (4000-bit) readable text blocks by six round computing. Within the basic operator of the cipher, i.e., in the function of the round F, a dynamical lookup table 2D standard map system is used to enhance the complexity and diffusion of the unreadable text. Also, a 3D Logistic map used for key sequence generator and chaos based dynamical Initial Permutation (dynamical IP) are used to increase the diffusion and confusion. Three different image sizes and three different text length were implemented in CPFCS. The results of the proposed system and security tests improve the applicability of PFCS in the data protection and security.


Introduction:
Previously, In the past years, chaos theory has big attention for many papers researchers and been widely used in the fields of coding and security of data and secure connecting benefit from its great properties such as periodicity, unability to predict, and sensitivity to the seed and parameters which met some conditions such as diffusion and confusion in the sensibility of coding.As a chaotic system characterizes excellent properties of diffusion and confusion, it is widely used to design various cryptographic schemes, for example, the cryptographic systems based on chaotic maps (1), and chaotic s-box function (2).
Chaotic maps are widely applied in secure communication which is carefully studied in (3,4).We could not only use chaotic signals to encrypt the information needed to be secure but also decipher encrypted one as well according to (5).Feistel Cipher is a pattern or sample for design block cipher, which does not mean that the feistel cipher is a type of block ciphers, for example DES Department of Computer, College of Education, Al_Mustansiriyah University, Baghdad, Iraq * Corresponding author: qweenr80@gmail.comalgorithm is derived from feistel structure.
Compared with the classical traditional ciphers like Feistel-based structure ciphers, many problems becomes clear in that structure; weakness point of substitution boxes, weakness of permutation choices boxes, weakness in the key generation algorithm, two chosen input to an S-box can create the same output and breaking Feistel ciphers has become easy with the help of brute force attack which was impossible during that time.
There are few references to the problem of designing Feistel encryption algorithms using chaotic maps: V.Patidar and K. K. Sud, 2010, 'Block cipher using 1D and 2D chaotic maps', This work, block cipher but with a new chaotic has been presented in henon maps, logistic maps, and secretive keys are be utilized.In this suggestion cipher based chaos, diffusion and confusion are completed consequently beside the CBC and secretive keys depend upon permute choice box (6).Wenyang Liu, Xiaomin.W and Wenfang.Z, 2014, "A lightweight Block cipher based on chaotic maps", through that work, a lightweight block cipher applied in the resource-limited environment is proposed by combining general Feistel network with chaotic maps (7).J. De D. Nkapkop, Joseph.Y. Effa, Jean S. A. E. Fouda, Mohamadou.A, Laurent.B and Monica.B,2014, in this paper, the proposed work is a one round chaos-based image encryption scheme based on the fast generation of big permute use a logistics maps to change the pixel positions and at diffusion stage, permutated image is divided into n sub of original image and the concatenation of solving of LDE (linear Diophantine equation )and PWLCM (Piecewise Linear Chaotic Map) have been generated (8).Xiao.J, Zha W., Yang.L, M. Zhang and Lianjie .X, 2015, through this work proposes a block ciphers for WSN , depend upon compound chaotic map.That mean the applicability of chaotic maps work with networks security, the algorithm improves Feistel network and build a cubic chaotic map function and its keys spaces was large, generated by the compound chaotic sequence (9).
Generally, compared with reference (6) the proposed cryptosystem used standards chaotic maps not suggested chaotic maps, and compared with the reference (8) the proposed cryptosystem used 6 rounds implemented on two study cases; texts and images in addition to structure of the proposed cryptosystem based on Feistel structure.
In the proposed cryptosystems, new dynamic substitution and permutation methods is proposed to solve all problems.The dynamical lookup substitution table is created for dynamical substitution.The dynamical permutation method is proposed to solve the problem of static permutation choices boxes.Dynamic key generation random algorithm will be designed based on randomization of chaotic maps.In addition, the proposed cryptosystem is designed to resist the brute forceattack.
This paper is classified into seven parts.In part 2, a simple presentation to some types of chose maps are used in proposed system in "Chaotic Maps".Explaining of properties of Feistel structure in part 3, in "Feistel Cipher".While part 4, a new Feistel cipher depend upon the Feistel structure and chaotic maps proposed in "Proposed Cryptosystem", and the experimental results has been presented in "Experimental Results for texts".And Section 6, the results of images in "Experimental Results for images" while the last part was talking and discuss the result which it stated in part 6, in Section 7.

Chaotic Maps Standard Map
The standards maps are described in (8), and can be processed by the following form: where k is the one of the parameters belong to the standard map chaotic met the k > 0, and the i th situations a i and b i both take real numbers in [0,2*p) for every i.The standards maps was discretized in a straight forward way by substitute x = a*N/2*p, y = b*N/2*p, K = k*N/2*p to Eqe. 1, which map from [0, 2*p) • [0, 2*p) to N • N. and then discretize, the map becomes: where K is a integer positive number.The characteristics of this discretize maps may not be as perfect as the first one, but it can be applied in the integer direction and range, which minimize the calculation complication and fits more for online data enciphering, the characteristics of this discretize standard maps is analyzed, firstly, then enhancing by introducing many aims, and at last used in information enciphering (8).

Logistics Maps
Logistics maps are the simple type of uncontinuous chaotic dynamic systems, utilized as chaotic work.The Logistics maps are a polynomial mapping of degree 2 that exhibits chaotic behavior (10).The logistics maps are simplest chaotic methods and provided by an Equation  + 1 = λXn (1 − Xn) .For 0<Xn<1 and λ=4 the equation exhibit the chaotic behavior.Hongjuan.L. et.al suggested the 2D logistics maps processed by the processing form: The above formulas increase the quadratic coupling of the items 2   2 ,  and give the high protection and security to the cryptosystems.When 2.75 < µ1 < 3.4, 2.7< µ2 < 3.45, 0.15 < y1 < 0.21, and 0.13 <y2 <0.15, the cryptographic system passes to chaotic state and can produce a chaos sequences in the region (0, 1].Through this work, we are extension the idea of the 2D Logistics maps to three dimensions (3d) by use the following forms: Also, the equation ( 4) utilize the chaotic properties for 3.53< λ< 3.81, and 0< β< 0.022,and 0 < α < 0.015 and can be taken between the range: [0, 1], (10).

Gauss Iterated Map:
There are multiple names for this map, called by (Gauss map) and (named as as Gaussian maps or mouse maps), is a nonlinear iterated map of the real to a real range given by the following form: Where a, b, c, d, e, k and h is a control parameters, and x ,y ,z and w consider the seed which have been fed to the Eq.6 to generate new values can be used as seed for second iteration of chaotic sequences

Feistel Cipher
Feistel Cipher is a pattern designed for block ciphers designing, that means the feistel cipher is not a specific scheme of block cipher.It is a design fashion which many different block ciphers depending on this pattern can be derived.DES is one of the known examples of a feistel cipher.A cryptosystem system depends upon feistel cipher network uses the same process and operations for both enciphering and deciphering (13).

Encryption Stage
The enciphering stage, which can be use the feistel model design consists of more than one rounds of process for the readable text, the single round consisting of a substitution stage and then by a permutat step.Feistel network is presented in Figure 1.In the input block to single round is split into two parts (also known as halves), that can be referred to as L i and R i for the left and right halves.For single round, the right part of the input block, R i , passes by unexchanged.While the left part, L, passes by an processing that based upon R i and the enciphering keys.First, an enciphering function f i that takes two inputs -the key Ki and Ri.The round Function fi generate the output f(R i ), Ki.Then the output of the set of mathematical operations function is Xored with Li.In right applying of the feistel cipher, like DES, instead of using the entire enciphering keys at single round, a round-dependent key asubkey is taken from the enciphering keys.This indicates that in the single round uses a different keys, although all these subkeys are derived from basic key.The permutate stage at the end of single round exchanges the altered Li and unaltered Ri.So, the Li for the next round would be Ri of the current round.And Ri for the next round be the output Li of the current round.Above 'substitution' and 'permutation stages form a single round, the number of rounds is determined by the algorithm pattern.For one time the final round is completed and the two sub blocks, 'Ri and Li are combination in this order to form the unreadable text block.The complex half of designing a feistel cipher is designing of round function 'fi'.In order to be un breakable system, this function needs to have several important (13).The process of deciphering stage in feistel cipher is the same work (13).Figure 1, shows the Feistel Network Structure.

Design of Chaotic-based Proposed Feistel Cipher System (CPFCS).
In the propose cryptosystem algorithm secretive key with length of (4000 bit), (500 byte) according to the plaintext block size and based upon the construction of secretive key has been designed.3 D logistic map is used for key generation, while 4 D Lorenz for permutation, 2D standard map for substitution operation, Gauss iterated map for enciphering/ deciphering operations and the controls parameter values for all chaos methods are kept without any change in the chaotic domain throughout the algorithm.During enciphering/ deciphering stages, the dynamic of the 3D logistic map will be mixed with the dynamic of the 4D Lorenz map.The domain produced by the logistics maps, based upon the secretive keys used in the propose algorithm, is passed to the 4D Lorenz maps and 2D standard maps.The 4D Lorenz map is used for dynamic permutation.In the Substitution process, 2D standard map is used in the round function fi, to generate the right part of the ciphertext.Based upon the secretive keys are used in the algorithm.In addition to the number of rounds in the proposed system equal to six. Figure 2 presents the single round of the Proposed Feistel Cipher System (PFCS).(9:12),Z 1 (13:16)); Step7) Concatenation the binary sequence between AL and AH to generate the first byte of the key, the same work to the BL, BH and CL, CH to generate the second and third bytes of the key.
Step8) The outputs of single iteration of the applying 3 dimensions Logistic map will be three bytes, these bytes will represent part of the key , that's mean the loop will be continuous until all the required key block (500 bytes) are generated.
Step9) When the key block is generated, the initial values of Logistic map are updated by Xoring the last values of N X , N Y and N Z with the initial values to generate the second key block and so on for all the remaining key blocks.

Lorenz Permutation
Step.The Lorenz permutation is the first step in the proposed algorithm where the plaintext block is permuted using 4D Lorenz map in the following way: a) The initial values x 0 , y 0 , z 0 and w 0 are determined and then used it in the Eq.6.
b) The parameters of Lorenz chaotic maps; a,b,c,d,e,k and h are determined.c) Apply the Eq.6 to generate new three float numbers (N X , N Y , N Z and N w ) which are converted to three integer numbers in the rang [1..500] (where 500 represent the length of block) for example in X case the equation will be as following: the same work for N Y , N Z and N W .
X=mod (round (N X ) d) The iteration of the Eq.6 will be continuous until all 500 new positions are generated randomly and saved in Lorenz Permutation Array (LPA).These 500 new positions in LPA are used to generate the Permutated array by taking each two adjacent positions in LPA and the corresponding value in the plaintext block and swap the contents of these values and such on the remaining bytes are generated.For example let A represent the LPA of 10 positions array and B represent the plaintext array, C will represent the output array (Permutated array), as the following: -A= LPA array A= [ Each byte of permutated array is substituted with a byte in lookup substitution table in the following way: the byte of permutated array is represented as binary sequence.This binary sequence is split into two parts, first four bits will represent the row in substitution array and the second four bits will represent the column in substitution array.This operation is repeated until all bytes of permutated array substituted in substituted array.For example, if the first byte in permutated array is 201 and it is represented as 11001001 in binary sequence.This sequence is split into row=1100 (C in hexadecimal) and column=1001(9 in hexadecimal).The intersection between row C and column 9 in the lookup substitution table shown in Table1 is 32H (50 D).So the byte 201 will be substituted by 32H (50 D). 4-Second Xor operation step: Xor operation between Left half (LKi) of key and the result is xored with the substituted array resulted from step3.

CPFCS Algorithm Steps:-
The proposed cryptographic system uses the same algorithm for both encryption and decryption.The only difference is the order of the sub keys.The encryption algorithm steps are as following:-1-Select the plaintext file (convert it to the ASCII array) or bit map image (convert it to three arrays based on color component: red array, green array and blue array).2-Each array is divided into blocks of 500 byte and each block will process in the following way :- Lorenz Permutation Step: in this step, the plaintext block is permutated by using Lorenz Permutation operation that is based on 4D Lorenz chaotic map and result the permutated array. Split the permutated array into two halves (LP i and RP i ).Each half consists of 250 byte (2000 bit). The round function fi will be applied on the right halve fi(RPi).The round function, as discussed in previous section, consists from four main operations: Permutation Step, First Xor operation step, Lookup Substitution Table and Second Xor operation step. The left half (LPi) of plaintext block is Xored with the left key (LKi). The resulted array from previous step is Xored with the result of the round function fi.The resulted array will be represents the left part of the ciphertext, while the right part, same part of the RP i before enters the round function.

Experimental results For Texts Statistical analysis
An ideal cipher must be able to protect its secret data against all types of strong attacks such as crystallize, statistical and Brute_Force Attacks.In the following tests, the results of the statistical tests after implemented upon the PFCS have been presented to measure its security characteristics confirm that the propose by using chaotic maps cipher is secure against the many known attack.

Correlation analysis
Correlation test is useful to know how to specify the strength of the linear relationship between two sequences.i.e, how strongly are these two sequences correlated or not?The correlation coefficient (CR) between the readable text sequence p 1 , p 2 , p 3 …p N and its corresponding un sequence c 1 , c 2 , c 3 …c N is computed as the following form: where N is length of letters in readable text/ unreadable text.We have computed the correlation coefficient between the readable text and its corresponding unreadable text for numerous sets with a different of keys.The correlation coefficients between different readable text sizes 1325,4628 and 11133 symbols (bytes) and its corresponding ciphertext for four different secretive key and different number of rounds is shown in the Table 2.The best value of the CR falls between μ -2σ and μ + 2σ, i.e., (-0.024, 0.024) [the range of perfect correlation coefficient values (Knuth, 1997) for good cryptosystem method when the result of correlation test as presented in the Table 1,2 and 3, are small near to 0 (CR ≈ 0), it indicates that the readable text sequences and its corresponding unreadable text sequences are completely independent of each other.

Histogram test results
For a perfect cryptographic application, no model must be show in the unreadable text as well as the unreadable text letters must be distributed in equal way in the total interval of the ASCII codes.the cipher cryptanalyze use the histograms gauges to look distribution of letters or symbols of cipher-

Information Entropy Analysis:
Il-legibility and in-determinateness are the basic aims of data enciphering.This in-determinateness can be presented through one of the most commonly used theoretical measure -information entropy.Information entropy states the degree of uncertainties in the cryptosystem and process as following form.

𝐻(𝑚
Where P mi is the emergence probability of mi.If all single letter have an equal probability, i.e m={m 0 ,m 1 ,m 2 ,…m 28-1 } and P(mi)=1/28(i=0,1,…255), and the entropy is H(m)=8 which is equal to an ideal state.Furthermore, contrast to those algorithms in ( 14) the proposed algorithm is much closer to the ideal situation and more robust against entropy attack.Practically, the information entropy of enciphered images are less compared to the ideal state.To build a perfect encryption system, the entropy of enciphered data (text or image) near to the optimal state is possible.As shown in

Key space
The total keys are being used in the cryptographic application, which it's constructed of many parts: 8 for permutation of the entire system, 3 for key generator, 3 for substitution process.These 14 parts are different from each other.Therefore, for m iterations, the size of the space of the total enciphering operations in the PFCS, N=662, If N ≥ 128, and the whole lengths satisfies H(N) > 2^128.That's mean there is no contradiction among these different keys, which keeps the cryptographic application in high security and protected from all known attacks.

Experimental Results for Images
In the proposed system, many types of images has vebeen experimented; binary, gray scale and color images for example the first image was lena image, has size 512*512 pixels as shown in

Figure 3 .
Fig. 3(a) above shows the high peaks start from 90 to 125 ASCII values and this describes the height of the plaintext letters, and low peaks as represents the low plaintext letters, while in the ciphertext we can notice the uniform distribution of the letters as shown in figure 3(b).

Fig 4 (
a) stated the original image, Figure4(b) stated the encrypted image using the proposed system for six rounds, while in Fig.4(c) shows the decrypted image by using the proposed system.

Figure 4 (Figure 5 .Figure 7 .
a): Original Image, (b): Encrypted Image, (c): Decrypted Image.This fig shows the histograms of the some enciphered images as well as its plain images that have widely different content.One of commonly example among them is presented in Figure5(a,b).The histogram of a plain-image consists of big spikes as presented in Fig.5(a).The histogram of the ciphered-image is presented in Fig. 5(b), it is equally observed differ from that of the plainimage, and bears no statistical resemblance to the plain-image, Hence does not provide any clue to utilize any statistical attack on the PFCS image and text enciphering code.(a)Histogram of the plain Lena Image(b)Histogram of the cipher Lena Image (a) (b) Figure 6.(a):Correlation for Vertical Plain lena image=0.9387;(b):Correlationfor Vertical cipher lena image=0(a) Correlation for Diagonal plain lena image=0.8743,(b)Correlationfor Diagonal cipher lena image=0

Table 1 . Example of 16*16 lookup substitution tables generated by 2D standard map
In each round, each plaintext/ciphertext block is divided into two halves: the right half RPi and the left half LPi.Each half consists of 250 byte.