Single Feistel lapse acting on reduced ASCII codes followed by a genetic crossover

This article describes a new cryptosystem that incorporates the most powerful genetic operators. With the aim of better integration in the field of color image encryption security, this technique starts with the application of an advanced Feistel scheme and ends with the implementation of deeply modified genetic operators. After vectorization of the original image, an application of the advanced Feistel scheme on blocks of random size will be launched. The output vector is transcribed in restricted ASCII code to achieve a genetic cross suitable for the encryption of color images. The output vector obtained is transcribed in restricted ASCII code to considerably improve the effects of the genetic crossing. This step increases the impact of the avalanche effect and protects the system from differential attacks. Simulations performed on a large volume of images of different sizes and formats ensure that our approach is not exposed to known attacks. The one Feistel rounds in our algorithm represent a large modification of a classical scheme. The main new features are: First Feistel lap and Cross-over genetic operator. Switching to ASCII code. Genetic crossover arrangement. First Feistel lap and Cross-over genetic operator. Switching to ASCII code. Genetic crossover arrangement.


Introduction
The rapid development of chaos theory in mathematics provides researchers with opportunities to further improve some classic encryption systems [17,20,21]. In front of this great security focus, many techniques for color image encryption have flooded the digital world, mostly exploiting number theory and chaos [1,2]. Others are attempting to update their policies by improving some classical techniques, such as Hill Cipher [3,4,15,22], Cesar, Vigenére [5,6], Feistel [7][8][9]16] and so on.

Feistel's classical technique
After separating the plain text into blocks of size 2t with t ∈ {2, 3, …} , Feistel's classical method is resumed by the scheme of the figure below. The first round of Feistel applied to a (U k ) block is illustrated in Fig. 1.
Note in passing, that the size of the blocks is defined and known in advance. This encryption can be explained by Eq. (1), which works on two blocks (G k , D k ). f k is a pre-defined pseudo-random function used in the system. In the absence of any diffusion, all classical systems remain exposed to differential attacks. Several techniques to improve Feistel's solution have invaded the network world [3,[9][10][11]. Most of them are focused on increasing the number of laps. In this article, the improvements made With k ∈ [1, t] to the Feistel scheme are on the one hand the size of the blocks calculated from the chaotic maps and the dimension of the original image, on the other hand, the application of some genetic operators adapted to the encryption of color images used as tour functions [12,13,19,23,24].

Usual operator genetics
In this approach, we will use the three genetic operators below, appropriate for the encryption of the image: • Genetic mutation operator A genetic mutation is a change in a sub-block of DNA, determined chaotically. • Genetic inversing operator A genetic inversio n is a passage to the complement of a sub-block of DNA, determined in a chaotic manner. • Genetic crossover operator A genetic cross is a cross between several DNA genes to form a new gene [11,12].

Our contribution
Our technique works in two steps: • Application of a new and greatly improved Feistel scheme. • The rapid transition to writing in restricted ASCII code.
This passage can be shown schematically in Fig. 2.

The proposed method
Based on chaos, [13,14] our new technology is based on the following steps:

Step 1: Chaotic sequences development
Our algorithm is a symmetric encryption system based on a large key, which is used to generate the three most commonly used chaotic sequences in the sector of color image encryption.

The logistics map
The logistic map is described by a recurrent sequence defined by equation (2).

PWLCM map
It is a real linear sequence by pieces defined by the equation below [18]:

The skew tent map (SKTM)
The Skew tent map will be redefined as equation (4).

Chaotic used vector design
Our work requires the construction of three chaotic vectors (CL), (KR) and (KL) in (G 256 ) , and two (CR), (BR) binary vectors. This construct is seen by algorithm 1.

Step 2: Feistel scheme upgrade
This new technology is articulated on two main steps: • A chaotic changeover to ASCII code • Two Feistel blocks rounds of size (2t) each.
After extracting the three color channels (RGB) and converting them to vectors (Vr) , (Vg) , (Vb) of size (1, nm) for each, a concatenation is established to generate a vector X(x 1 , x 2 , … , x 3nm ) of size (1, 3nm) . The operation of concatenation of the three vectors is performed according to algorithm 2. The resulting vector is said to be cut into blocks for the application of one single Feistel round.

Block size computing
To facilitate the implementation of the second encryption stage, the vector (X) must be cut into blocks uniform, we are going to calculate the constants (q). This value is given by equation (5).

Vector size adaptation
Therefore, the new vector size (XT) can be obtained by the following equation: By truncating the last (s) (X) pixel, and placing it in the (XL) after confusion with the vector (Cl) or the vector (KL) following the value of vector (BR). The (XT) adaptive vector can be obtained by algorithm 3.

Transition to MT matrix
The resulting vector (XT) is converted in matrix (MT) of size (t, 2q). This matrix will be subdivided into two matrices (XG) and (XD), of respective dimension (t, q). This transformation is illustrated in Fig. 3.

Initialization vector design
The (IV) initialization vector must be recalculated to change the value of the starting block. Ultimately, the The role of the initialization vector is to change the bootstrap block value and thereby start the encryption process. this operation is defined by algorithm 5. To simplify the calculation, the chaotic vector is transformed into a matrix of size (t, q). The figure below illustrates this transformation (Fig. 4).

Step 3: New image encryption technology
Our new algorithm applies Feistel's single turn provided by the new Vigenere function, and then applies genetic crossover to the output vector. This process is illustrated by Fig. 5.
This Feistel's first round is represented by equation (7). This first round is described by the following function V k genetic inversion, controlled by the two chaotic vectors (PA) and (PE), generated by algorithm 6: This scheme is analyzed by algorithm 8. We define the output matrix (XF) of this first round by the equation (8): On each row of the matrix (XF), we will apply a genetic mutation defined by algorithm 9 which makes it possible to generate a new matrix (FX) of the same size.
Solid chaining is established between the encrypted block and the next clear block to increase the impact of the avalanche effect and protect the system against any differential attacks. This diffusion operation is illustrated by algorithm 10.

Step 4: ASCII code notation
The output vector (XR) will be increased by amputated vector (XL) and then converted to restricted ASCII code. The vector (XF) is converted into a vector (XN) of size (1, 12nm) with coefficient in (G 4 ) by algorithm 11:

Substitute table building process
In our work, in order to provide a random aspect to the event, let us consider the table 1.
Each row of this table is converted into a permutation obtained by sorting on the elements of the row.

Pixels written in (G 4 )
For each pixel X(i), two nucleotide transformations are applied. The first consists in transforming the pixel X(i) in hexadecimal format by applying equation (9). The second transformation allows the passage of results obtained from base 16 to base 4 via Equation (10).
Equation (9) converts grayscale values between 0 and 255 to hexadecimal (Base 16), while equation (10) converts these values from base 16 to base 4. In addition, algorithm 11 allows the passage of the values in gray level to the base 4 via the use of the chaotic table PP illustrated in table 1.

Switching to restricted ASCII code
The ASCII codes used in our encryption system are the characters whose code respects Eq. (11).

Code table design
All these characters are stored in the table (TC) defined by algorithm 12.

Restricted ASCII code switching
The vector (XN) will be transformed into a vector (AC) of size (1, 4nm) whose coordinates are the codes of the vector (AS). The vector (BS) contains the ASCII codes permuted by S 2 .
These two algebraic operators are defined by equation (12).

Crossover process
The vector (AC) will be subjected to a genetic crossing controlled by a chaotic QR table of size (4nm, 3). The first column indicates the pixel of the vector (AC). Whereas, the second column indicates the vector pixel (A1) which will be intersected with the vector pixel (AC). and finally, the third column indicates the crossing pixel position. Figure 7 can be interpreted by the following algorithm:

Genetic crossover expression
The vector (VF) is the encrypted image.

ASCII code level simulations
(a) ASCII code Percent The following figure shows the percentage of ASCII codes in the clear image (Fig. 8): We notice that in this example, all the ASCII codes used are uniformly distributed. This protects our cryptosystem from all statistical attacks.

Step 5: Decryption of encrypted images
The solid chaining establishes between the encrypted block and the next clear block in the broadcast process, forcing us to start decryption from the last block using the opposite functions. So, the decryption process should follow these steps : • Read the encrypted image and switch to vector (VF) • Switching to restricted ASCII code • Application of the reverse crossover • Change in a rating under (G 256 ) • Reverse Feistel application • Reverse diffusion

Deep simulations
We randomly selected 150 images from a chaotic vector that contained a database of thousands of color images in different sizes and formats. All these images were tested by our system. all experiments are performed under the Matlab software running under Windows 7, on a basic i7 personal computer, 16 GB RAM, and 500 GB hard disk, and we found the following results.

Key-space analysis
The chaotic sequence used in our method ensures strong sensitivity to initial conditions and can protect it from any brute force attack. The secret key to our system is : If we use single-precision real numbers 10 −10 to operate, the total size of the key will greatly exceed ≈ 2 150 ≫ 2 110 , which is enough to avoid any brute force attack.

Secret key's sensitivity analysis
Our encryption key has a high sensitivity, which means that a small degradation of a single parameter used will automatically cause a large difference from the original image. The figure below illustrates this confirmation (Fig. 9).
This ensures that in the absence of the real encryption key, the original image cannot be restored.

Entropy analysis
The entropy of an image of size (n, m)is given by the equation below: p(i) is the probability of occurrence of level (i) in the original image. The entropy values on the 150 images tested by our method are represented graphically by the following figure (Fig. 10): The entropy values calculated for the 150 images tested by our system are all stored in [7.997, 7.9998]. These values are close to the maximum value of 8, therefore our system is safe from entropy attack. Fig. 11, illustrates a sample of an encrypted test image as well as its entropy. Table 2 shows that the entropy value generated by our encryption scheme is much higher, which provides better protection against entropy attack.

Correlation analysis
The correlation of an image of size (n, m)is given by the equation below: Simulations made on 150 images of the database gave the vertical correlation scores are displayed in Figure below  (Fig. 12): Table 3 shows that the vertical correlation values of the encrypted images are close to zero. This ensures high security against correlation attacks.This is well illustrated for the test image presented below: A slight improvement in the value of the correlation is made on passing the second round (application of genetic crossing).

Histogram analysis
All images tested by our algorithm have a uniformly distributed histogram (Fig. 13). This reflects that the entropy of the encrypted images is around 8, which makes the system immune to histogram attacks. The uniform distribution of intensity levels of the images tested; shown in Fig. 13, protect against all statistical attacks.

Differential analysis
In cryptography, differential attacks are managed by the following constants:

The NPCR constant
It is determined by the equation below: with

The NPCR constant
The UACI mathematical analysis of an image is given by the next equation:

Signal-to-peak noise ratio (PSNR)
i-MSE The MSE mathematical analysis of an image is given by the next equation: where P(i, j) is the pixel of the clear image and C(i, j) is the pixel of the cypher image. ii-PSNR The PSNR mathematical analysis of an image is given by the next equation: .
Abs(C 1 (i, j) − C 2 (i, j)). The study of the 150 images selected for the calculation of NPCR is illustrated in Fig. 14: All detected values are inside the confidence interval [99.63, 99.95]. These values are largely sufficient to affirm that our cryptosystem is protected from known differential attacks. The comparison of our approach illustrates in Table 4shows its robustness compared to some recently published techniques, against all differential attacks.
The study of the 150 selected images revealed the following diagram (Fig. 15): All detected values are inside the confidence interval [33.45, 33.67]. These values are largely sufficient to affirm that our crypto system is protected from known differential attacks.

Avalanche effect
Let C 1 and C 2 be two color images of size (n,m) which differ by a single bit. Let C ′ 1 and C ′ 2 be the encrypted images of C 1 and C 2 . A passage in binary notation of the two encrypted images allows us to calculate the number of bits having undergone a change. The percentage of different number of bits between C ′ 1 and C ′ 2 constitutes the avalanche effect. According to the literature if the modify bit rate exceeds 70% the system is perfect.
Our algorithm uses a strong link between encrypted pixels and subsequent clear pixels in the strategy. This leads to a gradual change in the value, which becomes more and more important as the data spreads through the structure of the algorithm. The avalanche effect is the number of bits that have been changed if a single bit of the original image is changed. The mathematical expression of this avalanche effect is given by: The figure below depicts the evaluation of the AE score for 150 images examined by our approach (Fig. 16).
The calculation of the AE for our cipher scheme, shows that all the values are in [73.96, 74.02]. This ensures that a single bit change significantly affects the encrypted image. Table 5 illustrates the encryption and decryption times. These times are very similar and vary in the interval [0.05, 0.1].

Performance time
The time required for the encryption and decryption of an image by our technique is very reduced, which encourages its use for the encryption of video sequences.

Conclusion
Our technique begins with the application of a Feistel turn applied to size blocks calculated from the chaotic maps used. We have implemented largely modified genetic operators for better use in image encryption. After a rapid transition from output vector to restricted ASCII code, the genetic crossover was applied to the vector integrity under the control of a chaotic crossover table. the results obtained confirm the robustness of our approach against different attacks. Comparisons that have been made show that our approach has taken place among the best recently published techniques.

Declarations
Conflict of interest I emphasize that this article has no potential conflicts of interest. Additionally this work was unfunded and does not contain any studies with participating humans or animals performed by any of the authors.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons. org/licenses/by/4.0/.