A chaotic image encryption method based on global dynamic selection
By employing a chaotic image encryption method based on global dynamic selection, utilizing a 2D-LSM chaotic system and DNA matrix operations, the lack of global dynamism and flexibility in existing technologies is addressed, achieving efficient image encryption and enhancing key sensitivity and decryption difficulty.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN HONGYUE INFORMATION TECH CO LTD
- Filing Date
- 2022-11-16
- Publication Date
- 2026-04-14
AI Technical Summary
Existing chaotic image encryption technologies lack global dynamism and flexibility, making it difficult to achieve dynamism and flexibility during the encryption process. Furthermore, they lack key sensitivity, resulting in low decryption costs.
A chaotic image encryption method based on global dynamic selection is adopted. A chaotic sequence is generated using a 2D-LSM chaotic system. The image is unfolded into a one-dimensional array by raster scanning, and dynamic DAN encoding and DNA matrix operations are performed. Combined with dynamic permutation and diffusion, the encryption process of global dynamic selection is realized.
It improves the parallelism and flexibility of the encryption structure, enhances the sensitivity of the key, increases the cost of decryption, strengthens the encryption effect, and resists statistical and differential attacks.
Smart Images

Figure CN115908093B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to a chaotic image encryption method based on global dynamic selection. Background Technology
[0002] With the development of technology, all aspects of people's lives have become information-based. As a medium in the information age, images can directly convey the information people want to express. Information technology has an increasingly significant impact on personal privacy, medicine, and social interactions. Once important information in an image is intercepted or tampered with by attackers, the resulting losses are substantial. Therefore, protecting the content of digital images from unauthorized access is crucial. To ensure the security of digital images, researchers have proposed many technologies, such as image encryption.
[0003] Generally, image encryption algorithms consist of two main parts: scrambling and diffusion. Scrambling changes the position of pixels, primarily aiming to break the correlation between adjacent pixels. Diffusion, on the other hand, alters the pixel value of each pixel in a specific way to protect image information; essentially, diffusion is the process of changing pixel values. Chaotic systems, with their pseudo-randomness, initial value sensitivity, parameter sensitivity, and unpredictability, can be applied to image encryption. Incorporating chaotic sequences generated iteratively from a chaotic system into the scrambling and diffusion processes improves the security and efficiency of the encryption system. Due to the high compatibility of chaotic systems with image encryption technology, chaotic image encryption technology is gradually attracting the attention of researchers.
[0004] With in-depth research into chaotic image encryption technology, hybrid chaotic image encryption schemes combining with other technologies have become a current research focus. These technologies include DNA encoding, frequency transformation, and compressed sensing. Although these methods have achieved good results, they do not adequately reflect the dynamics and flexibility of the encryption process.
[0005] To enhance the dynamism and flexibility of chaotic image encryption algorithms, some parallel encryption steps are considered within the permutation and diffusion structures. Yin proposes a chaotic image encryption scheme based on breadth-first search and dynamic diffusion; Li proposes a chaotic image encryption method with orbital perturbation and dynamic state variable selection mechanisms; Meysam proposes a chaotic image encryption algorithm based on chaotic mapping and dynamic function generator polynomial combination; and Wu proposes a plaintext-related dynamic key chaotic image encryption method. These schemes all employ local dynamics and do not reflect the global dynamism of chaotic image encryption from a holistic perspective. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the present invention aims to provide a chaotic image encryption method based on global dynamic selection, which has the advantages of high flexibility and multiple selectivity.
[0007] The above-mentioned technical objective of this invention is achieved through the following technical solution: a chaotic image encryption method based on global dynamic selection, comprising the following steps:
[0008] S1. The chaotic sequence used in the cost encryption method is generated using a 2D-LSM chaotic system;
[0009] S2. Unfold the image into a one-dimensional array using raster scanning;
[0010] S3. Perform dynamic DAN encoding on the image to convert the one-dimensional array into a DNA matrix;
[0011] S4. Dynamically permutate the DNA matrix to obtain a permutation image;
[0012] S5. Perform DNA decoding on the permutation image to obtain a DNA decoding matrix;
[0013] S6. Perform dynamic diffusion encryption on the DNA decoding matrix to obtain an encrypted image;
[0014] S7. Repeat steps S2-S7 to encrypt the encrypted image again, using the encrypted image as the initial image.
[0015] In one embodiment, step S1 includes the following steps:
[0016] S11, the generation length is L a =4L and L b =L pseudo-random sequence;
[0017] Where L = M × N is the total number of pixels in the image of size M × N.
[0018] In one embodiment, step S11 includes the following steps:
[0019] S111. Pre-iteration: The 2D-LSM chaotic system proposed by Hua et al. uses N0 = 800 iterations to prevent transient effects. The iterative expression is:
[0020]
[0021] Where h,w∈(0.2,0.3) and α,β∈[1,100] are the state parameters and control parameters of the 2D-LSM chaotic system, respectively, h(i+1) and w(i+1) represent the (i+1)th iteration, the initial value {h1(0),w1(0),α1,β1} is used as the first key, and the initial value {h2(0),w2(0),α2,β2} is used as the second key, which is set by the encryptor;
[0022] S112. Input the first group and the second group of keys into the 2D-LSM chaotic system, and iterate L... a and L b Next, the first set of current state variable values obtained by iterating the first set of keys. and The second set of current state variable values obtained by iterating through the second set of keys. and
[0023] S113, For the first group of state variable values and After quantization, they are sequentially placed into a one-dimensional chaotic order. and In the expression, the mathematical expressions for a(i) and b(i) are:
[0024]
[0025] Where mod(g) is the modulo operation, fix(g) is the function to round to the nearest zero, and i = 1, 2, 3, K, 4L;
[0026] For the second group of current state variable values and And and Convert to and The chaotic sequence is obtained after quantization and reconstruction into a two-dimensional matrix. and The mathematical expressions for x(i,j) and y(i,j) are as follows:
[0027]
[0028] Where mod(g) is the modulo operation, fix(g) is the function to round to the nearest zero, i = 1, 2, 3, K, M; j = 1, 2, 3, K, N.
[0029] In one embodiment, the one-dimensional array in step S2 is denoted as
[0030] In one embodiment, each pixel in the one-dimensional array P is divided into four two-bit pairs, denoted as... Each pair of bits is dynamically selected based on the chaotic sequence generated by the 2D-LSM chaotic system;
[0031] According to the chaotic sequence value pairs Each two-bit pair is dynamically selected from one of eight rule-based DNA encoding methods, and the digital matrix is converted into a DNA matrix and then reconstructed into a two-dimensional matrix.
[0032] In one embodiment, step S4 includes the following steps:
[0033] S41, using formula R S =mod(i(1)+i(4N)+i(4M×N-1)+i(4M×N),4) Calculate R S The value of is given in the formula, where the DNA symbol is assigned values according to "A=00, G=01, C=10, T=11" for addition operation, and mod(g) is the modulo operation;
[0034] According to the R S The value of {0, 1, 2, 3} is used to dynamically select the value. Figure 2 The permutation rules performed on the DNA matrix are shown in figures a, b, c, and d.
[0035] Let the permuted image be denoted as
[0036] In one embodiment, step S5 specifically involves:
[0037] The scrambled image S is arranged according to the raster scan sequence. The corresponding values are used to select dynamic DNA decoding rules, merging four symbols into one pixel, and reshaping the structure into an M-row, N-column DNA decoding matrix.
[0038] In one embodiment, step S6 includes the following steps:
[0039] S61. Let the image after diffusion be... Let the diffusion rule matrix be R. D =r(i,j)(i=0,1,2,K,M; j=0,1,2,K,N);
[0040] According to the formula Calculate R corresponding to different pixel positions D value;
[0041] S62, according to the RD The value is dynamically selected to perform the diffusion equation at that position. The mathematical expression for the element d(i,j) of the diffused image is as follows:
[0042]
[0043] In the formula,
[0044] The aforementioned chaotic image encryption method based on global dynamic selection has the following beneficial effects:
[0045] First, it improves the parallelism of the encryption structure by setting up multiple parallel encryption operations within the traditional permutation and diffusion stages, allowing the encryption operation to be selected for execution in a given round by either a chaotic sequence or by using pre-defined rules.
[0046] Secondly, it achieves global dynamic selection at the bit, pixel, and image levels, increasing the flexibility of the encryption structure;
[0047] Third, it improves encryption effectiveness and key sensitivity, and increases the order of magnitude of the equivalent key, which greatly increases the cost of decryption. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating this embodiment;
[0049] Figure 2 This is the replacement method corresponding to the dynamic replacement rule in this embodiment;
[0050] Figure 3 This is a schematic diagram illustrating the acquisition of diffusion rule values at different locations in this embodiment;
[0051] Figure 4 These are the original image, encrypted image, and decrypted image used in the experiment of this invention;
[0052] Figure 5 This is the grayscale histogram of the Lena image before and after encryption in this invention;
[0053] Figure 6 This invention compares the correlation between adjacent pixels in the horizontal, vertical, and diagonal directions of the encrypted image and the original image.
[0054] Figure 7 This is a graph showing the key sensitivity test results for Lena graph encryption in this invention;
[0055] Figure 8 This is a graph showing the key sensitivity test results for Lena graph decryption in this invention. Detailed Implementation
[0056] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0057] A chaotic image encryption method based on global dynamic selection, such as Figure 1 As shown, it includes the following steps:
[0058] S1. Use a 2D-LSM chaotic system to generate the chaotic sequence used in the cost encryption method.
[0059] Step S1 includes the following steps:
[0060] S11, the generation length is L a =4L and L b =L pseudo-random sequence;
[0061] Where L = M × N is the total number of pixels in the image of size M × N.
[0062] Specifically, S111, the pre-iteration of the 2D-LSM chaotic system proposed by Hua et al., with N0 = 800 iterations, is to prevent transient effects. The iterative expression is:
[0063]
[0064] Where h,w∈(0.2,0.3) and α,β∈[1,100] are the state parameters and control parameters of the 2D-LSM chaotic system, respectively, h(i+1) and w(i+1) represent the (i+1)th iteration, the initial value {h1(0),w1(0),α1,β1} is used as the first key, and the initial value {h2(0),w2(0),α2,β2} is used as the second key, which is set by the encryptor;
[0065] S112. Input the first group and the second group of keys into the 2D-LSM chaotic system, and iterate L... a and L b Next, the first set of current state variable values obtained by iterating the first set of keys. and The second set of current state variable values obtained by iterating through the second set of keys. and
[0066] S113, For the first set of state variable values and After quantization, they are sequentially placed into a one-dimensional chaotic order. and In the expression, the mathematical expressions for a(i) and b(i) are as follows:
[0067]
[0068] Where mod(g) is the modulo operation, fix(g) is the function to round to the nearest zero, and i = 1, 2, 3, K, 4L.
[0069] For the second group of current state variable values and And and Convert to and The chaotic sequence is obtained after quantization and reconstruction into a two-dimensional matrix. and The mathematical expressions for x(i,j) and y(i,j) are as follows:
[0070]
[0071] Where mod(g) is the modulo operation, fix(g) is the function to round to the nearest zero, i = 1, 2, 3, K, M; j = 1, 2, 3, K, N.
[0072] S2. Unfold the image into a one-dimensional array using raster scanning, and denote the one-dimensional array as... Where p1 represents the first pixel, and so on.
[0073] S3. Perform dynamic DAN encoding on the image to convert the one-dimensional array into a DNA matrix.
[0074] The DNA sequence is composed of four different basic deoxyribonucleotides: A, T, C, and G. Complementarity exists only between A and T, and between G and C. Furthermore, each pixel in the image can be represented by 8 bits, resulting in four binary pairs. These binary value pairs also include complementary pairs; for example, 00 and 11, and 01 and 10 are complementary. These numerical pairs (00, 01, 10, and 11) can be encoded by the DNA bases A, T, C, and G. Since this encoding principle must satisfy the condition that A and T are complementary and G and C are complementary, there are eight possible combinations based on different assignments, as shown in Table 1.
[0075] Table 1. Eight DNA coding rules
[0076] 1 2 3 4 5 6 7 8 00-A 00-A 00-C 00-C 00-G 00-G 00-T 00-T 01-C 01-G 01-A 01-T 01-A 01-T 01-C 01-G 10-G 10-C 10-T 10-A 10-T 10-A 10-G 10-C 11-T 11-T 11-G 11-G 11-C 11-C 11-A 11-A
[0077] For grayscale images, each grayscale value can be represented by an 8-bit binary number.
[0078] Specifically, each pixel in the one-dimensional array P is divided into four two-bit pairs, denoted as... Each pair of bits is dynamically selected based on the chaotic sequence generated by the 2D-LSM chaotic system;
[0079] According to the chaotic sequence value pairs Each two-bit pair is dynamically selected from one of eight rule-based DNA encoding methods to transform the digital matrix into a DNA matrix.
[0080] like Figure 2 As shown, S4, dynamically permutate the DNA matrix to obtain the permutation image.
[0081] Specifically, S41, through expression R S =mod(i(1,1)+i(1,4N)+i(M,1)+i(M,4N),4) calculate R S The value of is given in the formula, where the DNA symbol is assigned the values "A=00, G=01, C=10, T=11" for addition operation, and mod(g) is the modulo operation.
[0082] According to the R S The value of {0, 1, 2, 3} is used to dynamically select the value. Figure 2 The permutation rules performed on the DNA matrix are shown in figures a, b, c, and d.
[0083] Let the permuted image be denoted as
[0084] S5. Perform DNA decoding on the permutation image to obtain the DNA decoding matrix.
[0085] The scrambled image S is arranged according to the raster scan sequence. The corresponding values are used to select dynamic DNA decoding rules, merging four symbols into one pixel, and reshaping the structure into an M-row, N-column DNA decoding matrix.
[0086] S6. Perform dynamic diffusion encryption on the DNA decoding matrix to obtain an encrypted image.
[0087] Specifically, S61, according to the formula Calculate the diffusion rule R corresponding to different pixel positions. D = r(i,j) (i = 0, 1, 2, K, M; j = 0, 1, 2, K, N) values, such as Figure 3 The diffusion rule diagram is shown below;
[0088] S62, according to The value dynamically selects the diffusion rule to be executed at that position.
[0089]
[0090] in, And it is an integer. S7. Repeat steps S2-S7 to encrypt the encrypted image as the initial image. The number of encryption rounds N can be set by the encryptor. Multiple rounds of encryption further improve the encryption effect.
[0091] The decryption algorithm is the reverse process of the encryption algorithm; decryption can be completed by reversing the above steps.
[0092] Test example:
[0093] A 256×256 Lena grayscale image was used, and the first set of initial keys for the 2D-LSM chaotic system was set to {h1(0)=0.2333,w2(0)=0.25,α1=3,β1=4} to generate a one-dimensional chaotic sequence. and A second set of initial keys {h2(0)=0.28,w2(0)=0.289,α2=4,β2=3} is set to generate a two-dimensional chaotic sequence. and
[0094] Original image as Figure 4 (a) An encrypted image obtained using the present invention, such as Figure 4 As shown in (b), the reverse process of the present invention is used to... Figure 4 (b) Decrypted image as Figure 4 As shown in (c).
[0095] (1) Histogram differentiation
[0096] An image histogram is a statistical representation of the frequency of each gray level in an image. The histogram shows the distribution of gray levels; a more uniformly distributed histogram indicates better resistance to statistical attacks. Figure 5 The image shows Lena's plaintext and its histogram, as well as the ciphertext and its corresponding histogram. It can be seen that the grayscale distribution of the original image has multiple peaks and valleys, but the grayscale distribution is very uniform in the encrypted grayscale image.
[0097] (2) Correlation between adjacent pixels
[0098] Since adjacent pixels in a normal image are highly correlated in the horizontal, vertical, and diagonal directions, it is generally expected that adjacent pixels will have similar values. Only when the correlation coefficients of pixels in an encrypted image along the horizontal, vertical, and diagonal directions are low enough can it resist statistical attacks.
[0099] 8. The formulas for calculating the correlation coefficients in the horizontal, vertical, and diagonal directions are as follows:
[0100]
[0101]
[0102]
[0103]
[0104] Where u and v are the gray values of two adjacent pixels, and N = 2000 pairs is the total number of pixels selected from the image.
[0105] like Figure 6 As shown, Lena's plaintext and ciphertext correspond to adjacent pixel pairs in the horizontal, vertical, and diagonal directions. The plaintext pixels are mainly distributed in the diagonally adjacent areas, indicating a high correlation in the horizontal, vertical, and diagonal directions. The ciphertext, however, is different. Figure 6 It can be seen that the pixels of the ciphertext are randomly distributed in the phase plane, indicating that their correlation is not high. Table 2 shows the correlation comparison between adjacent pixels.
[0106] Table 2
[0107] Clear image Encrypted image Horizontal 0.9428 0.0016 Vertical 0.9143 -0.0034 Diagonal 0.9027 -0.0032
[0108] (3) Differential attack test
[0109] Differential attacks are a common security attack model. The principle is to select two plaintexts that are relatively different, encrypt them, and compare their ciphertexts. Attackers can also establish useful connections between the plaintext and ciphertext.
[0110] Therefore, Non-Positive Pixel Change Rate (NPCR) and Uniform Average Change Intensity (UACI) were proposed to better measure the quality of "diffusion" and "avalanche effect" characteristics in an encryption algorithm and to quantitatively calculate its resistance to differential attacks. The calculation formulas are as follows:
[0111]
[0112]
[0113] Two images of the same size are denoted as and The image size is W×H, and Sign(g) is the sign function. The theoretical value for NPCR is 99.609, and the theoretical value for UACI is 33.46. In this method, the calculated NPCR is 99.63 and the UACI is 33.49, which can be verified by NPCR and UACI tests.
[0114] (4) Information Entropy Analysis
[0115] Information entropy is an important indicator reflecting the random characteristics of image information. Generally, a higher information entropy value indicates greater uncertainty (greater information content) and less visible information in the image. It is used to measure the distribution of image pixels. The calculation formula is as follows:
[0116]
[0117] Where L is the number of gray levels in the image, and p(i) represents the probability of gray value i appearing.
[0118] For a grayscale random image, the theoretical value of the information entropy H is 8, while the information entropy value of the Lena image obtained through this method is 7.9993.
[0119] (5) Local information entropy analysis
[0120] Local information entropy measures the randomness of an image by calculating the mean of the information entropy samples across several non-overlapping and randomly selected image patches, thus overcoming some known shortcomings of global information entropy. Local information entropy is an important indicator reflecting the random characteristics of image information in local regions. Generally, the confidence interval for local information entropy is considered to be [7.9019014, 7.9030373]. Within this interval, it indicates good local information entropy and strong random characteristics in the local region. The calculation process is as follows:
[0121]
[0122] Among them, within the test image S with L gray levels, images with T are randomly selected. B Non-overlapping image blocks S1, S2, K, S of pixels t Here, (t,T) B Local information entropy The index was used to describe the entire test graph S. We tested at t=30, T B The value is 1936, so that all L scales for each pixel can be processed. The test value is considered to be within the confidence interval, indicating that the test has passed. The local information entropy value of Lena tested by this method is 7.9021367, which means that the test has passed.
[0123] (6) Key sensitivity test
[0124] Key sensitivity is a fundamental principle in the design of encryption systems. This property ensures that when the same plaintext is encrypted using any two keys with very small differences, completely different ciphertexts will be produced. Conversely, when an attacker attempts to decrypt the plaintext using a decryption key that is very similar to the encryption key, they will not obtain any information related to the plaintext.
[0125] In this test phase, the key with a slight change was modified to β1 = 4 + 10. -15 .
[0126] During the encryption process, the Lena image is encrypted using both the original key and a slightly modified key. The original Lena image is shown below. Figure 7 As shown in (a), the original key encryption diagram is as follows: Figure 7 (b) The key encryption graph with slight changes is as follows: Figure 7 (c) The differences between the two encrypted graphs are as follows: Figure 7 As shown in (d), it is clear that images encrypted with slightly different keys show significant differences.
[0127] During the decryption process, the same ciphertext image is decrypted using both the correct key and a slightly modified key. The Lena image is encrypted using the same original encryption key, and then decrypted using both the original key and a slightly modified key. The encrypted original image is... Figure 8 (a) The image encrypted with the original key is Figure 8 (b) The image after decryption of the slightly modified decryption key is: Figure 8 (c) The image decrypted using the original decryption key is Figure 8 (d)
[0128] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A chaotic image encryption method based on global dynamic selection, characterized in that, Includes the following steps: S1. The chaotic sequence used in the cost encryption method is generated using a 2D-LSM chaotic system; S2. Unfold the image into a one-dimensional array using raster scanning; S3. Perform dynamic DAN encoding on the image to convert the one-dimensional array into a DNA matrix; S4. Dynamically permutate the DNA matrix to obtain a permutation image; S5. Perform DNA decoding on the permutation image to obtain a DNA decoding matrix; S6. Perform dynamic diffusion encryption on the DNA decoding matrix to obtain an encrypted image; S7. Repeat steps S2-S7 to encrypt the encrypted image again, using the encrypted image as the initial image. Let the one-dimensional array in step S2 be denoted as ; Step S3 specifically involves: The one-dimensional array Each pixel in the image is divided into four two-bit pairs, denoted as... Each pair of bits is dynamically selected based on the chaotic sequence generated by the 2D-LSM chaotic system; According to the chaotic sequence value pairs Each two-bit pair is dynamically selected from one of eight regular DNA encoding methods, reconstructing the digital sequence into a DNA matrix. ;in, This indicates that the total number of elements in the chaotic sequence after restating the bit pairs is ; Step S4 includes the following steps: S41, through formula calculate The values are calculated in the formula, where the DNA symbols are assigned values according to "A=00, G=01, C=10, T=11" for addition operations. For mold taking operation; according to The value is used to dynamically select the permutation rule to be performed on the DNA matrix; Let the permuted image be denoted as ; Step S5 specifically involves: Scrambled image According to the sequence of raster scans The corresponding values are used to select dynamic DNA decoding rules, merging four symbols into one pixel, and reshaping the structure into an M-row, N-column DNA decoding matrix. ; Step S6 includes the following steps: S61, According to the formula Calculate the diffusion rules corresponding to different pixel positions The value of , where, , ; S62, according to the above The value dynamically selects the diffusion rule to be executed at that position. ; in, , And it is an integer.
2. The chaotic image encryption method based on global dynamic selection according to claim 1, characterized in that, Step S1 includes the following steps: S11, the generation length is respectively and A pseudo-random sequence; in, for The total number of pixels in an image of this size.
3. The chaotic image encryption method based on global dynamic selection according to claim 2, characterized in that, Step S11 includes the following steps: S111, Pre-iteration of the 2D-LSM chaotic system To prevent transient effects, the iterative expression is: ; in, and These are the state parameters and control parameters of the 2D-LSM chaotic system, respectively. and Representing the The next iteration, initial value As the first set of keys, the initial value As a second key, it is set by the encryptor; S112. Substitute the first set and the second set of keys into the 2D-LSM chaotic system and iterate respectively. and Next, the first set of current state variable values obtained by iterating the first set of keys. and The second set of current state variable values obtained by iterating through the second set of keys. and ; S113. For the first group of current state variable values and Quantization is performed to obtain an integer chaotic sequence. and , and The mathematical expression is as follows: ; in, For mold taking operation, The function rounds to the nearest zero. ; For the second group of current state variable values and Quantify and and Convert to and The chaotic sequence is obtained by quantization and reconstruction into a two-dimensional matrix. and , and The mathematical expression is as follows: ; in, For mold taking operation, The function rounds to the nearest zero. .
Citation Information
Patent Citations
Image encryption method based on chaotic mapping and bit-level replacement
CN112084517A
Image encryption method based on chaotic sequence and DNA coding
CN113225449A