Hyperchaotic image encryption method based on parallel rotation scrambling of Rubik's Cube three-dimensional space

By mapping image pixel values to the Rubik's Cube stereo space and using the seven-dimensional hyperchaotic system to control the rotation parameters, the problem of Rubik's Cube's failure to fully utilize stereo attributes and pseudo-random sequences is solved, and more complex and secure image encryption is achieved.

CN119602925BActive Publication Date: 2025-08-08NAVAL UNIV OF ENG PLA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411639996.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-08-08
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

The existing Rubik's Cube scrambling method does not fully utilize the three-dimensional attributes of the Rubik's Cube and the pseudo-random sequences generated by the chaotic system, resulting in poor chaos effect and does not dynamically control the Rubik's Cube rotation axis, number of rotation layers and rotation angle.

Method used

Map the pixel values of the image to all small cubes contained in the entire Rubik's Cube for three-dimensional space chaos. Use the pseudo-random sequence generated by the seven-dimensional superchaos system to dynamically control the rotation axis, number of rotation layers and rotation angle. Combined with Arnold transformation and Rubik's Cube chaos, the three-dimensional space rotation chaos of the image is achieved.

Benefits of technology

It improves the complexity and security of messing, increases the key space, and improves the encryption effect and image security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119602925B_ABST
    Figure CN119602925B_ABST
Patent Text Reader

Abstract

The present invention proposes a hyperchaotic image encryption method based on parallel rotation scrambling in a Rubik's Cube. A seven-dimensional hyperchaotic system generates a pseudorandom sequence as preprocessing parameters, Arnold transform parameters, and Rubik's Cube scrambling parameters. The pseudorandom sequence is then used to preprocess the R, G, and B channels of the plaintext image. The preprocessed image is then scrambled using the pseudorandom sequence to control the Arnold transform, thereby improving the data aggregation problem that often occurs during subsequent three-dimensional Rubik's Cube scrambling. The resulting two-dimensional chaotic matrix is then converted into a three-dimensional matrix, and the pseudorandom sequence is used to dynamically select the rotation axis, number of rotation layers, and rotation angle to perform parallel rotation scrambling in the three-dimensional Rubik's Cube. The present invention maps image pixel values to all small cubes contained in the entire Rubik's Cube for three-dimensional spatial scrambling, better utilizing the characteristics of the Rubik's Cube's three-dimensional structure. This increases the complexity of the scrambling and enhances the security of the ciphertext image, resulting in a larger key space and better scrambling results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image encryption technology, and in particular to a hyper-chaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space. Background Art

[0002] With the development of network and artificial intelligence technologies, digital images have brought great convenience to people due to their intuitiveness, vividness, and large amount of information. However, these digital images containing confidential information face threats such as illegal theft and tampering during transmission. Therefore, it is necessary to encrypt these digital images to ensure the security of the image information.

[0003] Some researchers have attempted to use traditional text encryption methods to encrypt images. However, due to the high correlation between adjacent pixels, large data capacity, and high redundancy of images, traditional text encryption methods are difficult to effectively and securely encrypt digital images. Therefore, there is an urgent need to develop encryption algorithms suitable for digital images.

[0004] In recent years, researchers have discovered that chaos, due to its ergodic, non-periodic, and pseudo-random properties, is well-suited for image encryption. Currently, chaotic image encryption has become a hot research topic (see references 1-11). To enhance encryption effectiveness, chaotic image encryption generally involves two steps: image diffusion and image scrambling. Image diffusion uses a chaotic pseudo-random sequence to alter pixel values, while image scrambling employs various scrambling methods to disrupt the positions of image pixels.

[0005] In the image scrambling process, existing image scrambling methods mainly include: Arnold transform (see reference 12), Zigzag transform (see references 13-14), DNA encoding (see references 15-17), and Rubik's Cube scrambling (see references 18-19). Among these scrambling methods, the Rubik's Cube scrambling method maps image pixels to a Rubik's Cube and scrambles the pixels by rotating the cube. It is a simple and efficient scrambling method. Therefore, image encryption technology that combines the Rubik's Cube and chaos has gradually become a research hotspot.

[0006] In recent years, due to the efficiency and convenience of Rubik's Cube scrambling, image encryption algorithms based on it have attracted the attention of some scholars, and some promising research results have been achieved (see references 18-28). Some chaotic image encryption methods based on Rubik's Cube scrambling typically utilize the Rubik's Cube's displacement characteristics to perform two-dimensional scrambling. For example, Yang Libo utilized the Rubik's Cube's rotation and cyclic shift properties to propose an image encryption algorithm based on a combination of Rubik's Cube transformation and DNA coding (see reference 18); Ma Cong introduced the idea of Rubik's Cube cyclic shift to scramble image pixels, thereby achieving image encryption (see reference 19); R. Vidhya and M. Brindha used the Rubik's Cube cyclic shift method for pixel scrambling and combined it with a chaotic system to propose an image encryption method (see reference 20); Zhao et al. decomposed the six faces of the Rubik's Cube and arranged them in a specific order on a two-dimensional plane. They then randomly mapped each pixel value of the image onto the Rubik's Cube and controlled the Rubik's Cube's rotation using a random sequence to achieve image scrambling and encryption (see reference 21). There are also some chaotic image encryption methods based on Rubik's Cube scrambling. When scrambling, the image pixels are mapped to the Rubik's Cube surface and the scrambling is performed by rotating the Rubik's Cube. For example: Chen et al. proposed an image encryption method based on DNA coding, Rubik's Cube and chaos. The six color matrices of two color images are regarded as the six faces of the Rubik's Cube. The pixels in each matrix are scrambled by rotating the Rubik's Cube (see reference 22); Zhao et al. spliced the scrambled pixel matrix and the five chaotic matrices into a hexahedron structure and dynamically scrambled the Rubik's Cube through a pseudo-random sequence (see reference 23); Wang Bin et al. used the R, G, and B components of the two images as the six faces of the Rubik's Cube and controlled the scrambling of the Rubik's Cube through a pseudo-random sequence generated by a chaotic system, thereby achieving encryption (see reference 24). ); Zhang Tian proposed mapping image pixel information to the surfaces of several three-order Rubik's cubes, completing the spatial scrambling of image pixels by controlling the rotation of the Rubik's cube, and combining it with quantum walk for encryption (see reference 25); Zheng et al. combined the R, G, and B layers of two images into a cube that can be unfolded in different orders, and exchanged the rows, columns, or surface pixels of each image by rotating the cube, thereby achieving image scrambling (see reference 26); Sun Guangmin et al. rearranged the pixels and password data into a hexahedral structure, and confused the data on the surfaces and bits in the form of a cross axis to achieve encryption (see reference 27).

[0007] Existing literature has limited results in scrambling image pixels by mapping them to a full Rubik's Cube. Gao et al. proposed an image encryption algorithm based on a three-dimensional cube and hyperchaotic mapping. After splitting multiple images into columns, they superimpose multiple fixed-size planes to form a regular cube. Each tangent plane is then scrambled by rotating it counterclockwise around a fixed Z-axis by different angles (see Reference 28).

[0008] In summary, although existing chaotic image encryption research has achieved some good results, with the passage of time and technological advancement, the following shortcomings still exist:

[0009] 1) Most existing Rubik's Cube scrambling methods utilize the Rubik's Cube's circular shift characteristics or simply map image pixels to the surfaces of the Rubik's Cube for scrambling. They do not fully consider the three-dimensional properties of the Rubik's Cube and do not map image pixels to all the small cubes contained in the entire Rubik's Cube for scrambling, which affects the scrambling effect. Although some literatures map image pixels to the entire Rubik's Cube for scrambling, they simply rotate it around a fixed axis at different angles for scrambling, resulting in low scrambling performance.

[0010] 2) Some results did not utilize or did not fully utilize the pseudo-random sequence generated by the chaotic system to participate in the Rubik's Cube scrambling, and did not dynamically control variables such as the Rubik's Cube rotation axis, number of rotation layers, and rotation angle, resulting in poor scrambling effects.

[0011] References are as follows:

[0012] [1]B.Liang,C.Hu,Z.Tian,et al.A 3D chaotic system with multi-transientbehavior and its application in image encryption.PhysicaA,616(2023)128624.

[0013] [2]L.Liu,J.Wang.A cluster of 1D quadratic chaotic map and its applications in image encryption.Mathematics and Computers in Simulation,204(2023)89-114.

[0014] [3]S.Zhou,X.Wang,Y.Zhang.Novel image encryption scheme based on onchaotic signals with finite-precision error.Information Science,621(2023)782-798.

[0015] [4]Z.Zhou,X.Xu,Y.Yao,et al.Novel multiple-image encryption algorithmbased on a two-dimensional hyperchaotic modular model.Chaos,Solitons andFractals,173(2023)113630.

[0016] [5]C.Cai,Y.Cao,H.Jahanshahi,et al.2D and 3D compatible chaotic imageencryption system based on checkers rules and shift register.Journal oftheFranklin Institute,361(2024)106874.

[0017] [6]N.Zhou,L.Hu,Z.Huang,et al.Novel multiple color images encryptionand decryption scheme based on a bit-level extension algorithm.Expert Systemswith Applications,238(2024)122052.

[0018] [7]M.U.Rehman.Quantum-enhanced chaotic image encryption:strengtheningdigital data security with 1-D sin-based chaotic maps and quantumcoding.Journal of King Saud University-Computer and Information Sciences,36(2024)101980.

[0019] [8]B.Sun,C.Zhang,Q.Peng,et al.Color image encryption algorithm based on5D memristive chaotic system and group scrambling.Optik-InternationalJournal for Light and Electron Optics,287(2023)171132.

[0020] [9] S. Zhou, X. Wang, Y. Zhang. Novel image encryption scheme based on onchaotic signals with finite-precision error. Information Science, 621 (2023) 782-798.

[0021]

[10] Q.Lai,GWHu,U.Erkan,et al.High-efficiency medical image encryption method based on 2D Logistic-Gaussian hyperchaotic map[J].AppliedMathematics and Computation,2023,442:127738.

[0022]

[11] DEMfungo,

[0023]

[12] Du Sike, Zhang Aihua. Arnold transformation image encryption algorithm based on Frobenius canonical form[J]. Journal of Nanjing University of Posts and Telecommunications (Natural Science Edition), 42(4)(2022)105-110.

[0024]

[13]

[0025]

[14] X.Wang,N.Guan.A novel chaotic image encryption algorithm based onextended Zigzag confusion and RNA operation[J].Optics and Laser Technology,131(2020)106366.

[0026]

[15] H.Wen,Y.Lin.Cryptanalysis of an image encryption algorithm using quantum chaotic map and DNA coding[J].Expert Systems with Application,237(2024)121514.

[0027]

[16] M.Alawida.A novel DNA tree-based chaotic image encryption algorithm[J].Journal ofInformation Security andApplication,83(2024)103791.

[0028]

[17] Q.Liang,C.Zhu.A new one-dimensional chaotic map for imageencryption scheme based on random DNA coding[J].Optics and Laser Technology,160(2023)109033.

[0029]

[18] Yang Libo. Research on image encryption scheme based on the combination of magic cube transformation and DNA coding[D]. Hefei, Anhui: Anhui University, 2017.

[0030]

[19] Ma Cong. Research on image encryption algorithm based on magic cube theory[D]. Lanzhou, Gansu: Northwest University for Nationalities, 2018.

[0031]

[20] R. Vidhya, M. Brindha. A chaos based image encryption algorithm using Rubik's cube and prime fractorization process [J]. Journal of King Saud University-Computer and Information Sciences, 34 (2022) 2000-2016.

[0032]

[21] J. Zhao, T. Zhang, J. Jiang, et al. Color image encryption scheme based on alternate quantum walk and controlled Rubik's cube [J]. Scientific Reports, 12 (2022) 14253.

[0033]

[22] L.Chen,H.Yin,L.Yuan,et al.Double color image encryption based onfractional order discrete improved Henon map and Rubik's cube transform[J].Signal Processing:Image Communication,97(2022)116363.

[0034]

[23] Y.Zhao,R.Meng,Y.Zhang,et al.Image encryption algorithm based on a new chaotic system with Rubik's cube transform and Brownian motion model[J].Optik-International Journal for Light and Electron Optics,273(2023)170342.

[0035]

[24] Wang Bin, Li Haixiao, Chen Rongrong. A dual color image encryption system based on an improved lifting scheme[J]. Computer Science, 51(6)(2024)230500007.

[0036]

[25] Zhang Tian. Research on image encryption based on quantum walk and magic cube transformation[D]. Qingdao, Shandong: Qingdao University of Technology, 2023.

[0037]

[26] H.Zheng,G.Li,W.Xu,et al.A compressive sensing encryption scheme for dual color images based on discrete memristor map and Rubik's cubescramble[J].Optik-International Journal for Light and Electron Optics,286(2023)170991.

[0038]

[27] Sun Guangmin, Wang Hao. Image encryption and decryption technology based on Rubik's Cube cipher[J]. Journal of Beijing University of Technology, 47(8)(2021)833-841.

[0039]

[28]

[0040]

[29] Yang Lingbing. Research on complex dynamics of controlled high-dimensional hyperchaotic systems[D]. Guangzhou: South China University of Technology, 2020.

[0041]

[30] Zhang Bo. Research on digital image scrambling method based on Matlab[J]. Computers and Digital Engineering, 2010, 38(7):139-142. Summary of the Invention

[0042] The present invention proposes a hyper-chaotic image encryption method based on parallel rotation scrambling of a Rubik's Cube in three-dimensional space. The method maps the image pixel values to all small cubes contained in the entire Rubik's Cube and then performs three-dimensional space scrambling. The scrambling has high complexity and better utilizes the characteristics of the three-dimensional cubic structure of the Rubik's Cube. The method solves the problems in the prior art of Rubik's Cube scrambling methods, such as the failure to fully utilize the pseudo-random sequence generated by the chaotic system to participate in the Rubik's Cube scrambling and the failure to dynamically control variables such as the Rubik's Cube rotation axis, the number of rotation layers, and the rotation angle, resulting in poor scrambling effects.

[0043] The technical solution of the present invention is achieved as follows:

[0044] The first aspect of the present invention provides a hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space, comprising the following steps:

[0045] The key K1 is selected to iterate the Logistic chaotic system multiple times to generate a chaotic sequence, which is then integerized and converted into a chaotic matrix A6.

[0046] The key K2 is selected to iterate the seven-dimensional hyperchaotic system to generate a hyperchaotic sequence, and then the hyperchaotic sequence is converted into an integer sequence;

[0047] Divide the plaintext image P into R P , G P 、B P Three channels, select key K3 to preprocess the pixel values of the three channel images to obtain pixel matrix A1;

[0048] Performing an Arnold transform on the pixel matrix A1 to obtain a transformed matrix A2, and transforming the matrix A2 into a three-dimensional pixel matrix A3;

[0049] Performing a three-dimensional Rubik's cube scrambling on the matrix A3 using an integer sequence to obtain a scrambled three-dimensional pixel matrix A4;

[0050] The matrix A4 is transformed into a two-dimensional pixel matrix A5, and the matrix A5 is XORed with the chaotic matrix A6 to obtain the ciphertext image.

[0051] Specifically, during the encryption process, the key K1=(μ,x0,i1,i q ) as the parameters, initial values, number of iterations and number of removed groups of the Logistic chaotic map;

[0052] Among them, μ=3.998, x0=0.720,

[0053] ceil(·) represents the ceiling rounding function, l = max(M,N), and the size of the plaintext image is M×N;

[0054] The key K1 is used to iterate the Logistic chaotic system multiple times to generate a chaotic sequence of size i1. The first 1000 values are removed to obtain the chaotic sequence x. The chaotic sequence x is converted into a pixel integer value of [0, 255] using the following formula:

[0055] X=floor(x×10 16 )mod 256;

[0056] Where floor(·) represents the floor function, and mod represents the remainder function;

[0057] Convert the rounded chaotic sequence X into The two-dimensional chaotic matrix A6.

[0058] Specifically, during the encryption process:

[0059] Select the key K2 = (a, b, c, d, e, y1(0), y2(0), y3(0), y4(0), y5(0), y6(0), y7(0), i2, i q ,i') as the parameters, initial values, number of iterations, number of removed groups and Arnold transformation as well as preprocessing parameters of the seven-dimensional hyperchaotic system;

[0060] Among them, the values of a, b, c, d, and e are 10, 100, 2.7, 2, and 3 respectively;

[0061] The values of y1(0), y2(0), y3(0), y4(0), y5(0), y6(0), and y7(0) are all 1;

[0062]

[0063] The seven-dimensional hyperchaotic system is iterated using the key K2 to generate a hyperchaotic sequence of size i2. After removing the first 1000 values, seven pseudo-random sequences are obtained: y1(i), y2(i), y3(i), y4(i), y5(i), y6(i), y7(i);

[0064] The 7 pseudo-random sequences are integerized using the following formula to obtain 7 integer sequences:

[0065]

[0066] in, T represents the two-dimensional Arnold transform period corresponding to images of different sizes.

[0067] Specifically, during the encryption process, a plaintext image P of size M×N is read in and the plaintext image P is divided into R P , G P 、BP Three channels, perform the following encryption operations on the images of the three channels in turn to obtain the encrypted images of each channel;

[0068] Let l = max(M, N), and pad the three channel images of the plaintext image P with zeros to obtain three channel images of size l × l;

[0069] Substitute the parameter i' in the key K2 into the sequence Y1(i), Y2(i), Y3(i) to obtain Y1(i'), Y2(i'), Y3(i');

[0070] Select the Y1(i'), Y2(i'), and Y3(i') values in the key K3 as the preprocessing parameters of the pixel values of the three channel images, and preprocess each channel image to obtain the pixel values of the three channels R2, G2, and B2 images respectively:

[0071]

[0072] Among them, the key K3 = {3, 5, 7, 9, 11, 13, 15,…, 251, 253, 255}.

[0073] Specifically, during the encryption process, taking the R2 channel as an example, it is converted into a pixel matrix A1, i' is substituted into the sequence Y4(i) to obtain Y4(i'), and Y4(i') is used as the number of Arnold transformations to perform Arnold transformation on the matrix A1 to obtain the transformed matrix A2;

[0074] Read matrix A2 into array a in row order and fill in the array a. 0, get array b, read array b in sequence indivual The two-dimensional matrices of different sizes are stacked from top to bottom to form A three-dimensional pixel matrix of size A3.

[0075] Specifically, during the encryption process, the method of performing three-dimensional Rubik's Cube scrambling on the matrix A3 is:

[0076] Use the integer sequence Y5(i) to control the rotation axis of the matrix A3:

[0077] When Y5(i)=0, the rotation axis is the X axis; when Y5(i)=1, the rotation axis is the Y axis; when Y5(i)=2, the rotation axis is the Z axis;

[0078] The integer sequence Y6(i) is used to control the rotation layer of the matrix A3 to be the Y6(i)th layer;

[0079] Use the integer sequence Y7(i) to control the rotation angle of the selected layer:

[0080] When Y7(i)=0, rotate 90°; when Y7(i)=1, rotate 180°; when Y7(i)=2, rotate 270°;

[0081] The direction of rotation is clockwise, starting from i=1 to Finally, the scrambled three-dimensional pixel matrix A4 is obtained.

[0082] Specifically, during the encryption process, the scrambled three-dimensional pixel matrix A4 is read in reverse order as array c, and the array c is supplemented with 0s to obtain array d, read array d in reverse order as a two-dimensional pixel matrix A5, and perform XOR operation on matrix A5 and chaotic matrix A6 to obtain the encrypted image of a certain channel, and then merge the encrypted images of the three channels into the final ciphertext image.

[0083] Specifically, during the decryption process, the ciphertext image is decrypted using the same chaotic matrix and chaotic sequence as in the encryption step to obtain the original plaintext image. The decryption process of the ciphertext image is the inverse process of the plaintext image encryption process.

[0084] A second aspect of the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and wherein the processor implements the steps of the image encryption method when executing the computer program.

[0085] A third aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and wherein the computer program implements the steps of the image encryption method when executed by a processor.

[0086] Compared with the prior art, the present invention has the following beneficial effects:

[0087] (1) The present invention generates mutually independent chaotic pseudo-random sequences as preprocessing parameters, Arnold transform parameters, Rubik's Cube scrambling parameters, etc. through a seven-dimensional hyperchaotic system, and applies them to perform different preprocessing on the R, G, and B channels of the plaintext image. Then, the chaotic pseudo-random sequence is used to control the Arnold transform to scramble the preprocessed image, and the image pixel values are mapped to all small cubes contained in the entire Rubik's Cube for three-dimensional space scrambling, which better utilizes the characteristics of the three-dimensional structure of the Rubik's Cube, thereby increasing the complexity of the scrambling and improving the security of the ciphertext image.

[0088] (2) The present invention utilizes a chaotic pseudo-random sequence to dynamically control the rotation axis, number of rotation layers, and rotation angle, resulting in better randomness, better encryption effect, a larger key space, and better scrambling effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0090] Figure 1 Schematic diagram of the process of plaintext image encryption in an embodiment of the present invention;

[0091] Figure 2 Schematic diagram of the process of decrypting a ciphertext image in an embodiment of the present invention;

[0092] Figure 3 A comparison diagram of a plaintext image, a ciphertext image, and a decrypted image in an embodiment of the present invention; Figure 3 In the figure, (a) is the plaintext image, (b) is the ciphertext image, and (c) is the decrypted image;

[0093] Figure 4 A comparison chart of key sensitivity test results in an embodiment of the present invention; Figure 4 In this figure, (a) is the image decrypted by the correct key, and (b) is the image decrypted by the wrong key;

[0094] Figure 5 is a histogram of a plaintext image and a ciphertext image in an embodiment of the present invention; Figure 5 In the figure, (a) is the histogram of the three channels R, G, and B of the plaintext image, and (b) is the histogram of the three channels R, G, and B of the ciphertext image;

[0095] Figure 6 This is a comparison diagram of the correlation between adjacent pixels of a plaintext image and a ciphertext image in an embodiment of the present invention; Figure 6In the figure, (a) is a schematic diagram of the correlation of adjacent pixels in the horizontal direction of the R channel of the plaintext image; (b) is a schematic diagram of the correlation of adjacent pixels in the horizontal direction of the R channel of the ciphertext image; (c) is a schematic diagram of the correlation of adjacent pixels in the vertical direction of the R channel of the plaintext image; (d) is a schematic diagram of the correlation of adjacent pixels in the vertical direction of the R channel of the ciphertext image; (e) is a schematic diagram of the correlation of adjacent pixels in the diagonal direction of the R channel of the plaintext image; (f) is a schematic diagram of the correlation of adjacent pixels in the diagonal direction of the R channel of the ciphertext image; (g) is a schematic diagram of the correlation of adjacent pixels in the horizontal direction of the G channel of the plaintext image; (h) is a schematic diagram of the correlation of adjacent pixels in the horizontal direction of the G channel of the ciphertext image; (i) is a schematic diagram of the correlation of adjacent pixels in the vertical direction of the G channel of the plaintext image ; (j) is a schematic diagram of the correlation of adjacent pixels in the vertical direction of the G channel of the ciphertext image; (k) is a schematic diagram of the correlation of adjacent pixels in the diagonal direction of the G channel of the plaintext image; (l) is a schematic diagram of the correlation of adjacent pixels in the diagonal direction of the G channel of the ciphertext image; (m) is a schematic diagram of the correlation of adjacent pixels in the horizontal direction of the B channel of the plaintext image; (n) is a schematic diagram of the correlation of adjacent pixels in the horizontal direction of the B channel of the ciphertext image; (o) is a schematic diagram of the correlation of adjacent pixels in the vertical direction of the B channel of the plaintext image; (p) is a schematic diagram of the correlation of adjacent pixels in the vertical direction of the B channel of the ciphertext image; (q) is a schematic diagram of the correlation of adjacent pixels in the diagonal direction of the B channel of the plaintext image; (r) is a schematic diagram of the correlation of adjacent pixels in the diagonal direction of the B channel of the ciphertext image;

[0096] Figure 7 This is the decrypted image after being attacked by a shearing attack in an embodiment of the present invention; Figure 7 In the figure, (a) is the decrypted image after 1 / 16 cropping, (b) is the decrypted image after 1 / 8 cropping, and (c) is the decrypted image after 1 / 4 cropping;

[0097] Figure 8 is a decrypted image after being attacked by noise in an embodiment of the present invention; Figure 7 In the figure, (a) is the decrypted image with noise (0.001), (b) is the decrypted image with noise (0.005), and (c) is the decrypted image with noise (0.01). DETAILED DESCRIPTION

[0098] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments of the present invention. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0099] Reference Figure 1 The first aspect of the present invention provides a hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space, comprising the following steps:

[0100] The key K1 is selected to iterate the Logistic chaotic system multiple times to generate a chaotic sequence, which is then integerized and converted into a chaotic matrix A6.

[0101] The key K2 is selected to iterate the seven-dimensional hyperchaotic system to generate a hyperchaotic sequence, and then the hyperchaotic sequence is converted into an integer sequence;

[0102] Divide the plaintext image P into R P , G P 、B P Three channels, select key K3 to preprocess the pixel values of the three channel images to obtain pixel matrix A1;

[0103] Performing an Arnold transform on the pixel matrix A1 to obtain a transformed matrix A2, and transforming the matrix A2 into a three-dimensional pixel matrix A3;

[0104] Performing a three-dimensional Rubik's cube scrambling on the matrix A3 using an integer sequence to obtain a scrambled three-dimensional pixel matrix A4;

[0105] The matrix A4 is transformed into a two-dimensional pixel matrix A5, and the matrix A5 is XORed with the chaotic matrix A6 to obtain the ciphertext image.

[0106] Specifically, during the encryption process, the key K1=(μ,x0,i1,i q ) as the parameters, initial values, number of iterations and number of removed groups of the Logistic chaotic map;

[0107] Among them, μ=3.998, x0=0.720,

[0108] ceil(·) represents the ceiling rounding function, l = max(M,N), and the size of the plaintext image is M×N;

[0109] The key K1 is used to iterate the Logistic chaotic system multiple times to generate a chaotic sequence of size i1. The first 1000 values are removed to prevent transient effects, and the chaotic sequence x is obtained. The chaotic sequence x is converted into a pixel integer value of [0, 255] using the following formula:

[0110] X=floor(x×10 16 )mod 256;

[0111] Where floor(·) represents the floor function, and mod represents the remainder function;

[0112] Convert the rounded chaotic sequence X into The two-dimensional chaotic matrix A6.

[0113] Specifically, during the encryption process:

[0114] Select the key K2 = (a, b, c, d, e, y1(0), y2(0), y3(0), y4(0), y5(0), y6(0), y7(0), i2, i q ,i') as the parameters, initial values, number of iterations, number of removed groups and Arnold transformation as well as preprocessing parameters of the seven-dimensional hyperchaotic system;

[0115] Among them, the values of a, b, c, d, and e are 10, 100, 2.7, 2, and 3 respectively;

[0116] The values of y1(0), y2(0), y3(0), y4(0), y5(0), y6(0), and y7(0) are all 1;

[0117]

[0118] The seven-dimensional hyperchaotic system is iterated using the key K2 to generate a hyperchaotic sequence of size i2. The first 1000 values are removed to prevent transient effects, and 7 pseudo-random sequences are obtained:

[0119] y1(i),y2(i),y3(i),y4(i),y5(i),y6(i),y7(i);

[0120] The 7 pseudo-random sequences are integerized using the following formula to obtain 7 integer sequences:

[0121]

[0122] in, T represents the two-dimensional Arnold transform period corresponding to images of different sizes (see Table 1 below).

[0123] Furthermore, the present invention uses Logistic mapping to generate a chaotic pseudo-random sequence, which is expressed as follows:

[0124] x n+1 =μx n (1-x n );

[0125] Among them, x n is the state variable of the system, μ is the control parameter of the system, when μ∈[0,4], x n ∈(0,1), the Logistic map will appear chaotic state; the Logistic chaotic map can generate a two-dimensional chaotic pseudo-random sequence matrix for diffusion.

[0126] A seven-dimensional hyperchaotic system is used to generate a hyperchaotic pseudo-random sequence, which is expressed as follows:

[0127]

[0128] Among them, y1, y2, y3, y4, y5, y6, and y7 are the state variables of the system, and a, b, c, d, and e are the control parameters of the system;

[0129] When the control parameters (a, b, c, d, e) = (10, 100, 2.7, 2, 3) and the initial values of the state variables (y1(0), y2(0), y3(0), y4(0), y5(0), y6(0), y7(0)) = (1, 1, 1, 1, 1, 1, 1), the system exhibits a hyperchaotic state (see reference 29); the seven-dimensional hyperchaotic system can be used to generate preprocessing parameters, Arnold transform times, and cube scrambling parameters in encryption algorithms.

[0130] Specifically, during the encryption process, a color plaintext image P of size M×N is read in and the plaintext image P is divided into R P , G P 、B P Three channels, perform the following encryption operations on the images of the three channels in turn to obtain the encrypted images of each channel;

[0131] R P Taking the channel image as an example, let l=max(M,N), for R P The channel image is padded with zeros to obtain an R1 channel image of size l×l, K4=(M,N);

[0132] Substitute the parameter i' in the key K2 into the sequence Y1(i), Y2(i), Y3(i) to obtain Y1(i'), Y2(i'), Y3(i');

[0133] Select the Y1(i'), Y2(i'), and Y3(i') values in the key K3 as the preprocessing parameters of the pixel values of the three channel images, and preprocess each channel image to obtain the pixel values of the three channels R2, G2, and B2 images respectively:

[0134]

[0135] Among them, the key K3 = {3, 5, 7, 9, 11, 13, 15,…, 251, 253, 255}.

[0136] Specifically, during the encryption process, the image of the R2 channel is converted into a pixel matrix A1, the value of i' is substituted into the sequence Y4(i) to obtain Y4(i'), and Y4(i') is used as the number of Arnold transformations to perform Arnold transformation on the matrix A1 to obtain the transformed matrix A2;

[0137] Read matrix A2 into array a in row order and fill in the array a. 0, get array b, read array b in sequence indivual The two-dimensional matrices of different sizes are stacked from top to bottom to form A three-dimensional pixel matrix of size A3.

[0138] Arnold transform (refer to reference 30) is a transform proposed by VJ Arnold in his study of ergodic theory. In Arnold transform, for an N×N image, if the pixel coordinates are

[0139] x,y∈{0,1,2,3,…,N-1}, the discretized Arnold transform can be:

[0140]

[0141] Among them, x, y are the coordinates of the pixel in the original image, x', y' are the coordinates of the pixel in the new image, and mod is the modulo function.

[0142] The inverse Arnold transform is:

[0143]

[0144] The Arnold transform is periodic. When the iteration reaches a certain step, the original image will be obtained again. The two-dimensional Arnold transform period of the image under different orders N can be calculated through the program (refer to the program given in Reference 30) as shown in Table 1 below:

[0145] Table 1 Two-dimensional Arnold transform period corresponding to images of different orders

[0146]

[0147] It can be observed that the period of the two-dimensional Arnold transform is related to the image size, but not proportional.

[0148] Lemma: If (a×b)mod256=c, a,b,c∈[0,255], a,b,c∈Z, and (a,256)=1, if a and c are known, then b has a unique solution.

[0149] Proof: If (a×b)mod256=c, a,b,c∈[0,255], a,b,c∈Z, and (a,256)=1, then there exists a -1 So that a·a -1 ≡1mod256. Therefore, the original formula is equivalent to a -1 ·a·b≡a -1cmod256, i.e. b≡a -1 cmod256, and because a -1 unique, so b is unique.

[0150] In encryption and decryption algorithms, this theorem can be used in image preprocessing and inverse processing to ensure the uniqueness of the decomposition and synthesis of the R, G, and B channels.

[0151] From the Euler function, we know that there are 128 integers in [0,255] that are coprime to 256, namely {1,3,5,7,9,11,13,15,…,251,253,255}. However, if the first element 1 is substituted into the aforementioned preprocessing formula to preprocess the channel image, the pixel values after preprocessing may not change, which may lead to poor image encryption effect. Therefore, the present invention removes the first element 1 from the original set to obtain the key set required for the encryption algorithm of the present invention:

[0152] K3 = {3, 5, 7, 9, 11, 13, 15, …, 251, 253, 255}, which contains a total of 127 elements.

[0153] Specifically, during the encryption process, the method of performing three-dimensional Rubik's Cube scrambling on the matrix A3 is:

[0154] Use the integer sequence Y5(i) to control the rotation axis of the matrix A3:

[0155] When Y5(i)=0, the rotation axis is the X axis; when Y5(i)=1, the rotation axis is the Y axis; when Y5(i)=2, the rotation axis is the Z axis;

[0156] The integer sequence Y6(i) is used to control the rotation layer of the matrix A3 to be the Y6(i)th layer;

[0157] Use the integer sequence Y7(i) to control the rotation angle of the selected layer:

[0158] When Y7(i)=0, rotate 90°; when Y7(i)=1, rotate 180°; when Y7(i)=2, rotate 270°;

[0159] The direction of rotation is clockwise, starting from i=1 to Finally, the scrambled three-dimensional pixel matrix A4 is obtained.

[0160] Specifically, during the encryption process, the scrambled three-dimensional pixel matrix A4 is read in reverse order as array c, and the array c is supplemented with 0s to obtain array d, read array d in reverse order as a two-dimensional pixel matrix A5, and perform XOR operation on matrix A5 and chaotic matrix A6 to obtain the encrypted image of a certain channel, and then merge the encrypted images of the three channels into the final ciphertext image.

[0161] Specifically, during the decryption process, the ciphertext image is decrypted using the same chaotic matrix and chaotic sequence as in the encryption step to obtain the original plaintext image. The decryption process of the ciphertext image is the inverse process of the plaintext image encryption process.

[0162] like Figure 2 As shown in the figure, the decryption process of the ciphertext image is as follows:

[0163] The key K1 is used to iterate the Logistic chaotic system multiple times to generate a chaotic sequence of size i1. The first 1000 values are removed to prevent transient effects, and the chaotic sequence x is obtained. The chaotic sequence x is converted into a pixel integer value of [0, 255] using the following formula:

[0164] X=floor(x×10 16 )mod 256;

[0165] Where floor(·) represents the floor function, and mod represents the remainder function;

[0166] Convert the rounded chaotic sequence X into The two-dimensional chaotic matrix A7.

[0167] The seven-dimensional hyperchaotic system is iterated using the key K2 to generate a hyperchaotic sequence of size i2. The first 1000 values are removed to prevent transient effects, and 7 pseudo-random sequences are obtained:

[0168] y1(i),y2(i),y3(i),y4(i),y5(i),y6(i),y7(i);

[0169] The 7 pseudo-random sequences are integerized to obtain 7 integer sequences:

[0170] Y1(i),Y2(i),Y3(i),Y4(i),Y5(i),Y6(i),Y7(i);

[0171] Substitute the parameter i' in the key K2 into the sequence Y1(i), Y2(i), Y3(i) to obtain Y1(i'), Y2(i'), Y3(i');

[0172] Divide the ciphertext image into R C , G C 、B C For three channels, perform the following decryption steps on each channel in turn to obtain the initial decrypted image of each channel;

[0173] R C Channel as an example, convert it into pixel matrix A C , the matrix A C Performing an XOR operation with the chaotic matrix A7 to obtain a two-dimensional pixel matrix A8;

[0174] Read the matrix A8 into array e in row order;

[0175] Remove the front of array e 0, and then read it in reverse order as array f, and read array f in order as indivual The two-dimensional matrices of different sizes are stacked from top to bottom to form The size of the three-dimensional pixel matrix A9.

[0176] Perform reverse cube scrambling on matrix A9. The specific method is as follows:

[0177] Use the integer sequence Y5(i) to control the rotation axis of the matrix A9:

[0178] When Y5(i)=0, the rotation axis is the X axis; when Y5(i)=1, the rotation axis is the Y axis; when Y5(i)=2, the rotation axis is the Z axis;

[0179] The integer sequence Y6(i) is used to control the rotation layer of the matrix A9 to be the Y6(i)th layer;

[0180] Use the integer sequence Y7(i) to control the rotation angle of the selected layer:

[0181] When Y7(i)=0, rotate 90°; when Y7(i)=1, rotate 180°; when Y7(i)=2, rotate 270°;

[0182] The direction of rotation is counterclockwise, from Start rotating to i=1, and finally get the scrambled three-dimensional pixel matrix A 10 .

[0183] The scrambled three-dimensional pixel matrix A 10 Read in reverse order as array g, and remove the end of array g 0 to get the array h, and read the array h as the l×l two-dimensional pixel matrix A 11 .

[0184] Let Y4(i') be the number of inverse Arnold transformations, and 11 Perform inverse Arnold transform to obtain the transformed matrix A 12 , the pixel matrix R 12 Convert to channel image;

[0185] Select the Y1(i'), Y2(i'), and Y3(i') values in the key K3 as the three channels R 12 , G 12 、B 12 The inverse processing parameters of the pixel values are inversely processed for each channel to obtain three channels R P' , G P' 、B P' The pixel values of the image are:

[0186]

[0187] The initial decrypted images of the three channels are merged and converted into a color image P', whose size is l×l. According to K4=(M,N), the last l is removed. 2 -M×N pixels with a pixel value of 0, and the final decrypted image P with a size of M×N is obtained.

[0188] A second aspect of the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and wherein the processor implements the steps of the image encryption method when executing the computer program.

[0189] A third aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and wherein the computer program implements the steps of the image encryption method when executed by a processor.

[0190] This example uses MATLAB R2022a to simulate and verify the image encryption and decryption method of the present invention. The specific operating environment is as follows: a 13th Gen Intel(R) Core(TM) i7-13700H @ 2.40GHz, 32GB of memory, a 64-bit operating system, and an X64-based processor. To intuitively evaluate the encryption effect of the algorithm proposed in this paper, the present invention uses the Lena graph as the experimental object to perform encryption and decryption.

[0191] from Figure 3 It can be seen that the encrypted image presents the characteristics of random noise, and the decrypted image is completely consistent with the original image. The image encryption and decryption algorithm proposed in the present invention can effectively realize image encryption and decryption.

[0192] Obviously, from Figure 3 In (b), no information related to the plaintext can be seen. Below, we use various image encryption performance indicators to study the performance of this method.

[0193] 1) Key sensitivity analysis

[0194] Key sensitivity is an important indicator for measuring the security of encryption algorithms. To test the sensitivity of the algorithm to key changes, the ciphertext image was decrypted using the correct key and an incorrect key that was slightly modified from the correct key.

[0195] The error key is:

[0196]

[0197] K2, K3, and K4 remain unchanged;

[0198] The decryption result is as follows Figure 4 As shown in the figure, it can be seen that even if the difference between the wrong key and the correct key is very small, the plaintext image cannot be decrypted. Therefore, the algorithm proposed in the present invention has good key sensitivity.

[0199] 2) Key space analysis

[0200] In order to effectively resist brute force attacks, the key space of the encryption algorithm must be at least greater than 2 100 The key used by the algorithm of the present invention is:

[0201]

[0202] K2=(a,b,c,d,e,y1(0),y2(0),y3(0),y4(0),y5(0),y6(0),y7(0),i2,i q ,i')

[0203] Among them, the values of a, b, c, d, and e are 10, 100, 2.7, 2, and 3 respectively;

[0204] The values of y1(0), y2(0), y3(0), y4(0), y5(0), y6(0), and y7(0) are all 1;

[0205]

[0206] K3={3,5,7,9,11,13,15,…,251,253,255};

[0207] K4=(M,N);

[0208] On computers with 64-bit operating systems, floating-point numbers can have a precision of up to 10 -16 Therefore, the sensitivity of the Logistic chaotic map and the seven-dimensional hyperchaotic system to parameters and initial values is 10 -16 , where the parameter values of the seven-dimensional hyperchaotic system are fixed, and the integer processing of the pseudo-random sequence is also accurate to 16 decimal places. It can be estimated that the key space size of the algorithm of the present invention is at least (1016 ) 3 ×(10 16 ) 13 ×127 3 ≈2 871 , much larger than 2 100 , which can effectively resist brute force attacks. The key space comparison of different algorithms is shown in Table 2 below:

[0209] Table 2 Comparison of key spaces of different algorithms

[0210]

[0211] Table 2 compares the key space sizes of the algorithm of the present invention and several other related algorithms. It can be seen that the algorithm proposed in the present invention has a larger key space and has a better image encryption effect.

[0212] 3) Histogram analysis

[0213] from Figure 5 It can be observed that the histogram of the ciphertext image tends to be evenly distributed, so the encryption algorithm of the present invention can resist statistical analysis attacks.

[0214] 4) Correlation analysis of adjacent pixels

[0215] like Figure 6 As shown in Table 3, in order to evaluate the scrambling effect of the algorithm of the present invention, the correlation coefficients of adjacent pixels in the horizontal, vertical and diagonal directions of the plaintext image and the ciphertext image are calculated respectively, and the correlation coefficients of the algorithm of the present invention are compared with those of other algorithms. The results are shown in Table 3:

[0216] Table 3 Comparison of correlation coefficients of adjacent pixels

[0217]

[0218] from Figure 6 It can be seen that the correlation coefficient of adjacent pixels of the ciphertext image encrypted by the algorithm of the present invention is much lower than the correlation coefficient of the plaintext image, and lower than the correlation coefficients of other literatures, and has better performance in image encryption.

[0219] 5) Information entropy analysis

[0220] Table 4 compares the information entropy of the ciphertext image obtained by the encryption algorithm of the present invention with that of the Lena color plaintext image and other encryption algorithms in related image encryption literature. The information entropy comparison results are shown in Table 4 below:

[0221] Table 4 Information entropy comparison table

[0222]

[0223] As can be seen from Table 4, the information entropy of the algorithm of the present invention is closer to the ideal value of 8, so the encryption algorithm of the present invention has better performance.

[0224] 6) Robustness analysis

[0225] In practical applications, image encryption algorithms should be able to resist cropping attacks and noise attacks. In order to evaluate the robustness of the algorithm, the ciphertext image area was cropped to 1 / 16, 1 / 8, and 1 / 4, respectively, and then decrypted; Gaussian noise with variances of 0.001, 0.005, and 0.01 was added to the ciphertext image, and then decrypted. The results are as follows: Figure 7 and Figure 8 As shown in the figure, the decrypted image is affected to varying degrees by shearing or noise attacks. When the shearing of the encrypted image is minimal, some of the original image information can be recovered. Furthermore, even when the encrypted image is contaminated by low-intensity noise, some of the original image information can still be recovered. This demonstrates that the algorithm has strong anti-attack capabilities and can maintain basic recoverability in harsh channel environments.

[0226] 7) Time test comparison

[0227] In order to verify the effect of different scrambling times of the Rubik's Cube in the algorithm on the final encryption effect, the encryption effect of different scrambling times of the Rubik's Cube is analyzed using image encryption performance indicators such as encryption and decryption time, adjacent pixel correlation coefficient, and information entropy according to the actual size of the Lena color image used by the algorithm. After substituting the Lena color image parameters, the actual value is i=262144. Then, the same Lena color image is encrypted with the number of Rubik's Cube scrambling times i / 10, i / 100, i / 1000, and i / 10000 (the actual values are 26215, 2622, 263, and 27, respectively). The performance indicators are compared. The results are shown in Table 5 below:

[0228] Table 5 Comparison of encryption and decryption algorithm time and encryption effect with different Rubik's Cube scrambling times

[0229]

[0230] Table 5 shows that when using encryption algorithms with different numbers of Rubik's Cube scrambling cycles, the correlation coefficients and information entropy of the resulting encrypted images are relatively small. However, the encryption and decryption time increases significantly with the number of scrambling cycles, and the difference is significant. Therefore, when the difference in encryption performance is negligible, choosing an encryption algorithm with fewer scrambling cycles results in faster encryption time and higher encryption efficiency.

[0231] In order to eliminate the interference of other encryption steps in this encryption method, the influence of different Rubik's Cube scrambling times on the image encryption effect is further studied. The same Lena color image is scrambled with different Rubik's Cube scrambling times. The image encryption performance indicators such as scrambling time and adjacent pixel correlation coefficient are used to compare and analyze the scrambling effects of different Rubik's Cube scrambling times. The comparison results are shown in Table 6 below:

[0232] Table 6 Comparison of scrambling time and scrambling effect of different Rubik's Cube scrambling times

[0233]

[0234] Table 6 shows that when the number of scrambling times is i and i / 10, the correlation coefficients of adjacent pixels in the scrambled image are low and the difference is not significant. However, the scrambling time for the former is much longer than that for the latter. Therefore, when the difference in encryption performance is negligible, the encryption algorithm with a lower number of scrambling times is selected, which will reduce encryption time and achieve higher encryption efficiency.

[0235] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube, characterized in that: The following steps are involved: The key K1 is selected to iterate the Logistic chaotic system multiple times to generate a chaotic sequence, which is then integerized and converted into a chaotic matrix A6. The key K2 is selected to iterate the seven-dimensional hyperchaotic system to generate a hyperchaotic sequence, and then the hyperchaotic sequence is converted into an integer sequence; Divide the plaintext image P into R P , G P 、B P Three channels, select key K3 to preprocess the pixel values of the three channel images to obtain pixel matrix A1; Performing an Arnold transform on the pixel matrix A1 to obtain a transformed matrix A2, and transforming the matrix A2 into a three-dimensional pixel matrix A3; Perform cube scrambling on the matrix A3 using an integer sequence to obtain a scrambled three-dimensional pixel matrix A4; The matrix A4 is transformed into a two-dimensional pixel matrix A5, and the matrix A5 is XORed with the chaotic matrix A6 to obtain the ciphertext image.

2. The hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space as claimed in claim 1, characterized in that: Select the key K1=(μ,x0,i1,i q ) as the parameters, initial values, number of iterations and number of removed groups of the Logistic chaotic map; Among them, μ=3.998, x0=0.720, i q =1000; ceil(·) represents the ceiling rounding function, l = max(M,N), and the size of the plaintext image is M×N; The key K1 is used to iterate the Logistic chaotic system multiple times to generate a chaotic sequence of size i1. The first 1000 values are removed to obtain the chaotic sequence x. The chaotic sequence x is converted into a pixel integer value of [0, 255] using the following formula: X=floor(x×10 16 )mod 256; Where floor(·) represents the floor function, and mod represents the remainder function; Convert the rounded chaotic sequence X into The two-dimensional chaotic matrix A6.

3. The hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space as claimed in claim 1, characterized in that: Select the key K2 = (a, b, c, d, e, y1(0), y2(0), y3(0), y4(0), y5(0), y6(0), y7(0), i2, i q ,i') as the parameters, initial values, number of iterations, number of removed groups and Arnold transformation as well as preprocessing parameters of the seven-dimensional hyperchaotic system; Among them, the values of a, b, c, d, and e are 10, 100, 2.7, 2, and 3 respectively; The values of y1(0), y2(0), y3(0), y4(0), y5(0), y6(0), and y7(0) are all 1; The seven-dimensional hyperchaotic system is iterated using the key K2 to generate a hyperchaotic sequence of size i2. After removing the first 1000 values, seven pseudo-random sequences are obtained: y1(i), y2(i), y3(i), y4(i), y5(i), y6(i), y7(i); The 7 pseudo-random sequences are integerized using the following formula to obtain 7 integer sequences: in, T represents the two-dimensional Arnold transform period corresponding to images of different sizes.

4. The hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space as claimed in claim 3, characterized in that: Read in a plaintext image P of size M×N and divide the plaintext image P into R P , G P 、B P Three channels, perform the following encryption operations on the images of the three channels in turn to obtain the encrypted images of each channel; Let l = max(M, N), and pad the three channel images of the plaintext image P with zeros to obtain three channel images of size l × l; Substitute the parameter i' in the key K2 into the sequence Y1(i), Y2(i), Y3(i) to obtain Y1(i'), Y2(i'), Y3(i'); Select the Y1(i'), Y2(i'), and Y3(i') values in the key K3 as the preprocessing parameters of the pixel values of the three channel images, and preprocess each channel image to obtain the pixel values of the three channels R2, G2, and B2 images respectively: Among them, the key K3 = {3, 5, 7, 9, 11, 13, 15,…, 251, 253, 255}.

5. The hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space as claimed in claim 4, characterized in that: Convert the image of a certain channel into pixel matrix A1, substitute i' into the sequence Y4(i) to obtain Y4(i'), and use Y4(i') as the number of Arnold transformations to perform Arnold transformation on matrix A1 to obtain the transformed matrix A2; Read matrix A2 into array a in row order and fill in the array a. 0, get array b, read array b in sequence indivual The two-dimensional matrices of size are stacked from top to bottom to form A three-dimensional pixel matrix of size A3.

6. The hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space as claimed in claim 5, characterized in that: The method of performing three-dimensional Rubik's cube scrambling on matrix A3 is: Use the integer sequence Y5(i) to control the rotation axis of the matrix A3: When Y5(i)=0, the rotation axis is the X axis; when Y5(i)=1, the rotation axis is the Y axis; when Y5(i)=2, the rotation axis is the Z axis; The integer sequence Y6(i) is used to control the rotation layer of the matrix A3 to be the Y6(i)th layer; Use the integer sequence Y7(i) to control the rotation angle of the selected layer: When Y7(i)=0, rotate 90°; when Y7(i)=1, rotate 180°; when Y7(i)=2, rotate 270°; The direction of rotation is clockwise, starting from i=1 to Finally, the scrambled three-dimensional pixel matrix A4 is obtained.

7. The hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space as claimed in claim 6, characterized in that: Read the scrambled three-dimensional pixel matrix A4 in reverse order as array c, and add 0s to obtain array d, read array d in reverse order as a two-dimensional pixel matrix A5, and perform XOR operation on matrix A5 and chaotic matrix A6 to obtain the encrypted image of a certain channel, and then merge the encrypted images of the three channels into the final ciphertext image.

8. The hyperchaotic image encryption method based on parallel rotation scrambling of a magic cube three-dimensional space as claimed in claim 1, characterized in that: The ciphertext image is decrypted using the same chaotic matrix and chaotic sequence as in the encryption step to obtain the original plaintext image. The decryption process of the ciphertext image is the inverse process of the plaintext image encryption process.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the steps of the image encryption method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the image encryption method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Image encryption method based on improved magic cube transformation and memristor chaos

    CN113129195A

  • Chaotic image encryption algorithm based on three-dimensional Rubik's cube scrambling and diffusion

    CN115623139A