^{1}

^{1}

^{2}

^{1}

^{3}

^{4}

^{5}

^{1}

^{2}

^{3}

^{4}

^{5}

Due to the growing of the use of Internet and communication media, image encryption is rapidly increased. Image sharing through unsafe open channels is vulnerable for attacking and stealing. For protecting the images from attacks, encryption techniques are required. Recently, new and efficient chaos-based techniques have been suggested to develop secure image encryption. This study presents a novel image encryption framework based on integrating the chaotic maps and color codes. Three phases are involved in the proposed image encryption technique. Piecewise chaotic linear map (PWLCM) is used in the first phase for permuting the digital image. In the second phase, substitution is done using Hill cipher which is the mixing of color codes with the permuted image. The third phase is implemented by XORing, a sequence generated by the chaotic logistic map (CLM). The proposed approach enhances the diffusion ability of the image encryption making the encrypted images resistant to the statistical differential attacks. The results of several analyses such as information entropy, histogram correlation of adjacent pixels, unified average changing intensity (UACI), number of pixel change rate (NPCR), and peak signal-to-noise ratio (PSNR) guarantee the security and robustness of the proposed algorithm. The measurements show that the proposed algorithm is a noble overall solution for image encryption. Thorough comparison with other image encryption algorithms is also carried out.

Images are a substantial source of information not limited to the daily routine of a common person, but having diverse applications in various fields of military, medical, and industry. For example, we may enumerate military image records, trusted video conferencing, satellite imagery, planetary motion images, and keeping a person’s medical record [

Imaging technology meets chaos and propagation requirements compared with traditional encryption systems; chaotic systems [

In 2014, [

Chaos system plays a vital role in the different fields of mathematics. Many complicated systems can be investigating through chaos systems. Chaotic maps have very interesting features such as sensitivity to the initial value: a completely different sequence is generated with the small change in the initial value. Other features may include nonperiodicity, the map which is used to generate the chaotic sequence is nonperiodic, and randomness behavior, the chaotic sequences which are generated by the chaotic map are mostly pseudorandom sequences with complex structures. Due to these features, security of image encryption can be improved because without knowing the correct values of control parameters and initial conditions, an attacker cannot predict the chaos map. These features of chaotic maps enable them to be highly recommended for creating the confusion and diffusion in image encryption. For instance, see references [

The present study is inspired by the above cited investigations and their applications to different areas. The core goal of this work is to make advanced venture in the regime of image encryption using chaotic maps. More accurately, this manuscript deals with developing and analyzing a novel image encryption that comprises three phases: pixel permutation process, substitution process, and pixel diffusion process. The permutation sequence for the first phase is generated by PWLCM, and the pixels of the plain image are then permuted according to the permutation sequence. Instead of using S-boxes for substitution phase, the substitution of pixels in the permuted image is determined by Hill cipher whose key is generated by color codes. The same key is used in the decryption process because it is self-invertible. At the end, the diffusion process is completed by CLM to ensure the secrecy of the entire image encryption technique. The effectiveness of the proposal is shown by several experimental results. By using information entropy analysis along with other indicative parameters such as entropy, PSNR, UACI, NPCR, and correlation factors, the proposed image encryption technique is compared with some existing techniques.

The remaining study is outlined as follows. The proposed image encryption algorithm is given in Section

To develop an algorithm, following three aspects should be considered:

The evaluation and implementation of the algorithm must be simple and easy

The design of the encryption algorithm must resist the known attacks

For the algorithms, the concepts and basic ideas must be well established and reliable

Keeping in mind all the three aspects, an efficient and secure technique for image encryption is proposed here, using the chaotic logistic map and color codes.

For the image selection, the size of

There are three phases involved in encryption; pixel permutation, substitution process using Hill cipher with color codes, and pixel diffusion. In the first phase, the piecewise linear chaotic map is used for permuting the pixels, so that the statistical structure of the plain image is dissipated into long-range statistics of the cipher image. The permuted image is then mixed with a self-invertible key matrix generated by secret color codes, in the second phase. Finally, confusion is achieved by XORing with another chaotic map to make the relationship between the statistics of the cipher image and the value of the key as complex as possible to thwart attempts of cryptanalyst. The designed flowchart shown in Figure

Flowchart of the proposed image encryption algorithm.

Three keys

There are many different ways to generate the chaotic sequences or the piecewise chaotic maps for the encryption. The authors of [

The piecewise linear chaotic map is defined [

The following Algorithm

Input. Color image _{1} = (_{0}

Output. Image array

Step 1. One-dimensional array

Step 2. Using PWLCM (1) with the key

Step 3. Compute the position vector of

Step 4. The array

The Hill cipher [

The Hill cipher method requires an invertible key matrix, so that the decryption can be allowed. To overcome the difficulty of having an invertible key matrix, self-invertible matrix is introduced by Acharya et al. [

RGB color format is a model that adds red, blue, and green colors in different quantities and produces new colors. Total bits that each color uses are 8, and hence, they can have any integer value from 0 to 255. There are _{.} The resulting matrices are combined once again to make a one-dimensional array

Schematic representation of key mixing with color codes.

Input. Permuted array PM,

Output. An array

Step 1. Computing self-invertible matrix

Make a matrix

Take a random integer

Calculate

where

Form a 6 × 6 self-invertible matrix

Step 2. Making submatrices

Convert one-dimensional array PM into submatrices of order

Key mixing is performed using the subsequent formula of Hill cipher

Concatenate all the

In the final phase, using key

Input. An array

Output. Encrypted image

Step 1. With key

Step 2. The sequence

Step 3. Bitwise XOR each element of

Step 4. Reshape array

Step 5. Convert resulting matrix in step (4) to get the cipher image

The final phase is a combination of a chaotic logistic map and XOR operation to apply the diffusion of pixels. Due to this change of pixel value, the pixels of the cipher image drastically change with even small one bit change in the plain image. For this process, we generate a random sequence using CLM which is defined as follows:

The conditions and parameters of CLM are defined as

The chaotic behavior of the CLM with infinite period is shown in Figure

Bifurcation diagram of CLM.

The following Algorithm

The following image decryption algorithm is used to revert back to the encryption algorithm for getting the original image. The decryption process also comprises three stages. In the first stage, the XOR operation is eradicated with the sequence generated with key

The following Algorithm

Input. Encrypted image

Output. Plain color image

Step 1. The encrypted image matrix

Step 2. As in step 1 and step 2 in Algorithm

Step 3. Each element of

Step 4. By using key _{2}, receiver generates matrix _{p} as in Algorithm

Step 5.Convert one-dimensional array

Step 6. Key mixing is reversed by using the formula

Step 7. Rewrite all

Step 8. By iterating the PWLCM and using the shared secret key

Step 9. The permutation array is computed by inverse transform position

Step 10. Use

Step 11. Reshape

For the evaluation of the proposed scheme, we used Matlab 2018a. The algorithms of pixel permutation, key mixing using Hill cipher with color codes, and pixel diffusion are executed to get the encrypted image and decryption algorithm to again get the plain image back. The standard colored images of Lena with (256 × 256) pixels are taken for the testing of our proposal. We perform the encryption using

Sample Lena (colored 256 × 256 pixels). (a) Original image. (b) Encrypted image. (c) Decrypted image.

In this section, proposed algorithm is evaluated by analyzing the statistical and differential parameters. We have developed the guidelines, both generally and specifically to compare the algorithm with different techniques. For performing correct encryption and decryption, these guidelines should be followed when choosing certain parameters involved in the algorithms.

Figure

Histogram analysis of encrypted image of Lena (colored 256 × 256 pixels). (a) Red component. (b) Green component. (c) Blue component.

The confusion and diffusion can be tested by using correlation analysis between neighboring pixels in the original image and the corresponding encrypted image. The correlation is calculated by using the following formula:

Correlation (row wise) of original image of Lena. (a) Red component. (b) Green component. (c) Blue component.

Correlation (column wise) of original image of Lena. (a) Red component. (b) Green component. (c) Blue component.

Correlation (diagonal wise wise) of original image of Lena. (a) Red component. (b) Green component. (c) Blue component.

Correlation (row wise) of encrypted image of Lena. (a) Red component. (b) Green component. (c) Blue component.

Correlation (column wise) of encrypted image of Lena. (a) Red component. (b) Green component. (c) Blue component.

Correlation (diagonal wise) of encrypted image of Lena. (a) Red component. (b) Green component. (c) Blue component.

Lena (colored 256 × 256 pixels) image correlation coefficient values.

Direction | Red | Green | Blue | |||
---|---|---|---|---|---|---|

Original | Cipher | Original | Cipher | Original | Cipher | |

Horizontal | 0.9910 | 0.0046 | 0.9889 | 0.0005 | 0.9846 | 0.0084 |

Vertical | 0.9781 | 0.0009 | 0.9741 | 0.0028 | 0.9709 | −0.0032 |

Diagonal | 0.9648 | −0.0012 | 0.9613 | 0.0030 | 0.9563 | −0.0022 |

Entropy is a measurement of unpredictability of the pixel concentrations in the encrypted image. For an 8 bit image, the encryption algorithm with a value of the entropy close to 8 is considered as a good algorithm. It is calculated by the following equation:

The comparison of values of information entropy.

Image encryption algorithm | Entropy values |
---|---|

Reference [ | 7.9967 |

Reference [ | 7.9970 |

Proposed algorithm | 7.9990 |

The net pixel change rate (NPCR) and unified average changing intensity (UACI) are two measuring criteria used for investigating the effect of altering one pixel of the plain image on the cipher image. Both indicators are defined by the following formulas, respectively:

The NPCR and UACI measures indicate the resistance of the algorithm against differential attacks, such as a ciphertext-only attack, a plaintext attack, or a known plaintext attack. The higher values of NPCR and UACI give the best security measures. The comparison of the NPCR and UACI values of encrypted Lena image is given in Table

Comparison of NCPR and UACI values.

Image encryption algorithm | NPCR | UACI |
---|---|---|

Reference [ | 99.61 | 33.46 |

Reference [ | 99.22 | 33.40 |

Reference [ | 99.61 | 33.41 |

Proposed algorithm | 99.61 | 33.46 |

Estimate of critical values of NPCR and UACI.

Image encryption algorithm | Obtained value | NPCR test results | ||
---|---|---|---|---|

0.05 level | 0.01 level | 0.001 level | ||

Theoretical NPCR values | ||||

99.5693% | 99.5527% | 99.5341% | ||

Proposed algorithm | 99.61% | Pass | Pass | Pass |

UACI test results | ||||

0.05 level | 0.01 level | 0.001 level | ||

Theoretical UACI values | ||||

33.2824–33.6447% | 33.2255–33.7016% | 33.1594–33.7677% | ||

Proposed algorithm | 33.46% | Pass | Pass | Pass |

In the cipher image of test image Lena, we add 1%, 5%, and 10% salt and pepper noise as shown in Figures

Experimental results for the performance evaluation of data loss attacks. (a), (b) Cipher images and decryption result of corresponding images using our algorithm with 1% salt and pepper noise.

Experimental results for the performance evaluation of data loss attacks. (a), (b) Cipher images and decryption result of corresponding images using our algorithm with 5% salt and pepper noise.

Experimental results for the performance evaluation of data loss attacks. (a), (b) Cipher images and decryption result of corresponding images using our algorithm with 10% salt and pepper noise.

The mean square error (MSE) is the measurement of difference between the original and cipher images. The high value of MSE is related to a high difference between original image and cipher image. It can be calculated by the following equation:

Performance of MSE and PSNR.

Salt and pepper noise (%) | MSE | PSNR |
---|---|---|

1 | 8716.6 | 8.7273 |

5 | 8815.9 | 8.8263 |

10 | 8926.2 | 9.6253 |

The peak signal-to-noise ratio (PSNR) measures the conformity between the plain and cipher images. It can be calculated using the following formula:

The value of PSNR should be as low as possible between the plain and cipher images for good encryption algorithms. The value of PSNR of the proposed algorithm is given in Table

The proposed algorithms are also applied to another sample colored image of onion (198 × 135 pixels). The entropy value of onion image is 7.9975. The resulting encrypted and decrypted images are shown in Figure

Sample onion (colored 198 × 135 pixels). (a) Original image. (b) Encrypted image. (c) Decrypted image.

Histogram of cipher image of onion (colored 198 × 135 pixels). (a) Red component. (b) Green component. (c) Blue component.

Correlation (row wise) plot of plain onion image. (a) Red component. (b) Green component. (c) Blue component.

Correlation (row wise) plot of color components of onion cipher image. (a) Red component. (b) Green component. (c) Blue component.

Correlation (column wise) of original image of onion. (a) Red component. (b) Green component. (c) Blue component.

Correlation (column wise) of encrypted image of onion. (a) Red component. (b) Green component. (c) Blue component.

Correlation (diagonal wise) of original image of onion. (a) Red component. (b) Green component. (c) Blue component.

Correlation (diagonal wise) of encrypted image of onion. (a) Red component. (b) Green component. (c) Blue component.

Correlation coefficient values of two adjacent pixels of onion (198 × 135 pixels) ciphered image.

Direction | Red | Green | Blue | |||
---|---|---|---|---|---|---|

Original image | Cipher image | Original image | Cipher image | Original image | Cipher image | |

Horizontal | 0.9826 | −0.0007 | 0.9786 | −0.0068 | 0.9648 | 0.0003 |

Vertical | 0.9900 | −0.0034 | 0.9880 | 0.0046 | 0.9751 | −0.0018 |

Diagonal | 0.9721 | −0.0054 | 0.9675 | −0.0083 | 0.9427 | −0.0021 |

The key space is all the possibilities of keys that can be utilized in the encryption algorithm. The size of key space is treated as a significant aspect of the algorithm. It should be huge enough to avoid brute-force attacks. With today’s computing abilities, an algorithm can resist exhaustive attacks [

Comparison of size of key space.

Image encryption algorithms | Size of key space |
---|---|

Reference [ | |

Reference [ | |

Reference [ | |

Reference [ | |

Proposed algorithm |

The computational complexity is analyzed as follows.

Assume that a fastest computer can calculate

An image encryption algorithm should be highly sensitive to its secret key, that is, a variation of single bit in secret key should yield a totally different cipher result. A highly sensitive key may contribute towards the security of the image encryption algorithm. The output of our decryption algorithm is totally changed with a slight modification in any part of the key

This study presents a novel color image scheme based on chaotic maps. In contrast to the traditional chaos-based cryptosystems, the suggested cryptosystem is proposed using Hill cipher and color codes. The confusion phase is done by the piecewise chaotic linear map. The Hill cipher with color codes is employed for the substitution phase. The diffusion process is performed by a chaotic logistic map and bitwise XOR. The key space size of the encryption algorithm is adequately high to combat brute-force attacks. Also, the algorithm is highly sensitive to keys. Several experimental tests have been carried out with detailed numerical analysis which exhibits the robustness of the suggested algorithm against numerous attacks such as statistical and differential attacks. The proposed image encryption algorithm is highly secure which is demonstrated by performing different assessment tests. The results of these experiments and performance tests are compared with different algorithms and summarized in Table

Summary of properties comparison of different algorithms.

Algorithms | NPCR | UACI | Correlation coefficients | Entropy | ||
---|---|---|---|---|---|---|

Horizontal | Vertical | Diagonal | ||||

Reference [ | 99.22 | 33.40 | 0.0042 | 0.0033 | 0.0024 | 7.9967 |

Reference [ | 99.61 | 33.41 | −0.0026 | −0.0038 | 0.0017 | 7.9970 |

Reference [ | 99.61 | 33.47 | −0.0075 | −0.0011 | −0.0012 | 7.9998 |

Reference [ | 99.62 | 30.91 | −0.0049 | 0.0067 | 0.0010 | 7.9960 |

Proposed algorithm | 99.61 | 33.46 | 0.0045 | 0.00016 | −0.0013 | 7.9990 |

The data used to support the findings of this study are included within the article.

The authors declare that they have no conflicts of interest.

The authors thank Taif University, Taif, Saudi Arabia, for its support under the project Taif University Researchers Supporting Project number (TURSP-2020/114).