Fast color image encryption method based on four-dimensional discrete hyperchaotic system
The chaotic sequence is generated through a four-dimensional discrete superchaotic system, and the color images are encrypted by combining compression perception technology and wavelet packet transformation, solving the inefficiency problems caused by random attenuation and large data volume in traditional algorithms, and achieving high security and high efficiency image encryption.
Patent Information
- Application Number
- CN202510218212.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-30
AI Technical Summary
When the traditional image encryption algorithm based on continuous chaotic systems is implemented in computers, the random attenuation of the chaotic sequence leads to a reduction in encryption security; at the same time, the amount of color image data is large and the direct encryption efficiency is low.
A four-dimensional discrete superchaotic system is used to generate chaotic sequences, and the image is compressed and main information extracted by combining compression perception technology and two-dimensional discrete wavelet packet transformation. Multi-level chaos and diffusion operations are performed through the random matrix generated by the chaotic sequence.
It effectively avoids the random attenuation of chaotic sequences and improves the security of ciphertext images; by compressing and extracting main information, the amount of data processed by the encryption algorithm is reduced and the execution efficiency is improved.
Smart Images

Figure CN120075370A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image encryption, and particularly relates to a fast color image encryption method based on a four-dimensional discrete hyperchaotic system. Background Art
[0002] In the information age, a huge amount of data is generated every day, and these data are usually stored and transmitted in media such as text and images. Among them, images are widely used in various fields because of their intuitive and vivid expression methods, which can convey emotions, concepts, and information. For example, common applications such as sharing images on social media, using images in medical diagnosis, the key role of images in security monitoring systems, and the attractiveness of images in commercial advertisements all highlight the importance of images. However, since images often contain personal privacy, business secrets, and key information, the security of images has become particularly important. This has enabled scholars in the field of information security to gradually recognize the importance of images in information transmission and decision-making, as well as the urgent need to protect these image data.
[0003] As a class of dynamic systems with highly nonlinear, initial value sensitivity, spatial ergodicity, and non-periodicity characteristics, the inherent chaos and pseudo-randomness of hyperchaotic systems endow them with the ability to generate complex and unpredictable sequences, which is particularly crucial for the generation of keys in the encryption process. However, chaotic systems are not absolutely secure and may still be threatened by specific attack algorithms. Therefore, when designing and applying chaotic systems for image encryption, other encryption technologies still need to be integrated to enhance security. For example, one-dimensional chaotic systems have advantages such as simple structure and small computational complexity, so they are favored by cryptographers. However, due to the simple motion characteristics of one-dimensional chaotic maps, their key space is relatively small, the fault tolerance is limited, and there is a lack of unified theory and analysis support. In contrast, high-dimensional chaotic systems have complex chaotic behaviors and unpredictable trajectories, providing more potential resources for improving the security of image encryption. With the continuous improvement of computer capabilities, the previously proposed low-dimensional chaotic systems have been difficult to meet the current cryptographic requirements, and the security of low-dimensional chaotic systems has been continuously decreasing. Therefore, when designing and applying chaotic systems for image encryption, other encryption technologies still need to be integrated to enhance security. Summary of the Invention
[0004] Aiming at the deficiencies of the above-mentioned prior art, the present invention provides a fast color image encryption method based on a four-dimensional discrete hyperchaotic system. By generating a chaotic sequence with randomness through the four-dimensional discrete hyperchaotic system, the compression sensing technology and two-dimensional discrete wavelet packet transform are used to compress the image and extract the main information, and based on the random matrix generated by the chaotic sequence, multi-level scrambling and diffusion operations are performed on the extracted image information, so as to show a relatively high operating efficiency externally while ensuring the security of the ciphertext image.
[0005] To solve the above technical problems, the present invention adopts the following technical solutions:
[0006] A fast color image encryption method based on a four-dimensional discrete hyperchaotic system, comprising the following steps:
[0007] S1. Cover a plaintext image P with a binary image of the same size as the plaintext image P with a pixel width × height of M×N, and arrange the covered pixels into a pixel sequence q 1 ;
[0008] S2. Calculate the pixel sequence q 1 using the SHA-256 hash function to obtain a hash value H of a hexadecimal sequence 1 ;
[0009] S3. Concatenate the external random string H 2 and the hash value H 1 to obtain a hexadecimal sequence K, and convert it into a decimal sequence K′. Use the decimal sequence K′ to perturb the initial condition parameters x 0 , y 0 , z 0 , w 0 of the four-dimensional discrete hyperchaotic system to obtain perturbed initial condition parameters x′ 0 , y′ 0 , z′ 0 , w′ 0 ;
[0010] S4. Substitute the perturbed initial condition parameters x′ 0 , y′ 0 , z′ 0 , w′ 0 into the four-dimensional discrete hyperchaotic system for iteration times to obtain four chaotic sequences s 1 , s 2 , s 3 and s 4 ; where CR represents the compression ratio, represents the floor function;
[0011] S5. Process the plaintext image P using compressive sensing technology to obtain a compressed pixel matrix P 2 ; Perform two-dimensional discrete wavelet packet decomposition on the compressed pixel matrix P 2 using Haar wavelets, and take the signal component P 3 at the first position as the pixel matrix to be encrypted;
[0012] S6. The four chaotic sequences s 1 , s 2 , s3 and s 4 are respectively rearranged into the matrix form of 1 to obtain four chaotic matrices m 2 , m 3 and m 4 ;
[0013] S7. Respectively sort the chaotic matrices m 2 and m 4 to obtain the corresponding position indexes, and respectively scramble the chaotic matrices m 1 and m 3 according to the position indexes of the chaotic matrices m 2 and m 4 to respectively obtain the matrices M 1 and M 2 ; Use M 2 to scramble M 1 to obtain the matrix M 3 ; Use the matrix M 3 to scramble the pixel matrix P 3 to obtain the pixel matrix P 4 ;
[0014] S8. Derive the pulse sequence 2 from the chaotic sequence s Derive the pulse sequence 3 and s 4 from the chaotic sequence s to obtain the corresponding action point coordinates (r, c), and diffuse the pixel matrix P according to each pulse sequence 4 and its corresponding action point coordinates to obtain the final ciphertext image C.
[0015] Preferably, in step S3, the specific method of using the decimal sequence K′ to perturb the initial condition parameters x 0 , y 0 , z 0 , w 0 of the four-dimensional discrete hyperchaotic system to obtain the perturbed initial condition parameters x′ 0 , y′ 0 , z′ 0 , w′ 0 is as follows:
[0016]
[0017] where k i represents the i-th element in the sequence K′, i = 1, 2,..., 64, mod represents the modulo function, represents the exclusive OR operation.
[0018] Preferably, in step S4, the iterative expression of the four-dimensional discrete hyperchaotic system is as follows:
[0019]
[0020] In the formula, x′ n , y′ n , z′ n , w′ n all represent the state variables of the nth iteration, and x′ n+1 , y′ n+1 , z′ n+1 , w′ n+1 all represent the state variables of the (n + 1)th iteration.
[0021] Preferably, in step S4, the perturbed initial condition parameters x′ 0 , y′ 0 , z′ 0 , w′ 0 are substituted into the four-dimensional discrete hyperchaotic system iteration times to obtain four chaotic sequences: s 1 = {x′ 1 , x′ 2 ,..., x′ L}, s 2 = {y′ 1 , y′ 2 ,..., y′ L}, s 3 = {z′ 0 , z′ 2 ,..., z′ L}, s 4 = {w′ 1 , w′ 2 ,..., w′ L},
[0022] Preferably, in step S5, the process of processing the plaintext image P using compressive sensing technology to obtain the compressed pixel matrix P 2 is as follows:
[0023] S501. Use a partial Hadamard matrix H with a preset size of M as the measurement matrix, and randomly sample the plaintext image P through matrix multiplication to obtain the pixel matrix P 1 :
[0024] P 1 = H M ×P;
[0025] S502. Normalize the pixel matrix P 1 by the following formula to obtain the compressed pixel matrix P 2 :
[0026]
[0027] Preferably, in step S6, the method of rearranging the four chaotic sequences s 1 , s 2 , s 3 and s 4 into the matrix form of to obtain four chaotic matrices m 1 , m 2 , m 3 and m 4 is as follows: For each chaotic sequence s 1 , s 2 , s 3 and s 4 , starting from the first element of the chaotic sequence, select elements in sequence and fill them into the corresponding rows of the chaotic matrix one by one. Repeat the above process until the matrix size is completely filled to form a chaotic matrix of , and obtain the chaotic matrices m 1 , m 2 , m 3 and m 4 .
[0028] Preferably, in step S7, the specific process of scrambling includes:
[0029] S701. Sort the element values in each row of the matrix participating in scrambling in ascending order from small to large, and record the original positions of the sorted elements to form an index matrix I;
[0030] S702. Use the number of rows of the index matrix I as the abscissa, group the index matrix I by columns, and set the elements contained in each column as the ordinate to form a coordinate sequence;
[0031] S703. According to the coordinates in the coordinate sequence, group the matrix to be scrambled and perform a counterclockwise cyclic shift operation, and the shift bits are related to the ordinate positions of the group;
[0032] S704. Fill the cyclically shifted groups of sequences into a new matrix column by column to complete the scrambling.
[0033] Preferably, in step S8, the pulse sequence 2 derived from the chaotic sequence s is as follows:
[0034]
[0035] In the formula, round represents the rounding function;
[0036] Preferably, in step S8, the pulse sequence 3 and s 4 derived corresponding action point coordinates (r, c) are as follows: Corresponding action point coordinates (r, c) are as follows:
[0037]
[0038] In the formula, r represents the abscissa of the action point of a certain pulse in P 4 and c is the ordinate of this action point.
[0039] Preferably, in step S8, the process of diffusing the pixel matrix P according to each pulse sequence 4 and its corresponding action point coordinates to obtain the ciphertext image C specifically includes:
[0040] S801. Perform bitwise XOR operation on the action point coordinates and their surrounding elements through the following expression:
[0041]
[0042] In the formula, (m, n) represents the coordinates of the surrounding elements of the action point;
[0043] S802. Expand the pixel matrix P 4 by the method of padding with 0s, and perform diffusion operation on the expanded pixel matrix P 4 to obtain the diffused image C, which is the final ciphertext image.
[0044] Compared with the prior art, the present invention has the following technical effects:
[0045] (1) When the traditional image encryption algorithm based on continuous chaotic systems is implemented on a computer, due to discretization processing, the randomness of the chaotic sequence will decay, thereby reducing the security of encryption. The present invention uses a high-dimensional discretized chaotic system to replace the continuous chaotic coefficient in the traditional chaotic-based image encryption algorithm, and uses a four-dimensional discrete hyperchaotic system to generate a chaotic sequence, effectively avoiding the problem of randomness decay existing in solving the chaotic system in a computer. At the same time, the chaotic sequence generated by this system has extremely strong randomness, thereby improving the security of the ciphertext image.
[0046] (2) In view of the wide application range of color images but the larger amount of data they contain, before encryption, the present invention performs compressive sensing processing on the plaintext image, randomly samples the image using a partial Hadamard matrix to reduce the amount of data, and further extracts the main information of the image through two-dimensional discrete wavelet packet transform decomposition, greatly reducing the amount of data that the encryption algorithm needs to process and improving the execution efficiency of the algorithm.
[0047] (3) Based on the random matrix generated by the chaotic sequence, the present invention performs multi-level scrambling operations on the image using the random matrix generated by the chaotic sequence, significantly enhancing the security and strength of image encryption; in addition, the present invention also introduces a diffusion operation based on the phenomenon of water droplet dripping, which spreads the effect of each "pulse" to the surrounding pixels, further increasing the correlation between image data. Such a diffusion effect makes it more difficult for attackers to recover the original image by analyzing local information, thus greatly improving the security of the encrypted image. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to make the objectives, technical solutions, and advantages of the invention clearer, the present invention will be further described in detail below in conjunction with the drawings, where:
[0049] Figure 1 is a schematic diagram of the fast color image encryption and decryption process based on a four-dimensional discrete hyperchaotic system disclosed by the present invention;
[0050] Figure 2 is a schematic diagram of the color Pepper image of this embodiment and its three color channel components;
[0051] Figure 3 is a complex Chinese character image used for simulation experiments in this embodiment, and they are also binary images;
[0052] Figure 4 is a phase diagram of the four-dimensional discrete hyperchaotic system in this embodiment when the initial condition parameters are (0.7, 0.7, 0.7, 0.7);
[0053] Figure 5 is a schematic diagram of the second-order discrete wavelet packet decomposition of the grayscale Pepper image using Haar wavelets in this embodiment;
[0054] Figure 6 is the plaintext image with a size of 512×512 used in the simulation experiment;
[0055] Figure 7 is Figure 6 the ciphertext images corresponding to the respective plaintext images in when the compression ratio CR = 0.5;
[0056] Figure 8 is Figure 7 the decrypted images corresponding to the respective ciphertext images in;
[0057] Figure 9 For Figure 6 、 7 、the histograms of the sub - figures in 8;
[0058] Figure 10 For Figure 6 、 7 、the correlation diagrams of the sub - figures in 8. Specific embodiments
[0059] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Components of the embodiments of the present invention described and illustrated herein usually can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0060] The present invention will be further described in detail below with reference to the accompanying drawings.
[0061] In the information age, the storage and transmission of image data are very extensive. However, images often contain important information such as personal privacy and business secrets. Therefore, the security of images has become particularly important. However, traditional image encryption algorithms have the following problems: Randomness attenuation: When traditional image encryption algorithms based on continuous chaotic systems are implemented on a computer, due to discretization processing, the randomness of the chaotic sequence will decay, thus reducing the security of encryption; Large data volume: Color image data volume is large. Encrypting the entire image directly will lead to low algorithm operation efficiency and it is difficult to meet the fast - processing requirements in practical applications; Limited encryption effect: In the scrambling and diffusion processes of existing encryption algorithms, it may not be able to fully disrupt the pixel distribution of the image and the correlation of adjacent pixels, resulting in insufficient security of the ciphertext image.
[0062] In view of the above - mentioned problems and deficiencies, based on the classic scrambling - diffusion structure, by introducing a four - dimensional discrete hyper - chaotic system, the present invention proposes a fast color image encryption method based on a four - dimensional discrete hyper - chaotic system, as Figure 1 shown, Figure 1The encryption and decryption processes of this method are shown as follows: In the chaotic sequence generation stage, the perturbed initial condition parameters are substituted into the four-dimensional discrete hyperchaotic system and iterated for a preset number of times to obtain four chaotic sequences of the same length that have a strong correlation with the plaintext image; before encryption, compressive sensing and two-dimensional discrete wavelet packet operations are successively used to extract the main information of the compressed plaintext image; in the encryption stage of the algorithm, coordinate mapping operation and diffusion operation based on the phenomenon of water droplet dripping are respectively introduced into the scrambling and diffusion processes of the algorithm, achieving the purpose of disturbing the information of the plaintext image and protecting the information from being leaked.
[0063] When specifically applying this embodiment, taking the color image Pepper with a size of 512×512 as an example, its corresponding 3 color channels are as Figure 2 shown. Assuming that its R channel is stored in the computer as the plaintext image P. The following details the operation process of the fast color image encryption method based on the four-dimensional discrete hyperchaotic system proposed by the present invention.
[0064] 1. Generate chaotic sequences associated with the plaintext image
[0065] In this embodiment, first, a binary image as shown in Figure 3 (including complex traditional Chinese characters, also stored in the computer in matrix form) is used to cover the plaintext image P of M×N, and the covered pixels are arranged as a pixel sequence q 1 ; specifically, it includes: corresponding the plaintext image with the complex Chinese character image (binary image) of the same size according to the coordinates of the pixels they contain. When the pixel at (x, y) in the complex Chinese character image is 1, the pixel at (x, y) in the plaintext image is taken and put into the sequence q 1 , and the length of q 1 is equal to the number of pixels 1 in the complex Chinese character image.
[0066] Then, without any processing on q 1 , the SHA-256 hash function is used to calculate the pixel sequence q 1 , and the hash value H of a 64-bit and unique hexadecimal sequence can be obtained 1 ;
[0067] After that, a 128-bit hexadecimal sequence K is obtained by splicing the external 64-bit random string H 2 and the hash value H 1 . It is converted into a decimal sequence K′, and the initial condition parameters x 0 , y 0 , z 0 , w 0Perform perturbation to obtain the perturbed initial condition parameters \(x'\) 0 , \(y'\) 0 , \(z'\) 0 , \(w'\) 0 ;
[0068]
[0069] Where \(k\) i represents the \(i\)-th element in the sequence \(K'\), \(i = 1, 2, \cdots, 64\), and \(\bmod\) represents the modulo function, represents the exclusive OR operation.
[0070] Finally, substitute the perturbed initial condition parameters \(x'\) 0 , \(y'\) 0 , \(z'\) 0 , \(w'\) 0 into the four-dimensional discrete hyperchaotic system for iterations to obtain four chaotic sequences \(s\) 1 , \(s\) 2 , \(s\) 3 and \(s\) 4 . Among them, the iterative expression of the four-dimensional discrete hyperchaotic system is:
[0071]
[0072] Where \(x'\) n , \(y'\) n , \(z'\) n , \(w'\) n all represent the state variables at the \(n\)-th iteration, and \(x'\) n+1 , \(y'\) n+1 , \(z'\) n+1 , \(w'\) n+1 all represent the state variables at the \((n + 1)\)-th iteration.
[0073] In this embodiment, a four-dimensional discrete hyperchaotic system is used to generate chaotic sequences, effectively avoiding the problem of randomness decay when solving chaotic systems in a computer. At the same time, the chaotic sequences generated by this system have extremely strong randomness, thus improving the security of the encrypted image.
[0074] Figure 4 Fig. shows the phase diagram of the system when the initial condition parameters are \((0.7, 0.7, 0.7, 0.7)\). In addition, to prove that the chaotic sequences generated by this system have extremely strong randomness, Table 1 shows the results of the NIST SP800-20 randomness test for \(s\) 1 and \(s\) 3 .
[0075] Table 1 \(s\) 1 and \(s\) 3NIST SP800-22 Randomness Test Results
[0076]
[0077] Note: * 1st : 0.6476, 0.6476;
[0078] * 2nd : 0.9350, 0.2070, 0.4501, 0.6728, 0.9195, 0.4355, 0.2109, 0.0808;
[0079] * 3rd : 0.4087, 0.7261, 0.7127, 0.6571, 0.5129, 0.4850, 0.5788, 0.3093, 0.2040, 0.5254, 0.8676, 0.4938, 0.3481, 0.3918, 0.4808, 0.8414, 0.8756, 0.7580;
[0080] * 4th : 0.9925, 0.4674;
[0081] * 5th : 0.0655, 0.3534, 0.7459, 0.6209, 0.8893, 0.3671, 0.7041, 0.7123;
[0082] * 6th : 0.8806, 0.7693, 0.6955, 0.8600, 0.8996, 0.8862, 0.7936, 0.7057, 0.6796, 0.7567, 0.9208, 0.6442, 0.6963, 0.9543, 0.7793, 0.5863, 0.7089, 0.8412.
[0083] In Table 1, "Cumulative Sum Test", "Random Walk Test", and "Random Walk Variant Test" contain 2, 8, and 18 results respectively (see the note in Table 1), and only when the p-value is greater than 0.1 can it be considered that the sequence passes this test. The results in Table 1 show that s 1 and s 3 pass all the test items, indicating that the chaotic sequence generated by this four-dimensional discrete hyperchaotic system has extremely strong randomness and is suitable for image encryption.
[0084] 2. Compress the plaintext image and extract the main information
[0085] In this embodiment, the plaintext image P is processed using compressive sensing technology to obtain the compressed pixel matrix P2 ; The compressed pixel matrix P is decomposed by two-dimensional discrete wavelet packet transform using Haar wavelets, and the first signal component P 2 is taken as the pixel matrix to be encrypted. 3 Specifically, in order to effectively compress the data in P, assuming that the compression ratio of the compressed image compared to P is CR (CR ∈ (0, 1]), a partial Hadamard matrix H
[0086] with a preset size is used as the measurement matrix, and the plaintext image P is randomly sampled by matrix multiplication to obtain the pixel matrix P : M P 1 = H
[0087] × P; 1 At this time, the size of P M is
[0088] This compression not only reduces the amount of data, but also, due to the orthogonality and randomness of the Hadamard matrix, can provide good encryption effects in subsequent encryption processes while maintaining the main features of the image. 1 However, since the value range of the elements in P
[0089] is relatively large and cannot be directly used for pixel-level operations, P
[0090] is normalized as follows to obtain the compressed pixel matrix P 1 : 1 where P 2 is a matrix of the same size as P
[0091]
[0092] and the value of the elements in P 2 is restricted to the interval [0, 255]. 1 Although the plaintext image P has been compressed, due to the redundancy of the information stored in the digital image, P 2 still contains a lot of unremarkable information. Therefore, considering extracting the main information in P
[0093] to further reduce the amount of data to be processed by the compression algorithm, and the extraction of the main information can be achieved by second-order discrete wavelet packet decomposition operation. 2 Fig. 2 shows the schematic diagram of the second-order discrete wavelet packet decomposition of the grayscale Pepper image when using Haar wavelets. Among them, each signal component is taken from the bottom layer nodes of the wavelet packet tree corresponding to this decomposition process. Figure 5 Fig.
[0094] FromFigure 5 It can be seen that the discrete wavelet packet decomposition can divide the time-frequency plane of the signal very finely. A general grayscale image (or a certain color channel of an RGB image) can be decomposed into 16 signal components, and the first signal component contains most of the information in the original image. Therefore, the Haar wavelet is used to decompose P 2 and take the first signal component P 3 for the subsequent encryption process. At this time, the size of P 3 is
[0095] In this embodiment, aiming at the characteristics that color images have a wide application range but contain more data, the plaintext image is subjected to compressive sensing processing before encryption. A partial Hadamard matrix is used to randomly sample the image to reduce the data volume, and further the main information of the image is extracted through two-dimensional discrete wavelet packet transform decomposition, greatly reducing the data volume that the encryption algorithm needs to process and improving the execution efficiency of the algorithm.
[0096] 3. Scrambling process
[0097] Before performing the scrambling operation on P 3 , it is necessary to convert the chaotic sequences s 1 , s 2 , s 3 , s 4 into chaotic matrices m with the size of 1 , m 2 , m 3 and m 4 . The specific method is as follows: for each chaotic sequence s 1 , s 2 , s 3 and s 4 , starting from the first element of the chaotic sequence, select elements in sequence and fill them into the corresponding rows of the chaotic matrix one by one. Repeat the above process until the matrix size is completely filled to chaotic matrix, and obtain chaotic matrices m 1 , m 2 , m 3 and m 4 respectively.
[0098] Taking the chaotic sequence s 1 as an example, divide it into groups of short sequences with a length of from left to right. Then, take these groups of sequences as the first row, the second row... (until the th row) of the chaotic matrix and fill them into the new matrix. Finally, obtain a chaotic matrix m with the size of 1 ; Similarly, from s 2 , s 3 , s 4 can also be respectively converted and derived to obtain chaotic matrices m with dimensions of 2 , m 3 and m 4 .
[0099] After obtaining 4 random chaotic matrices, sort the chaotic matrices m 2 and m 4 respectively to obtain the corresponding position indexes, and permute the chaotic matrices m 1 and m 3 respectively according to the position indexes of the chaotic matrices m 2 and m 4 to obtain matrices M 1 and M 2 . The specific process of permutation includes:
[0100] S701. Sort the element values of each row in the matrix participating in the permutation in ascending order from small to large, and record the original positions of the sorted elements to form an index matrix I;
[0101] S702. Use the number of rows of the index matrix I as the abscissa, group the index matrix I by column, and set the elements contained in each column as the ordinate to form a coordinate sequence;
[0102] S703. Group the matrix to be permuted according to the coordinates in the coordinate sequence and perform a counterclockwise cyclic shift operation, and the number of shifted bits is related to the ordinate position of this group;
[0103] S704. Fill the sequences of each group after cyclic shift into the new matrix column by column to complete the permutation.
[0104] Taking the process of permuting m 2 for m 1 as an example, first, sort the elements in each row of m 2 from left to right in ascending order according to the element values. The matrix I of the same size as m 2 records the positions (only column numbers) of each row element in the original m 2 in the original m 2 ; then, use the increasing sequence starting from 1 and with a maximum value not exceeding the number of rows of I as the abscissa, group I by each column (a total of columns), and set the elements contained in each column (a total of elements) as the ordinate. In this way, groups with a total of coordinates can be obtained; permute m 1Shuffled and randomly divided into groups (i.e., sequences of length ), and then perform a cyclic shift operation on each sequence in the counterclockwise direction. The number of shifted bits is related to the group number where the ordinate of the group is located. For example, if the coordinates of a group are derived from the first column of matrix I, then the element sequence of this group will be cyclically shifted 1 bit in the counterclockwise direction, and so on for other groups; the cyclically shifted sequences of each group are filled into the new random matrix M 1 column by column. Similarly, scrambling m 4 with m 3 can obtain the random matrix M 2 . This process ensures that the rows of the matrix are composed of elements selected from the chaotic sequence at fixed intervals, thereby introducing the randomness of the chaotic sequence in subsequent encryption steps and enhancing the security of encryption.
[0105] Similarly, using M 2 to scramble M 1 obtains a new random matrix M 3 , whose size is the same as that of P 3 , which is Finally, using M 3 to scramble P 3 obtains the scrambled matrix P 4 .
[0106] 4. Diffusion process
[0107] Before the diffusion process, it is necessary to derive the pulse sequence and coordinates for diffusion from the chaotic sequences s 2 , s 3 and s 4 ; among them, the process of deriving the pulse sequence 2 from the chaotic sequence s is as follows:
[0108]
[0109] In the formula, round represents the rounding function, contains incompletely identical pulses;
[0110] The coordinates (r, c) of the action points corresponding to the pulse sequence 3 derived from the chaotic sequences s 4 and s are obtained, where (u = 1, 2,..., ) represents the coordinates of the u-th pulse action point in P 4 , and there are pulse action points; this process is as follows:
[0111]
[0112] In the formula, r represents the abscissa of the action point of a certain pulse in P 4 and c is the ordinate of the action point.
[0113] At this time, according to each pulse sequence and its corresponding action point coordinates, the pixel matrix P 4 is diffused, specifically as follows:
[0114] The bitwise exclusive OR operation is performed on the action point coordinates and their surrounding elements through the following expression:
[0115]
[0116] In the formula, (m, n) represents the coordinates of the surrounding elements of the action point;
[0117] The rows and columns of the pixel matrix P are extended by the method of padding with 0 4 to avoid the problem of overflow caused by "pulses" at the boundaries. In addition, since different pulses are applied to the image in a certain order, the pixels in P 4 may be affected by multiple pulses successively.
[0118] The decryption process of the image is the inverse process corresponding to the encryption process, and its schematic diagram is as Figure 1 shown, so it will not be elaborated here.
[0119] This embodiment is based on a random matrix generated by a chaotic sequence. The chaotic sequence-generated random matrix is used to perform multi-level scrambling operations on the image, significantly enhancing the security and strength of image encryption; in addition, the present invention also introduces a diffusion operation based on the phenomenon of water droplet dripping. This operation diffuses the effect of each "pulse" to the surrounding pixels, further increasing the correlation between image data. Such a diffusion effect makes it more difficult for attackers to recover the original image by analyzing local information, thus greatly improving the security of the encrypted image.
[0120] 5. Embodiment
[0121] To verify the effectiveness of this embodiment and the security of the ciphertext image obtained by its encryption, a simulation experiment was carried out on an experimental platform (Windows 10 system, CPU is Intel(R) Core(TM) i7-6700HQ / 2.60GHz, running memory 16GB), and the simulation software uses MATLAB 2020a).
[0122] Without loss of generality, let the initial condition parameters of the four-dimensional discrete hyperchaotic system be (0.01, 0.02, 0.03, 0.04). At the same time, let the compression ratio CR of the compressed image compared to the original image be 0.5, and the external random string H 2 be {E419158BDD0D629DD20CE597425C265A111126E8C6A2D907181B631A89E8B5FB}. After that, six binary images of complex traditional Chinese characters are selected to extract the pixels in the plaintext image. These Chinese character images are as Figure 3 shown. At the same time, color images Lena.jpg, Pepper.jpg, Barbara.jpg, grayscale images Cameraman.jpg, All-White.jpg and All-Black.jpg with a size of 512×512 are selected as plaintext images. The simulation results are respectively as Figure 6 shown, where Figure 6 (a) is the color image Lena, Figure 6 (b) is the color image Pepper, Figure 6 (c) is the color image Barbara, Figure 6 (d) is the grayscale image Cameraman, Figure 6 (e) is the all-white image All-White, Figure 6 (f) is the all-black image All-Black. Figure 7 is Figure 6 the ciphertext images corresponding to each plaintext image in at a compression ratio CR = 0.5. Among them, Figure 7 (a) is the ciphertext image of Lena, Figure 7 (b) is the ciphertext image of Pepper, Figure 7 (c) is the ciphertext image of Barbara, Figure 7 (d) is the ciphertext image of Cameraman, Figure 7 (e) is the ciphertext image of All-White, Figure 7 (f) is the ciphertext image of All-Black. Figure 8 is Figure 7 the decrypted images corresponding to each ciphertext image in. Among them, Figure 8 (a) is Figure 7 (a) (i.e., Lena)'s decrypted image, Figure 8 (b) is Figure 7 (b) (i.e., Pepper)'s decrypted image, Figure 8 (c) is Figure 7 (c) (i.e., Barbara)'s decrypted image, Figure 8 (d) is Figure 7 (d) (i.e., Cameraman)'s decrypted image,Figure 8 (e) is Figure 7 the decrypted image of (e) (i.e., All-White), Figure 8 (f) is Figure 7 the decrypted image of (f) (i.e., All-Black). Figure 9 is Figure 6 and 7 the histograms of each subfigure in 8, where Figure 9 (a) are the histograms of the three color channels (red for the R channel, green for the G channel, and blue for the B channel, the same below) of the plaintext image of Lena, the ciphertext at a compression ratio of 0.5, and the decrypted image, corresponding to Figure 9 a(1), Figure 9 a(2) and Figure 9 a(3) respectively, Figure 9 (b) are the histograms of the three color channels (corresponding to Figure 9 b(1), Figure 9 b(2) and Figure 9 b(3) respectively) of the plaintext image of Pepper, the ciphertext at a compression ratio of 0.5, and the decrypted image, Figure 9 (c) are the histograms of the three color channels (corresponding to Figure 9 c(1), Figure 9 c(2) and Figure 9 c(3) respectively) of the plaintext image of Barbara, the ciphertext at a compression ratio of 0.5, and the decrypted image, Figure 9 (d) are the histograms of the plaintext image of Cameraman, the ciphertext at a compression ratio of 0.5, and the decrypted image (corresponding to Figure 9 d(1), Figure 9 d(2) and Figure 9 d(3) respectively), Figure 9 (e) are the histograms of the plaintext image of All-White, the ciphertext at a compression ratio of 0.5, and the decrypted image (corresponding to Figure 9 e(1), Figure 9 e(2) and Figure 9 e(3) respectively), Figure 9 (f) are the histograms of the plaintext image of All-Black, the ciphertext at a compression ratio of 0.5, and the decrypted image (corresponding to Figure 9 f(1), Figure 9 f(2) and Figure 9 f(3) respectively). Figure 10 is Figure 6 and 7 the correlation diagrams of each subfigure in 8, where Figure 10 (a) are the 3 color channels of the plaintext image of Lena and the ciphertext image at a compression ratio of 0.5 (corresponding to Figure 10 a(1)-Figure 10 a(3), Figure 10 a(4)- Figure 10 a(6)) in the horizontal direction correlation diagram, Figure 10 (b) is the 3 color channels of the plaintext image of Lena and the ciphertext image with a compression ratio of 0.5 (corresponding respectively to Figure 10 b(1)- Figure 10 b(3), Figure 10 b(4)- Figure 10 b(6)) in the vertical direction correlation diagram, Figure 10 (c) is the 3 color channels of the plaintext image of Lena and the ciphertext image with a compression ratio of 0.5 (corresponding respectively to Figure 10 c(1)- Figure 10 c(3), Figure 10 c(4)- Figure 10 c(6)) in the diagonal direction correlation diagram, Figure 10 (d) is the 3 color channels of the plaintext image of Pepper and the ciphertext image with a compression ratio of 0.5 (corresponding respectively to Figure 10 d(1)- Figure 10 d(3), Figure 10 d(4)- Figure 10 d(6)) in the horizontal direction correlation diagram, Figure 10 (e) is the 3 color channels of the plaintext image of Pepper and the ciphertext image with a compression ratio of 0.5 (corresponding respectively to Figure 10 e(1)- Figure 10 e(3), Figure 10 e(4)- Figure 10 e(6)) in the vertical direction correlation diagram, Figure 10 (f) is the 3 color channels of the plaintext image of Pepper and the ciphertext image with a compression ratio of 0.5 (corresponding respectively to Figure 10 f(1)- Figure 10 f(3), Figure 10 f(4)- Figure 10 f(6)) in the diagonal direction correlation diagram, Figure 10 (g) is the 3 color channels of the plaintext image of Barbara and the ciphertext image with a compression ratio of 0.5 (corresponding respectively to Figure 10 g(1)- Figure 10 g(3), Figure 10 g(4)- Figure 10 g(6)) in the horizontal direction correlation diagram, Figure 10 (h) is the 3 color channels of the plaintext image of Barbara and the ciphertext image with a compression ratio of 0.5 (corresponding respectively to Figure 10 h(1)- Figure 10 h(3), Figure 10 h(4)-Figure 10 The correlation diagram of h(6) in the vertical direction Figure 10 (i) The three color channels of the ciphertext image when the plaintext image is Barbara and the compression ratio is 0.5 (corresponding to Figure 10 i(1)- Figure 10 i(3), Figure 10 i(4)- Figure 10 The correlation diagram of i(6) in the diagonal direction Figure 10 (j) The correlation diagrams of the ciphertext image when the plaintext image is Cameraman and the compression ratio is 0.5 in the horizontal, vertical, and diagonal directions (corresponding to Figure 10 j(1)- Figure 10 j(3), Figure 10 j(4)- Figure 10 j(6)), Figure 10 (k) The correlation diagrams of the ciphertext image when the plaintext image is All-White and the compression ratio is 0.5 in the horizontal, vertical, and diagonal directions (corresponding to Figure 10 k(1)- Figure 10 k(3), Figure 10 k(4)- Figure 10 k(6)), Figure 10 (l) The correlation diagrams of the ciphertext image when the plaintext image is All-Black and the compression ratio is 0.5 in the horizontal, vertical, and diagonal directions (corresponding to Figure 10 l(1)- Figure 10 l(3), Figure 10 l(4)- Figure 10 l(6)).
[0123] Combined with Figures 6 - 10 the results in, it can be seen that through combination, the high-dimensional present invention can achieve compression and encryption of the input plaintext image, and it effectively disrupts information such as the pixel distribution of the plaintext image and the correlation between adjacent pixel points. At the same time, the present invention can also achieve reconstruction of the original plaintext image information during the decryption process. According to the results of the above simulation experiments, it can be proved that the present invention has good compression and encryption effects.
[0124] 6. Summary
[0125] In summary, the present invention has the following technical effects:
[0126] (1) When the traditional image encryption algorithm based on continuous chaotic systems is implemented on a computer, due to discretization processing, the randomness of the chaotic sequence will decay, thus reducing the security of encryption. The present invention replaces the continuous chaotic coefficient in the traditional chaotic-based image encryption algorithm with a high-dimensional discretized chaotic system, and uses a four-dimensional discrete hyperchaotic system to generate a chaotic sequence, effectively avoiding the problem of randomness decay that exists when solving the chaotic system in a computer. At the same time, the chaotic sequence generated by this system has extremely strong randomness, thereby improving the security of the encrypted image.
[0127] (2) In view of the wide application range of color images but the larger amount of data they contain, the present invention performs compressive sensing processing on the plaintext image before encryption, randomly samples the image using a partial Hadamard matrix to reduce the amount of data, and further extracts the main information of the image through two-dimensional discrete wavelet packet transform decomposition, greatly reducing the amount of data that the encryption algorithm needs to process and improving the execution efficiency of the algorithm.
[0128] (3) Based on the random matrix generated by the chaotic sequence, the present invention performs multi-level scrambling operations on the image using the random matrix generated by the chaotic sequence, significantly enhancing the security and strength of image encryption; in addition, the present invention also introduces a diffusion operation based on the phenomenon of water droplet dripping, which spreads the effect of each "pulse" to the surrounding pixels, further increasing the correlation between image data. Such a diffusion effect makes it more difficult for attackers to recover the original image by analyzing local information, thus greatly improving the security of the encrypted image.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit. Although the present invention has been described by referring to the preferred embodiments of the present invention, those of ordinary skill in the art should understand that various changes can be made in form and details without departing from the spirit and scope of the present invention defined by the appended claims.
Claims
1. A fast color image encryption method based on a four-dimensional discrete hyperchaotic system, characterized in that: The steps include: S1, using a binary image of the same size as the plaintext image P with a pixel width × height of M × N to cover it, and arranging the covered pixels into a pixel sequence q1; S2, using the SHA-256 hash function to calculate the pixel sequence q1, and obtain a hash value H1 of the hexadecimal sequence; S3, convert the hexadecimal sequence K obtained by concatenating the external random string H2 and the hash value H1 into a decimal sequence K′, and use the decimal sequence K′ to perturb the initial condition parameters x0, y0, z0, w0 of the four-dimensional discrete hyperchaotic system to obtain the perturbed initial condition parameters x′0, y0′, z0′, w0′; S4. Substitute the initial condition parameters x′0, y0′, z0′, w0′ after disturbance into the four-dimensional discrete hyperchaotic system iteratively. times, and four chaotic sequences s1, s2, s3 and s4 are obtained; where CR represents the compression ratio, represents the floor function; S5, the plaintext image P is processed by using compressed sensing technology to obtain a compressed pixel matrix P2; the compressed pixel matrix P2 is decomposed by two-dimensional discrete wavelet packets using Haar wavelet, and the signal component P3 located at the first position is taken as the pixel matrix to be encrypted; S6, rearrange the four chaotic sequences s1, s2, s3 and s4 into In matrix form, four chaotic matrices m1, m2, m3 and m4 are obtained; S7, sort the chaotic matrices m2 and m4 respectively and obtain the corresponding position indexes, scramble the chaotic matrices m1 and m3 according to the position indexes of the chaotic matrices m2 and m4 respectively, and obtain matrices M1 and M2 respectively; use M2 to scramble M1 to obtain matrix M3; use matrix M3 to scramble the pixel matrix P3 to be encrypted to obtain pixel matrix P4; S8, deriving pulse sequence from chaotic sequence s2 Pulse sequence derived from chaotic sequences s3 and s4 The corresponding action point coordinates (r, c), according to each pulse sequence The pixel matrix P4 is diffused with its corresponding action point coordinates to obtain the final ciphertext image C.
2. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 1 is characterized in that: In step S3, the specific method of using the decimal sequence K′ to perturb the initial condition parameters x0, y0, z0, w0 of the four-dimensional discrete hyperchaotic system to obtain the perturbed initial condition parameters x′0, y0′, z0′, w0′ is: In the formula, k i represents the i-th element in the sequence K′, i=1,2,...,64, mod represents the modulus function, Represents the exclusive-or operation.
3. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 1 is characterized in that: In step S4, the iterative expression of the four-dimensional discrete hyperchaotic system is: In the formula, x′ n , y′ n , z′ n , w′ n Both represent the state variables of the nth iteration, x′ n+1 , y′ n+1 , z′ n+1 , w′ n+1 Both represent the state variables of the n+1th iteration.
4. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 3 is characterized in that: In step S4, the perturbed initial condition parameters x′0, y′0, z′0, w′0 are substituted into the four-dimensional discrete hyperchaotic system iteration times, we get four chaotic sequences: s1 = {x′1, x′2, ..., x′ L }, s2={y′1,y′2,...,y′ L }, s3={z′0,z′2,...,z′ L }, s4={w′1,w′2,...,w′ L }, 5. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 1 is characterized in that: In step S5, the plaintext image P is processed by using the compressed sensing technology to obtain the compressed pixel matrix P2. The specific processing process is: S501, using the preset size The partial Hadamard matrix H M As the measurement matrix, the plaintext image P is randomly sampled by matrix multiplication to obtain the pixel matrix P1: P1=H M ×P; S502, normalize the pixel matrix P1 as follows to obtain a compressed pixel matrix P2:
6. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 1 is characterized in that: In step S6, the four chaotic sequences s1, s2, s3 and s4 are rearranged into The matrix form of the four chaotic matrices m1, m2, m3 and m4 is obtained by: for each chaotic sequence s1, s2, s3 and s4, starting from the first element of the chaotic sequence, select The elements are filled into the corresponding rows of the chaotic matrix in turn, and the above process is repeated until the matrix size is completely filled to The chaotic matrices of are obtained, and the chaotic matrices m1, m2, m3 and m4 are obtained respectively.
7. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 1 is characterized in that: In step S7, the specific process of scrambling includes: S701, sorting the values of the elements in each row of the matrix involved in the scrambling in ascending order from small to large, and recording the original positions of the sorted elements to form an index matrix I; S702, using the number of rows of the index matrix I as the horizontal coordinate, grouping the index matrix I by column, and setting the elements contained in each column as the vertical coordinate, thereby forming a coordinate sequence; S703, grouping the matrices to be scrambled according to the coordinates in the coordinate sequence and performing a counterclockwise circular shift operation, and the number of shift bits is related to the position of the vertical coordinate of the group; S704: Fill each group of sequences that have undergone cyclic shift into the new matrix in columns to complete the scrambling.
8. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 1 is characterized in that: In step S8, the pulse sequence is derived from the chaotic sequence s2 As shown below: In the formula, round represents the rounding function; 9. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 1 is characterized in that: In step S8, the pulse sequence is derived from the chaotic sequences s3 and s4. The corresponding action point coordinates (r, c) are as follows: In the formula, r represents the horizontal coordinate of the point of action of a certain pulse in P4, and c represents the vertical coordinate of the point of action.
10. The fast color image encryption method based on four-dimensional discrete hyperchaotic system according to claim 1, characterized in that: In step S8, the The specific process of diffusing the pixel matrix P4 with the corresponding action point coordinates to obtain the ciphertext image C includes: S801. Perform a bitwise XOR operation on the coordinates of the action point and its surrounding elements using the following expression: In the formula, (m, n) represents the coordinates of the elements around the action point; S802, expand the pixel matrix P4 by using the method of padding with 0, perform a diffusion operation on the expanded pixel matrix P4, and obtain a diffused image C, which is the final ciphertext image.
Citation Information
Cited By
Signal processing method and system of rotary laser scanning measurement system
CN121682423A