1. Introduction
The unprecedented developments and complexity witnessed in today’s wireless communication networks and big data applications render security as an issue of paramount importance [
1,
2,
3]. Data security, through cryptography and steganography [
4,
5,
6,
7,
8,
9], has thus become a vital means to ensure safe and secure operation and usage of millions of online applications [
10]. Cryptography, being the core technology in information security, has attracted the attention of scientists and engineers, with investments in its research and developments skyrocketing in recent decades [
11,
12]. Although modern cryptographic algorithms employ block ciphers such as the data encryption standard (DES), the triple DES (3DES), and the advanced encryption standard (AES), they are not best-suited for the purposes of encrypting images. This is because images hold very large amounts of data [
13]. Thus, global efforts in recent years were directed to design and build cryptosystems that are lightweight and better-suited to efficiently carry out image encryption. Outcomes of such efforts have usually involved the use of one or more pseudo random number generators (PRNGs) as well as true RNGs. The literature includes examples pooling from chaos theory [
14], cellular automata (CA) [
15], electrical circuits [
16] and electronics [
17], quantum physics [
18], as well as many others. The next few paragraphs emphasize the importance of CA and chaos theory in security applications, as well as their utilization in state-of-the-art image encryption schemes. Next, substitution boxes (S-boxes) are discussed as a powerful tool to introduce confusion in a cryptosystem.
Cellular automata are systems of dynamical nature that are discrete both in space and time. A cellular automaton comprises an array of cells. Each such cell can take on a value from a finite number of possibilities, updated synchronously in discrete steps of time, based on an interaction rule. As many cryptographic algorithms are based on RNGs, CA seems to be a great fit, as they can be utilized as RNGs with multiple advantages. Those include algorithmic simplicity and the ease of hardware implementation [
19]. One of the earliest uses of CA in cryptography was proposed by Wolfram in [
20]. Soon enough, scientists and engineers adopted the idea of CA as encryption devices and started utilizing them as well. Most notably is the work of Nandi et al. [
21], where a number of block and stream ciphers were proposed. These were based on CA built around Rule 51, Rule 90, Rule 150, Rule 153, and Rule 195. Achieved numerical results clearly showcase that the use of CA provides good defense against various attacks. Furthermore, the authors of [
21] also proposed logic diagrams for VLSI implementations of such CA based encryption hardware. A more recent work entailing the use of Rule 30 is [
22], where the authors contend that because randomly generated numbers from Rule 30 are tested for significant randomness, it can be applied in visual cryptography schemes with much success. In [
23], the authors propose an image encryption algorithm that utilizes a memrestive hyperchaotic system, CA, and DNA sequence operations. Furthermore, they make use of SHA-256 in their key generation. The authors of [
24] adopted a non-uniform CA framework to circumvent the problem of the limited number of CA reversal rules and the inability to generate long state sequences by some of them. In [
25], the authors present an image encryption scheme built on a quantum logistic map, CA, and an RSA-based key generation. The authors of [
26] employ a multi-delay Chebyshev map, along with CA and DNA coding for the purposes of image encryption. The work proposed by [
27] also employs chaos theory in addition to CA, as well as adopts SHA-2. To date, the amount of literature making use of CA in cryptography is rather limited, especially when compared to its equivalent amount that extends ideas from chaotic and dynamical systems for the same purposes of security.
The inherent characteristics of chaotic functions as a random phenomenon in nonlinear systems prove advantageous in relation to cryptography [
14], specifically, their high sensitivity to initial conditions, control parameters, periodicity, pseudo-randomness, and ergodicity [
28]. These characteristics are made use of in designing image encryption schemes. Such schemes are classified into two categories: (a) one-dimensional (1D) and (b) multi-dimensional (MD). Although image encryption schemes that are based on 1D chaotic maps are less complex and more efficient for software and hardware implementations, they exhibit less desirable characteristics, in terms of shorter chaotic periods, non-uniform distribution of their chaotic output, and a higher vulnerability to cryptanalysis. In contrast, MD chaotic maps when employed in image encryption schemes provide higher security levels at the expense of a higher complexity and, thus, more running time for software and hardware implementations [
29]. The literature on the use of 1D and MD for image encryption is extensive. For example, the authors of [
30] propose a grayscale image encryption algorithm based on pixel shuffling through the Arnold map, followed by the use of a key that is generated through the 2D logistic sine map and a linear congruential generator. The authors of [
31] utilized a finite field in order to generalize the logistic map and attempt to find an automorphic mapping between two logistic maps to compute parameters over the finite field
. In [
32], the authors employ a coupling of the 2D logistic map and a quantum chaotic map through the nearest-neighboring coupled-map matrices. Their proposed scheme makes use of the resulting higher complexity randomness to generate an encrypted image. The authors of [
33] propose a symmetric cryptosystem for color images. Their proposed algorithm employs a hybrid form of the Lorenz system to achieve diffusion and DNA sequencing to achieve confusion. In [
34], the authors make use of a Lorenz–Rossler chaotic system to carry out pixel diffusion, whereas 2D logistic maps are employed for confusion. The authors of [
35] propose a color image encryption scheme that utilizes multiple chaotic maps with a minimum number of rounds of encryption. Their proposed scheme makes full use of the ideas of Shannon with regards to confusion and diffusion. A rather thorough numerical analysis was carried out by the authors of [
36], who proposed a scheme based on an LA-semi group for confusion, whereas a chaotic continuous system was adopted for diffusion. In [
37], the authors base their proposed image encryption scheme on three stages: A diffusion stage that utilizes a chaotic quantum logistic function, a scrambling stage for the pixel arrangement, which employs a 2D chaotic map, and then coupling the results of the first two stages with a nearest-neighbor coupled-map lattices. The authors of [
38] propose an efficient image encryption scheme that is based on hyper-chaos and a vector operation. Their proposed scheme makes use of a post-processing method that creates a key matrix. The use of this key matrix results in an acute reduction in the number of required iterations of the utilized hyperchaotic system. In [
39], a color image encryption scheme that involves the use of chaos theory and a zigzag transform is proposed. The authors employ the zigzag transform in conjunction with an arrangement that changes in a bidirectional crossover manner to carry out the first stage of image encryption. This is followed by the use of a logistic map and a hyperchaotic Chen dynamical system. This paragraph only touches upon the topic of employing chaos theory in image encryption applications. Recent literature on the topic is quite expansive. The next paragraph focuses on a different but rather important building block of many image encryption schemes: substitution boxes.
An S-box is a vital component in modern block encryption algorithms. It aids in generating an apparent ciphertext from any given plaintext. The simple act of adding an S-box to an encryption algorithm results in a non-linear mapping between the input and output data, thus providing the confusion property [
40]. The higher the extent of confusion, the better the security offered by an S-box in a block cipher. In turn, for many block encryption algorithms, their robustness against attacks is directly related to the security provided through the utilization of one or more S-boxes. Although such algorithms could comprise multiple components, an S-box is usually the sole non-linear component that enhances sensitive data security [
41,
42]. State-of-the-art symmetric ciphers usually employ S-boxes that introduce a high level of confusion for attackers [
13,
43,
44,
45,
46]. However, designing an S-box should be an efficient and low-complexity process in order for it to be suitable for real-time data encryption algorithms. For example, the generation of S-boxes through the employment of a linear fractional transformation (LFT) makes use of the Galois field. LFT, otherwise known as the Möbius transformation, is repeatedly mentioned in the literature for the design of S-boxes [
47,
48].
While recent literature on image encryption schemes proposes a multitude of algorithms that make use of chaos theory, very little research utilizes CA. Furthermore, the combined utilization of chaos theory and CA for image encryption is very limited in the literature. Schemes that do propose such combinations either suffer from low key spaces or lengthy encryption times, deeming them less than optimal for modern-day real-time image encryption applications. In this paper, the authors identify this as a research gap and attempt to fill it, by proposing a novel color image encryption scheme that combines ideas from chaos theory and CA. Furthermore, the proposed scheme possesses a large key space, yet exhibits a very small encryption time. The contributions of this paper are as follows. A lightweight color image encryption scheme is proposed. The proposed scheme is based on three stages. The first stage incorporates the use of Rule 30 CA, the second stage utilizes a robust S-box, and the third stage employs a solution of the Lorenz system. The proposed image encryption scheme makes use of the ideas of confusion and diffusion proposed by Shannon [
49]. Performance analysis is carried out and compared against recent counterpart image encryption schemes from the literature. The computed numerical results are remarkable in terms of robustness and resistance to statistical and differential attacks. The proposed scheme is also shown to pass the NIST suite of tests. Finally, its suitability for real-time applications is evaluated, given its large key space and short running time. This paper is organized as follows.
Section 2 introduces some preliminary ideas that are employed in the proposed scheme. Those include Rule 30 of CA, followed by the adopted S-box and the Lorenz system.
Section 3 describes the methodology of the proposed image encryption scheme.
Section 4 presents the numerical results of the computations and performance evaluation and provides appropriate commentary on them.
Section 5 draws the conclusions of the paper, identifies a limitation, and suggests future work that could be further pursued.
4. Security Analysis and Numerical Results
The performance of an encryption algorithm is measured by its ability to resist statistical and differential attacks. Thus, this section outlines the numerical results of the proposed image encryption scheme, as well a comparison with its counterpart schemes from the literature. The proposed scheme is implemented using the computer algebra system Wolfram Mathematica® on a machine running macOS Catalina v10.15.7, equipped with a 2.9 GHz 6-Core Intel® CoreTM i9 processor and 32 GB of 2400 MHz DDR4 of memory. The utilized keys are assigned the following values: , and . 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 . 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
The various sub-figures of
Figure 11,
Figure 12 and
Figure 13 depict plain and encrypted images of Lena, Peppers, and Baboon, respectively. It is clear that the human visual system (HVS) does not allow for any meaningful information to be discerned from the encrypted images.
A histogram of an image shows the frequency distribution of its pixels. In order to have a strong encryption scheme, the histogram of an encrypted image must be uniform. This is because a uniform histogram distribution shows that the probability of each of the gray levels of the image is almost the same, thus rendering the image more resistant against statistical attacks. The histograms shown in
Figure 11,
Figure 12 and
Figure 13 depict histograms of each of the color channels of the encrypted Lena image. As can be seen, histograms of the encrypted images are uniform, unlike histograms of plain images, which have many sharp peaks. Hence, encrypted image pixels are distributed uniformly, resulting in images that do not reveal any statistical characteristics. This makes it extremely difficult for attackers to recover the plain image from its encrypted version.
4.2. Chi-Square Test
The histogram is approximated by a uniform distribution. The uniformity is verified by
test as expressed in (
15),
where
k is the number of gray levels, which is 256, and
is the observed occurrence frequencies of each gray level, from 0 to 255. Note that the expected occurrence frequency of each gray level is 256 [
54]. For a significance level of
, the computed
value of the encrypted Lena image of our proposed scheme is 289. Because
, this implies that the null hypothesis is not rejected and the distribution of the encrypted histogram is uniform [
55]. Furthermore, our computed
value is superior to that of other image encryption schemes in the literature [
56,
57].
4.3. Information Entropy
Information entropy is employed to measure the randomness of the distribution of gray pixel values of an image. It is represented as the following expression according to Shannon’s theory:
where
refers to the probability of occurrence of symbol
m, and
M represents the total number of bits for each symbol. Theoretically, the entropy value of a randomly encrypted image is 8 because a gray scale image has 256 symbols and the data of the pixel have
possible combinations. The entropy values of the encrypted Lena, Peppers, and Baboon images are shown in
Table 2. As can be seen, each of the values is a little over
, which reveals that the proposed encryption scheme randomizes the distribution of the pixels of the plain image, making it impossible for an attacker to gain any information about the plain image from its encrypted version. Moreover,
Table 3 and
Table 4 show entropy values of the RGB color channels of various images and how they compare with achieved values in the literature, respectively. It can be seen that the achieved entropy values are all a little over
, very close to the ideal entropy value of 8 and comparable to the literature.
4.4. Mean Squared Error
The mean squared error (MSE) is utilized to measure the reliability of the proposed scheme. It is evaluated through comparing the plain and encrypted images’ pixels, in order to detect any similarities or differences between them. Mathematically, it is expressed as:
where
represents a pixel of the plain image and
represents a pixel of the encrypted image. The product
gives the total number of pixels in any of the images. Theoretically, the value of the MSE must be a large number in order to have a scheme that is robust against any statistical attacks.
Table 5 and
Table 6 show the computed MSE values for various encrypted images, as well as compares those of other schemes from the literature, respectively. It can be seen that the MSE values computed for encrypted images employing the proposed scheme are comparable or superior to those obtained from other schemes in the literature.
4.5. Peak Signal to Noise Ratio
The quality of the encryption scheme can be evaluated using the peak signal to noise ratio (PSNR), which is a ratio of the highest pixel value of the image over the MSE. Mathematically, it is expressed by:
where
is the maximum pixel value, which is 255. The theoretical value of the PSNR should be as low as possible, as it is inversely proportional to the MSE. The lower the PSNR values, the better indication of the quality of the encryption scheme.
Table 5 and
Table 6 show the computed PSNR values for various encrypted images and compares those of other schemes from the literature, respectively. It can be seen that the PSNR values computed for encrypted images employing the proposed scheme are comparable or superior to those obtained from other schemes in the literature.
4.6. Mean Absolute Error
The mean absolute error (MAE) is a metric employed to measure the performance of the encryption scheme against differential attacks. The value of the MAE between an encrypted and a plain image must be large to guarantee that an encryption scheme is robust. It is mathematically expressed as:
where
refers to a pixel in the plain image and
refers to a pixel in the encrypted image, in row
i and column
j;
M and
N are the dimensions of the image.
Table 7 shows that the computed MAE values of the proposed scheme are comparable or superior to its counterparts from the literature.
4.7. Correlation Coefficient Analysis
A correlation coefficient measures the similarity or difference between adjacent image pixels in three directions: vertically, horizontally, and diagonally. In order to have an image encryption scheme that is cryptographically secure, a strong correlation between the adjacent pixels in all directions should be eliminated. The value of the correlation coefficient ranges from
to 1, such that
means that it has a negative correlation,
means that it has a positive correlation, whereas 0 corresponds to no correlation. Therefore, the encrypted image must have a correlation coefficient close to 0 between the adjacent pixels in all the directions so it would resist statistical attacks. It is mathematically expressed as:
where
and
Figure 14 shows correlation coefficient plots of the plain and encrypted Lena image. As can be seen, the horizontal, vertical, and diagonal correlation coefficients of the adjacent pixels are linear. Moreover, the horizontal, vertical, and diagonal correlation coefficients plots of the encrypted image are uniform and have a scatter-like distribution. This same pixel correlation coefficient behavior can be seen in
Figure 15,
Figure 16 and
Figure 17, for the red, green, and blue channels of the Lena image, respectively. A set of 20,000 adjacent pixels were chosen along the horizontal, vertical, and diagonal directions for this computation. The distribution of the pixels in the plain image is linear and lies on the main diagonal. This indicates that the pixels are linearly correlated. In contrast, the pixel distribution of the encrypted image is more scattered, indicating the absence of correlation between the adjacent pixels.
This linear relationship is also shown in
Table 8, where the plain image has a correlation coefficient of ∼1 and the correlation coefficient of the encrypted image is ∼0, which means that the pixels are not correlated to one another, making the encrypted image meaningless to any attacker.
Table 9 showcases a correlation coefficient comparison among the proposed scheme and some of its counterparts from the literature. It is clear that the results are comparable. A detailed correlation coefficient comparison in terms of each of the color channels is provided in
Table 10 and
Table 11, for the Lena and Baboon images, respectively, as well as comparison with values from counterpart schemes from the literature.
4.8. Key Space Analysis
A key space analysis is carried out to compute the number of unique keys that can be utilized in the encryption process. In the proposed image encryption scheme, the secret keys and variables are assumed to be shared between the transmitter and receiver via a secure channel. In addition, the literature includes excellent key-establishment protocols, for example, [
73]. In the proposed image encryption scheme, there is a total of eight variables. These are:
and seven variables that are used to generate the keys,
and
. The largest machine precision is
. Thus, the key space is approximately
. This value exceeds the threshold earlier proposed in [
74] as
. This means that our proposed scheme can resist brute-force attacks. Furthermore, an examination of key space values of related image encryption schemes from the literature, as in
Table 12, clearly indicates that the proposed scheme is larger than them.
4.9. Differential Attack Analysis
A differential attack analysis is employed to measure the strength of the proposed encryption scheme against differential attacks. The number of pixels changing rate (NPCR) and the unified average change intensity (UACI) are two methods that are employed to carry out a differential attack analysis.
4.9.1. The Number of Pixel Changing Rate
The NPCR measures the number of pixels which are different between two images. It is mathematically expressed as:
where
is given by:
4.9.2. The Unified Average Change Intensity
The UACI is a measure of the difference in the average intensity between the encrypted and plain images. It is mathematically expressed as:
where
and
are two images of dimensions
.
Table 13 depicts the NPCR and UACI results of the proposed encryption scheme on various images. As shown, the NPCR is greater than
and the UACI should also be greater than
. It is not in all the cases; however, it is close to it. As a result, any slight difference in the plain text image would result in a significant difference in the encrypted image. Moreover, the proposed scheme is also compared with its counterparts from the literature, in terms of the differential attacks. NPCR and UACI values are also shown in
Table 14 and
Table 15. As can be seen, the computed NPCR value of the proposed scheme is
and is better than [
35,
78,
79]. The UACI value should be
, which is not the case for the proposed scheme, in which [
78] is better.
4.10. Execution Time Analysis
The execution time is used to measure the complexity of this scheme and whether it can be used for real time applications.
Table 16 shows the total execution time, in terms of encryption and decryption times, of the Lena image, provided for various dimensions. The total execution time ranges from 2.89 s to 16.217 s, depending on the image dimensions. Furthermore,
Table 17 provides a comparison of the encryption time among the proposed image encryption scheme and its counterparts from the literature. Note that the differences in execution time depends on multiple factors, including the algorithm itself, the machine specifications on which the algorithm is run (i.e., processing power and available memory), as well as the software running the algorithm. Note that in [
77,
80,
81,
82], the software of choice is Mathworks Matlab
®, 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
A good PRNG should satisfy its randomness criteria by a number of tests that comprise the NIST analysis suite. Specifically, the probability, or
p-value, of each of the tests should be greater than
for any bitstream to be regarded as random. The proposed encryption scheme is subjected to the NIST suite of tests, over a large number of lengthy bit sequences, and successfully passes each of them. As an illustration,
Table 18 shows the results of the NIST analysis of each of the color channels of the encrypted Lena image. It is clear that the values for all the tests are indeed larger than
, indicating the success of the proposed image encryption scheme at passing the NIST analysis.
5. Conclusions
This paper proposed an RGB image encryption scheme that makes use of Shannon’s ideas of confusion and diffusion. The proposed scheme is implemented in three stages. In the first stage, Rule 30 cellular automaton is utilized to generate the first key. In the second stage, a well-designed S-box is utilized to create the needed non-linearity and complexity. Finally, in the third stage, a solution of the Lorenz system is used to generate the second key. The performance of the scheme was evaluated utilizing different metrics, statistically and differentially. Those included a histogram analysis and its associated computations, a correlation coefficient analysis, MSE, PSNR, MAE, information entropy, an execution time analysis, a differential attack analysis (in terms of NPCR and UACI), a key space analysis, and a NIST analysis. The computed results suggest that the proposed scheme is resistant against any statistical, differential, or brute-force attacks. Moreover, on carrying out comparisons with counterpart image encryption schemes from the literature, the proposed color image encryption scheme exhibited either a comparable or a superior security performance. Nevertheless, the proposed scheme does not come without limitations. The Lorenz system utilized in the third stage is dissipative and has a comparatively poor ergodic property in comparison with conservative chaotic dynamical systems. Such systems have improved distribution in phase space while also exhibiting high ergodicity, sometimes at the expense of being more computationally complex. Future work could tackle this issue, attempting to find a dynamical system with a trade-off among high ergodicity, improved distribution in phase space, and low computational complexity.