Keywords

1 Introduction

A large amount of data is being relayed over the Internet and this not only includes text but also image, audio and multimedia files. With the accelerated advancement in technology, transmission of information through a safe and secure network and its storage has become a matter of great importance. It is imperative to shield the cyber-related information from illegal retrieval, copying and distribution by attackers [1]. Images have a lot of extensive applications ranging from telemedicine, multimedia systems to military communication [2]. The privacy of people’s data is put in jeopardy due to the leakage of data while transmitting through wireless and wired media such as Wi-Fi and Ethernet [3].

Hence, it is imperative to formulate a data encryption system that is resilient and provides data integrity, authentication and confidentiality [4]. The obsolete encryption algorithms like DES, SHA, AES, RSA and elliptic curve-based cryptography are not effective for images due to its speed and its inability crack the correlation between the adjacent pixels [5,6,7,8]. Another reason why these algorithms and its variations are ineffective is because they have small keyspace and use elementary encryption operations thus, making it susceptible to attacks such as the brute force attack [6]. It is not advisable to employ these techniques in real time because of the high degree of data redundancy. Therefore, it is pivotal to design a cryptosystem that can provide excellent data security, speed and retrieval of decrypted image without loss in quality. In this context, chaos theory has turned out to be one of the most budding research fields for information security for the past few decades [9]. The robust encryption schemes that involve chaos have superseded the above-mentioned traditional algorithms and play an indispensable role in the surveillance of IT communication. Cryptography and chaos theory are closely connected and play a paramount role in the development of contemporary information security [10]. Research scholars are trying to incorporate the properties of the nonlinear chaotic attractors in secure communication. Ergodicity, unstable behavior, no periodicity, high sensitivity to system constraints and initial conditions are a few outstanding features of these chaotic systems that make it suitable for data encryption [9]. One-dimensional chaotic maps yield only single elementary chaotic paths and have average keyspace [11]. As a result, it becomes easy for the intruder to obtain the key necessary for decryption. Hence, we opt for three-dimensional chaotic attractors for securing data as incrementing the dimensions increases the nonlinearity, provides enhanced security and has greater numbers of positive exponents of Lyapunov [12, 13]. The entropy generated by the chaotic attractor produces three sets of pseudorandom sequences that can be utilized in carrying out the scrambling and diffusion process [14, 15]. In this paper, the standard 256 × 256 Pepper test image is encrypted using the Genesio-Tesi attractor, Lorenz attractor and the Modified Chua attractor [16,17,18]. The results of the proposed scheme and a detailed analysis of the various statistical tests conducted are provided toward the end of the paper.

2 Methodology

2.1 Realization of the Nonlinear Strange Attractors

The comprehensive analysis and the realization of the nonlinear chaotic attractors used to encrypt the RGB image is shown below.

Lorenz Attractor: The Lorenz nonlinear chaotic attractor is a continuous system that is represented by a family of differential equations which is notable for having chaotic solutions for a certain range of parameter values and system conditions. This chaotic attractor is an example of a strange attractor and is a deterministic system as the future values can be predicted as it changes with time when the exact starting values are known. The Lorenz system of equations is given below

$$\begin{aligned} \hfill &\frac{{{\text{d}}x}}{{{\text{d}}t}} = m_{1} (y - x) \\ \hfill& \frac{{{\text{d}}y}}{{{\text{d}}t}} = m_{2} x - y - xz \\ \hfill& \frac{{{\text{d}}z}}{{{\text{d}}t}} = xy - m_{3} z \\ \end{aligned}$$
(1)

In this system of equations, m1, m2, m3 are the system constraints and the left-hand side of the family of differential equations represent the state of the system. The terms xy and xz contribute to the nonlinearity of the chaotic system. Normally, the values of m1, m2, m3 are taken to be positive. Here, in this case, we will designate the values of the constraints as m1 = 10, m2 = 8/3, m3 = 28 and the preliminary constraints of the chaos-based system as (x0, y0, z0) = (0, 1, 0). The Lorenz system displays chaotic behavior for the aforementioned values and proximate values as well. The 3D view of the Lorenz attractor is displayed in Fig. 1a.

Fig. 1
figure 1

a Lorenz chaotic attractor, b Genesio-Tesi chaotic attractor, c Modified Chua chaotic attractor

Genesio-Tesi Attractor: The Genesio-Tesi chaotic attractor is also another continuous system that is represented by a set of nonlinear differential equations shown below

$$\begin{gathered} \frac{{{\text{d}}y}}{{{\text{d}}x}} = y \hfill \\ \frac{{{\text{d}}y}}{{{\text{d}}x}} = z \hfill \\ \frac{{{\text{d}}z}}{{{\text{d}}t}} = - p_{3} x - p_{2} y - p_{1} z + x^{2} \hfill \\ \end{gathered}$$
(2)

The state variables are represented by x, y, z and p1, p2, p3 are positive real system parameters such that the parameters satisfy p1.p2 < p3. The values for the initial conditions and the system constraints are designated as (x0 = 0.1, y0 = 0.1, z0 = 0.1) and p1 = 1, p2 = 3.03, p3 = 5.55 so that chaotic system displays the anticipated chaotic behavior. The plot of the Genesio-Tesi attractor is shown in Fig. 1b.

Modified Chua Attractor: The Modified Chua chaotic attractor system is a multi-scroll attractor with system parameters b1 = 10.82, b2 = 0.11, b3 = 14.286, e = 1.3, d = 0 and initial conditions (x0 = 1, y0 = 1, z0 = 0). The system of equations representing the Modified Chua attractor is shown below

$$\begin{gathered} \frac{{{\text{d}}x}}{{{\text{d}}t}} = b_{1} (y + b_{2} (\sin (\frac{\pi x}{{2e}} + d))) \hfill \\ \frac{{{\text{d}}y}}{{{\text{d}}t}} = x - y + z \hfill \\ \frac{{{\text{d}}z}}{{{\text{d}}t}} = - b_{3} y \hfill \\ \end{gathered}$$
(3)

The 3D graph of the Modified Chua attractor is shown in Fig. 1c.

2.2 Implementation of the Proposed Encryption Scheme

Discretization of the continuous Lorenz, Genesio-Tesi and Modified Chua system based on Runge–Kutta technique: A broad range of techniques can be harnessed to acquire the numerical results of the system of nonlinear differential equations. Difference equations are obtained after the differential equations undergo discretization. In this case, the function is performed with the aid of Runge–Kutta 4th numerical technique. An approximate value of x is estimated for a known value of t. The limitation of Runge–Kutta technique is that it is applicable only differential equations of the first order. The formula used for the mentioned operation is shown below

$$\begin{gathered} m_{1} = {\text{if}}(t_{n} ,x_{n} ) \hfill \\ m_{2} = {\text{if}}\left( {t_{n} + \frac{i}{2},x_{n} + \frac{{m_{1} }}{2}} \right) \hfill \\ m_{3} = {\text{if}}\left( {t_{n} + \frac{i}{2},x_{n} + \frac{{m_{2} }}{2}} \right) \hfill \\ m_{4} = if\left( {t_{n} + i,x_{n} + m_{3} } \right) \hfill \\ x_{n + 1} = x_{n} + \frac{{m_{1} }}{6} + \frac{{m{}_{2}}}{3} + \frac{{m_{3} }}{3} + \frac{{m_{4} }}{6} \hfill \\ \end{gathered}$$
(4)

The formula given above is used to determine the next value of x, i.e., xn+1 from xn. The variable i is the increment size and tn+1 = tn + i. The increment size is set to a very small value for greater accuracy. We fix the increment value to i = 0.001 and the initial conditions and subsequently, the three sets of pseudorandom numbers namely X, Y, Z discrete series of the three attractors are obtained.

Proposed Encryption Scheme: The standard 256 × 256 Pepper RGB image is taken and processed. The image is transformed into a two-dimensional matrix of 3 different layers, i.e., R, G, B planes. The planes are further converted into one-dimensional arrays. The diffusion process is implemented by performing bit-wise XOR operation between the X, Y, Z pseudorandom sequences and the one dimensional R, G, B plane 8-bit values respectively.

This is followed by a scrambling process where the same random number sequences are used to shuffle the location of the matrix elements. This is used to produce indiscernible 1D array to increase the ambiguity of the enciphered image and the complexity of the encryption key. The encrypted information is transformed back into a 2D matrix, thus producing the encrypted image. This algorithm involves three layers of scrambling and diffusion to boost the security of the data. The entire process of encryption is shown as a block diagram in Fig. 2. The original test image can be obtained by performing the inverse operation of encryption, i.e., decryption. The diffused image, final encrypted image along with the decrypted image are shown in Fig. 3. From Fig. 3c, we can clearly observe that the process of securing the given test image is efficient and successful as the details of the plain test image cannot be retrieved from the enciphered image by an unintended recipient without the key.

Fig. 2
figure 2

Proposed encryption scheme

Fig. 3
figure 3

a 256 × 256 Pepper test image, b Diffused image, c Final encrypted image, d Decrypted image

3 Results and Discussion

3.1 Histogram Plot Analysis

The quantity of pixels in an image for different intensity values present in an image is given by the histogram plot. It is indicative of how the tones are distributed in an image. The histogram plot of the original test image along with the encrypted image are displayed in Fig. 4a and b. From the figure, it is observed that the histogram plot of the original data comprises of irregular rise and falls whereas the cipher data has a fairly consistent tonal distribution. The histogram plot of the encrypted data substantiates that the suggested cryptosystem is extremely effective against statistical attacks.

Fig. 4
figure 4

a Histogram plot of test image, b Histogram plot of ciphered data

3.2 Entropy Analysis

Entropy analysis is one of the most primary metrics to estimate the degree of randomness in the image and evaluate the effectiveness of the scrambling and diffusion technique. The entropy of the digital image increases with the increase in the distribution of the R, G, B values in the image. The most suitable value of the entropy for an 8-bit encrypted image is 8.000. The entropy values for the enciphered image are clearly shown in Table 1.

Table 1 Comparison between the entropy of the test image and the enciphered image

3.3 Correlation Coefficient Analysis

The relationship between two proximate pixels in a digital image is given by the coefficient of correlation. It is the measure of resemblance between two pixels.

The value of the coefficient varies from −1 to +1. For a cipher image, the correlation coefficient values should be very low and should be high for plain image. With the aim of testing the correlation of the proximate pixels of the enciphered image, 3000 pixels are randomly selected from the image and their correlation coefficients are estimated. The horizontal, diagonal and vertical coefficients of correlation are listed in Table 2.

Table 2 Analysis of the correlation coefficients of the encrypted image and original image

3.4 NPCR and UACI Analysis

The NPCR value is indicative of the rate at which the number of pixels changes in the enciphered image, when a certain pixel value of the test image is altered and the UACI value is indicatory of the mean intensity of differences between the test data and the enciphered data. These values are directly proportional to the ability of the system to withstand differential invasions. The NPCR and UACI values for the suggested cryptosystem are listed in Table 3.

Table 3 Comparison of the UACI and NPCR values

3.5 PSNR Analysis

The quantitative mathematical relationship between peak strength of a signal and the strength of noise that degrades the characteristics of the signal rendition is given by the peak signal-to-noise ratio (PSNR) [19, 20]. The PSNR is a direct indicator of the features of the image obtained. It is proportional to the quality of the image [21, 22]. PSNR and MSE is a very beneficial performance evaluation test to assess the quality of reconstruction of encryption codes. The average of errors raised to the second degree between the plain test image and the image with noise is given by the MSE. The error is denotative of the amount by which the values of the plain test image differ from the depreciated image. The PSNR values obtained using the suggested algorithm is shown below in Table 4.

Table 4 PSNR and MSE values of the image

3.6 Comparative Study of the Encryption Technique

With a plethora of research papers being published on information security throughout the year, it is essential to compare the results of the encryption standard put forth with the already existing novel cryptosystems. The comparative study of various statistical tests conducted for the encryption scheme proposed in this paper and the reference papers are shown clearly in Table 5.

Table 5 Comparative study of the statistical tests

4 Conclusion

In this paper, an innovative and robust approach has been implemented in securing digital images by making use of nonlinear chaotic iterative attractors. The proposed scheme is efficient due to the use of three-dimensional chaotic attractors as they have more keyspace and it becomes very hard for the unintended recipient to obtain the original data from the cipher image. It is corroborated that the scheme proposed masks the original data effectively and the decrypted image obtained has no loss in quality. This efficiency of the cryptosystem is validated by the results of the various statistical tests conducted. This algorithm can be extended to encrypt other forms of data as well such as audio and video. This cryptosystem has been executed using software without any major obstacles and forms a solid groundwork for hardware implementation. The encryption method validated by this paper can be used in real-time communication and chaos theory has a splendid future in cryptography and information security.