Introduction

As a result of the growing popularity of the Internet and social network platforms, large amounts of image and video data are now transported through a wide range of applications, including webinars, videoconferences, conferences, online courses and social media platforms. Information security and privacy protection is a primary concern to avoid unauthorized access to data shared on these platforms. There are many techniques available to protect data from intruders such as watermarking1, Steganography2 and cryptography3,4,5. Encryption is considered as the best method to protect visual data. Encryption transforms visual data into an unrecognizable format, protecting it from eavesdropping. In video and image data, there is inherently a significant correlation and redundancy between pixels. This renders traditional encryption methods such as AES image encryption, TDES image encryption, etc., unsuitable for safeguarding such content. Classical techniques not only take more time but also have slower processing speed. Therefore, researchers are increasingly turning to chaos theory as an alternative method for video encryption. Chaotic maps can produce different effects with small changes in initial conditions. Chaotic map has become a focal point in encryption strategies. Chaos based encryption methods mainly involve alignment and diffusion techniques. Alignment implies dislocation of data, while diffusion refers to the substitution of data6,7,8,9,10,11,12. Compared to one-dimensional chaotic maps, high dimensional chaotic maps typically have more complex structures and better chaotic properties. This makes their chaotic trajectories more difficult to predict, but correspondingly increase their overhead cost.

Researchers have designed numerous chaotic maps13,14,15. Kumar and Dua16 used two different chaotic maps to encrypt audio using DNA encoding and dynamic diffusion. Wei et al.17 proposed a secure image transmission scheme using two chaotic maps, tailored for multimedia sensor environments. The scheme includes SIT-SS, which employs a Tent-Logistic Map for efficient encryption with low hardware requirements, and SIT-SR, which uses dynamic permutation and diffusion based on discrete logarithms to enhance security. Simulation results show improved image reconstruction quality and superior statistical properties compared to existing methods. Erkan et al.18 used Schaffer function to introduce 2D hyper chaotic system. This mapping was used to design image encryption scheme. Mansoor and Parah19 introduced hybrid adaptive image encryption scheme using logistic map-ping and Tent mapping. The authors also integrated DNA computation into the scheme. Experiments verified the security provided by the method.Ma et al.20 proposed an innovative algorithm based on Tabu Search and Hyperchaos . Their method integrates the Tabu search optimization strategy to improve key generation and hyperchaotic systems to enhance the unpredictability of encryption processes. The approach demonstrates strong performance in resisting statistical and brute-force attacks, making it a valuable contribution to the field of image security. Khokhar et al.21 controlled the load frequency of the grid based on one-dimensional CS. When refining the approach, they optimized the mapping method with cosine function. The experimental results show that the method has better convergence, effective control of the running time, and higher sensitivity. Wei et al.22 proposed a robust image encryption algorithm, IEASP, based on a novel 2D-SQPM hyperchaotic map and a pixel fusion strategy. The 2D-SQPM map demonstrated strong chaotic propertiesIEASP introduced efficient measures, including a common keystream, pixel fusion, chaotic pixel superposition, and intra-vector quick scrambling, achieving high security and efficiency. Wei et al.23 also propose a novel multi-channel image encryption algorithm, named MIEA-PRHM, which leverages pixel reorganization and hyperchaotic maps. The MIEA-PRHM algorithm employs two hyperchaotic maps to jointly generate chaotic sequences, ensuring a larger key space and enhanced randomness.

Alexan et al.24 employed the Tent mapping technique. They used it to create chaotic sequences. These chaotic sequences formed the basis of a novel optimality seeking strategy. This strategy aimed to overcome the limitations of traditional optimization algorithms, which often get stuck in local optimal solution. By utilizing chaotic sequences, the proposed approach enabled faster convergence to the global optimum. Given the poor security of one-dimensional chaotic systems, researchers in the field of chaotic cryptography have tried to improve the shortcomings of one-dimensional systems by increasing the dimensionality of chaotic systems. However, increasing multiple control parameters also greatly increases its computational complexity. Numerous researchers22,25,26,27,28 have dedicated themselves to enhancing the security and feasibility of chaotic image encryption. Moreover, their proposed methods primarily concentrate on two key areas: the development or optimization of chaotic systems and the creation or refinement of encryption procedures.

Therefore, we propose a one-dimensional mapping, and improves the security of images through multilevel encryption. The above studies have proposed various chaotic maps for encrypting images or audio. However, a common issue with these methods is that the encryption layer is often too simplistic, typically used for only a single layer of encryption. This may result in the encrypted image being relatively easy to leak.

Therefore, this paper proposes an image encryption algorithm, the LSCM encryption and multi-layer encryption algorithm based on the traditional chaotic image encryption. The combination of matrix determinant transformation, cellular automata and chaotic map produces an image encryption algorithm that is used to solve the problem of image encryption at multiple levels. The main contributions of this thesis are as follows:

  • 1. Before subjecting the image to chaotic encryption, we introduce the determinant transform to preprocess the image. It is beneficial to increase the security of the image and improve the attack resistance.

  • 2. We propose the LSCM encryption. This paper combines the logistic map and sine map to address their potential periodic phenomenon under certain parameters. This makes the encryption system less prone to be vulnerable to periodic attacks. It can be well avoided by the combination of two chaotic maps. A single chaotic system may have the risk of limited key space or exposure to specific attacks. And mixing two different chaotic systems can greatly enhance the security of encryption. An attacker needs to breach both systems to successfully decrypt the message. It greatly increases the difficulty of the attack. Fusing two chaotic systems at the same time can generate a richer key space.

  • 3. Cellular automata is applied after chaotic encryption to further confuse the sequence. Cellular automata has complex dynamic behavior and spatial structure, and chaotic system also has complex nonlinear properties. Combining them can increase the complexity of the encryption system, making it more difficult for crackers to understand how the encryption algorithm works.

The rest of the paper is organized as follows. Section “Preliminaries” describes the image encryption algorithm based on the Logistic-Sine Map. Section “Proposed image encryption algorithm” describes the implementation steps as well as the flow of the algorithm. Section “Experimental results and analysis” experimental tests and security analysis. Section Conclusions concludes the article.

Preliminaries

This section describes the methods used in this paper, starting with the determinant transform, followed by the proposed image encryption algorithm, and finally the role of the cellular automata.

Chaotic map

Two classical chaotic maps are first reviewed and then the LSCM proposed in this paper is introduced. Logistic mapping is a common nonlinear dynamical system model, the mathematical expression of one-dimensional logistic mapping in Eq. (1):

$$\begin{aligned} x_{n+1}=r\times x_n\times (1-x_n) \end{aligned}$$
(1)

Where: r is the control parameter, \(r \in\) (0, 4] the sequence is in chaotic state only when \(3.569945627<r \le 4\), the sequence \(x_{n}\) is in chaotic state. Arif29 used logistic map for encryption of images. However, the application of this algorithm may only be suitable for encrypting grayscale images, as the algorithm in question is specifically designed for encrypting grayscale images. It may not be able to encrypt well for color images. There is still room for improvement. Sine chaotic map is a nonlinear dynamical system model based on sinusoidal functions, and the expression of Sine chaotic map is Eq. (2):

$$\begin{aligned} x_{i+1}=\frac{a}{4}\times \sin (\pi \times x_i) \end{aligned}$$
(2)

Where a is a control parameter which typically is 4. The range of chaotic orbital state values is (0, 1). Song et al.24 encrypted the image using sine mapping to achieve privacy protection. However, their image encryption algorithm is relatively simple, which may pose a risk of deciphering.

Considering the colour of the encrypted image and the complexity of the encryption process, this paper improves the complexity of the encryption algorithm based on two kinds of mapping: logical mapping and sinusoidal mapping. At the same time, the characteristics of these two mappings are combined to form the image encryption algorithm in this paper. We call it modified Logstic-Sine Chaotic Map (LSCM). Now, we give its expression Eq. (3).

$$\begin{aligned} x_{i+1}=\sin (r\times \pi \cdot (1-x_i)\times b\times x_i) \end{aligned}$$
(3)

Where r and b are the control parameter. when \(r \in\) (0, 4]. The range of chaotic orbital state value is (0, 1) As in Fig. 1, when r is 4, its distribution value is more random. This chaotic map combines the advantages of both logistic and sine maps. By combining the logistic map with the sine map, it compensates for the periodicity phenomenon that occurs in each map individually under certain parameters. Even slight changes in initial conditions can lead to periodic LSCM trajectories. This chaos models some nonlinear behaviors very well, making its trajectory unpredictable. Additionally, I utilize the Lyapunov exponent (LE) to evaluate its chaotic properties.

Fig. 1
Fig. 1
Full size image

LSCM trajectories.

Fig. 2
Fig. 2
Full size image

LE index.

The Lyapunov exponent (LE) assesses the chaotic behavior of a dynamical system. A positive LE value indicates that two extremely close LSCM trajectories in the phase plane exponentially separate over time. The system’s predictability is determined by the maximum LE (MLE) value. If the MLE value is positive, the system exhibits chaotic behavior. Multiple positive LE values indicate hyperchaotic behavior. Chaotic maps with hyperchaotic behavior are characterized by high complexity and unpredictable LSCM trajectories. Figure 2 shows that the Lyapunov exponent (LE) is greater than 0, indicating good chaotic behavior. The horizontal axis represents the control parameter r, while the vertical axis represents the LE.

Bifurcation maps illustrate variations in chaotic behavior for different parameter values. A larger range of parameters producing chaotic behavior increases resistance to exhaustive attacks. Figure 3 shows the bifurcation diagram of the proposed LSCM chaotic map. Figure 3 shows that the parameter r control produces a high chaotic range and does not produce a periodic window. This indicates good chaotic properties.

Fig. 3
Fig. 3
Full size image

LS Bifurcation diagram.

Cellular automata

Cellular automata (CA), originally proposed by John von Neumann and Stanislaw Ulam in the 1940s, are a type of discrete model. Cellular automata find applications in various fields, including biology, physics, computer science, and social science. In one-dimensional CA, each cell has only two states, i.e., 0 or 1. For three neighboring cells, there are 2 \(\times\) 2 \(\times\) 2 = 8 possible states, which are 000, 001, 010, 011, 100, 101, 110, 111. The state of each cell at the next moment is determined by that cell and its two neighboring cells, as expressed in Eq. (4).

$$\begin{aligned} S_i^{t+1}=f(S_{i-1}^t,S_i^t,S_{i+1}^t) \end{aligned}$$
(4)

where: t is time; \(S_i\) is the state of the ith cell; \(S_i^{t+1}.\) is the state of the ith cell at the moment \(t+1\); f is a Boolean function, a binary logic operation. See literature30 for more details. This paper focuses on encrypting images using cellular automata to generate an unordered sequence.

NIST SP-800 randomness test

The NIST SP-800 randomness test is a widely adopted collection of statistical methodologies aimed at assessing the quality of random and pseudorandom number generations. To demonstrate the superiority of our chaotic sequence generation strategy, we subject the chaotic sequences employed within our LSCM to the NIST SP-800 randomness test.23 Following the NIST SP-800 randomness test requirements, we generate 60 sets of binary sequences, each 1,000,000 bits long. Following the NIST SP-800 randomness test requirements, we generate 60 sets of binary sequences, each 1,000,000 bits long. Table 1 presents the final test results.

Table 1 NIST test results for LSCM.

Proposed image encryption algorithm

The encrypted image size is denoted as \(M*N\). The encryption process, shown in Fig. 4 and implemented by Algorithm 1. The method combines matrix rank transformation, chaotic maps, and cellular automata for multi-level encryption and decryption. The original image has obtained in a size of \(M*N\). The image is then converted into a matrix. The original image is divided into R, G and B channels. The R, G, and B channels are transformed with different ranks to increase deciphering difficulty. After row and column transformations, the three channels remain independent. A new matrix I is generated. The transformed image undergoes LSCM chaotic encryption. The chaotic sequence, producing values in (0,1), is scaled and matched with the image values. The chaotic sequence is converted to form a \(M*N\) matrix, and then XOR operation is performed with the encrypted image matrix to create a new matrix. After chaotic encryption, the image undergoes the cellular automata for final encryption to obtain the final ciphertext image E.

Fig. 4
Fig. 4
Full size image

Block diagram of proposed image encryption.

Algorithm 1
Algorithm 1
Full size image

Encryption

Channel split

An image is first divided into three channels, which are then processed separately to enhance security. Figure 5 shows the image after channel separation. The original image has a size of \(M*N\). The image is converted into a matrix. The original image is divided into R, G and B channels.

Fig. 5
Fig. 5
Full size image

RGB channel image.

Row and column transformation

In this paper, the image is segmented and encrypted. The encrypted image is split into multiple channels, each undergoing different row and column transformations to generate a new image. The process is as follows.

  • Step 1: For an encrypted image, we split it into a number of channels to perform different row and column transformations on it respectively. The transformation starts with the second column. The odd columns of the G channel and the reverse order of the R channel are inverted. Every third column in the B channel is inverted.

  • Step 2: The R and G channels are switched in every column. The R and B channels are switched in every third column. G and B channels are switched in every fifth column.

  • Step 3: An inversion operation is performed for each channel.

  • Step 4: A cyclic shift operation is performed on each row of the R channel, every three rows of the B channel, and every five rows of the G channel.

  • Step 5: The row-column transformation is completed.

Generating chaotic sequences

A matrix of the same size as the encrypted image is generated using the Logistic-Sine Chaotic Map (LSCM). The matrix values are scaled to match the pixel value range [0, 256). Substitution and diffusion operations generate a new encrypted matrix. The LSCM process is as follows:

  • Step 1: A chaotic matrix \(I_{\text {chaotic}}\) is generated using LSCM.

  • Step 2: Scale the values of matrixK to the range [0, 256) to obtain a new matrix K.

  • Step 3: Diffusion and substitution operations using matrices \(I_{\text {shuffled}}\) and \(K\) generate the encrypted image \(I_{\text {chaotic}}\).

Cellular automata process

After chaotic encryption, we further encrypt the cryptographic image matrix using CA to enhance security. And we achieve pixel-level encryption and decryption of the image. The encryption and decryption processes of CA are shown in Fig. 6. Algorithm 2 illustrates the encryption process. The decryption process is the inverse of the encryption algorithm. Firstly, we separate the input image into R, G and B channels. Secondly, we use the same CA transformation rules to process each channel. For each pixel in each channel, the corresponding pixel value is converted to an 8-bit binary representation, and the CA rules are applied iteratively. Thirdly, the first four bits are updated via XOR operations and the remaining four bits are inverted bitwise. By repeating this process multiple times, the system achieves a chaotic effect. Finally, the transformed R, G and B channels are merged back together, resulting in the overall encrypted output image.

Algorithm 2
Algorithm 2
Full size image

Cellular Automaton Encryption

Fig. 6
Fig. 6
Full size image

Cellular Automata image encryption and decryption process. (a) is encryption process, (b) is decryption process.

Decryption process

The decryption process is the inverse of encryption, as shown in Fig. 7. The decryption process is implemented by Algorithm 3.

Fig. 7
Fig. 7
Full size image

Block diagram of the proposed image decryption.

Algorithm 3
Algorithm 3
Full size image

Decryption

Experimental results and analysis

This section analyzes the image encryption algorithm’s performance, including histogram, pixel correlation, information entropy, key sensitivity, key space, robustness, and blocking attack analyses.

Encryption and decryption results

We evaluate the encryption performance on several standard images from the CVG-UGR and USC-SIPI datasets. Figure 8 shows the simulation results of three color images “Jelly”,“House”,“Baboon”. The Jelly image, with a size of 256 \(\times\) 256 pixels, are sourced from USC-SIPI. The House image, measuring 256x256 pixels, is obtained from USC-SIPI. The Baboon image, with a size of 512x512 pixels, are sourced from CVG-UGR. As illustrated in Fig. 8, the cipher image lacks any discernible resemblance to the original image, thereby demonstrating the efficacy of the image encryption algorithm in concealing image information.In addition, the hardware configurations utilized are Intel CPU RTX 4060 and 16 GB RAM, while the software configurations are Windows 11 and Pycharm 2023.

Fig. 8
Fig. 8
Full size image

Encryption and decryption results of some pictures. (a), (d), (g) are original images. (b), (e), (h) are encrypted images. (c), (f), (i) are decrypt images.

Histogram analysis

Histograms are important tools for qualitative analysis of digital images. After applying the encryption algorithm, the original image becomes visually unrecognizable. The encrypted image undergoes multi-layer row and column transformations, chaotic map, and Cellular automata encryption. This process results in a more uniform distribution of pixel values and reduced frequency fluctuations. Figure 9 shows the Jelly image. Figure 10 displays the encrypted image. The histogram of original ’s image, shown in the form of a curve Fig. 11, illustrates the distribution of pixel values in the plaintext image. The histogram clearly shows the difference between the plaintext and ciphertext images, with the plaintext image exhibiting high and low levels. The encrypted ciphertext image Fig. 12 exhibits random noise with a more uniform distribution in its histogram. The frequency change in encrypted pixel values is minimal. It indicates that the information of the original image is effectively hidden, thus guaranteeing the security of the image.

Fig. 9
Fig. 9
Full size image

Original image.

Fig. 10
Fig. 10
Full size image

Encryption image.

Fig. 11
Fig. 11
Full size image

Original image histogram.

Fig. 12
Fig. 12
Full size image

Encryption histogram.

Correlation analysis

Correlation analysis can be used to evaluate the security and effectiveness of encryption algorithms for hyper chaotic systems. In ordinary images, the pixel values of neighboring pixels have a small range of variation and relatively concentrated distribution. It makes them susceptible to differential attacks. In contrast, the pixel distribution of encrypted cryptographic images is more uniform. Therefore, the correlation between neighboring pixels should be eliminated as much as possible in order to enhance the security of the image during the encryption process. In addition, the degree of correlation between pixels can be qualitatively analyzed by the correlation coefficient. Three thousand pairs of neighboring pixel points were selected from each of the plaintext image and ciphertext image for testing. Figure 13 shows the correlation test results between the selected pixel points and the neighboring pixel points. In the plaintext image, there is a strong correlation between the pixel points, indicated by a large correlation coefficient (see Table 2). Whereas in the encrypted image Fig. 14, the correlation between the pixel points is destroyed and the value of the correlation coefficient is close to zero. The correlation is very weak (see Table 3). The correlation coefficient can be calculated by Eq. 6.

$$\begin{aligned} r_{xy}= & \frac{\cot (x,y)}{\sqrt{D(x)}\sqrt{D(y)}} \end{aligned}$$
(5)
$$\begin{aligned} \textrm{cov}(x,y)= & \frac{1}{N}\sum _{i=1} \big (x_i-E(x)\big )\big (y_i-E(y)\big ) \end{aligned}$$
(6)
$$\begin{aligned} & \begin{aligned}&D(x) =\frac{1}{N}\sum _{i=1}^{N} (x_i-E(x))^2 \\&E(x) =\frac{1}{N}\sum _{i=1}^Nx_i \end{aligned} \end{aligned}$$
(7)

Where x, y, and n represent the pixel values and number of pixel points of neighboring positions in horizontal, vertical, and diagonal directions. The correlation coefficient indicates the strength of the correlation, with larger absolute values indicating stronger correlations. Figure 10 shows that the pixel points of the plaintext image are concentrated near the line y=x in all directions, indicating a small gap between neigh-boring pixel values. In contrast, the pixel points in the ciphertext image encrypted by the algorithm are uniformly distributed with a small correlation coefficient. The given situation implies that the ciphertext image conceals the information in the plaintext image more effectively. Table 2 presents the correlation coefficient results and comparison of the original plaintext images. Table 2 presents the correlation coefficient results and comparison of the encrypted images. The data in the tables indicates that the correlation coefficient results for the ciphertext image are close to 0, confirming that the algorithm exhibits very low correlation. The presentation shows the R, G, and B channels respectively. By comparing Tables  2 and 3, it can be observed that the correlation coefficient of neighboring pixels in the encrypted image is smaller than that reported in the literature31. It suggests that the algorithm’s encrypted image offers higher security.

Fig. 13
Fig. 13
Full size image

Original image correlationl, (a, c) is “Jelly”, (d, f) is “Baboon”, (g, i) is “House”.

Fig. 14
Fig. 14
Full size image

encrypted image correlation, (a, c) is “Jelly”, (d, f) is “Baboon”, (g, i) is “House”.

Table 2 Correlation coefficients of plain images.
Table 3 Correlation coefficient of encrypted image.

Information entropy

Information entropy is a metric used to quantify the uncertainty and confusion of an image. As the information entropy increases, the complexity and randomness of the image also increase. This leads to a reduction in the visual information of the image while enhancing its security. Eq. 8 as:

$$\begin{aligned} H=-\sum _{i=0}^Lp(i)\log _2p(i) \end{aligned}$$
(8)

In Eq. 8 , L represents the grey number level of the image, and p(i) represents the probability of occurrence of grey value i . To ensure objectivity, subjective evaluations have been excluded. Upon analyzing the comparative literature in Table 4, it is evident that the mentioned chaotic algorithm encryption outperforms others in terms of information entropy. The algorithm exhibits values of information entropy that is closer to the theoretical value of information entropy 8 when compared to literature34 and literature35. This result confirms the algorithm’s superiority in terms of randomness and demonstrates the cryptosystem’s resistance to entropy attacks .

Table 4 Information entropy.

Key sensitivity analysis

Differential attacks generally exploit the ciphertext disparities resulting from minimal plaintext changes to launch targeted attacks23. Ideally chaotic encryption should be key sensitive, which means that even a small change in a very weak value in the key should lead to a completely different encryption result. This property is called key sensitivity. In general, the key sensitivity of a chaotic cipher includes the sensitivity of the initial state of the chaotic map and the sensitivity of the control parameters. Two parameters are usually used to evaluate the key sensitivity: the number of pixel change rate (NPCR) and the uniform average change intensity (UACI). The closer the NPCR and UACI are to their optimal values, the more sensitive the encryption algorithm is to the security key, thereby increasing the algorithm’s overall security. They are calculated as follows Eqs. (9) and (10):

$$\begin{aligned} & \begin{aligned}&NPCR(P_{1},P_{2})=\frac{\sum _{i=1}^{M}\sum _{j=1}^{N}\left| \cdot \textrm{Sign}\big (P_{1}(i,j)-P_{2}(i,j)\big )\right| \times 100\%}{MN}\\ &Sign(x)={\left\{ \begin{array}{ll} 1,x>0\\ 0,x=0\\ -1,x<0\end{array}\right. } \end{aligned} \end{aligned}$$
(9)
$$\begin{aligned} & UACI(P_1,P_2)=\frac{\sum _{i=1}^M\sum _{j=1}^N|P_1(i,j)-P_2(i,j)|\times 100\%}{255-0} \end{aligned}$$
(10)

This paper presents the results of obtaining different encrypted images using a variable initial value \(x_0\) with \(x_0\)+1e-10. The NPCR and UACI values for both images are shown in Table 5. The data indicates that the values obtained are close to the theoretical value, demonstrating that this chaotic encryption method is highly sensitive to the key. The difference between the two initial values \(x_0\) is 1e-10, as shown in Fig. 15 and Fig. 16. The encrypted images of the two images exhibit a significant difference, demonstrating sensitivity to the initial value.

Table 5 Key security analysis.
Fig. 15
Fig. 15
Full size image

This is the first encryption scheme represented as a \(x_0\) encrypted image.

Fig. 16
Fig. 16
Full size image

This is the second encryption scheme represented as a \(x_0\)+1e-10 encrypted image.

By comparing the experiments, it is evident that our image encryption algorithm effectively enhances the security of the ciphertext image. This achieves the goal of privacy protection. The use of multilevel encryption makes our image encryption algorithm more difficult to decipher, and the matrix is more disordered, resulting in higher deciphering costs. Our algorithm outperforms those proposed in the literature. When compared to other algorithms proposed in literature, this algorithm demonstrates high security and attack resistance due to its use of multilevel encryption.

Key space analysis

Key space is the range of key sizes that determine the security of an encryption algorithm. A larger key space provides better defense against exhaustive attacks, while a smaller key space is less likely to successfully defend against exhaustive attacks. When designing an encryption algorithm, it is important to ensure that the key space is as large as possible to improve security. In general, the key space should be at least \(2^{100}\). We take the key r , b , x and set the maximum precision to 15. The key space is approximated to be estimated as \(10^{15} \times\) \(10^{15}\times 10^{15}=10^{45}\) \(\approx\) \(2^{150}\). The space in which our image encryption algorithm can generate chaotic sequences when computing the key space is \(2^{150}\).The key space of the encryption algorithm proposed in this paper is already greater than \(2^{100}\), and hence secure enough with enough key space to effectively avoid exhaustive attacks.

Robustness

It is conceivable that during the transmission or storage of encrypted images, their ciphertext pixels may be subject to loss or corruption. Consequently, a robust image encryption algorithm ought to possess the capability to withstand a certain degree of ciphertext pixel loss or corruption23. During transmission, images are sometimes affected by various factors, such as noise. The noise may cause distortion or contamination of the image. These factors will cause the final decryption to fail if the image cannot be properly decrypted. This makes it more difficult to recover the ciphertext image. Therefore, the image encryption algorithm must be robust enough to resist noise attacks generated in real-world scenarios. In this paper, the problem encountered in real world scenarios is simulated by adding noise to the ciphertext image. The decryption effect is observed by decrypting the image with added noise. In this paper, we choose to use salt noise. The results of the experiments are shown in Fig. 17 salt noise image and Fig. 18 salt noise decryption image.

Fig. 17
Fig. 17
Full size image

salt noise image.

Fig. 18
Fig. 18
Full size image

salt noise decrypted image.

Blocking attacks

During network communication, partial loss of images may occur, so the image encryption algorithm must be able to cope with this loss. After partial loss of data, the algorithm can still restore the encrypted image. To demonstrate the resistance of this algorithm to attacks, we modify the encrypted image by removing a pixel from the red channel, a pixel from the green channel, and a pixel from the blue channel. We then decrypt the modified image. If the original information is retained after decryption and the content of the original image can be visualized, it indicates that the proposed cipher is able to decrypt the lossy image. Figure 19 shows the removal (replaced by 0) of a pixel from the red channel of 80 \(\times\) 80 pixels, a pixel from the green channel of 50 \(\times\) 80 pixels, and a pixel from the blue channel of 60\(\times\)50 pixels. The decrypted result is shown in Fig. 20.

Fig. 19
Fig. 19
Full size image

Loss of encrypted image.

Fig. 20
Fig. 20
Full size image

Decrypted image.

Encryption efficiency

We list the encryption time for some images and compare it with some literature. Since we use multi-level encryption, some extra time will be spent in Table 6.

Table 6 Comparison of time analysis results.

Conclusions

Visual data has been used as a focal point for privacy protection. This paper introduces a multi-level image encryption algorithm that combines matrix row and column transformation, chaotic map, and cellular automata to enhance the security and confidentiality of image data. Firstly, the original image is preprocessed by row and column transform, which enhances the encryption speed and the security of the image, and improves the antiattack ability. Secondly, a chaotic encryption method LSCM is introduced to make up for the periodicity defect of a single chaotic system and improve the security of the encryption system. Finally, the sequence is further obfuscated by cellular automata. It increases the complexity of the encryption system and makes it more difficult for the cracker to understand the operation of the encryption algorithm, thus improving the overall security of the encryption system. The algorithm has high security and attack resistance and is suitable for the security needs of protecting image data during network transmission.

In future work, a multi-layer application of encryption process is proposed in this algorithm. Nevertheless, there are still some limitations to be addressed. The time overhead of the algorithm may increase due to the inclusion of multiple layers, and further optimization will be pursued. The application of the algorithm to the practice of privacy protection will be explored with the aim of enhancing social benefits.