Content area

Abstract

Most image encryption methods based on Rubik’s cube scrambling adopt the idea of cyclic shift or map the image pixels to the cube surface, not fully considering the cube’s three-dimensional (3D) properties. In response to this defect, we propose a mixed chaotic color image encryption method based on parallel rotation scrambling in 3D Rubik’s cube space. First, a seven-dimensional hyperchaotic system is introduced to generate chaotic pseudo-random integer sequences. Then, a proven lemma is applied to preprocess the red (R), green (G), and blue (B) channels of the plain image to realize the first diffusion. Next, the chaotic integer sequence is employed to control Arnold transformation, and the scrambled two-dimensional (2D) pixel matrix is converted into a 3D matrix. Then, the 3D cube is scrambled by dynamically selecting the rotating axis, layer number, and angle through the chaotic integer sequence. The scrambled 3D matrix is converted into a 2D matrix, realizing the second diffusion via exclusive OR with the chaotic matrix generated by logistic mapping. Finally, the matrices of the R, G, and B channels are combined into an encrypted image. By performing the encryption algorithm in reverse, the encrypted image can be decrypted into the plain image. A simulation analysis shows that the proposed method has a larger key space and exhibits stronger key sensitivity than some existing methods.

Full text

Turn on search term navigation

1. Introduction

With the development of network technology and artificial intelligence, the information transmission mode based on digital images has brought great convenience because of its intuitive nature, visualization features, and high information density. However, digital images involving personal privacy or secret information are faced with threats such as illegal theft and tampering in the transmission process, so it is necessary to encrypt digital images to ensure the security of information [1,2,3].

Some scholars have tried to apply traditional text information encryption methods to image encryption. However, due to the high correlation between adjacent pixels, large data capacity, and significant information redundancy, it is difficult for traditional text encryption methods to achieve efficient and secure encryption of digital images. Therefore, it is urgent to develop encryption methods suitable for digital images.

In recent years, researchers have discovered that chaos is highly effective for image encryption because of its ergodicity, aperiodicity, and pseudo-randomness. At present, chaotic image encryption has become a hotspot in the research field of image encryption [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]. To enhance encryption effects, chaotic image encryption generally includes image diffusion and image scrambling. The former approach uses chaotic pseudo-random sequences to change pixel values, while the latter leverages some scrambling methods to disrupt image pixel positions.

Most existing image diffusion methods adopt a single exclusive OR (XOR) operation in the process [13,14,15]. After rounding, a chaotic pseudo-random integer sequence is obtained, which then undergoes the XOR operation with plain-image pixel values one by one to realize image diffusion. For instance, in the Knuth–Durstenfeld shuffling algorithm based on chaotic sequences adopted in Refs. [13,14], the same random diffusion step is adopted for the red (R), green (G), and blue (B) channels of color images. Isaac et al. decomposed color images into three components (R, G, and B) and conducted discrete wavelet transformation and the same scrambling steps for each component [15]. Then, the chaotic pseudo-random sequence was used for the XOR operation with each component to achieve the purpose of diffusion.

Existing image scrambling methods mainly include Arnold transformation [16], Zigzag transform [17,18], DNA coding [19,20,21], and Rubik’s cube scrambling [22,23,24,25,26,27,28,29,30,31,32]. Among them, Rubik’s cube scrambling can realize pixel scrambling by mapping the pixels to the Rubik’s cube and utilizing its rotational property, which is characterized by simple operation and high efficiency. Some chaotic image encryption methods based on Rubik’s cube scrambling typically use the displacement characteristic of Rubik’s cubes for two-dimensional (2D) scrambling [22,23,24,25]. For example, Yang proposed an image encryption algorithm combining Rubik’s cube transformation and DNA coding by leveraging the rotation cyclic shift characteristics of the Rubik’s cube [22]. Ma adopted the cyclic shift idea of the Rubik’s cube to displace image pixels [23]. Vidhya employed the Rubik’s cube cyclic shift method for pixel scrambling [24]. Zhao et al. decomposed the six faces of a Rubik’s cube and arranged them in the 2D plane and controlled the rotation of the cube through random sequences to realize scrambling [25]. Some other chaotic image encryption methods are also based on Rubik’s cube scrambling, mapping image pixels to the cube surfaces, and then performing cube rotation [26,27,28,29,30,31]. For example, Chen et al. considered six color matrices of two color images as six faces of the Rubik’s cube, and achieved pixel scrambling by rotating the cube [26]. Zhao et al. spliced the scrambled pixel matrix and five chaotic matrices into a hexahedral structure, dynamically scrambling the Rubik’s cube through a pseudo-random sequence [27]. Wang et al. took the R, G, and B components of two images as the surfaces of the Rubik’s cube and controlled the cube’s scrambling through the pseudo-random sequence to achieve encryption [28]. Zhang mapped the image pixels to the surfaces of several third-order Rubik’s cubes, completing the spatial scrambling of image pixels by controlling the cube’s rotation [29]. Zheng et al. combined the R, G, and B components of two images into a cube and achieved image scrambling by rotating the cube [30]. Sun arranged the pixel values and keys into a hexahedron and scrambled the pixels by using a cross-axis rotation strategy [31]. However, few reports have mapped image pixels to an entire Rubik’s cube for scrambling. Notably, Gao et al. segmented multiple images by columns, superimposed multiple fixed-size planes to obtain regular cubes, and then disambiguated each tangent plane by rotating each plane counterclockwise around a fixed Z-axis by different angles [32].

To sum up, the existing research on chaotic image encryption based on Rubik’s cube scrambling has achieved some good results, but some shortcomings remain despite the progress:

(1). In the diffusion process of existing chaotic system-based color image encryption methods, most of the R, G, and B channels in color images are diffused by the same and single XOR operation, which is similar to the steps of the grayscale image encryption method and does not make full use of the characteristics of color images, affecting the encryption effect.

(2). Previous Rubik’s cube scrambling methods mostly leverage the cyclic shift feature of the Rubik’s cube or only map image pixels to the six cube surfaces. However, they do not fully consider the three-dimensional (3D) properties of the Rubik’s cube and fail to map image pixels to all the small cubes contained in the whole cube, which affects the scrambling effect. Although some studies map image pixels to the entire cube for scrambling, they simply rotate different angles around a fixed axis and fail to fully utilize the cube’s three degrees of freedom, resulting in suboptimal scrambling performance.

(3). Some reports do not make full use of chaotic pseudo-random sequences generated by chaotic systems in Rubik’s cube scrambling and fail to dynamically control variables such as the cube’s rotation axis, layer, and angle, resulting in poor scrambling effects.

In response to these defects, we propose a mixed chaotic image encryption method based on parallel rotation scrambling in 3D Rubik’s cube space. First, the method generates chaotic pseudo-random integer sequences through a seven-dimensional (7D) hyperchaotic system. Then, a proven lemma is used to preprocess the R, G, and B channels of the plain image to achieve the first diffusion step. Next, the chaotic pseudo-random integer sequences are employed to control the process of Arnold transformation for scrambling, and the scrambled 2D image pixel matrix is converted into a 3D matrix. The chaotic pseudo-random integer sequences are used to dynamically select the rotation axis, rotation layer number, and rotation angle, and parallel rotation scrambling is performed in the 3D space of the Rubik’s cube. The second diffusion is realized by the XOR operation with the chaotic matrix generated by logistic mapping. Finally, the diffusion matrices of the R, G, and B channels are synthesized into an encrypted image to realize encryption. The effectiveness of the proposed mixed chaotic image encryption method is verified by comparing its performance indexes with those of existing methods through simulation experiments.

The innovation of the proposed algorithm lies in the following aspects. The pixel values of the R, G, and B channels of the color image are multiplied by different parameters, and then the same modular operation is conducted for preprocessing diffusion. Deep diffusion is carried out twice in combination with XOR diffusion, which achieves a better effect than using the same and single XOR diffusion. After mapping the image pixel values to all the small cubes contained in the Rubik’s cube, 3D space scrambling is realized. The complexity of scrambling is high, and the 3D structure of the Rubik’s cube is better utilized. The chaotic pseudo-random sequences are used to dynamically control the rotation axis, rotation layer number, and rotation angle during Rubik’s cube scrambling, realizing better randomness and more satisfactory encryption performance.

2. Theoretical Basis

2.1. Chaotic System

In this paper, we use logistic mapping and a 7D hyperchaotic system to generate chaotic pseudo-random sequences.

The expression of logistic mapping is as follows:

(1)xn+1=μxn1xn,

where xn denotes the state variable of the system and μ represents the control parameter. When μ0,4 and xn0,1, logistic mapping appears chaotic [14].

The 7D hyperchaotic system is expressed as follows [33]:

(2)y˙1=ay2y1+y4+y7,y˙2=cy2y1y3+y6,y˙3=b+y1y2,y˙4=y2y5,y˙5=dy2+y4,y˙6=ey1+y2,y˙7=y2+y6,

where y1,y2,y3,y4,y5,y6,y7 are the state variables of the system, and a,b,c,d,e represent the control parameters. When a,b,c,d,e=10,100,2.7,2,3 and the initial variable values are set to y10,y20,y30,y40,y50,y60,y70=1,1,1,1,1,1,1, the system exhibits a hyperchaotic state [33].

Remark 1.

Logistic mapping is hereinafter used to generate 2D chaotic pseudo-random sequence matrices for diffusion, and the 7D hyperchaotic system is employed to create chaotic pseudo-random sequences for preprocessing parameters, Arnold transformation times, and Rubik’s cube scrambling control parameters in the encryption algorithm.

2.2. Arnold Transformation

Arnold transformation [32] is a method proposed by V. J. Arnold in the study of ergodic theory. In Arnold transformation, if the pixel coordinates of an N×N image are x,y0,1,2,3,,N1, discrete Arnold transformation can be employed as follows:

(3)xy=1112xymod N,

where x and y are the pixel coordinates in the plain image, x and y denote the pixel coordinates in the new image, and “mod” represents the function of taking remainders.

Arnold inverse transformation is described by

(4)xy=11121xymod N.

Arnold transformation features periodicity and can obtain the plain image after certain iterations. Through the code given in Ref. [34], the 2D Arnold transformation period of images under a varying order N can be obtained, as shown in Table 1. It can be observed that the 2D Arnold transformation period is related but not proportional to the image size.

As can be seen from Table 1, the 2D Arnold transformation period T is 383 in this algorithm since the 512 × 512 × 3 Lena standard color image is used as the plain image in the simulation.

2.3. Fundamentals of Remainders

Lemma 1.

For a×bmod256=c, a,b,c0,255, a,b,cZ, and a,256=1, if a and c are known, then b has a unique solution.

Proof of Lemma 1.

If a×bmod256=c, a,b,c0,255, a,b,cZ, and a,256=1, then a1 exists that satisfies aa11mod256. Therefore, the original formula is equivalent to a1aba1cmod256, that is, ba1cmod256. Since a1 is unique, b is unique. QED. □

Remark 2.

In encryption and decryption methods, Lemma 1 can be used in image preprocessing and inverse processing to ensure the uniqueness of decomposition and synthesis of the R, G, and B channels.

According to the Euler function, 128 integers in 0,255, namely, 1,3,5,7,9,11,13,15, ,251,253,255, are coprime with 256. However, if the first element 1 is substituted into Equation (7) below, the preprocessed pixel value may not change, which may ultimately lead to subpar image encryption. Therefore, we remove the first element 1 in the plain set and obtain the 127-element key set of K3=3,5,7,9,11,13,15,,251,253,255 needed by the proposed encryption algorithm.

3. Mixed Chaotic Image Encryption Method Based on Parallel Rotation Scrambling in 3D Rubik’s Cube Space

For any color image with a size of M×N, we design the mixed chaotic image encryption method based on parallel rotation scrambling in 3D Rubik’s cube space as follows.

Step 1: Let l=maxM,N. Select the key K1=μ,x0,i1,iq=3.998,0.720,ceilceill2332+1000,1000, which specifies the parameter, initial value, iteration time, and number of elimination groups of logistic mapping given in Equation (1), and then iterate logistic mapping several times. A chaotic pseudo-random sequence with a size of ceilceill2332+1000 is generated, and the first 1000 values are removed to prevent the transient effect, obtaining the chaotic pseudo-random sequence x. To convert this into a pixel integer value of 0,255, the following processing is employed:

(5)X=floorx×1016mod256,

where ceil is an upward rounding function and floor represents a downward rounding function.

Then, the above chaotic pseudo-random integer sequence X is transformed into a chaotic matrix A6 with a size of ceilceill233×ceilceill233.

Step 2: Select the key K2=a,b,c,d,e,y10,y20,y30,y40,y50,y60,y70,i2,iq,i=10,100,2.7,2,3,1,1,1,1,1,1,1,ceill233+1000,1000,2, which specifies the parameters, initial values, iteration times, number of elimination groups, Arnold transformation parameter, and preprocessing parameter of the 7D hyperchaotic system depicted in Equation (2). A chaotic pseudo-random sequence with a size of ceill233+1000 is generated, and the first 1000 groups are similarly removed to prevent the transient effect, obtaining 7 pseudo-random sequences: y1i,y2i,y3i,y4i,y5i,y6i,y7i.

Step 3: Integerize the chaotic pseudo-computer sequences y1i,y2i,y3i,y4i,y5i,y6i,y7i with Equation (6), below, to attain the integer sequences Y1i,Y2i,Y3i,Y4i,Y5i,Y6i,Y7i:

(6)Y1i=floory1i×1016mod127+1,Y2i=floory2i×1016mod127+1,Y3i=floory3i×1016mod127+1,Y4i=floory4i×1016modT1+1,Y5i=floory5i×1016mod3,Y6i=floory6i×1016modceill23+1,Y7i=floory7i×1016mod3,

where i=1,2,3,,ceill233, and T denotes the 2D Arnold transformation period corresponding to images of different sizes (Table 1).

Step 4: Read the color plain image P of size M×N, and divide it into three channels: RP,GP,BP.

Step 5: Taking the RP channel image as an example, zero-fill it to obtain the R1 channel image with a size of l×l, K4=M,N. In this way, G1 and B1 channel images with a size of l×l can also be obtained.

Step 6: Substitute the value of i into the chaotic pseudo-random integer sequences Y1i,Y2i,Y3i to obtain Y1i,Y2i,Y3i. The Y1ith, Y2ith, and Y3ith values of K3=3,5,7,9,11,13,15,,251,253,255 are then selected as the preprocessing parameters of the pixel values of the R1, G1, and B1 channels, respectively. The pixel values of the R2, G2, and B2 channels are obtained by preprocessing each channel using the following equations:

(7)R2=K3Y1i×R1mod256,G2=K3Y2i×G1mod256,B2=K3Y3i×B1mod256.

Step 7: Convert the R2 channel image into a pixel matrix A1, and substitute the value of i into the sequence Y4i to attain Y4i. Then, take Y4i as the number of the Arnold transformation and perform Arnold transformation on A1 to obtain the transformed matrix A2.

Step 8: Read A2 as array a in row order and fill it with ceill233l2 zeroes to obtain array b. Then, read b as ceill23 2D matrices with a size of ceill23×ceill23. These 2D matrices are stacked sequentially from top to bottom to form a 3D pixel matrix A3 with a size of ceill23×ceill23×ceill23.

Step 9: Perform Rubik’s cube scrambling on A3 in the following manner: Y5i determines whether the rotation axis of A3 is axis X(Y5i=0), axis Y(Y5i=1), or axis Z(Y5i=2); Y6i controls the layer that A3 rotates to be the Y6ith layer; Y7i decides whether the rotation angle of the selected layer is 90° (Y7i=0), 180° (Y7i=1), or 270° (Y7i=2). The rotation direction is clockwise, and the operation starts from i=1 to i=ceill233. Taking the fifth-order Rubik’s cube as an example, the specific method is shown in Figure 1.

Step 10: Read the scrambled 3D pixel matrix A4 as array c in reverse order according to the method in step 8, and add ceilceill2332ceill233 zeros after c to obtain array d. Read d in reverse order as a 2D pixel matrix A5, and perform XOR with A6 to generate the final encrypted image RC of the R channel.

Similarly, the encryption operations from steps 7 to 10 are performed on the G2 and B2 channels, obtaining the final encrypted images GC and BC of the G and B channels.

Step 11: The encrypted images, RC, GC, and BC, of the three channels are merged and converted into an encrypted color image C.

The overall process is illustrated in Figure 2. The pseudocode is as in Algorithm 1.

Algorithm 1. Mixed chaotic image encryption method based on parallel rotation scrambling in 3D Rubik’s cube space.
Input: Image P of size M×N and keys K1,K2,K3,K4 Output: Image C 1: Generate chaotic sequence x using Logistic mapping;2: Convert chaotic sequence x to integer sequence X after removing the first 1000 values of x;3: Transform X into chaos matrix A6;4: sequenceLength = K1(3);5: Logisticmap = zeros(sequenceLength, 1);6: Logisticmap(1) = K1(2);7: for i = 2:sequenceLength8:    logisticmap(i) = K1(1) × logisticmap(i − 1) × (1 − logisticmap(i − 1));9: end10: Logisticmap = Logisticmap(1001:end);11: X = mod(floor(Logisticmap × 1 × 1016), 256);12: A6 = reshape(X, sqrt(length(X)), sqrt(length(X)));13: Generate hyperchaotic sequence y using the 7D hyperchaotic system;14: Convert hyperchaotic sequence y to integer sequence Y after removing the first 1000 values of y;15: dy = zeros(7, 1);16: y(1) = K26:12;17: seqLength = K213;18: for i = 2:seqLength19:    dy1 = K21× (y2y1) + y4 + y7;20:    dy2 = −K23×y2y1×y3 + y6;21:    dy3 = −K22 + y1×y2;22:    dy4 = −y2y5;23:    dy5 = K24×y2 + y4;24:    dy6 = −K25×y1 + y2;25:    dy7 = −y2 + y6;26: end27: y = y(1001:end, :);28: Y1 = mod(floor(abs(y(:, 1)) × 1× 1016), 127) + 1; 29: Y2 = mod(floor(abs(y(:, 2)) × 1× 1016), 127) + 1; 30: Y3 = mod(floor(abs(y(:, 3)) × 1× 1016), 127) + 1; 31: Y4 = mod(floor(abs(y(:, 4)) × 1× 1016), 382) + 1; 32: Y5 = mod(floor(abs(y(:, 5)) × 1× 1016), 3); 33: Y6 = mod(floor(abs(y(:, 6)) × 1× 1016), ceil(l2/3) + 1; 34: Y7 = mod(floor(abs(y(:, 7)) × 1× 1016), 3); 35: Preprocess the plain image; 36: R1 = double(P(:, :, 1));37: G1 = double(P(:, :, 2));38: B1 = double(P(:, :, 3));39: for i = 1:numel(R1)40:    R2(i: numel(R1)) = mod(K3(Y1(2)) × R1(i: numel(R1)), 256);41:    G2(i: numel(R1)) = mod(K3(Y2(2)) × G1(i: numel(R1)), 256);42:    B2(i: numel(R1)) = mod(K3(Y3(2)) × B1(i: numel(R1)), 256);43: end44: Perform Arnold transformation;45: [rows, cols] = size(R2);46: N = rows; 47: R3 = R2;48: G3 = G2;49: B3 = B2;50: for iter = 1:Y4K21551:    for x = 0:rows-152:        for y = 0:cols-153:            x_new = mod((x + y), N);54:            y_new = mod((x + 2*y), N);55:            R3(x_new + 1, y_new + 1) = R2(x + 1, y + 1);56:            G3(x_new + 1, y_new + 1) = G2(x + 1, y + 1);57:            B3(x_new + 1, y_new + 1) = B2(x + 1, y + 1);58:        end59:    end60:    R2 = R3;61:    G2 = G3;62:    B2 = B3;63: end64: Convert transformed matrix A2 to 3D pixel matrix A3;65: Scramble the Rubik’s cube A3;66: R4 = zeros(cube_size, cube_size, cube_size);67: G4 = zeros(cube_size, cube_size, cube_size);68: B4 = zeros(cube_size, cube_size, cube_size);69: for i = 1:cube_size70:    for j = 1:cube_size71:        for k = 1:cube_size72:            index = (i − 1)×cube_size2 + (j − 1)×cube_size + k;73:            if index ≤ numel(R3)74:                R4(i,j,k) = R3(index);75:                G4(i,j,k) = G3(index);76:                B4(i,j,k) = B3(index);77:            end78:        end79:    end80: end81: for i = 1:ceil((length(Y5)) 82:    axis = Y5(i) + 1; 83:    layer = Y6(i); 84:    rotation = Y7(i) + 1;85:    R4 = rubiks_cube_rotate(R4, axis, rotation, layer);86:    G4 = rubiks_cube_rotate(G4, axis, rotation, layer);87:    B4 = rubiks_cube_rotate(B4, axis, rotation, layer);88: end89: Convert 3D matrix A4 into 2D matrix A5 after XOR with chaotic matrix A6;90: Merge encrypted channels into color encrypted image C.

4. Mixed Chaotic Image Decryption Method Based on Parallel Rotation Scrambling in 3D Rubik’s Cube Space

The mixed chaotic image decryption method based on parallel rotation scrambling in 3D Rubik’s cube space is the reverse process of the above encryption process; it is performed in the following steps.

Step 1: Let l=maxM,N. Iterate the logistic mapping described in Equation (1) by using the values in K1=μ,x0,i1,iq=3.998,0.720,ceilceill2332+1000,1000 as the parameter, initial value, iteration time, and number of elimination groups of logistic mapping, respectively. Then, obtain the chaotic pseudo-random sequence x after removing the first 1000 values. Process x according to Equation (5) to turn it into the interval of 0,255, and then transform it into a chaotic matrix A7 with a size of ceilceill233×ceilceill233.

Step 2: Iterate the 7D hyperchaotic system in Equation (2) by using the values in K2=a,b,c,d,e,y10,y20,y30,y40,y50,y60,y70,i2,iq,i=10,100,2.7,2,3,1,1,1,1,1,1,1,ceill233+1000,1000,2 as the parameters, initial values, iteration times, number of elimination groups, Arnold transformation parameter, and preprocessing parameter of the 7D hyperchaotic system, respectively. Then, remove the first 1000 groups of values to obtain 7 chaotic pseudo-random sequences y1i,y2i,y3i,y4i,y5i,y6i,y7i.

Step 3: Integerize the chaotic pseudo-random sequences y1i,y2i,y3i,y4i,y5i,y6i,y7i via Equation (6) to obtain the chaotic pseudo-random integer sequences Y1i,Y2i,Y3i,Y4i,Y5i,Y6i,Y7i. Substitute the value of i into the sequences Y1i,Y2i,Y3i,Y4i to obtain Y1i,Y2i,Y3i,Y4i.

Step 4: Divide the encrypted color image into three channels, RC, GC, and BC, and decrypt the image of each channel using steps 5 to 10 to obtain the initial decrypted image of each channel.

Step 5: Take the RC channel image as an example, convert it into a pixel matrix AC, and then perform an XOR operation between it and A7 to generate a 2D pixel matrix A8.

Step 6: Read A8 as array e in row order, remove the first ceilceill2332ceill233 zeros, and then read it as array f in reverse order. Read f sequentially as ceill23 2D matrices with a size of ceill23×ceill23, and stack these 2D matrices from top to bottom to form a 3D pixel matrix A9 with a size of ceill23×ceill23×ceill23.

Step 7: Perform a reverse-order 3D Rubik’s cube disarrangement of A9 in the following way: Y5i decides whether the rotation axis of A9 is axis X(Y5i=0), axis Y(Y5i=1), or axis Z(Y5i=2); Y6i determines the layer A9 rotates to be the Y6ith layer; Y7i controls whether the rotation angle of the selected layer is 90° (Y7i=0), 180° (Y7i=1), or 270° (Y7i=2). The rotation direction is counterclockwise, and the operation is from i=1 to i=ceill233.

Step 8: Read the scrambled 3D pixel matrix A10 into array g in reverse order according to the method in step 6. Remove the last ceill233l2 zeros after g to obtain array h, and read h as a 2D pixel matrix A11 with a size of l×l.

Step 9: Taking Y4i as the number of times to perform Arnold inverse transformation, perform Arnold inverse transformation on A11 and obtain the transformed pixel matrix A12. Then, A12 is transformed into the R12 channel image.

Step 10: In K3=3,5,7,9,11,13,15,,251,253,255, the Y1ith, Y2ith, and Y3ith values are selected as the inverse processing parameters of the pixel values of the three channels R12, G12, and B12, respectively. The image of each channel is inversely processed, and the pixel values of the images in the RP, GP, and BP channels are obtained as follows:

(8)RP=K31Y1i×R12mod256,GP=K31Y2i×G12mod256,BP=K31Y3i×B12mod256.

Step 11: The initial decrypted images of the three channels are merged and converted into a color image P with a size of l×l. According to K4=M,N, the last l2M×N pixels with a value of 0 are removed to obtain the final decrypted image P, with a size of M×N.

The overall process is illustrated in Figure 3.

5. Simulation Results and Analysis

In this paper, MATLAB R2022a is used to simulate and verify the proposed mixed chaotic image encryption method. The operating environment is as follows: 13th Gen Intel(R) Core(TM) [email protected] GHz, 32 GB memory, a 64-bit operating system, and an X64-based processor. To evaluate the encryption effect of this method intuitively, the Lena standard color image with a size of 512 × 512 × 3 is selected as the experimental encryption and decryption object. As can be seen from Figure 4, the encrypted image exhibits random noise, and the decrypted image is consistent with the plain image, demonstrating that the proposed method can effectively realize image encryption and decryption.

5.1. Key Sensitivity Analysis

Key sensitivity is an important index to measure the security of encryption algorithms. To judge the sensitivity of the proposed algorithm to the change of key, we decrypt the encrypted image with the correct key and the wrong key after slightly changing the correct key. (The wrong key is K1=μ,x0,i1,iq=3.998,0.720+1015,ceilceill2332+1000,1000 while K2,K3,K4 remains unchanged.) The results are shown in Figure 5. It can be seen that even though the difference between the two keys is slight, the correct image cannot be decrypted. Therefore, the proposed algorithm has good key sensitivity.

5.2. Key Space Analysis

The key space of encryption algorithms must be at least greater than 2100 to effectively resist violent attacks. The keys used in this algorithm are as follows: K1=μ,x0,i1,iq=3.998,0.720,ceilceill2332+1000,1000,K2=a,b,c,d,e,y10,y20,y30,y40,y50,y60,y70,i2,iq,i=10,100,2.7,2,3,1,1,1,1,1,1,1,ceill233+1000,1000,2,K3=3,5,7,9,11,13,15,,251,253255,K4=M,N. Using a computer with a 64-bit operating system, the floating-point precision can reach 10−16, so the sensitivities of logistic mapping and the 7D hyperchaotic system to parameters and initial values are 10−16. The parameters of the 7D hyperchaotic system are fixed, so the integerization of pseudo-random sequences is also accurate to 16 decimal places. It can be estimated that the key space size of this algorithm is at least 10163×101613×12732871, which is far greater than 2100. This confirms the algorithm’s strong ability to resist violent attacks.

Table 2 compares the key space size of different algorithms, revealing that the proposed algorithm has a larger key space and better image encryption effect.

5.3. Histogram Analysis

As shown in Figure 6, the plain image exhibits significant non-uniform distribution characteristics in the histogram, and its pixel values are concentrated in specific intervals, reflecting a statistical law. The histogram of the image encrypted by the proposed method shows an approximately uniform distribution, which indicates that the encryption process eliminates the statistical characteristics of the plain image through sufficient scrambling and diffusion. Therefore, attackers cannot use the histogram distribution law to infer the original information, which verifies that the proposed encryption algorithm can resist statistical analysis attacks.

5.4. Correlation Analysis of Adjacent Pixels

As can be seen from Figure 7, the adjacent pixels of the plain image show strong correlations, while the adjacent pixels of the encrypted image have few correlations. To further evaluate the correlation of adjacent image pixels, the correlation coefficients of adjacent pixels of the plain and encrypted images in horizontal, vertical, and diagonal directions are calculated. The correlation coefficients of the proposed algorithm are compared with those of other algorithms, as shown in Table 3.

Table 3 reveals that the correlation coefficients of adjacent pixels of the image encrypted by the proposed method are far lower than those of the plain image and generally smaller than those of other methods. These results demonstrate the superior performance of our image encryption method.

5.5. Information Entropy Analysis

Table 4 compares the information entropy of the Lena color plain image, the image encrypted by the proposed encryption method, and the images obtained from other comparative methods. Compared with the images encrypted by other methods, the image encrypted by our method exhibits information entropy closer to the ideal value of 8, indicative of its superior encryption performance.

5.6. Robustness Analysis

In practical applications, image encryption methods should have the ability to resist shearing attacks and noise attacks. To evaluate the robustness of the proposed algorithm, 1/16, 1/8, and 1/4 of the encrypted image area are cut before decryption. Gaussian noise with a variance of 0.001, 0.005, and 0.01 is added to the encrypted image and then the images are decrypted. The results are shown in Figure 8 and Figure 9, respectively. It can be observed that the decrypted images are affected to varying degrees after cropping or adding noise, but some information of the plain image can be recovered when the cut image part is small or the noise pollution intensity is low. This shows that the proposed algorithm has a strong anti-attack ability and can maintain basic recoverability in harsh channel environments.

5.7. Time Comparison

To verify the influence of the Rubik’s cube scrambling times on the final encryption effect of the proposed method, we vary the scrambling time of the Rubik’s cube and employ performance indexes such as the encryption and decryption time, correlation coefficient of adjacent pixels, and information entropy for encryption effect analysis according to the actual size of the Lena color image. In the encryption algorithm, the Rubik’s cube scrambling times are i=ceill233, and the actual value of i is 262,144 after substituting the Lena color image parameters. Then, the Rubik’s cube scrambling times are set to i10, i100, and i1000 (the actual values are 26,215, 2622, and 263, respectively) to encrypt the same Lena color image. The obtained performance indexes are compared in Table 5.

As can be seen from Table 5, the correlation coefficient and information entropy of adjacent pixels of the final encrypted image vary slightly under different Rubik’s cube scrambling times, while the encryption and decryption times increase significantly with an increase in scrambling times. This means that when the difference in encryption performance is negligible, the encryption algorithm with a lower scrambling time will have a shorter encryption time and higher encryption efficiency.

To eliminate the interference of other encryption steps in the proposed method and further study the influence of the Rubik’s cube scrambling time on image encryption effects, the same Lena color image is scrambled with different Rubik’s cube scrambling times, and image encryption performance metrics such as the scrambling time and correlation coefficient of adjacent pixels are used for evaluation.

As can be seen from Table 6, for scrambling times of i or i10, the correlation coefficient of adjacent pixels of the scrambled image is low, and there is little difference between the two scenarios. However, the former case has a much shorter scrambling time than the latter. Therefore, if the difference in encryption performance is negligible, the encryption algorithm with a lower scrambling time should be selected, which can yield a shorter encryption time and higher encryption efficiency.

6. Conclusions

Existing chaotic image encryption methods based on Rubik’s cube scrambling suffer from single diffusion, insufficient use of the 3D properties of Rubik’s cubes, and deficient adoption of chaotic pseudo-random sequences generated by chaotic systems. In response to these disadvantages, this study proposes a mixed chaotic image encryption method based on parallel rotation scrambling in 3D Rubik’s cube space. The innovations of this method are as follows: First, the pixel values of the R, G, and B channels of a color image are multiplied by different parameters, and then the same modular operation is performed for preprocessing diffusion. Combined with XOR diffusion, deep diffusion is performed twice. Second, the pixel values of the image are mapped to the small cubes contained in the whole Rubik’s cube, and then the 3D space is scrambled, which exhibits high complexity and makes better use of the characteristics of the cube’s 3D structure. Third, chaotic pseudo-random sequences are used to dynamically control the rotation axis, layer, and angle of the Rubik’s cube, which achieves better randomness and more satisfactory encryption effects. Simulation experiments compare the performance indexes and prove the effectiveness of this mixed chaotic image encryption method compared to some existing methods.

Author Contributions

Conceptualization, L.X. and Y.C.; methodology, L.X. and Y.C.; software, L.X.; writing—original draft preparation, L.X. and Y.C.; writing—review and editing, L.X., Y.C., Y.Q. and Z.Y. All authors have read and agreed to the published version of the manuscript.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

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

Conflicts of Interest

The authors declare no conflicts of interest.

Footnotes

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Figures and Tables

Figure 1 Rubik’s cube scrambling.

View Image -

Figure 2 Encryption flowchart.

View Image -

Figure 3 Decryption flowchart.

View Image -

Figure 4 Plain image, encrypted image, and decrypted image.

View Image -

Figure 5 Key sensitivity test results.

View Image -

Figure 6 Histograms of the plain image and encrypted image.

View Image -

View Image -

Figure 7 Comparison of the adjacent pixel correlations between the plain and encrypted images.

View Image -

View Image -

View Image -

Figure 8 Decrypted images subjected to cropping attacks with different proportions.

View Image -

Figure 9 Decrypted images after adding Gaussian noise with different variances.

View Image -

The 2D Arnold transformation periods corresponding to images under different orders [34].

N 2 4 8 10 25 50 100 125 256 512
T 3 3 6 30 50 150 150 250 192 383

Comparison of key spaces for different algorithms.

Method Number of Keys
Ours 2871
Ref. [31] 2199
Ref. [25] 2212
Ref. [27] 2450
Ref. [14] 2512

Comparison of correlation coefficients between adjacent pixels.

Method Horizontal Vertical Diagonal
Plain image 0.9818 0.9681 0.9517
Ours −0.001600 −0.000939 0.000243
Ref. [14] 0.003496 −0.000815 −0.001055
Ref. [27] −0.006267 −0.001400 0.001067
Ref. [29] 0.001269 −0.004160 0.001162
Ref. [31] −0.001100 −0.002733 −0.001000

Comparison of information entropy.

Method R G B Average
Plain image 7.2682 7.5901 6.9951 7.28447
Ours 7.9992 7.9994 7.9994 7.99933
Ref. [31] 7.9956 7.9949 7.9953 7.99527
Ref. [27] 7.9976 7.9973 7.9974 7.99743
Ref. [14] 7.9993 7.9994 7.9991 7.99927
Ref. [29] 7.9993 7.9993 7.9992 7.99927

Comparison of encryption and decryption times and encryption effects for different cube scrambling times.

Number of Disruptions i i 10 i 100 i 1000
Encryption time 1138.45 s 113.50 s 15.21 s 5.82 s
Decryption time 1067.61 s 133.79 s 24.72 s 14.95 s
Neighboring pixelcorrelation coefficient Horizontal −0.00160 0.00131 0.00088 0.00105
Vertical −0.00094 −0.00286 0.00022 0.00111
Diagonal 0.00024 0.00125 −0.00151 −0.00006
Information entropy R 7.9992 7.9993 7.9993 7.9993
G 7.9994 7.9993 7.9993 7.9993
B 7.9994 7.9992 7.9992 7.9993
Average 7.99933 7.99927 7.99927 7.99930

Comparison of scrambling time and encryption effects for different cube scrambling times.

Number of Disruptions i i 10 i 100 i 1000
Scrambling time 2199.74 s 226.41 s 11.30 s 1.95 s
Neighboring pixelcorrelation coefficient Horizontal 0.03680 0.03527 0.05531 0.23495
Vertical 0.02790 0.03696 0.06371 0.27084
Diagonal 0.02549 0.02210 0.02946 0.09948

References

1. Zhou, Z.; Xu, X.; Yao, Y.; Jiang, Z.; Sun, K. Novel multiple-image encryption algorithm based on a two-dimensional hyperchaotic modular model. Chaos Solitons Fractals; 2023; 173, 113630. [DOI: https://dx.doi.org/10.1016/j.chaos.2023.113630]

2. Cai, C.; Cao, Y.; Jahanshahi, H.; Mou, J.; Sun, B. 2D and 3D compatible chaotic image encryption system based on checkers rules and shift register. J. Frankl. Inst.; 2024; 361, 106874. [DOI: https://dx.doi.org/10.1016/j.jfranklin.2024.106874]

3. Zhou, N.-R.; Hu, L.-L.; Huang, Z.-W.; Wang, M.-M.; Luo, G.-S. Novel multiple color images encryption and decryption scheme based on a bit-level extension algorithm. Expert Syst. Appl.; 2024; 238, 122052. [DOI: https://dx.doi.org/10.1016/j.eswa.2023.122052]

4. Liang, B.; Hu, C.; Tian, Z.; Wang, Q.; Jian, C. A 3D chaotic system with multi-transient behavior and its application in image encryption. Phys. A Stat. Mech. Appl.; 2023; 616, 128624. [DOI: https://dx.doi.org/10.1016/j.physa.2023.128624]

5. Liu, L.; Wang, J. A cluster of 1D quadratic chaotic map and its applications in image encryption. Math. Comput. Simul.; 2023; 204, pp. 89-114. [DOI: https://dx.doi.org/10.1016/j.matcom.2022.07.030]

6. Zhou, S.; Wang, X.; Zhang, Y. Novel image encryption scheme based on chaotic signals with finite-precision error. Inf. Sci.; 2023; 621, pp. 782-798. [DOI: https://dx.doi.org/10.1016/j.ins.2022.11.104]

7. Rehman, M.U. Quantum-enhanced Chaotic Image Encryption: Strengthening Digital Data Security With 1-D Sine-based Chaotic Maps and Quantum Coding. J. King Saud Univ. Comput. Inf. Sci.; 2024; 36, 101980. [DOI: https://dx.doi.org/10.1016/j.jksuci.2024.101980]

8. Sun, B.; Zhang, C.; Peng, Q.; Du, B. Color image encryption algorithm based on 5D memristive chaotic system and group scrambling. Optik; 2023; 287, 171132. [DOI: https://dx.doi.org/10.1016/j.ijleo.2023.171132]

9. Lai, Q.; Hu, G.; Erkan, U.; Toktas, A. High-efficiency medical image encryption method based on 2D Logistic-Gaussian hyperchaotic map. Appl. Math. Comput.; 2023; 442, 127738. [DOI: https://dx.doi.org/10.1016/j.amc.2022.127738]

10. Mfungo, D.E.; Fu, X.; Wang, X.; Xian, Y. Enhancing Image Encryption with the Kronecker xor Product, the Hill Cipher, and the Sigmoid Logistic Map. Appl. Sci.; 2023; 13, 4034. [DOI: https://dx.doi.org/10.3390/app13064034]

11. Qiu, H.; Xu, X.; Jiang, Z.; Sun, K.; Xiao, C. A color image encryption algorithm based on hyperchaotic map and Rubik’s Cube scrambling. Nonlinear Dyn.; 2022; 110, pp. 2869-2887. [DOI: https://dx.doi.org/10.1007/s11071-022-07756-1]

12. Zhang, X.; Liu, M.; Niu, Y. Facial image encryption scheme based on improved 4-D hyperchaotic system. J. Supercomput.; 2025; 81, 454. [DOI: https://dx.doi.org/10.1007/s11227-025-06943-2]

13. Geng, S.; Zhang, H.; Zhang, X. A hexadecimal scrambling image encryption scheme based on improved four-dimensional chaotic system. J. Supercomput.; 2024; 80, pp. 25853-25887. [DOI: https://dx.doi.org/10.1007/s11227-024-06400-6]

14. Qiu, H. Research on Color Image Encryption Algorithms Based on Hyperchaotic System. Master’s Thesis; Central South University: Changsha, China, 2023; (In Chinese)

15. Isaac, S.D.; Njitacke, Z.T.; Tsafack, N.; Tchapga, C.T.; Kengne, J. Novel compressive sensing image encryption using the dynamics of an adjustable gradient Hopfield neural network. Eur. Phys. J. Spec. Top.; 2022; 231, pp. 1995-2016. [DOI: https://dx.doi.org/10.1140/epjs/s11734-022-00472-2]

16. Du, S.K.; Zhang, A.H. An encryption algorithm for Arnold transformation images based on Frobenius normal form. J. Nanjing Univ. Posts Telecommun. Nat. Sci. Ed.; 2022; 42, pp. 105-110. (In Chinese)

17. Wang, X.; Zhang, J.; Cao, G. An image encryption algorithm based on Zigzag transform and LL compound chaotic system. Opt. Laser Technol.; 2019; 119, 105581.

18. Wang, X.; Guan, N. A novel chaotic image encryption algorithm based on extended Zigzag confusion and RNA operation. Opt. Laser Technol.; 2020; 131, 106366. [DOI: https://dx.doi.org/10.1016/j.optlastec.2020.106366]

19. Wen, H.; Lin, Y. Cryptanalysis of an image encryption algorithm using quantum chaotic map and DNA coding. Expert Syst. Appl.; 2024; 237, 106366. [DOI: https://dx.doi.org/10.1016/j.eswa.2023.121514]

20. Alawida, M. A novel DNA tree-based chaotic image encryption algorithm. J. Inf. Secur. Appl.; 2024; 83, 103791. [DOI: https://dx.doi.org/10.1016/j.jisa.2024.103791]

21. Liang, Q.; Zhu, C. A new one-dimensional chaotic map for image encryption scheme based on random DNA coding. Opt. Laser Technol.; 2023; 160, 109033. [DOI: https://dx.doi.org/10.1016/j.optlastec.2022.109033]

22. Yang, L.B. Research on Image Encryption Method Based on the Combination of Magic Cube Transformation and DNA Coding. Master’s Thesis; Anhui University: Hefei, China, 2017; (In Chinese)

23. Ma, C. Research on Image Encryption Algorithm Based on Rubik’s Cube Theory. Master’s Thesis; Northwest University for Nationalities: Lanzhou, China, 2018; (In Chinese)

24. Vidhya, R.; Brindha, M. A chaos based image encryption algorithm using Rubik’s cube and prime factorization process (CIERPF). J. King Saud Univ. Comput. Inf. Sci.; 2018; 34, pp. 2000-2016. [DOI: https://dx.doi.org/10.1016/j.jksuci.2019.12.014]

25. Zhao, J.; Zhang, T.; Jiang, J.; Fang, T.; Ma, H. Color image encryption scheme based on alternate quantum walk and controlled Rubik’s Cube. Sci. Rep.; 2022; 12, 14253. [DOI: https://dx.doi.org/10.1038/s41598-022-18079-x]

26. Chen, L.; Yin, H.; Yuan, L.; Machado, J.T.; Wu, R.; Alam, Z. Double color image encryption based on fractional order discrete improved Henon map and Rubik’s cube transform. Signal Process. Image Commun.; 2021; 97, 116363. [DOI: https://dx.doi.org/10.1016/j.image.2021.116363]

27. Zhao, Y.; Meng, R.; Zhang, Y.; Yang, Q. Image encryption algorithm based on a new chaotic system with Rubik’s cube transform and Brownian motion model. Optik; 2022; 273, 170342. [DOI: https://dx.doi.org/10.1016/j.ijleo.2022.170342]

28. Wang, B.; Li, H.X.; Chen, R.R. Dual-color image encryption system with improved lifting-like Scheme. Comput. Sci.; 2024; 51, 230500007.(In Chinese)

29. Zhang, T. Research on Image Encryption Based on Quantum Walk and Rubik’s Cube Transform. Master’s Thesis; Qingdao Technological University: Qingdao, China, 2023; (In Chinese)

30. Zheng, H.; Li, G.; Xu, W.; Zhong, H.; Xu, X. A compressive sensing encryption scheme for dual color images based on discrete memristor map and Rubik’s cube scramble. Optik; 2023; 286, 170991. [DOI: https://dx.doi.org/10.1016/j.ijleo.2023.170991]

31. Sun, G.M.; Wang, H. Image encryption and decryption technology based on Rubik’s Cube and dynamic password. J. Beijing Univ. Technol.; 2021; 47, pp. 833-841. (In Chinese)

32. Gao, X.; Mou, J.; Banerjee, S.; Cao, Y.; Xiong, L.; Chen, X. An effective multiple-image encryption algorithm based on 3D cube and hyperchaotic map. J. King Saud Univ. Comput. Inf. Sci.; 2022; 34, pp. 1535-1551. [DOI: https://dx.doi.org/10.1016/j.jksuci.2022.01.017]

33. Yang, L.B. Study on Complex Dynamics of Controlled High-Dimensional Hyperchaotic Systems. Ph.D. Thesis; South China University of Technology: Guangzhou, China, 2020; (In Chinese)

34. Zhang, B. Scrambling research of digital image based on Matlab. Comput. Digit. Eng.; 2018; 38, pp. 139-142. (In Chinese)

© 2025 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/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.