#
RGB Image Encryption through Cellular Automata, S-Box and the Lorenz System^{ †}

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Preliminary for the Proposed Image Encryption Scheme

#### 2.1. Rule 30 Cellular Automaton

#### 2.2. S-Box

#### 2.3. The Lorenz System

## 3. Methodology of the Proposed RGB Image Encryption through Cellular Automata, S-Box and the Lorenz System

#### 3.1. The Encryption Scheme

- An image of appropriate dimensions $M\times N$ is chosen and its pixels are converted into a 1D bitstream, d.
- The mean intensity of the image pixels, ${P}_{\mu}$, is calculated as$${P}_{\mu}=\frac{{\sum}_{i}{p}_{i}}{M\times N},$$$$\mu ={f}_{M}\times {P}_{\mu}.$$
- Cyclically shifting each of the ${a}_{i}$ elements of d to the right by $\mu $ places:
- XORing the resulting bitstream, now denoted ${d}_{\mu}$, with the first encryption key, ${K}_{CA}$, as follows:$${C}_{0}={d}_{\mu}\oplus {K}_{CA},$$
- The output bitstream from the XORing process, ${C}_{0}$, enters a substitution process using the proposed S-box, which is constructed employing the ideas proposed in [43]. Let us denote the resulting bitstream as ${C}_{1}$:$${C}_{1}=S({C}_{0}).$$This concludes the second stage of encryption.
- The Lorenz system is numerically solved, resulting in a 3D geometry, as depicted in Figure 5. Take the $x,y$, and z coordinates of each of the points of the resulting solution and flatten them into a single 1D array, L, as follows:$$L=\{{P}_{1},{P}_{2},\dots ,{P}_{M}\}\to \{{x}_{1},{y}_{1},{z}_{1},{x}_{2},{y}_{2},{z}_{2},\dots ,{x}_{M},{y}_{M},{z}_{M}\}.$$Next, we list plot those values into 2D, as shown in Figure 7. Examining the plot in Figure 7, it is clear that there are more positive values than there are negative ones. Therefore, we choose a threshold value $\lambda $, such that if any of the values are above this threshold, they would be accounted as 1s, otherwise, they would be accounted as 0 s, as follows:$$v=\left\{\begin{array}{cc}1,\hfill & {L}_{i}>\lambda ,\hfill \\ 0,\hfill & {L}_{i}\le \lambda .\hfill \end{array}\right.$$This newly obtained bitstream, v, of length ${N}_{L}$ would make up the seed of our Lorenz system based key, as in Figure 8.
- Repeat those ${N}_{L}$ bits until they are of the same length as d and ${C}_{1}$, thus forming the second encryption key. Let us denote it ${K}_{L}$, and XOR it with ${C}_{1}$, obtaining ${C}_{2}$ as follows:$${C}_{2}={C}_{1}\oplus {K}_{L},$$This concludes the third stage of encryption.
- ${C}_{2}$ is reshaped back into an image of the same dimensions ($M\times N$) as those of the plain image, obtaining the encrypted image.

**Figure 6.**Flow chart of PRNG of Rule 30 CA, employed in the generation of the first key, ${K}_{CA}$.

**Figure 7.**The first 50 points from the 2D array obtained from the 3D coordinates of the Lorenz system solution for the values $\sigma =10,\beta =8/3$, and $\rho =28$.

**Figure 8.**Flow chart of PRNG of chaotic sequences from the Lorenz system, employed in the generation of the second key, ${K}_{L}$.

#### 3.2. The Decryption Scheme

- Grouping the bits of the encrypted image of dimensions ($M\times N$) into a 1D bitstream, ${C}_{2}$.
- XORing ${C}_{2}$ with the second encryption key, ${K}_{L}$, as follows:$${C}_{1}={C}_{2}\oplus {K}_{L}$$This concludes the first stage of decryption.
- Applying an inverse substitution step on ${C}_{1}$, utilizing our generated S-box, as follows:$${C}_{0}={S}^{-1}({C}_{1})$$This concludes the second stage of decryption.
- Obtaining ${d}_{\mu}$ by XORing ${C}_{0}$ with the first encryption key, ${K}_{CA}$, as follows:$${d}_{\mu}={C}_{0}\oplus {K}_{CA}$$This concludes the third stage of decryption.
- Cyclically shifting each of the ${a}_{i}$ bits of ${d}_{\mu}$ in the opposite direction to that used in the encryption, i.e., to the left, by the value of $\mu $, resulting in a bitstream d
- Folding back the resulting bitstream, d, into an image of the same dimensions ($M\times N$) as those of the encrypted image, obtaining the plain image.

## 4. Security Analysis and Numerical Results

^{®}on a machine running macOS Catalina v10.15.7, equipped with a 2.9 GHz 6-Core Intel

^{®}Core

^{TM}i9 processor and 32 GB of 2400 MHz DDR4 of memory. The utilized keys are assigned the following values: $\sigma =10,\beta =8/3,\rho =28,{N}_{CA}=100,{N}_{L}=50,{f}_{M}={10}^{6}$, and $\lambda =10$. Three images that are commonly used in image processing applications and experimentation are utilized in this section. These are Lena, Peppers, and Baboon, all of dimensions $M\times N=256\times 256$. The proposed image encryption scheme is tested against various statistical and differential attacks. Those include visual and histogram analyses, a correlation coefficient analysis, mean square error (MSE), mean absolute error (MAE), peak signal to noise ratio (PSNR), information entropy, a differential attack analysis, comprising the number of pixel changing rate (NPCR) and the unified average change intensity (UACI), a key space analysis, a NIST analysis, and, finally, an execution time analysis.

#### 4.1. Visual and Histogram Analyses

#### 4.2. Chi-Square Test

#### 4.3. Information Entropy

#### 4.4. Mean Squared Error

#### 4.5. Peak Signal to Noise Ratio

#### 4.6. Mean Absolute Error

#### 4.7. Correlation Coefficient Analysis

#### 4.8. Key Space Analysis

#### 4.9. Differential Attack Analysis

#### 4.9.1. The Number of Pixel Changing Rate

#### 4.9.2. The Unified Average Change Intensity

#### 4.10. Execution Time Analysis

^{®}, whereas the proposed scheme is programmed on Wolfram Mathematica

^{®}. The average encryption time of the proposed image encryption scheme is 0.61 Mbps.

#### 4.11. The National Institute of Standards and Technology Analysis

## 5. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Farrag, S.; Maher, E.; El-Mahdy, A.; Dressler, F. Performance Analysis of UAV Assisted Mobile Communications in THz Channel. IEEE Access
**2021**, 9, 160104–160115. [Google Scholar] [CrossRef] - Furqan, H.M.; Solaija, M.S.J.; Türkmen, H.; Arslan, H. Wireless Communication, Sensing, and REM: A Security Perspective. IEEE Open J. Commun. Soc.
**2021**, 2, 287–321. [Google Scholar] [CrossRef] - El Mahdy, A.; Alexan, W. A threshold-free LLR-based scheme to minimize the BER for decode-and-forward relaying. Wirel. Pers. Commun.
**2018**, 100, 787–801. [Google Scholar] [CrossRef] - Moussa, Y.; Alexan, W. Message Security Through AES and LSB Embedding in Edge Detected Pixels of 3D Images. In Proceedings of the 2020 2nd Novel Intelligent and Leading Emerging Sciences Conference (NILES), Giza, Egypt, 24–26 October 2020; pp. 224–229. [Google Scholar] [CrossRef]
- Alexan, W.; Mamdouh, E.; Elkhateeb, A.; Al-Seba’ey, F.; Amr, Z.; Khalil, H. Securing Sensitive Data Through Corner Filters, Chaotic Maps and LSB Embedding. In Proceedings of the 2021 3rd Novel Intelligent and Leading Emerging Sciences Conference (NILES), Giza, Egypt, 23–25 October 2021; pp. 359–364. [Google Scholar]
- Elkandoz, M.T.; Alexan, W. Logistic Tan Map Based Audio Steganography. In Proceedings of the 2019 International Conference on Electrical and Computing Technologies and Applications (ICECTA), Ras Al Khaimah, United Arab Emirates, 19–21 November 2019; pp. 1–5. [Google Scholar] [CrossRef]
- Mihailescu, M.I.; Nita, S.L. Big Data Cryptography. In Pro Cryptography and Cryptanalysis; Springer: Berlin/Heidelberg, Germany, 2021; pp. 379–400. [Google Scholar]
- Alexan, W.; El Beheiry, M.; Gamal-Eldin, O. A comparative study among different mathematical sequences in 3d image steganography. Int. J. Comput. Digit. Syst.
**2020**, 9, 545–552. [Google Scholar] [CrossRef] - Farrag, S.; Alexan, W. Secure 3D data hiding technique based on a mesh traversal algorithm. Multimed. Tools Appl.
**2020**, 79, 29289–29303. [Google Scholar] [CrossRef] - El-Shafai, W.; Almomani, I.M.; Alkhayer, A. Optical Bit-Plane-Based 3D-JST Cryptography Algorithm With Cascaded 2D-FrFT Encryption for Efficient and Secure HEVC Communication. IEEE Access
**2021**, 9, 35004–35026. [Google Scholar] [CrossRef] - Verbauwhede, I. The cost of cryptography: Is low budget possible? In Proceedings of the 2011 IEEE 17th International On-Line Testing Symposium, Athens, Greece, 13–15 July 2011; p. 133. [Google Scholar] [CrossRef] [Green Version]
- Rifa-Pous, H.; Herrera-Joancomartí, J. Computational and energy costs of cryptographic algorithms on handheld devices. Future Internet
**2011**, 3, 31–48. [Google Scholar] [CrossRef] [Green Version] - Lu, Q.; Zhu, C.; Deng, X. An efficient image encryption scheme based on the LSS chaotic map and single S-box. IEEE Access
**2020**, 8, 25664–25678. [Google Scholar] [CrossRef] - Hosny, K.M. Multimedia Security Using Chaotic Maps: Principles and Methodologies; Springer: Berlin/Heidelberg, Germany, 2020; Volume 884. [Google Scholar]
- Wolfram, S. A New Kind of Science; Wolfram Media: Champaign, IL, USA, 2002; Volume 5. [Google Scholar]
- Wen, C.; Li, X.; Zanotti, T.; Puglisi, F.M.; Shi, Y.; Saiz, F.; Antidormi, A.; Roche, S.; Zheng, W.; Liang, X.; et al. Advanced Data Encryption using 2D Materials. Adv. Mater.
**2021**, 33, 2100185. [Google Scholar] [CrossRef] - Tulli, D.; Abellan, C.; Amaya, W. Engineering High-Speed Quantum Random Number Generators. In Proceedings of the 2019 21st International Conference on Transparent Optical Networks (ICTON), Angers, France, 9–13 July 2019. [Google Scholar] [CrossRef]
- Zhang, Y.; Lo, H.P.; Mink, A.; Ikuta, T.; Honjo, T.; Takesue, H.; Munro, W.J. A simple low-latency real-time certifiable quantum random number generator. Nat. Commun.
**2021**, 12, 1056. [Google Scholar] [CrossRef] - Tomassini, M.; Perrenoud, M. Cryptography with cellular automata. Appl. Soft Comput.
**2001**, 1, 151–160. [Google Scholar] [CrossRef] - Wolfram, S. Cryptography with cellular automata. In Proceedings of the Conference on the Theory and Application of Cryptographic Techniques, Santa Barbara, CA, USA, 18–22 August 1985; pp. 429–432. [Google Scholar]
- Nandi, S.; Kar, B.K.; Chaudhuri, P.P. Theory and applications of cellular automata in cryptography. IEEE Trans. Comput.
**1994**, 43, 1346–1357. [Google Scholar] [CrossRef] - Yampolskiy, R.V.; Rebolledo-Mendez, J.D.; Hindi, M.M. Password protected visual cryptography via cellular automaton rule 30. In Transactions on Data Hiding and Multimedia Security IX; Springer: Berlin/Heidelberg, Germany, 2014; pp. 57–67. [Google Scholar]
- Chai, X.; Gan, Z.; Yang, K.; Chen, Y.; Liu, X. An image encryption algorithm based on the memristive hyperchaotic system, cellular automata and DNA sequence operations. Signal Process. Image Commun.
**2017**, 52, 6–19. [Google Scholar] [CrossRef] [Green Version] - Niyat, A.Y.; Moattar, M.H.; Torshiz, M.N. Color image encryption based on hybrid hyper-chaotic system and cellular automata. Opt. Lasers Eng.
**2017**, 90, 225–237. [Google Scholar] [CrossRef] - Jiao, K.; Ye, G.; Mei, Q. Image Encryption Scheme Based on Quantum Logistic Map and Cellular Automata. In Proceedings of the 2021 IEEE 6th International Conference on Computer and Communication Systems (ICCCS), Chengdu, China, 23–26 April 2021; pp. 375–379. [Google Scholar] [CrossRef]
- Li, W.; Li, J.; Guo, L. An Efficient 2bits-Level for Image Encryption Based on Dna, Multi-Delayed Chebyshev Map and Cellular Automata. In Proceedings of the 2018 15th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP), Chengdu, China, 14–16 December 2018; pp. 131–137. [Google Scholar] [CrossRef]
- Ben Slimane, N.; Aouf, N.; Bouallegue, K.; Machhout, M. Hash Key-Based Image Cryptosystem Using Chaotic Maps and Cellular Automata. In Proceedings of the 2018 15th International Multi-Conference on Systems, Signals Devices (SSD), Yasmine Hammamet, Tunisia, 19–22 March 2018; pp. 190–194. [Google Scholar] [CrossRef]
- Kumari, M.; Gupta, S. Performance comparison between Chaos and quantum-chaos based image encryption techniques. Multimed. Tools Appl.
**2021**, 80, 33213–33255. [Google Scholar] [CrossRef] [PubMed] - Arroyo, D.; Diaz, J.; Rodriguez, F. Cryptanalysis of a one round chaos-based substitution permutation network. Signal Process.
**2013**, 93, 1358–1364. [Google Scholar] [CrossRef] [Green Version] - Elkandoz, M.T.; Alexan, W.; Hussein, H.H. Logistic Sine Map Based Image Encryption. In Proceedings of the 2019 Signal Processing: Algorithms, Architectures, Arrangements, and Applications (SPA), Poznan, Poland, 18–20 September 2019; pp. 290–295. [Google Scholar] [CrossRef]
- Yang, B.; Liao, X. A new color image encryption scheme based on logistic map over the finite field ZN. Multimed. Tools Appl.
**2018**, 77, 21803–21821. [Google Scholar] [CrossRef] - Liu, H.; Jin, C. A novel color image encryption algorithm based on quantum chaos sequence. 3D Res.
**2017**, 8, 4. [Google Scholar] [CrossRef] - ElKamchouchi, D.H.; Mohamed, H.G.; Moussa, K.H. A bijective image encryption system based on hybrid chaotic map diffusion and DNA confusion. Entropy
**2020**, 22, 180. [Google Scholar] [CrossRef] [Green Version] - Kumar, V.; Girdhar, A. A 2D logistic map and Lorenz-Rossler chaotic system based RGB image encryption approach. Multimed. Tools Appl.
**2021**, 80, 3749–3773. [Google Scholar] [CrossRef] - Khan, M.; Masood, F. A novel chaotic image encryption technique based on multiple discrete dynamical maps. Multimed. Tools Appl.
**2019**, 78, 26203–26222. [Google Scholar] [CrossRef] - Younas, I.; Khan, M. A new efficient digital image encryption based on inverse left almost semi group and Lorenz chaotic system. Entropy
**2018**, 20, 913. [Google Scholar] [CrossRef] [Green Version] - Seyedzadeh, S.M.; Norouzi, B.; Mosavi, M.R.; Mirzakuchaki, S. A novel color image encryption algorithm based on spatial permutation and quantum chaotic map. Nonlinear Dyn.
**2015**, 81, 511–529. [Google Scholar] [CrossRef] - Ge, B.; Chen, X.; Chen, G.; Shen, Z. Secure and Fast Image Encryption Algorithm Using Hyper-Chaos-Based Key Generator and Vector Operation. IEEE Access
**2021**, 9, 137635–137654. [Google Scholar] [CrossRef] - Gao, H.; Wang, X. Chaotic Image Encryption Algorithm Based on Zigzag Transform With Bidirectional Crossover From Random Position. IEEE Access
**2021**, 9, 105627–105640. [Google Scholar] [CrossRef] - Ahmad, M.; Chugh, H.; Goel, A.; Singla, P. A chaos based method for efficient cryptographic S-box design. In Proceedings of the International Symposium on Security in Computing and Communication, Mysore, India, 22–24 August 2013; pp. 130–137. [Google Scholar]
- Tanyildizi, E.; Özkaynak, F. A new chaotic S-box generation method using parameter optimization of one dimensional chaotic maps. IEEE Access
**2019**, 7, 117829–117838. [Google Scholar] [CrossRef] - Ahmad, M.; Al-Solami, E.; Alghamdi, A.M.; Yousaf, M.A. Bijective S-boxes method using improved chaotic map-based heuristic search and algebraic group structures. IEEE Access
**2020**, 8, 110397–110411. [Google Scholar] [CrossRef] - Zahid, A.H.; Al-Solami, E.; Ahmad, M. A novel modular approach based substitution-box design for image encryption. IEEE Access
**2020**, 8, 150326–150340. [Google Scholar] [CrossRef] - Khalid, I.; Jamal, S.S.; Shah, T.; Shah, D.; Hazzazi, M.M. A Novel Scheme of Image Encryption Based on Elliptic Curves Isomorphism and Substitution Boxes. IEEE Access
**2021**, 9, 77798–777810. [Google Scholar] [CrossRef] - Ramzan, M.; Shah, T.; Hazzazi, M.M.; Aljaedi, A.; Alharbi, A.R. Construction of S-Boxes using Different Maps over Elliptic Curves for Image Encryption. IEEE Access
**2021**, 9, 157106–157123. [Google Scholar] [CrossRef] - Tanveer, M.; Shah, T.; Rehman, A.; Ali, A.; Siddiqui, G.F.; Saba, T.; Tariq, U. Multi-Images Encryption Scheme Based on 3D Chaotic Map and Substitution Box. IEEE Access
**2021**, 9, 73924–73937. [Google Scholar] [CrossRef] - Nizam Chew, L.C.; Ismail, E.S. S-box construction based on linear fractional transformation and permutation function. Symmetry
**2020**, 12, 826. [Google Scholar] [CrossRef] - Jamal, S.S.; Shah, T.; AlKhaldi, A.H.; Tufail, M.N. Construction of new substitution boxes using linear fractional transformation and enhanced chaos. Chin. J. Phys.
**2019**, 60, 564–572. [Google Scholar] [CrossRef] - Shannon, C.E. Communication theory of secrecy systems. Bell Syst. Tech. J.
**1949**, 28, 656–715. [Google Scholar] [CrossRef] - Zaitsev, D.A. A generalized neighborhood for cellular automata. Theor. Comput. Sci.
**2017**, 666, 21–35. [Google Scholar] [CrossRef] - Tomassini, M.; Sipper, M.; Perrenoud, M. On the generation of high-quality random numbers by two-dimensional cellular automata. IEEE Trans. Comput.
**2000**, 49, 1146–1151. [Google Scholar] - Lorenz, E.N. Deterministic nonperiodic flow. J. Atmos. Sci.
**1963**, 20, 130–141. [Google Scholar] [CrossRef] [Green Version] - Sparrow, C. The Lorenz Equations: Bifurcations, Chaos, and Strange Attractors; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2012; Volume 41. [Google Scholar]
- Khanzadi, H.; Eshghi, M.; Borujeni, S.E. Image encryption using random bit sequence based on chaotic maps. Arab. J. Sci. Eng.
**2014**, 39, 1039–1047. [Google Scholar] [CrossRef] [Green Version] - Kwok, H.; Tang, W.K. A fast image encryption system based on chaotic maps with finite precision representation. Chaos Solitons Fractals
**2007**, 32, 1518–1529. [Google Scholar] [CrossRef] - Etemadi Borujeni, S.; Eshghi, M. Chaotic image encryption design using tompkins-paige algorithm. Math. Probl. Eng.
**2009**, 2009, 762652. [Google Scholar] [CrossRef] [Green Version] - Revathy, K.; Thenmozhi, K.; Amirtharajan, R.; Praveenkumar, P. CR Assisted IE Guarded Authenticated Biomedical Image Transactions. IEEE Photonics J.
**2018**, 10, 1–13. [Google Scholar] [CrossRef] - Hasanzadeh, E.; Yaghoobi, M. A novel color image encryption algorithm based on substitution box and hyper-chaotic system with fractal keys. Multimed. Tools Appl.
**2019**, 79, 7279–7297. [Google Scholar] [CrossRef] - Liu, H.; Wang, X. Color image encryption using spatial bit-level permutation and high-dimension chaotic system. Opt. Commun.
**2011**, 284, 3895–3903. [Google Scholar] [CrossRef] - Yang, F.; Mou, J.; Sun, K.; Cao, Y.; Jin, J. Color image compression-encryption algorithm based on fractional-order memristor chaotic circuit. IEEE Access
**2019**, 7, 58751–58763. [Google Scholar] [CrossRef] - Huang, Y.; Huang, L.; Wang, Y.; Peng, Y.; Yu, F. Shape synchronization in driver-response of 4-D chaotic system and its application in image encryption. IEEE Access
**2020**, 8, 135308–135319. [Google Scholar] [CrossRef] - Khan, M.; Shah, T. An efficient chaotic image encryption scheme. Neural Comput. Appl.
**2015**, 26, 1137–1148. [Google Scholar] [CrossRef] - Wang, Y.; Wu, C.; Kang, S.; Wang, Q.; Mikulovich, V. Multi-channel chaotic encryption algorithm for color image based on DNA coding. Multimed. Tools Appl.
**2020**, 79, 18317–18342. [Google Scholar] [CrossRef] - Rhouma, R.; Meherzi, S.; Belghith, S. OCML-based colour image encryption. Chaos Solitons Fractals
**2009**, 40, 309–318. [Google Scholar] [CrossRef] - Liu, H.; Kadir, A. Asymmetric color image encryption scheme using 2D discrete-time map. Signal Process.
**2015**, 113, 104–112. [Google Scholar] [CrossRef] - Wu, X.; Wang, K.; Wang, X.; Kan, H.; Kurths, J. Color image DNA encryption using NCA map-based CML and one-time keys. Signal Process.
**2018**, 148, 272–287. [Google Scholar] [CrossRef] - Norouzi, B.; Mirzakuchaki, S. A fast color image encryption algorithm based on hyper-chaotic systems. Nonlinear Dyn.
**2014**, 78, 995–1015. [Google Scholar] [CrossRef] - Wu, X.; Wang, K.; Wang, X.; Kan, H. Lossless chaotic color image cryptosystem based on DNA encryption and entropy. Nonlinear Dyn.
**2017**, 90, 855–875. [Google Scholar] [CrossRef] - Hua, Z.; Zhou, Y. Exponential chaotic model for generating robust chaos. IEEE Trans. Syst. Man Cybern. Syst.
**2019**, 51, 3713–3724. [Google Scholar] [CrossRef] - Zhang, Y.Q.; He, Y.; Li, P.; Wang, X.Y. A new color image encryption scheme based on 2DNLCML system and genetic operations. Opt. Lasers Eng.
**2020**, 128, 106040. [Google Scholar] [CrossRef] - Jithin, K.; Sankar, S. Colour image encryption algorithm combining, Arnold map, DNA sequence operation, and a Mandelbrot set. J. Inf. Secur. Appl.
**2020**, 50, 102428. [Google Scholar] [CrossRef] - Rehman, A.U.; Firdous, A.; Iqbal, S.; Abbas, Z.; Shahid, M.M.A.; Wang, H.; Ullah, F. A Color Image Encryption Algorithm Based on One Time Key, Chaos Theory, and Concept of Rotor Machine. IEEE Access
**2020**, 8, 172275–172295. [Google Scholar] [CrossRef] - Boyd, C.; Mathuria, A.; Stebila, D. Protocols for Authentication and Key Establishment; Springer: Berlin/Heidelberg, Germany, 2003; Volume 1. [Google Scholar]
- Alvarez, G.; Li, S. Some basic cryptographic requirements for chaos-based cryptosystems. Int. J. Bifurc. Chaos
**2006**, 16, 2129–2151. [Google Scholar] [CrossRef] [Green Version] - Ur Rehman, A.; Liao, X.; Ashraf, R.; Ullah, S.; Wang, H. A color image encryption technique using exclusive-OR with DNA complementary rules based on chaos theory and SHA-2. Optik
**2018**, 159, 348–367. [Google Scholar] [CrossRef] - Li, B.; Liao, X.; Jiang, Y. A novel image encryption scheme based on logistic map and dynatomic modular curve. Multimed. Tools Appl.
**2018**, 77, 8911–8938. [Google Scholar] [CrossRef] - Hu, X.; Wei, L.; Chen, W.; Chen, Q.; Guo, Y. Color image encryption algorithm based on dynamic chaos and matrix convolution. IEEE Access
**2020**, 8, 12452–12466. [Google Scholar] [CrossRef] - Wu, X.; Kurths, J.; Kan, H. A robust and lossless DNA encryption scheme for color images. Multimed. Tools Appl.
**2018**, 77, 12349–12376. [Google Scholar] [CrossRef] - Huang, C.K.; Nien, H.H. Multi chaotic systems based pixel shuffle for image encryption. Opt. Commun.
**2009**, 282, 2123–2127. [Google Scholar] [CrossRef] - Gong, L.; Qiu, K.; Deng, C.; Zhou, N. An image compression and encryption algorithm based on chaotic system and compressive sensing. Opt. Laser Technol.
**2019**, 115, 257–267. [Google Scholar] [CrossRef] - Zhang, X.; Wang, L.; Wang, Y.; Niu, Y.; Li, Y. An image encryption algorithm based on hyperchaotic system and variable-step Josephus problem. Int. J. Opt.
**2020**, 2020, 6102824. [Google Scholar] [CrossRef] - Xu, L.; Li, Z.; Li, J.; Hua, W. A novel bit-level image encryption algorithm based on chaotic maps. Opt. Lasers Eng.
**2016**, 78, 17–25. [Google Scholar] [CrossRef] - Slimane, N.B.; Aouf, N.; Bouallegue, K.; Machhout, M. A novel chaotic image cryptosystem based on DNA sequence operations and single neuron model. Multimed. Tools Appl.
**2018**, 77, 30993–31019. [Google Scholar] [CrossRef]

**Figure 1.**The orange cells are the Moore neighborhood for the violet cell (

**left**). The orange cells are the von Neumann neighborhood for the violet cell. The range-2 cross neighborhood includes the yellow cells also (

**right**).

**Figure 5.**The butterfly shape of a Lorenz system solution for the values $\sigma =10,\beta =8/3$, and $\rho =28$.

**Figure 11.**Lena image and histogram comparison before and after encryption. (

**a**) Plain image. (

**b**) Encrypted image. (

**c**) Histogram of the plain image. (

**d**) Histogram of the encrypted image.

**Figure 12.**Peppers image and histogram comparison before and after encryption. (

**a**) Plain image. (

**b**) Encrypted image. (

**c**) Histogram of the plain image. (

**d**) Histogram of the encrypted image.

**Figure 13.**Baboon image and histogram comparison before and after encryption. (

**a**) Plain image. (

**b**) Encrypted image. (

**c**) Histogram of the plain image. (

**d**) Histogram of the encrypted image.

**Figure 14.**Correlation coefficient diagrams of the plain and encrypted Lena image. (

**a**) Horizontal. (

**b**) Vertical. (

**c**) Diagonal. (

**d**) Horizontal. (

**e**) Vertical. (

**f**) Diagonal.

**Figure 15.**Correlation coefficient diagram of the plain and encrypted red channel of Lena image. (

**a**) Horizontal. (

**b**) Vertical. (

**c**) Diagonal. (

**d**) Horizontal. (

**e**) Vertical. (

**f**) Diagonal.

**Figure 16.**Correlation coefficient diagram of the plain and encrypted green channel of Lena image. (

**a**) Horizontal. (

**b**) Vertical. (

**c**) Diagonal. (

**d**) Horizontal. (

**e**) Vertical. (

**f**) Diagonal.

**Figure 17.**Correlation coefficient diagram of the plain and encrypted blue channel of Lena image. (

**a**) Horizontal. (

**b**) Vertical. (

**c**) Diagonal (

**d**) Horizontal. (

**e**) Vertical. (

**f**) Diagonal.

**Table 1.**Example S-box values as constructed from the proposed method in [43].

203 | 153 | 138 | 245 | 187 | 130 | 186 | 167 | 144 | 40 | 131 | 250 | 202 | 47 | 244 | 136 |

141 | 166 | 91 | 116 | 121 | 13 | 210 | 55 | 7 | 126 | 217 | 113 | 90 | 71 | 127 | 70 |

12 | 119 | 104 | 54 | 190 | 88 | 184 | 32 | 42 | 248 | 112 | 158 | 89 | 11 | 209 | 154 |

229 | 30 | 207 | 220 | 195 | 23 | 216 | 128 | 118 | 102 | 109 | 255 | 249 | 4 | 53 | 1 |

211 | 74 | 197 | 206 | 235 | 198 | 18 | 193 | 81 | 149 | 19 | 117 | 115 | 31 | 5 | 147 |

231 | 25 | 182 | 242 | 163 | 14 | 177 | 180 | 254 | 24 | 208 | 123 | 111 | 84 | 224 | 178 |

161 | 201 | 157 | 133 | 175 | 236 | 218 | 241 | 106 | 165 | 137 | 213 | 36 | 162 | 38 | 230 |

10 | 205 | 107 | 69 | 97 | 251 | 159 | 222 | 191 | 65 | 57 | 93 | 179 | 212 | 17 | 72 |

76 | 20 | 214 | 194 | 61 | 125 | 114 | 101 | 34 | 152 | 171 | 122 | 228 | 68 | 85 | 199 |

170 | 83 | 0 | 174 | 87 | 58 | 172 | 189 | 29 | 135 | 86 | 105 | 223 | 156 | 143 | 132 |

196 | 63 | 43 | 237 | 181 | 185 | 240 | 45 | 78 | 164 | 200 | 192 | 66 | 35 | 98 | 6 |

160 | 188 | 150 | 52 | 247 | 27 | 219 | 95 | 221 | 44 | 120 | 92 | 151 | 16 | 39 | 21 |

82 | 124 | 100 | 56 | 96 | 79 | 33 | 173 | 146 | 134 | 49 | 233 | 3 | 77 | 80 | 243 |

94 | 15 | 75 | 232 | 26 | 110 | 252 | 226 | 142 | 140 | 238 | 108 | 176 | 64 | 239 | 59 |

22 | 51 | 60 | 183 | 46 | 67 | 204 | 253 | 8 | 2 | 148 | 155 | 139 | 129 | 41 | 234 |

62 | 37 | 50 | 227 | 28 | 103 | 48 | 246 | 168 | 99 | 145 | 9 | 215 | 225 | 73 | 169 |

Image | Information Entropy |
---|---|

Lena | $7.99910$ |

Peppers | $7.99877$ |

Baboon | $7.99907$ |

Image | Channels | Information Entropy |
---|---|---|

Lena | Red | $7.9972$ |

Green | $7.9973$ | |

Blue | $7.9966$ | |

Peppers | Red | $7.9964$ |

Green | $7.9969$ | |

Blue | $7.9969$ | |

Baboon | Red | $7.9973$ |

Green | $7.9967$ | |

Blue | $7.9967$ |

Scheme | Information Entropy Values | ||
---|---|---|---|

Red | Green | Blue | |

Proposed scheme | $7.9972$ | $7.9973$ | $7.9966$ |

[46] | $7.9991$ | $7.9954$ | $7.9963$ |

[35] | $7.9973$ | $7.9972$ | $7.9975$ |

[58] | $7.9994$ | $7.9994$ | $7.9993$ |

[59] | $7.9791$ | $7.9802$ | $7.9827$ |

[60] | $7.9948$ | $7.9958$ | $7.9950$ |

[61] | $7.9993$ | $7.9993$ | $7.9993$ |

Image | Channels | MSE | PSNR [dB] |
---|---|---|---|

Lena | Red | 10,663.2963 | $7.8518$ |

Green | $8982.0206$ | $8.5970$ | |

Blue | $7021.3295$ | $9.6666$ | |

Peppers | Red | $8032.5074$ | $9.0822$ |

Green | 11,143.3106 | $7.66066$ | |

Blue | 11,101.1624 | $7.67712$ | |

Baboon | Red | $8337.2601$ | $8.92057$ |

Green | $7434.5269$ | $9.41827$ | |

Blue | $9113.8334$ | $8.53379$ |

Image | Proposed Scheme | [35] | [36] | |||
---|---|---|---|---|---|---|

Avg. MSE | Avg. PSNR [dB] | MSE | PSNR [dB] | MSE | PSNR [dB] | |

Lena | $8888.88$ | $8.64233$ | 10,869.73 | $7.7677$ | $4859.03$ | $11.3$ |

Peppers | 10,092.3 | $8.09089$ | - | - | $6399.05$ | $10.10$ |

Baboon | $8295.21$ | $8.94253$ | 10,930.33 | $7.7447$ | $7274.44$ | $9.55$ |

Plain Image | Encrypted Image | |||||
---|---|---|---|---|---|---|

Correlation Coefficient | Correlation Coefficient | |||||

Image | Horizontal | Diagonal | Vertical | Horizontal | Diagonal | Vertical |

Lena | $0.96734$ | $0.94821$ | $0.98276$ | $0.002287$ | $-0.00132$ | $-0.00160$ |

Peppers | $0.95595$ | $0.95371$ | $0.97939$ | $-0.00063$ | $-0.00003$ | $-0.00102$ |

Baboon | $0.92203$ | $0.87049$ | $0.90303$ | $0.001362$ | $-0.00332$ | $-0.00138$ |

Scheme | Horizontal | Diagonal | Vertical |
---|---|---|---|

Proposed scheme | $0.002287$ | $-0.00132$ | $-0.00160$ |

[24] | $0.0022$ | $-0.0017$ | $0.0001$ |

[35] | $0.0054$ | $0.0054$ | $0.0016$ |

[63] | $0.000199$ | $0.003705$ | $-0.000924$ |

[64] | $0.0681$ | $0.0128$ | $0.0049$ |

[65] | $0.001862$ | $0.003768$ | $0.000710$ |

[66] | $-0.0082$ | $-0.0012$ | $-0.0128$ |

[67] | $0.000546$ | $0.000192$ | $0.000514$ |

[68] | $-0.0029$ | $-0.0045$ | $-0.0001$ |

[69] | $0.0023$ | $-0.0059$ | $0.0029$ |

Lena | ||||||
---|---|---|---|---|---|---|

Channel | CC | Plain Image | Encrypted Image | [70] | [71] | [72] |

Red | HC | $0.95722$ | $-0.00364$ | $0.001365$ | $0.0021$ | $0.9568$ |

DC | $0.93389$ | $0.00016$ | $0.000232$ | $-0.0026$ | $0.0075$ | |

VC | $0.97889$ | $0.000697$ | $0.004776$ | $0.0018$ | $-0.0376$ | |

Green | HC | $0.94321$ | $0.000118$ | $0.003294$ | $-0.0006$ | $0.0020$ |

DC | $0.91931$ | $0.00177$ | $0.004807$ | 0 | $-0.0046$ | |

VC | $0.97137$ | $-0.0011$ | $-0.000579$ | $0.0004$ | $-0.0013$ | |

Blue | HC | $0.92845$ | $-0.00164$ | $0.002060$ | $-0.005$ | $0.0071$ |

DC | $0.90068$ | $-0.00523$ | $-0.004043$ | $-0.0104$ | $-0.0009$ | |

VC | $0.95593$ | $0.006041$ | $0.000194$ | $0.001$ | $-0.0423$ |

Baboon | |||||
---|---|---|---|---|---|

Channel | CC | Plain Image | Encrypted Image | [70] | [71] |

Red | HC | $0.94741$ | $-0.00428$ | $0.001391$ | $0.0005$ |

DC | $0.90413$ | $-0.00009$ | $0.000334$ | $0.0014$ | |

VC | $0.92152$ | $0.000706$ | $0.004650$ | $0.0059$ | |

Green | HC | $0.87266$ | $0.00340$ | $-0.008134$ | $0.0078$ |

DC | $0.79341$ | $0.00282$ | $0.005334$ | $-0.001$ | |

VC | $0.83905$ | $-0.0016$ | $0.000829$ | $0.0042$ | |

Blue | HC | $0.92153$ | $-0.00253$ | $-0.00889$ | $0.0021$ |

DC | $0.87668$ | $-0.00635$ | $0.001710$ | $-0.0114$ | |

VC | $0.91432$ | $-0.00003$ | $0.000056$ | $-0.0039$ |

Scheme | Key Space |
---|---|

Proposed scheme | ${10}^{128}\approx {2}^{425}$ |

[31] | ${2}^{256}$ |

[38] | ${2}^{345}$ |

[39] | ${2}^{256}$ |

[32] | ${2}^{128}$ |

[63] | ${2}^{187}$ |

[75] | ${10}^{94}$ |

[76] | ${2}^{128}$ |

[77] | ${2}^{219}$ |

Test Type | Image | Result |
---|---|---|

NPCR | Lena | $99.62870$ |

Pepper | $99.59360$ | |

Baboon | $99.58190$ | |

UACI | Lena | $30.34321$ |

Pepper | $32.17523$ | |

Baboon | $29.39764$ |

Test Type | Image | Channel Type | Result | [83] |
---|---|---|---|---|

NPCR | Lena | Red | $99.6109$ | $99.6355$ |

Green | $99.6109$ | $99.6256$ | ||

Blue | $99.6375$ | $99.6159$ | ||

Pepper | Red | $99.6032$ | $99.6307$ | |

Green | $99.6032$ | $99.6250$ | ||

Blue | $99.3750$ | $99.6213$ | ||

Baboon | Red | $99.5880$ | $99.6102$ | |

Green | $99.5880$ | $99.6134$ | ||

Blue | $99.5880$ | $99.6057$ | ||

UACI | Lena | Red | $33.4158$ | $33.4657$ |

Green | $30.3902$ | $33.4552$ | ||

Blue | $33.2420$ | $33.4550$ | ||

Pepper | Red | $33.3459$ | $33.4832$ | |

Green | $33.4702$ | $33.4904$ | ||

Blue | $33.4357$ | $33.4619$ | ||

Baboon | Red | $33.4273$ | $33.5002$ | |

Green | $33.4635$ | $33.4711$ | ||

Blue | $33.7951$ | $33.4951$ |

Scheme | NPCR | UACI |
---|---|---|

Proposed scheme | $99.62870$ | $30.34321$ |

[35] | $99.52$ | $26.7933$ |

[78] | $99.6075$ | $33.4342$ |

[79] | $99.52$ | $26.7933$ |

Image Dimensions | ${\mathit{t}}_{\mathbf{Enc}}$ [s] | ${\mathit{t}}_{\mathbf{Dec}}$ [s] | ${\mathit{t}}_{\mathbf{Tot}}$ [s] |
---|---|---|---|

$128\times 128$ | $2.123165$ | $0.76698$ | $2.890163$ |

$256\times 256$ | $2.582389$ | $3.149124$ | $5.731513$ |

$512\times 512$ | $4.379808$ | $11.83809$ | $16.217898$ |

**Table 17.**Execution time comparison for various schemes of the Lena image having dimensions $256\times 256$.

Scheme | Encryption Time [s] | Machine Specifications (CPU and RAM) |
---|---|---|

Proposed scheme | $2.582389$ | 2.9 GHz Intel^{®} Core^{TM} i9, 32 GB |

[77] | $3.45$ | N/A |

[80] | $1.1168$ | 3.4 GHz Intel^{®} Core^{TM} i7, 8 GB |

[81] | $1.112$ | 3.4 GHz Intel^{®} Core^{TM} i3, 4 GB |

[82] | $4.98$ | 2.5 GHz AMD^{®}, 4 GB |

Test Name | Red | Green | Blue | Remarks |
---|---|---|---|---|

Frequency | $0.612882$ | $0.273620$ | $0.426467$ | Success |

Block Frequency | $0.431942$ | $0.338326$ | $0.545500$ | Success |

Run (m = 75,221) | $0.239030$ | $0.252482$ | $0.103463$ | Success |

Long runs of ones | $0.907470$ | $0.993509$ | $0.650024$ | Success |

Rank | $0.839897$ | $0.669290$ | $0.934658$ | Success |

Spectral FFT | $0.504492$ | $0.722283$ | $0.962204$ | Success |

Non overlapping | $0.611940$ | $0.669954$ | $0.552968$ | Success |

Overlapping | $0.491780$ | $0.502543$ | $0.554045$ | Success |

Universal | $0.431557$ | $0.016275$ | $0.375857$ | Success |

Serial | $0.750796$ | $0.094145$ | $0.836764$ | Success |

Serial | $0.786736$ | $0.214226$ | $0.637876$ | Success |

Approx. Entropy | $0.701255$ | $0.182486$ | $0.781052$ | Success |

Cumulative sum forward | $0.941731$ | $0.455203$ | $0.368786$ | Success |

Cumulative sum reverse | $0.534965$ | $0.347123$ | $0.551838$ | Success |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Alexan, W.; ElBeltagy, M.; Aboshousha, A.
RGB Image Encryption through Cellular Automata, S-Box and the Lorenz System. *Symmetry* **2022**, *14*, 443.
https://doi.org/10.3390/sym14030443

**AMA Style**

Alexan W, ElBeltagy M, Aboshousha A.
RGB Image Encryption through Cellular Automata, S-Box and the Lorenz System. *Symmetry*. 2022; 14(3):443.
https://doi.org/10.3390/sym14030443

**Chicago/Turabian Style**

Alexan, Wassim, Mohamed ElBeltagy, and Amr Aboshousha.
2022. "RGB Image Encryption through Cellular Automata, S-Box and the Lorenz System" *Symmetry* 14, no. 3: 443.
https://doi.org/10.3390/sym14030443