Image encryption method and system based on chaotic system
By constructing a two-dimensional chaotic system combining cellular automata and tent mapping, and combining pixel coordinate and spatial scrambling and diffusion technology, the sensitivity, robustness and periodicity problems of image encryption methods in the existing technology are solved, and high-security image encryption is achieved.
Patent Information
- Application Number
- CN202511030974.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2045-07-25
AI Technical Summary
Existing image encryption methods based on chaotic systems are not sensitive enough to plaintext images, cannot effectively defend against differential attacks, have poor robustness, suffer from periodicity problems, and generally have small key spaces.
A two-dimensional chaotic mapping system constructed by cellular automaton and tent mapping is adopted. Pixel coordinate scrambling, spatial scrambling and diffusion techniques are combined. The Arnold model is used for coordinate scrambling, the maze traversal model is used for spatial scrambling, and the CA model of cellular automaton is used for diffusion processing of pixel values.
It significantly enhances the security and complexity of the encryption system, can effectively defend against multiple attacks, including noise attacks and differential attacks, defend against 80% of clipping attacks, increase the key space, and improve the sensitivity and robustness of the encryption system.
Smart Images

Figure CN120529025B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an image encryption method and system based on a chaotic system. Background Art
[0002] With the rapid development of network and multimedia technologies, digital images have become a primary medium for information transmission and storage due to their intuitive and vivid nature, as well as their ability to quickly convey large amounts of information. Since digital images are typically transmitted over the open internet or stored in the cloud for flexible use and to conserve local space, they are susceptible to leakage during transmission and storage, posing serious information security risks. Ensuring the secure transmission and storage of digital images over the internet has become a hot topic of research, with image encryption technology offering one effective solution.
[0003] Chaotic system-based encryption methods have become an important branch of image encryption technology. With the maturity of cryptography, the advancement of cryptanalysis methods, and the improvement of computer performance, image encryption technology faces greater challenges. Traditional chaotic system-based image encryption methods have many drawbacks, such as insufficient sensitivity to plaintext images, inability to effectively defend against differential attacks, poor robustness, periodicity issues, and generally small key spaces. Therefore, designing fast, secure, and efficient chaotic system-based image encryption schemes remains a major task for researchers. Summary of the Invention
[0004] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide an image encryption method and system based on a chaotic system, aiming to solve the technical problems in the existing technology of image encryption methods based on chaotic systems, such as insufficient sensitivity to plaintext images, inability to effectively defend against differential attacks, poor robustness, periodicity problems and generally small key space.
[0005] A first aspect of the present invention is to provide an image encryption method based on a chaotic system, the method comprising:
[0006] Chaos system construction
[0007] The chaotic system is a two-dimensional chaotic mapping system constructed by combining cellular automata and tent mapping;
[0008] Pixel coordinate scrambling
[0009] Based on the Arnold model, the coordinate values of each pixel in the plaintext image are scrambled;
[0010] Pixel space scrambling
[0011] All pixels of the scrambled plaintext image are used to form a pixel matrix, and the pixel matrix is traversed based on a maze traversal model. The new coordinate value of each pixel in the new pixel matrix is determined based on the traversal order and the coordinate value of each pixel in the pixel matrix to obtain an initial encrypted matrix.
[0012] Chaotic sequence generation
[0013] randomly obtaining two sets of binary pseudo-random sequences through the chaotic system, arranging the two sets of binary pseudo-random sequences in a row-first and column-first manner respectively to form a row matrix and a column matrix of the same size as the plaintext image, performing an XOR operation on the row matrix and the column matrix to convert the plaintext image into a two-dimensional matrix;
[0014] Two-dimensional encryption matrix generation
[0015] Based on the conversion between the plaintext image and the two-dimensional matrix, converting the initial encryption matrix into a two-dimensional encryption matrix;
[0016] Pixel Diffusion
[0017] Based on the CA model of the cellular automaton, the pixel values of the initial encryption matrix and the two-dimensional encryption matrix are calculated and assigned, and the initial encryption matrix is replaced and diffused to obtain a target encrypted image.
[0018] Compared with the existing technology, the beneficial effects of the present invention are: combining cellular automata and tent mapping, a new two-dimensional discrete chaotic system is designed, which has the characteristics of simplicity, stability, efficient operation, and excellent Lyapunov index test. It adopts 256 rules of cellular automata. The system will flexibly select different rules from the rule library according to the number of current iterations to dynamically process the current input data. This method can not only effectively break the periodic limitations of traditional chaotic encryption systems, but also greatly expand the key space, thereby significantly enhancing the security and complexity of the encryption system, and can effectively solve the periodic problem. The paper solves the problems of coordinate scrambling-space scrambling-diffusion encryption structure and designs three encryption algorithms: Arnold-based coordinate scrambling method, maze traversal-based space scrambling method and CA diffusion. This method can not only resist various types of noise attacks and differential attacks, but also defend against 80% of cropping attacks, showing high sensitivity and good security and robustness, thus solving the technical problems of image encryption methods based on chaotic systems in the existing technology, such as insufficient sensitivity to plaintext images, inability to effectively defend against differential attacks, poor robustness, periodicity problems and generally small key spaces.
[0019] According to one aspect of the above technical solution, the construction equation of the chaotic system is as follows:
[0020]
[0021] Wherein, LM is the improved logistic mapping algorithm, CA is the cellular automaton operation rule algorithm, according to the change of the iteration number i of the cellular automaton, CA will use different rules to process the incoming parameters, and p is the key parameter for regulating the tent mapping.
[0022] According to an aspect of the above technical solution, the formula of the LM algorithm is as follows:
[0023] LM(λ)=1.85*(3*λ+1)*λ*(1-λ);
[0024] According to an aspect of the above technical solution, the step of performing coordinate scrambling on the coordinate value of each pixel point in the plaintext image based on the Arnold model comprises:
[0025] c’=(c+bd)modM
[0026] d′=[rqc+(1+brq)d]+c′ 2 modN,
[0027] Wherein, (c, d) is the original coordinate of the pixel point, (c', d') is the coordinate of the pixel point after coordinate scrambling, M and N are the length and width of the plaintext image, b and r are any integer, Gcd is the greatest common divisor.
[0028] According to an aspect of the above technical solution, all pixel points of the plaintext image after coordinate scrambling are formed into a pixel matrix, the pixel matrix is traversed based on the maze traversal model, the new coordinate value of each pixel in the new pixel matrix is determined through the traversal order and the coordinate value of each pixel in the pixel matrix, and the step of obtaining the initial encryption matrix comprises:
[0029] All pixel points of the plaintext image after coordinate scrambling are formed into a pixel matrix;
[0030] Initialize three matrices, namely a first matrix, a second matrix and a third matrix, and the third matrix is the same size as the pixel matrix;
[0031] Randomly select a pixel point of the pixel matrix, traverse the entire pixel matrix based on the maze traversal model, and store the new coordinates formed in the second matrix;
[0032] Loop through each new coordinate in the second matrix, and calculate the pixel point value of the corresponding real coordinate in the pixel matrix according to the new coordinate;
[0033] Copy the new coordinates and the pixel point value of the corresponding position to the third matrix to obtain an initial encryption matrix.
[0034] According to an aspect of the above technical solution, a certain pixel point of the pixel matrix is randomly selected, and the entire pixel matrix is traversed based on a maze traversal model to form new coordinates recorded in the second matrix.
[0035] A certain pixel point of the pixel matrix is randomly selected, and the entire pixel matrix is traversed through a direction vector.
[0036] The traversal order of the pixel point access is used to form new coordinates recorded in the second matrix, and the real coordinates of the pixel points that have been accessed are tracked through the first matrix.
[0037] According to an aspect of the above technical solution, based on the CA model of the cellular automaton, the pixel point values of the initial encryption matrix and the two-dimensional encryption matrix are calculated and assigned, the initial encryption matrix is replaced and diffused to obtain a target encryption image.
[0038] Based on the CA model of the cellular automaton, the pixel point value of the e-th row and the f-th column of the initial encryption matrix is XORed with the pixel point value of the e-th row and the f-1-th column, and then the pixel point value of the e-th row and the f-1-th column of the two-dimensional encryption matrix is XORed to obtain a new pixel point value. The new pixel point value is assigned to the e-th row and the f-1-th column of the target encryption image. The above operation is repeated until the diffusion of the target encryption image is completed to obtain the target encryption image, wherein e=1, 2...E, f=1, 2...F, e is the number of rows, E is the maximum number of rows, f is the number of columns, and F is the maximum number of columns.
[0039] The second aspect of the present application provides an image encryption system based on a chaotic system, which is used to implement the above-mentioned image encryption method based on a chaotic system. The system comprises:
[0040] A chaotic system construction module
[0041] The chaotic system is a two-dimensional chaotic mapping system constructed by combining a cellular automaton and a tent mapping.
[0042] A pixel coordinate scrambling module
[0043] The pixel coordinate scrambling module is used to scramble the coordinate values of each pixel point in the plaintext image based on an Arnold model.
[0044] A pixel space scrambling module
[0045] All pixel points of the coordinate-chaotic plaintext image are constituted into a pixel matrix, the pixel matrix is traversed based on a labyrinth traversal model, new coordinate values of each pixel in a new pixel matrix are determined through a traversal order and the coordinate values of the pixel in the pixel matrix, and an initial encryption matrix is obtained;
[0046] Chaotic sequence generation module
[0047] Two groups of binary pseudo-random sequences are randomly obtained through the chaotic system, the two groups of binary pseudo-random sequences are arranged in a row-first and column-first manner respectively to form a row matrix and a column matrix with the same size as the plaintext image, the row matrix and the column matrix are subjected to XOR operation, and the plaintext image is converted into a two-dimensional matrix;
[0048] Two-dimensional encryption matrix generation module
[0049] The initial encryption matrix is converted into a two-dimensional encryption matrix based on the conversion of the plaintext image and the two-dimensional matrix;
[0050] Pixel diffusion module
[0051] The initial encryption matrix is replaced and diffused to obtain a target encryption image through calculation and assignment of pixel point values of the initial encryption matrix and the two-dimensional encryption matrix based on the CA model of the cellular automaton.
[0052] A third aspect of the present application provides a readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the steps of the image encryption method based on the chaotic system.
[0053] A fourth aspect of the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the image encryption method based on the chaotic system when executing the program. BRIEF DESCRIPTION OF DRAWINGS
[0054] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
[0055] Figure 1 A flowchart of the image encryption method based on the chaotic system in the first embodiment of the present application;
[0056] Figure 2 The encryption / decryption results of three different test images;
[0057] Figure 3 The Lyapunov exponent test images of different chaotic systems;
[0058] Figure 4 Bifurcation diagram of the chaotic system of the present application. DETAILED DESCRIPTION
[0059] In order to make the objects, features and advantages of the present application more clear, the specific embodiments of the present application are described in detail below with reference to the accompanying drawings. The present application is shown in several embodiments in the drawings. However, the present application can be realized in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided so that the disclosure of the present application is more thorough and complete.
[0060] Some concepts involved in the embodiments of the present application are introduced below.
[0061] Cellular Automaton (CA) is a mathematical model used to simulate complex systems composed of simple rules. In this model, space is divided into a discrete grid, and each grid location is called a "cell". Each cell has a finite set of states at each time step, which can be on or off, 0 or 1, etc. The state of a cell is updated according to specific rules and the state of its neighbors. Cellular automata are used to simulate and study various complex systems and phenomena, such as fluid dynamics, ecological systems, urban development, and mathematical theoretical problems, etc. Due to its simplicity and strong expressive power, cellular automata are an important tool in the field of complexity research.
[0062] The tent map is a simple nonlinear discrete dynamical system, and is a typical example for studying chaotic behavior. It is named after the tent-shaped graph of the function in mathematics. The tent map is a typical model for studying chaotic phenomena, through which researchers can understand the nature of nonlinear dynamics and chaotic behavior in more complex systems. It is also used to explain many similar nonlinear phenomena in nature.
[0063] Lyapunov exponent is a numerical index used to quantify initial value sensitivity in dynamical systems. It measures the exponential divergence rate between adjacent points in the system trajectory to assess the chaotic nature of the system. If the largest Lyapunov exponent of a system is positive, it means that small differences between initial points will grow exponentially over time, and the system exhibits chaotic behavior. That is, the system is very sensitive to initial conditions, and small initial changes can lead to significantly different future states.
[0064] Permutation is a common image encryption technique that changes the structure of the original image by rearranging the positions of the pixels. The basic principle is to rearrange the pixels in the image according to certain rules, thereby changing the pixel positions. During encryption, the arrangement order of the pixels needs to be recorded so that the pixels can be restored to their original positions during decryption.
[0065] Diffusion is an image encryption technique that spreads information in the image by changing the values of the pixels, thereby enhancing the security and attack resistance of the image. The basic principle is to spread the value of a pixel to its surrounding pixels, so that the key or secret message is propagated throughout the image. In this way, even if the image is modified locally, it will have an impact on the entire image, thereby improving the strength of the encryption.
[0066] Cropping attack refers to an attacker changing the content of an image or stealing information from an image by cropping it. In a cropping attack, an attacker can hide or modify important information in an image by cropping a part of the image, thereby destroying the integrity and confidentiality of the original image. Cropping attacks often occur in scenarios where images need to be transmitted, stored, processed, etc., such as video surveillance, face recognition, digital watermarking, etc. Attackers can evade detection and recognition algorithms by cropping specific areas of the image, or obtain sensitive information from the target image.
[0067] Noise attack is a common form of noise interference in digital image processing. It mainly manifests as salt and pepper noise attack and Gaussian noise attack. In this attack, errors are introduced during the encryption operation, resulting in incorrect output, thereby inferring the key or other sensitive information.
[0068] Embodiment one
[0069] Please refer to Figure 1 , the first embodiment of the present application provides an image encryption method based on a chaotic system, which comprises steps S10-S15:
[0070] Step S10, chaotic system construction
[0071] The chaotic system is a two-dimensional chaotic mapping system constructed by combining cellular automata and tent mapping;
[0072] Specifically, the construction equation of the chaotic system is as follows:
[0073]
[0074] Wherein, LM is the improved logistic mapping algorithm, CA is the cellular automaton operation rule algorithm, according to the change of the iteration number i of the cellular automaton, CA will use different rules to process the incoming parameters; p is the key parameter for regulating the tent mapping.
[0075] The formula of the LM algorithm is as follows:
[0076] LM (λ) = 1.85 * (3 * λ + 1) * λ * (1 - λ);
[0077] It should be noted that, compared with the classical logistic mapping (single peak mapping) algorithm, the LM algorithm exhibits more complex dynamic behavior by introducing additional coefficients and linear terms, and provides more parameter adjustment space to adapt to different attacks, making the key of the encryption algorithm more complex and more suitable for image encryption field.
[0078] Further, p is the key parameter for regulating the tent mapping, and the chaotic system will be compared with the generated pseudo-random number to determine the algorithm used in the next step. At the same time, p also participates in the algorithm as a variable, realizing deep coupling and further enhancing the complexity and unpredictability of the chaotic system.
[0079] In summary, the embodiment combines cellular automaton and tent mapping to design a new two-dimensional discrete chaotic system, which has the characteristics of simple and stable, efficient operation, excellent Lyapunov exponent test, etc. The system uses 256 rules of cellular automaton, and will flexibly select different rules from the rule library to dynamically process the current input data according to the current iteration number. This method not only effectively breaks the periodicity limitation of traditional chaotic encryption system, but also greatly expands the key space, thereby significantly enhancing the security and complexity of the encryption system, and effectively solving the problems of periodicity and small key space.
[0080] Step S11, pixel coordinate scrambling
[0081] Based on the Arnold model, the coordinate value of each pixel point in the plaintext image is scrambled;
[0082] The calculation formula is as follows:
[0083] c' = (c + bd) mod M
[0084] d' = [rqc + (1 + brq) d] + c' 2 mod N,
[0085] Wherein, (c, d) is the original coordinate of the pixel point, (c', d') is the coordinate of the pixel point after coordinate scrambling, M, N are the length and width of the plaintext image, b, r are any integers, GCD is the greatest common divisor.
[0086] It should be noted that after the coordinate scrambling, the original meaningful plaintext image becomes a meaningless image, thereby realizing the preliminary hiding of information.
[0087] Step S12, pixel space scrambling
[0088] All pixel points of the coordinate-scrambled plaintext image are formed into a pixel matrix, the pixel matrix is traversed based on a maze traversal model, and the new coordinate value of each pixel in the new pixel matrix is determined through the traversal order and the coordinate value of each pixel in the pixel matrix, so as to obtain an initial encryption matrix.
[0089] Specifically, in step S120, all pixel points of the coordinate-scrambled plaintext image are formed into a pixel matrix.
[0090] Step S121, three matrices are initialized, which are a first matrix, a second matrix and a third matrix, and the third matrix has the same size as the pixel matrix.
[0091] Step S122, a pixel point of the pixel matrix is randomly selected, and the entire pixel matrix is traversed based on a maze traversal model, and the new coordinates formed are recorded in the second matrix.
[0092] Specifically, a pixel point of the pixel matrix is randomly selected, and the entire pixel matrix is traversed through a direction vector.
[0093] The traversal order of the pixel point access is used to form new coordinates, which are recorded in the second matrix, and the first matrix is used to track the real coordinates of the pixel points that have been accessed.
[0094] Step S123, each new coordinate in the second matrix is cyclically traversed, and the pixel point value of the corresponding real coordinate in the pixel matrix is calculated according to the new coordinate.
[0095] Step S124, the new coordinate and the pixel point value at the corresponding position are copied into the third matrix to obtain an initial encryption matrix.
[0096] By way of example but not limitation, for example, starting from the pixel point of the coordinate (1, 1) of the pixel matrix, the direction vector d = [1, 0; -1, 0; 0, 1; 0, -1] (down, up, right, left) is used to traverse the pixel matrix, and finally an initial encryption matrix S is obtained.
[0097] It should be noted that the spatial scrambling based on the maze traversal model does not change the position of the coordinate point in the matrix by changing the coordinate value, but traverses the original pixel matrix in a traversal manner, and then combines the traversal order and the position of the coordinate in the original plaintext image to determine the new position of the real coordinate.
[0098] Step S13, chaotic sequence generation
[0099] randomly obtaining two sets of binary pseudo-random sequences through the chaotic system, arranging the two sets of binary pseudo-random sequences in a row-first and column-first manner respectively to form a row matrix and a column matrix of the same size as the plaintext image, performing an XOR operation on the row matrix and the column matrix to convert the plaintext image into a two-dimensional matrix;
[0100] By way of example and not limitation, for example, two sets of binary pseudo-random sequences h and j are arranged in a row-first and column-first manner respectively to form a row matrix H and a column matrix J of the same size as the plaintext image. The row matrix H and the column matrix J are XORed to convert the plaintext image into a two-dimensional matrix Q.
[0101] Step S14: Generate a two-dimensional encryption matrix
[0102] Based on the conversion between the plaintext image and the two-dimensional matrix, converting the initial encryption matrix into a two-dimensional encryption matrix;
[0103] Similar to converting the plaintext image into a two-dimensional matrix Q, similarly, the initial encryption matrix S is converted into a two-dimensional encryption matrix S'.
[0104] Step S15: pixel diffusion
[0105] Based on the CA model of the cellular automaton, the pixel values of the initial encryption matrix and the two-dimensional encryption matrix are calculated and assigned, and the initial encryption matrix is replaced and diffused to obtain a target encrypted image.
[0106] Specifically, based on the CA model of the cellular automaton, the pixel value in the fth column of the eth row of the initial encryption matrix is bitwise exclusive ORed with the pixel value in the f-1th column of the eth row, and then bitwise exclusive ORed with the pixel value in the f-1th column of the eth row of the two-dimensional encryption matrix to obtain a new pixel value, and the new pixel value is assigned to the f-1th column of the eth row in the target encrypted image. The above operation is repeated until the diffusion of the target encrypted image is completed to obtain the target encrypted image, wherein e=1, 2...E, f=1, 2...F, e is the number of rows, E is the maximum number of rows, f is the number of columns, and F is the maximum number of columns.
[0107] It is important to note that the encryption structure employs coordinate scrambling, spatial scrambling, and diffusion, and three encryption algorithms are designed: an Arnold-based coordinate scrambling method, a maze-traversal-based spatial scrambling method, and CA diffusion. This method not only resists various types of noise and differential attacks, but also defends against 80% of cropping attacks, demonstrating high sensitivity, security, and robustness. Furthermore, the decryption algorithm is equally efficient and stable, capable of decrypting images with a high degree of fidelity.
[0108] Figure 2 The following are the encryption and decryption results of three different test images simulated using the encryption steps described above. (a)-(c) are the unencrypted images of Peppers, Airplane, and Baboon; (d)-(f) are the encrypted images; and (g)-(i) are the decrypted images. The encrypted images resemble random noise, making it impossible to discern any information from the original image, effectively masking the image's visual content.
[0109] Figure 3 The Lyapunov index test graphs of the chaotic system of 2D-Logistic (two-dimensional Logistic chaotic system), 2D-SLMM (two-dimensional sinusoidal transform Logistic chaotic system, which introduces sinusoidal transform into the chaotic system to expand the range of the chaotic system in a chaotic state), New 2D-LCM (two-dimensional space-time discrete dynamic Logistic chaotic system, which breaks the original period window of the chaotic system to generate a time series with good randomness), and this embodiment show that the Lyapunov index of the chaotic system of this embodiment is the highest, indicating that the chaotic performance of the chaotic sequence generated by the chaotic system of this embodiment is better.
[0110] Figure 4 This is the bifurcation diagram of the chaotic system of this embodiment, where p represents the system's control parameter, and x corresponds to the evolution path of the system state when the parameter changes. As can be seen, the chaotic system of this embodiment has many and complex bifurcation points, indicating that the richer the dynamic behavior of the chaotic system of this embodiment, the more obvious the chaotic characteristics.
[0111] As we all know, information entropy can measure the distribution of image grayscale values. The more evenly the image grayscale values are distributed, the greater the information entropy value. It is an indicator of the quality of image encryption. The closer this index is to 8, the better the encryption effect.
[0112] Table 1:
[0113]
[0114] Among them, the comparison paper [1]: A.Firdous, AURehman, MMSMissen, A gray image encryption technique using the concept of water waves, chaos and hash function, Ieee Access 9 (2021) 11675–11693.
[0115] Comparative paper [2]: C. Pak, L. Huang, A new color image encryption using combination of the 1d chaotic map, Signal Processing 138 (2017) 129–137.
[0116] Comparative paper [3]: C.Zou,
[0117] Comparative paper [4]: J.Zheng, H.Hu, A symmetric image encryption scheme based on hybrid analog-digital chaotic system and parameter selection mechanism, Multimedia Tools and Applications 80(2021)20883–20905.
[0118] Comparative paper [5]: W.Song, C.Fu, M.Tie, C.-W.Sham, J.Liu, H.-f.Ma, A fast parallel batch image encryption algorithm using intrinsic.
[0119] properties of chaos, SignalProcessing: Image Communication 102 (2022) 116628. Comparative paper [6]: E. Yavuz, A new parallel processing architecture for accelerating image encryption based on chaos, Journal of Information Security and Applications 63 (2021) 103056.
[0120] Comparative paper [7]: S. Zhou, A real-time one-time pad dna-chaos image encryption algorithm based on multiple keys, Optics&Laser Technology 143(2021)107359.
[0121] As can be seen from Table 1, compared with other papers, the index of the image encryption method based on the chaotic system in this embodiment is closest to 8, indicating that the image encryption method has excellent encryption effect.
[0122] In addition, 1000 pairs of adjacent pixels in the horizontal, vertical and diagonal directions are randomly selected from the plaintext image and the target encrypted image, and the correlation of adjacent pixels is calculated. The smaller the value, the better the encryption effect.
[0123] Table 2:
[0124]
[0125] As can be seen from Table 2, the image encryption method based on the chaotic system in this embodiment has a very low correlation between adjacent pixels after encryption, almost close to 0, compared with designs in other papers, and the encryption effect is relatively excellent.
[0126] Compared with the existing technology, the image encryption method based on the chaotic system in this embodiment has the following beneficial effects: combining cellular automata and tent mapping, a new two-dimensional discrete chaotic system is designed. The system has the characteristics of simplicity, stability, efficient operation, and excellent Lyapunov index test. It adopts 256 rules of cellular automata. The system will flexibly select different rules from the rule library according to the number of current iterations to dynamically process the current input data. This method can not only effectively break the periodic limitations of traditional chaotic encryption systems, but also greatly expand the key space, thereby significantly enhancing the security and complexity of the encryption system. It can effectively solve the problems of periodicity and small key space; it adopts the encryption structure of coordinate scrambling-space scrambling-diffusion, and designs three encryption algorithms: Arnold-based coordinate scrambling method, maze traversal-based space scrambling method, and CA diffusion. This method can not only resist various types of noise attacks and differential attacks, but also defend against 80% of cropping attacks, showing high sensitivity and good security and robustness, thus solving the technical problems of the image encryption method based on chaotic system in the existing technology that is not sensitive enough to plaintext images, cannot effectively defend against differential attacks, has poor robustness, and has periodic problems and generally small key space.
[0127] Example 2
[0128] See also Figure 2 , which shows an image encryption system based on a chaotic system provided by a second embodiment of the present invention, the system includes:
[0129] Chaotic System Building Blocks
[0130] The chaotic system is a two-dimensional chaotic mapping system constructed by combining cellular automata and tent mapping;
[0131] Pixel coordinate scrambling module
[0132] Used to scramble the coordinates of each pixel in the plaintext image based on the Arnold model;
[0133] Pixel space scrambling module
[0134] All pixels of the plaintext image with scrambled coordinates are used to form a pixel matrix, the pixel matrix is traversed based on a maze traversal model, and the new coordinate value of each pixel in the new pixel matrix is determined based on the traversal order and the coordinate value of each pixel in the pixel matrix to obtain an initial encryption matrix;
[0135] Chaotic sequence generation module
[0136] for randomly obtaining two sets of binary pseudo-random sequences through the chaotic system, arranging the two sets of binary pseudo-random sequences in a row-first and column-first manner respectively to form a row matrix and a column matrix of the same size as the plaintext image, performing an XOR operation on the row matrix and the column matrix, and converting the plaintext image into a two-dimensional matrix;
[0137] Two-dimensional encryption matrix generation module
[0138] for converting the initial encryption matrix into a two-dimensional encryption matrix based on the conversion between the plaintext image and the two-dimensional matrix;
[0139] Pixel Diffusion Module
[0140] The CA model is used to calculate and assign pixel values of the initial encryption matrix and the two-dimensional encryption matrix based on the cellular automaton, replace and diffuse the initial encryption matrix, and obtain a target encrypted image.
[0141] Compared with the existing technology, the image encryption system based on the chaotic system shown in this embodiment has the following beneficial effects: the chaotic system building module combines cellular automata and tent mapping, and has the characteristics of simplicity, stability, efficient operation, and excellent Lyapunov index test. It adopts 256 rules of cellular automata. The system will flexibly select different rules from the rule library according to the number of current iterations to dynamically process the current input data, which can effectively break the periodic limitations of traditional chaotic encryption systems and greatly expand the key space, thereby significantly enhancing the security and complexity of the encryption system and effectively solving the periodicity problem and the problem of small key space. The coordinate scrambling-spatial scrambling-diffusion encryption structure can not only resist various types of noise attacks and differential attacks, but also defend against 80% of cropping attacks, showing high sensitivity, good security and robustness, thereby solving the technical problems of the image encryption method based on the chaotic system in the existing technology that is not sensitive enough to plaintext images, cannot effectively defend against differential attacks, has poor robustness, and has periodicity problems and a generally small key space.
[0142] Example 3
[0143] A third embodiment of the present invention provides a storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method described in the first embodiment.
[0144] Example 4
[0145] A fourth embodiment of the present invention provides a device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first embodiment when executing the program.
[0146] The technical features of each of the above embodiments can be combined in any manner. For the sake of brevity, not all possible combinations of the technical features of the above embodiments are described, however, it is to be understood that the scope of the present specification includes all possible combinations of the technical features.
[0147] Those skilled in the art will appreciate that the logic and / or steps represented in the flow diagrams, or otherwise described herein, for example, can be embodied in one or more of a variety of ways including as a set of instructions executed by a computer, as a structure of hardware components, or as a combination of hardware and software components. In one embodiment, for example, the logic and / or steps represented in the flow diagrams, or otherwise described herein, can be embodied in a set of instructions executed by a computer, such as a computer readable medium having stored thereon a set of instructions executable by a computer. The computer readable medium can be a machine-readable storage medium having stored thereon a set of instructions executable by a computer. The computer readable medium may, for example, be RAM containing the set of instructions. Alternatively, the computer readable medium may, for example, be a hard disk drive containing the set of instructions. Alternatively, the computer readable medium may, for example, be a flash memory containing the set of instructions. Alternatively, the computer readable medium may, for example, be a compact disk containing the set of instructions. Alternatively, the computer readable medium may, for example, be a tape containing the set of instructions. Alternatively, the computer readable medium may, for example, be a hard-wired or preprogrammed hard-wired
[0148] More specific examples (a non-exhaustive list) of the computer readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). Additionally, the computer readable medium can also be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
[0149] It will be appreciated that portions of the present application can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, a number of steps or methods can be implemented in software or firmware that is stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, known in the art, or a combination thereof, can be used: discrete logic circuitry having logic gates for implementing logic functions upon data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.
[0150] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0151] The above-described embodiments merely illustrate several implementations of the present invention. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. An image encryption method based on a chaotic system, characterized in that: The method comprises the following steps: Chaos system construction The chaotic system is a two-dimensional chaotic mapping system constructed by combining cellular automata and tent mapping. The construction equation of the chaotic system is as follows: Among them, LM is the improved logistic mapping algorithm, CA is the cellular automaton operation rule algorithm. According to the change of the number of cellular automaton iterations i, CA will use different rules to process the input parameters, and p is the key parameter for regulating tent mapping; The formula of the LM algorithm is as follows: LM(λ)=1.85*(3*λ+1)*λ*(1-λ); Pixel coordinate scrambling Based on the Arnold model, the coordinate values of each pixel in the plaintext image are scrambled; Pixel space scrambling All pixels of the scrambled plaintext image are used to form a pixel matrix, and the pixel matrix is traversed based on a maze traversal model. The new coordinate value of each pixel in the new pixel matrix is determined based on the traversal order and the coordinate value of each pixel in the pixel matrix to obtain an initial encrypted matrix. Chaotic sequence generation randomly obtaining two sets of binary pseudo-random sequences through the chaotic system, arranging the two sets of binary pseudo-random sequences in a row-first and column-first manner respectively to form a row matrix and a column matrix of the same size as the plaintext image, performing an XOR operation on the row matrix and the column matrix to convert the plaintext image into a two-dimensional matrix; Two-dimensional encryption matrix generation Based on the conversion between the plaintext image and the two-dimensional matrix, converting the initial encryption matrix into a two-dimensional encryption matrix; Pixel Diffusion Based on the CA model of the cellular automaton, the pixel values of the initial encryption matrix and the two-dimensional encryption matrix are calculated and assigned, and the initial encryption matrix is replaced and diffused to obtain a target encrypted image.
2. The image encryption method based on chaotic system according to claim 1, characterized in that: The steps of scrambling the coordinate values of each pixel in the plaintext image based on the Arnold model specifically include: Where (c, d) is the original coordinate of the pixel, (c', d') is the coordinate of the pixel after scrambling, M and N are the length and width of the plaintext image, b and r are arbitrary integers. gcd is the greatest common divisor.
3. The image encryption method based on chaotic system according to claim 2, characterized in that: The steps of forming a pixel matrix from all pixels of the plaintext image with scrambled coordinates, traversing the pixel matrix based on a maze traversal model, and determining the new coordinate value of each pixel in the new pixel matrix based on the traversal order and the coordinate value of each pixel in the pixel matrix to obtain an initial encryption matrix specifically include: All pixels of the plaintext image with scrambled coordinates form a pixel matrix; Initializing three matrices, namely a first matrix, a second matrix, and a third matrix, wherein the third matrix has the same size as the pixel matrix; Randomly selecting a pixel point in the pixel matrix, traversing the entire pixel matrix based on a maze traversal model, and storing the resulting new coordinate record in the second matrix; Loop through each new coordinate in the second matrix, and calculate the pixel value of the real coordinate corresponding to the new coordinate in the pixel matrix; The new coordinates and the pixel values at the corresponding positions are copied into the third matrix to obtain an initial encrypted matrix.
4. The image encryption method based on chaotic system according to claim 3, characterized in that: The step of randomly selecting a pixel point of the pixel matrix, traversing the entire pixel matrix based on the maze traversal model, and storing the resulting new coordinate record in the second matrix specifically includes: Randomly select a pixel point of the pixel matrix, and traverse the entire pixel matrix through the direction vector; The traversal order of pixel point visits is used to form new coordinates, which are recorded and stored in the second matrix, and the real coordinates of the visited pixel points are tracked through the first matrix.
5. The image encryption method based on chaotic system according to claim 1, characterized in that: Based on the CA model of the cellular automaton, the steps of calculating and assigning pixel values between the initial encryption matrix and the two-dimensional encryption matrix, replacing and diffusing the initial encryption matrix, and obtaining a target encrypted image specifically include: Based on the CA model of the cellular automaton, the pixel value in the fth column of the eth row of the initial encryption matrix is bitwise exclusive-ORed with the pixel value in the f-1th column of the eth row, and then bitwise exclusive-ORed with the pixel value in the f-1th column of the eth row of the two-dimensional encryption matrix to obtain a new pixel value. The new pixel value is assigned to the f-1th column of the eth row of the target encrypted image, and the above operation is repeated until the diffusion of the target encrypted image is completed to obtain the target encrypted image, wherein e=1, 2...E, f=1, 2...F, e is the number of rows, E is the maximum number of rows, f is the number of columns, and F is the maximum number of columns.
6. An image encryption system based on a chaotic system, characterized in that: The system is used to implement the image encryption method based on a chaotic system according to any one of claims 1 to 5, and the system includes: Chaotic System Building Blocks The chaotic system is a two-dimensional chaotic mapping system constructed by combining cellular automata and tent mapping. The construction equation of the chaotic system is as follows: Among them, LM is the improved logistic mapping algorithm, CA is the cellular automaton operation rule algorithm. According to the change of the number of cellular automaton iterations i, CA will use different rules to process the input parameters, and p is the key parameter for regulating tent mapping; The formula of the LM algorithm is as follows: LM(λ)=1.85*(3*λ+1)*λ*(1-λ); Pixel coordinate scrambling module Used to scramble the coordinates of each pixel in the plaintext image based on the Arnold model; Pixel space scrambling module All pixels of the plaintext image with scrambled coordinates are used to form a pixel matrix, the pixel matrix is traversed based on a maze traversal model, and the new coordinate value of each pixel in the new pixel matrix is determined based on the traversal order and the coordinate value of each pixel in the pixel matrix to obtain an initial encryption matrix; Chaotic sequence generation module for randomly obtaining two sets of binary pseudo-random sequences through the chaotic system, arranging the two sets of binary pseudo-random sequences in a row-first and column-first manner respectively to form a row matrix and a column matrix of the same size as the plaintext image, performing an XOR operation on the row matrix and the column matrix, and converting the plaintext image into a two-dimensional matrix; Two-dimensional encryption matrix generation module for converting the initial encryption matrix into a two-dimensional encryption matrix based on the conversion between the plaintext image and the two-dimensional matrix; Pixel Diffusion Module The CA model is used to calculate and assign pixel values of the initial encryption matrix and the two-dimensional encryption matrix based on the cellular automaton, replace and diffuse the initial encryption matrix, and obtain a target encrypted image.
7. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the image encryption method based on a chaotic system as claimed in any one of claims 1 to 5 are implemented.
8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, the steps of the image encryption method based on a chaotic system as claimed in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Image encryption method combining three-dimensional Arnold transformation with chaotic sequence
CN103455971A
Foreground and background separation-based image encryption and decryption methods
CN104851070A
Image encryption method and system based on chaotic system and reversible cellular automaton
CN114531221A