A chaotic system with adjustable Lyapunov exponent and image encryption and decryption method
Through the Lyapunov exponentially adjustable two-dimensional chaotic system, combined with parabolic and hyperbolic tangent extension mapping, pseudo-random sequences related to plaintext images are generated, which solves the shortcomings of existing image encryption algorithms in terms of complexity and anti-attackability, and realizes a high security and anti-interference image encryption method.
Patent Information
- Application Number
- CN202310262538.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-03-17
AI Technical Summary
Existing image encryption algorithms are difficult to balance in terms of complexity, anti-image attacks and anti-signal interference, and the independence of the key and plaintext makes it impossible to effectively resist selected plaintext attacks or known plaintext attacks.
The two-dimensional chaotic system with a tunable Lyapunov index is adopted to adjust the system complexity by setting control parameters to generate pseudo-random sequences related to plaintext images, and image encryption is performed using parabola and hyperbolic tangent expansion mapping, including plaintext hash function, messing and diffusion operations.
It improves the complexity and security of the encryption system, can effectively resist selected plaintext attacks and known plaintext attacks, and has high anti-interference ability during communication to ensure the clarity of image restoration.
Smart Images

Figure CN116192362B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of digital image encryption, and specifically relates to a chaotic system with adjustable Lyapunov exponent, an image encryption and decryption method implemented by using the chaotic system as a tool, and an image encryption transmission system. Background Art
[0002] Digital images have become one of the most widely circulated forms of data online. On social networks, people share personal and family images with each other. In hospitals, doctors rely on medical images for disease diagnosis. Agriculture, industry, and other sectors all rely on images for certain tasks. Images contain a wealth of important personal or collective information and are typically transmitted between specific parties. Access by unauthorized attackers can cause immeasurable damage. Encrypting images to prevent unauthorized decryption has become a hot topic of research.
[0003] Chaos-based image encryption methods overcome the limitations of traditional encryption methods. The random sequences generated by chaotic mapping as parameters vary can be used to interfere with and overwrite pixels in an image. The chaotic sequences themselves and how they are combined with image pixels determine the security and efficiency of the encryption scheme. Optimizing their combination is considered a promising research direction. The security of encryption schemes depends heavily on the performance of chaotic mapping. In addition to the high performance of chaotic systems, an efficient and secure method for interfering with pixels is essential.
[0004] One-dimensional chaotic maps have a simple structure, a discontinuous chaotic range, few control parameters, and lack of hyperchaotic behavior, resulting in weak security for encryption algorithms based on such chaotic systems. Multi-dimensional chaotic systems have more complex structures and rich dynamic characteristics. Their complexity can be reflected by positive Lyapunov exponents. However, existing multi-dimensional chaotic systems generally cannot accurately determine the value of their Lyapunov exponents. The application of many innovative and effective methods to chaotic image encryption has promoted the development of the field.
[0005] However, many chaotic image encryption schemes rely on independent keys and plaintext images, rendering them vulnerable to chosen-plaintext and known-plaintext attacks. Furthermore, many traditional high-security image encryption schemes place extremely high demands on the stability of the communication transmission process. Any frame loss or interference can affect the accurate restoration of the image. Therefore, developing a highly complex image encryption method that is both resilient to attacks and robust against interference is a pressing technical challenge for those skilled in the art. Summary of the Invention
[0006] In order to solve the problem that existing image encryption algorithms cannot achieve a balance in multiple performance aspects such as complexity, resistance to image attacks and resistance to signal interference, the present invention provides a chaotic system with adjustable Lyapunov exponent, an image encryption and decryption method implemented using the chaotic system as a tool, and an image encryption transmission system.
[0007] The present invention is achieved by adopting the following technical solutions:
[0008] A chaotic system with adjustable Lyapunov exponent is a two-dimensional chaotic system. A set of control parameters is set in the chaotic system for visually adjusting the system's Lyapunov exponent, thereby achieving free customization of the system complexity, "what you see is what you get".
[0009] The chaotic system is used to generate the required two sets of chaotic sequences X = {x1, x2, ... x n}, Y={y1,y2,…y n There are two forms of chaotic systems: parabolic expansion mapping and hyperbolic tangent expansion mapping. The mapping relationship of the parabolic expansion mapping is as follows:
[0010]
[0011] The mapping relationship of the hyperbolic tangent extension map is as follows:
[0012]
[0013] In the above formula, i is the number of iterations, x, y are the iterative output values, x i ,y i is the value obtained in the i-th iteration; mod is the modulo operation; a1, a2, and u are all system control parameters in the parabolic expansion mapping, and a1 and a2 can be used to quantitatively adjust the Lyapunov exponents of the system; a′1, a′2, and u′ are all system control parameters in the hyperbolic tangent expansion mapping, and a′1 and a′2 can be used to quantitatively adjust the Lyapunov exponents of the system.
[0014] As a further improvement of the present invention, in the parabolic expansion mapping, the values of the control parameters a1 and a2 are the values of the two Lyapunov exponents of the system; when any one of the control parameters a1 and a2 is greater than zero, the chaotic system is in a chaotic state; when both the control parameters a1 and a2 are greater than zero, the chaotic system is in a hyperchaotic state.
[0015] In the hyperbolic tangent expansion mapping, the values of the control parameters a′1 and a′2 are the values of the two Lyapunov exponents of the system; when either of the control parameters a′1 and a′2 is greater than zero, the chaotic system is in a chaotic state; when both the control parameters a′1 and a′2 are greater than zero, the chaotic system is in a hyperchaotic state.
[0016] As a further improvement of the present invention, the design method of the chaotic system is as follows:
[0017] (1) Obtain the following classic one-dimensional logistic mapping:
[0018] x i+1 =ux i (1-x i )
[0019] Among them, u is the control parameter; i is the number of iterations; x is the iterative output value; x i is the value obtained in the i-th iteration; when u∈[3.57,4], the mapping is in a chaotic state.
[0020] (2) By performing dimension increase, logical transformation, coefficient adjustment, and modulo operation on the one-dimensional logistic map, the following two-dimensional parabolic expansion map is obtained:
[0021]
[0022] In the above formula, i is the number of iterations, x, y are the iterative output values, x i ,y i is the value obtained in the i-th iteration; mod is the modulo operation; a1, a2 and u are a set of adjustable system control parameters.
[0023] (3) Replace 1-y in the previous step i Replaced by 1-tanhy i , we get the following two-dimensional hyperbolic tangent extension map:
[0024]
[0025] In the above formula, a′1, a′2 and u′ are a set of adjustable system control parameters.
[0026] The present invention also includes an image encryption method, which uses the aforementioned chaotic system with adjustable Lyapunov exponent as an encryption tool to generate a ciphertext image E with the same size as the original plaintext image A. The image encryption method includes the following steps:
[0027] S1: Transform the parabolic expansion map into the following plaintext hash function, and use it as the required first-level chaotic system:
[0028]
[0029] S2: Calculate the pixel average value o1, information entropy o2, and total pixel value o3 of the plaintext image A to be encrypted with a size of M×N, where M and N are the number of rows and columns of the plaintext image A, respectively.
[0030] S3: Normalize the three image feature values o1, o2, and o3 in the previous step to obtain normalized values x1(1), y1(2), and y1(3). Preset the values of a1, a2, and u in the first-level chaotic system, and use x1(1), y1(2), y1(3), a1, a2, and u together as the required first-level keys.
[0031] S4: Based on the known primary key, two hash sequences x and y are iteratively generated through the primary chaotic system. The output chaotic sequences X and Y are randomly sampled and modulo-ed to obtain two values, denoted as x0 and y0.
[0032] S5: Take the hyperbolic tangent expansion map as the required second-level chaotic system, manually set the values of the control parameters a′1, a′2 and u′ in the second-level chaotic system, and use them as the second-level key; use x0, y0 as the initial values of the second-level chaotic system, and generate two chaotic sequences X and Y with a length of M×N.
[0033] S6: Perform modular processing on the chaotic sequences X and Y respectively to obtain the required scrambling sequence S and diffusion sequence Q.
[0034] S7: Use the scrambling sequence S to scramble the plaintext image A. The process is as follows:
[0035] S71: Convert the M×N original image A to be encrypted into a one-dimensional image matrix P of 1×MN.
[0036] S72: Arrange the scrambled sequence S in ascending order to obtain an ascending matrix F and its corresponding index matrix G.
[0037] S73: Use the index matrix G to scramble the one-dimensional image matrix P to obtain a scrambled image matrix B.
[0038] S8: Use the diffusion sequence Q to perform diffusion and dimension-changing operations on the scrambled image matrix B to obtain the ciphertext image E. The process is as follows:
[0039] S81: Perform an XOR operation on the diffusion sequence Q and the scrambled image matrix B to obtain the diffusion image matrix C.
[0040] S82: Perform matrix row and column transformation on the diffusion image matrix C to obtain a ciphertext image E with M rows and N columns.
[0041] In the present invention, the normalization function of the image feature value in step S3 is as follows:
[0042]
[0043] In the above formula, α is the preset feature magnification factor. In the present invention, α=2 15; β1, β2, and β3 are the offsets of the preset characteristic values, and the values of the three are all positive numbers less than 1. In the present invention, β1, β2, and β3 are 0.1, 0.2, and 0.3, respectively.
[0044] In step S4 of the present invention, x0 and y0, which are the initial values of the secondary chaotic system, are generated using the following sampling formula:
[0045]
[0046] In the above formula, λ1 and λ2 are adjustment coefficients for controlling the iteration rounds of the hash sequence x1 in the original samples corresponding to x0 and y0, respectively.
[0047] In step S6 of the present invention, chaotic sequences X and Y are modulo processed using the following formula:
[0048]
[0049] In the above formula, S i and Q i are the iteration values of S and Q respectively; x i and y i They are the iteration values of X and Y respectively; floor represents a rounding down function.
[0050] The obtained scrambled sequence S is an integer sequence mapped to the range of 1-MN, and the obtained diffusion sequence Q is an integer sequence mapped to the range of 0-255.
[0051] In the present invention, step S71 uses the sort function to sort the scrambled sequence S in ascending order to obtain the index matrix G, which is expressed as follows:
[0052] [F,G]=sort(S)
[0053] Among them, F is the matrix after the scrambled sequence S is arranged in ascending order.
[0054] In step S73, the generation formula of the scrambling matrix B is as follows:
[0055] B(i)=P(G(i)), i∈[1, MN].
[0056] In the present invention, the formula for generating the diffusion image matrix C in step S81 is as follows:
[0057] E(i)=B(i)⊕Q(i), i∈[1,MN]
[0058] Among them, ⊕ is the exclusive OR operator.
[0059] In step S82, the matrix row and column number transformation formula of the encrypted image E is as follows:
[0060] E = reshape(C,M,N)
[0061] Among them, reshape is the matrix row and column transformation function, M and N are the number of rows and columns of the ciphertext image E respectively.
[0062] The present invention also includes an image decryption method, which uses the aforementioned chaotic system with adjustable Lyapunov exponent as a decryption tool, and restores the ciphertext image E generated by the aforementioned image encryption method to the original plaintext image A based on known primary and secondary keys.
[0063] The image decryption method provided by the present invention comprises the following steps:
[0064] S01: Based on the known primary key and secondary key, the same process as steps S1-S6 in the image encryption method is used to generate the required scrambling sequence S and diffusion sequence Q.
[0065] S02: Convert the ciphertext image E into the corresponding one-dimensional matrix E′, and XOR it with the diffusion sequence Q to restore the scrambled image matrix B. The mathematical expression is as follows:
[0066] B(i)=E′(i)⊕Q(i).
[0067] S03: Use the sort function to sort the scrambled sequence S in ascending order to obtain the index matrix G. The mathematical expression is as follows:
[0068] [F,G]=sort(S)
[0069] Among them, F is the matrix obtained by arranging the scrambled sequence S in ascending order; G is the sorted index matrix.
[0070] S04: Use the sort function again to sort the index matrix G in ascending order to obtain the index matrix H. The mathematical expression is as follows:
[0071] [T,H]=sort(G)
[0072] Among them, T is the matrix after sorting the matrix G in ascending order, and H is the index matrix corresponding to the sorted matrix T.
[0073] S05: Use the index matrix H to restore the scrambled image matrix B to the one-dimensional plaintext image matrix P. The operation process is expressed as follows:
[0074] P(i)=B(H(i)).
[0075] S06: Use the matrix row and column number transformation function reshape to restore the one-dimensional plaintext image matrix P to the original size M×N plaintext image A. The expression is as follows:
[0076] A=reshape(P,M,N).
[0077] The present invention also includes an image encryption transmission system for implementing encrypted transmission of image information between a data transmitter and a data receiver. The image encryption transmission system provided by the present invention uses the aforementioned image encryption method at the data transmitter to encrypt a plaintext image A to be transmitted, and uses the aforementioned image decryption method at the data receiver to restore the received ciphertext image E to the original plaintext image A.
[0078] Specifically, the image encryption transmission system provided by the present invention includes: a channel, a synchronization sequence generation module, an information encryption module, an information sending module, an information receiving module, and an information decryption module.
[0079] Among them, the channel serves as a data channel for encrypted data transmission between the data sending end and the data receiving end.
[0080] The synchronization sequence generation module includes two completely synchronized chaotic sequence generation units located at the data sending end and the data receiving end, respectively. The chaotic sequence generation unit includes a primary chaotic system and a secondary chaotic system. The chaotic sequence generation unit is used to perform the following operations at the data sending end and the data receiving end, respectively, during the encrypted transmission process: (1) Based on the known primary key, the primary chaotic system is used to generate and output a set of sequence values x0 and y0, which are used as the initial values of the iteration of the secondary chaotic system. (2) Based on the known secondary key, the secondary chaotic system is used to generate two chaotic sequences with a length equal to the product of the row and column values of the plaintext image pixels, which are used as the scrambling sequence S and the diffusion sequence Q.
[0081] The information encryption module, located at the signal transmitting end, is used to generate a ciphertext image E to be transmitted based on the plaintext image A. The information encryption module includes a scrambling unit and a diffusion unit. The scrambling unit is used to first convert the M×N original image A to be encrypted into a 1×MN one-dimensional image matrix P. The scrambling sequence S is then sorted in ascending order to obtain the ascending matrix F and its corresponding index matrix G. Finally, the index matrix G is used to scramble the one-dimensional image matrix P to obtain the scrambled image matrix B. The diffusion unit is used to first perform an XOR operation on the diffusion sequence Q and the scrambled image matrix B to obtain the diffused image matrix C. The diffused image matrix C is then subjected to a matrix row-column transformation to obtain the ciphertext image E with M rows and N columns.
[0082] The information sending module is used to package the primary key, the secondary key and the ciphertext image E according to a preset data format and send them to the data receiving end through the channel.
[0083] The information receiving module receives and unpacks data packets from the signal transmitting module to obtain the corresponding primary and secondary keys and ciphertext images. These primary and secondary keys are used as input to the synchronization sequence generation module at the data receiving end, generating the corresponding scrambling sequence S and diffusion sequence Q.
[0084] The information decryption module is located at the signal receiving end and is used to restore the original plaintext image A based on the received ciphertext image E, scrambling sequence S, and diffusion sequence Q. The information decryption module includes a scrambled image restoration unit, an index matrix generation unit, a one-dimensional image restoration unit, and an image resizing unit. The scrambled image restoration unit converts the ciphertext image E into the corresponding one-dimensional matrix E′ and performs an exclusive-or operation on E′ with the diffusion sequence Q to restore the scrambled image matrix B. The index matrix generation unit first uses the sort function to sort the scrambled sequence S in ascending order to obtain the index matrix G, and then uses the sort function to sort the index matrix G in ascending order to obtain the index matrix H. The one-dimensional image restoration unit uses the index matrix H to restore the scrambled image matrix B to the one-dimensional plaintext image matrix P. The image resizing unit uses the matrix row and column number transformation function reshape to restore the one-dimensional plaintext image matrix P to the original M×N plaintext image A.
[0085] The technical solution provided by the present invention has the following beneficial effects:
[0086] The chaotic system provided by this invention can customize the system's Lyapunov exponents by setting the values of control parameters, resulting in a chaotic map with controllable dynamic characteristics. This system is highly complex and difficult to crack, and can generate chaotic sequences with increased randomness. This chaotic system offers enhanced security when used for data encryption. Furthermore, increasing the control parameters also increases the number of encryption keys, significantly expanding the key space.
[0087] This invention provides an image encryption method that utilizes a newly designed chaotic system, further increasing the complexity and security of the encryption system. Furthermore, the invention applies the statistical characteristics of the plaintext image to a plaintext hash function to generate the initial values of the chaotic sequence, generating a pseudo-random sequence related to the plaintext. Even the slightest change in the plaintext will result in a completely different ciphertext. Consequently, the encryption algorithm is effectively resistant to chosen-plaintext attacks and known-plaintext attacks.
[0088] In addition, the information redundancy of each area in the encrypted image generated by this encryption method is large, and the tolerance to losses and noise in the communication process is high. Even if there is a large degree of pixel loss or more noise, high-definition image restoration can still be achieved during the image decryption process. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0090] Figure 1 This is a flowchart of the steps of an image encryption method provided in Example 2 of the present invention.
[0091] Figure 2 for Figure 1 Signal flow graph of the image encryption method in .
[0092] Figure 3 This is a flowchart of the steps of an image decryption method provided in Example 3 of the present invention.
[0093] Figure 4 for Figure 3 Signal flow graph of the image decryption method in .
[0094] Figure 5 This is a network architecture diagram of an image encryption transmission system provided in Example 4 of the present invention.
[0095] Figure 6 These are the regular sample images and their histograms used in the performance test.
[0096] Figure 7 It is the ciphertext image and its histogram corresponding to the sample image during the performance test.
[0097] Figure 8 This is the correlation distribution diagram of adjacent pixels of the sampled pixels in the plaintext image in the horizontal, vertical and diagonal directions during the performance test.
[0098] Figure 9 This is the correlation distribution diagram of adjacent pixels in the horizontal, vertical and diagonal directions of the sampled pixels in the ciphertext image during the performance test.
[0099] Figure 10 This is the decryption result of a sample image with a pixel loss ratio of 1 / 16 of the original ciphertext image during the performance test.
[0100] Figure 11 This is the decryption result of a sample image with a pixel loss ratio of 1 / 4 of the original ciphertext image during the performance test.
[0101] Figure 12 This is the decryption result of a sample image with a pixel loss ratio of 1 / 2 of the original ciphertext image during the performance test.
[0102] Figure 13 The decryption results of the ciphertext image after adding 1% salt and pepper noise during the performance test.
[0103] Figure 14 The decryption results of the ciphertext image after adding 5% salt and pepper noise during the performance test.
[0104] Figure 15 Decryption results of the ciphertext image after adding 10% salt and pepper noise during the performance test.
[0105] Figure 16 This is the encryption result of a completely black image during the performance test.
[0106] Figure 17 This is the encryption result of the all-white image during the performance test. DETAILED DESCRIPTION
[0107] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0108] Example 1
[0109] This embodiment provides a chaotic system with adjustable Lyapunov exponents, a type of two-dimensional chaotic mapping. Most notably, this embodiment incorporates a set of control parameters for visually adjusting the system's Lyapunov exponents. By setting these parameters, users can customize the system's Lyapunov exponents and obtain a chaotic mapping with desired dynamic characteristics, a feature not available in many other chaotic systems.
[0110] This embodiment also designs two different forms of two-dimensional chaotic mappings for the chaotic system, namely, parabola expansion mapping and hyperbolic tangent expansion mapping.
[0111] Among them, the mapping relationship of the parabola expansion mapping is as follows:
[0112]
[0113] The mapping relationship of the hyperbolic tangent extension map is as follows:
[0114]
[0115] In the above formula, i is the number of iterations, x, y are the iterative output values, x i ,y i is the value obtained at the i-th iteration; mod is the modulo operation; a1, a2, and u are all system control parameters in the parabolic expansion map, and a1 and a2 can be used to quantitatively adjust the system's Lyapunov exponents. a′1, a′2, and u′ are all system control parameters in the hyperbolic tangent expansion map, and a′1 and a′2 can be used to quantitatively adjust the system's Lyapunov exponents.
[0116] Combining the above expressions, we can see that as the number of iterations increases, the parabola expansion mapping and the hyperbolic tangent expansion mapping can generate two chaotic sequences X and Y with increasing lengths, X = {x1, x2, ...x n}, Y={y1,y2,…y n}. The numerical values of the elements in the sequence will be affected by the initial value and three controllable parameters a1, a2 and u (or a′1, a′2 and u′). Considering that a typical application of the chaotic system provided by this embodiment is to generate a highly random chaotic sequence during the encryption process. Since the Lyapunov exponent of the chaotic map can be artificially controlled, the user can obtain a chaotic system that meets the desired dynamic complexity. Therefore, the chaotic system of this example can generate a chaotic sequence with high complexity and high randomness. At the same time, the chaotic map of this embodiment is a two-dimensional chaotic map obtained by dimensional expansion of a one-dimensional chaotic map. The increase in the initial value and system parameters increases the number of keys of the encryption system, greatly expanding the key space.
[0117] Furthermore, taking the hyperbolic tangent expansion map as an example for analysis, as the controllable parameters a′1, a′2, and u′ are adjusted, the setting method of the Lyapunov exponents LE1 and LE2 corresponding to the chaotic map of two dimensions in the hyperbolic tangent expansion map is shown in the following table:
[0118] Table 1: Relationship between the two Lyapunov exponents of the system and the control parameters in the hyperbolic tangent expansion map
[0119]
[0120] Analysis of the above table reveals that, in the designed hyperbolic tangent expansion map, the system's Lyapunov exponent is directly determined by its parameters a1 and a2 (or a′1, a′2), and the manually set system control parameter value is exactly equal to the Lyapunov exponent corresponding to the chaotic map. Considering that the complexity of a chaotic system can be intuitively evaluated using the Lyapunov exponent, the chaotic system provided in this embodiment can meet the user's "customization" requirements for the complexity of the chaotic system. The user only needs to set the corresponding control parameters according to the required complexity, and once the parameters are set, the system's Lyapunov exponent can be determined very intuitively.
[0121] Furthermore, analysis of the aforementioned expressions reveals that, in the parabola expansion mapping provided by this embodiment, when either of the control parameters a1 or a2 is greater than zero, the chaotic system enters a chaotic state; when both of them are greater than zero, the chaotic system enters a hyperchaotic state. Correspondingly, in the hyperbolic tangent expansion mapping of this embodiment, when either of the control parameters a′1 or a′2 is greater than zero, the chaotic system enters a chaotic state; when both of them are greater than zero, the chaotic system enters a hyperchaotic state.
[0122] That is to say, in the designed chaotic system, when the two artificially set Lyapunov exponents in the parabolic expansion mapping and the hyperbolic tangent expansion mapping are positive, it indicates that the chaotic system can achieve hyperchaotic behavior.
[0123] The two-dimensional chaotic system provided in this embodiment is designed based on the classic one-dimensional Logistic map. The design method of the chaotic system with adjustable Lyapunov exponent includes the following steps:
[0124] (1) Obtain the following classic one-dimensional logistic mapping:
[0125] x i+1 =ux i (1-x i )
[0126] Among them, u is the control parameter; i is the number of iterations; x is the iterative output value; x i is the value obtained in the i-th iteration; when u∈[3.57,4], the mapping is in a chaotic state.
[0127] (2) By performing dimension increase, logical transformation, coefficient adjustment, and modulo operation on the one-dimensional logistic map, the following two-dimensional parabolic expansion map is obtained:
[0128]
[0129] In the above formula, i is the number of iterations, x, y are the iterative output values, x i ,y i is the value obtained in the i-th iteration; mod is the modulo operation; a1, a2 and u are a set of adjustable system control parameters.
[0130] (3) Replace 1-y in the previous step i Replaced by 1-tanhy i , we get the following two-dimensional hyperbolic tangent extension map:
[0131]
[0132] In the above formula, a′1, a′2 and u′ are a set of adjustable system control parameters.
[0133] Example 2
[0134] Based on the chaotic system designed in Example 1, this embodiment further provides an image encryption method. This image encryption method uses the chaotic system with adjustable Lyapunov exponents in Example 1 as an encryption tool. During the encryption process, a ciphertext image E with the same size as the original plaintext image A can be generated.
[0135] Specifically, the image encryption method provided in this embodiment is as follows: Figure 1 and Figure 2 As shown, the following steps are included:
[0136] S1: Transform the parabolic expansion map into the following plaintext hash function, and use it as the required first-level chaotic system:
[0137]
[0138] S2: Calculate the pixel average value o1, information entropy o2, and total pixel value o3 of the plaintext image A to be encrypted with a size of M×N, where M and N are the number of rows and columns of the plaintext image A, respectively.
[0139] S3: Normalize the three image feature values o1, o2, and o3 obtained in the previous step to obtain the normalized values x1(1), y1(2), and y1(3). Then, preset the values of a1, a2, and u in the first-level chaotic system, and use x1(1), y1(2), y1(3), a1, a2, and u together as the required first-level key.
[0140] The standard form of the normalization function of the image feature value in this embodiment is as follows:
[0141]
[0142] In the above formula, α is the preset feature magnification factor, β1, β2, and β3 are the preset offsets of each feature value, and the values of the three are all positive numbers less than 1.
[0143] In this embodiment, α=2 15 ; β1, β2, and β3 are 0.1, 0.2, and 0.3 respectively; that is, the normalization function is:
[0144]
[0145] S4: Based on the known primary key, two hash sequences x and y are iteratively generated through the primary chaotic system. The output chaotic sequences X and Y are randomly sampled and modulo-ed to obtain two values, denoted as x0 and y0.
[0146] In this embodiment, x0 and y0, which are the initial values of the secondary chaotic system, are generated using the following sampling formula:
[0147]
[0148] In the above formula, λ1 and λ2 are adjustment coefficients for controlling the iteration rounds of the hash sequence x1 in the original samples corresponding to x0 and y0, respectively.
[0149] For example, in the specific example of this embodiment, λ1 is set to 2 and λ2 is set to 1. That is to say, x0 is generated by iterating the first-order chaotic system MN / 2 times, and y0 is generated by iterating the first-order chaotic system MN times. In addition, α in the sampling formula is still set to 2. 15 ;Right now:
[0150]
[0151] S5: Take the hyperbolic tangent expansion map as the required second-level chaotic system, manually set the values of the control parameters a′1, a′2 and u′ in the second-level chaotic system, and use them as the second-level key; use x0, y0 as the initial values of the second-level chaotic system, and generate two chaotic sequences X and Y with a length of M×N.
[0152] S6: Perform modular processing on the chaotic sequences X and Y respectively to obtain the required scrambling sequence S and diffusion sequence Q.
[0153] The chaotic sequences X and Y are modulo processed using the following formula:
[0154]
[0155] In the above formula, S i and Q i are the iteration values of S and Q respectively; x i and y i They are the iteration values of X and Y respectively; floor represents a rounding down function.
[0156] After processing by the above formula, the obtained scrambled sequence S is an integer sequence mapped to the range of 1-MN, and the obtained diffusion sequence Q is an integer sequence mapped to the range of 0-255.
[0157] S7: Use the scrambling sequence S to scramble the plaintext image A. The process is as follows:
[0158] S71: Convert the M×N original image A to be encrypted into a one-dimensional image matrix P of 1×MN.
[0159] S72: Arrange the scrambled sequence S in ascending order to obtain the ascending matrix F and its corresponding index matrix
[0160] G. Specifically, use the sort function to sort the scrambled sequence S in ascending order to obtain the index matrix G. Mathematically
[0161] The expression is as follows:
[0162] [F,G]=sort(S)
[0163] Among them, F is the matrix after the scrambled sequence S is arranged in ascending order.
[0164] S73: Use the index matrix G to scramble the one-dimensional image matrix P to obtain a scrambled image matrix B. The generation formula of the scrambled matrix B is as follows:
[0165]
[0166] S8: Use the diffusion sequence Q to perform diffusion and dimension-changing operations on the scrambled image matrix B to obtain the ciphertext image E. The process is as follows:
[0167] S81: Perform XOR processing on the diffusion sequence Q and the scrambled image matrix B to obtain the diffusion image matrix C. The generation formula of the diffusion image matrix C is as follows:
[0168] E(i)=B(i)⊕Q(i), i∈[1,MN]
[0169] Among them, ⊕ is the exclusive OR operator.
[0170] S82: Perform matrix row and column transformation on the diffusion image matrix C to obtain the ciphertext image E with M rows and N columns. The matrix row and column transformation formula of the encrypted image E is as follows:
[0171] E = reshape(C,M,N)
[0172] Among them, reshape is the matrix row and column transformation function, M and N are the number of rows and columns of the ciphertext image E respectively.
[0173] The new image encryption method provided in this embodiment is implemented using a newly designed chaotic system. A parabolic expansion map within the chaotic system is first used to generate a plaintext hash function. A specific output is then generated based on the statistical characteristics of the plaintext image and relevant parameters in a preset primary key. This output serves as the initial value for the iteration of the hyperbolic tangent expansion map. Next, the hyperbolic tangent expansion map uses the preset secondary key as a control parameter and iterates continuously, outputting a highly complex chaotic sequence that correlates with the image characteristics of the plaintext image to be encrypted. Finally, the resulting two-dimensional chaotic sequence is used as the scrambling sequence S and diffusion sequence Q, respectively. A series of matrix operations are then performed on the original plaintext image to produce a new encrypted image that is the same size as the original image but completely conceals the pixel features of the original image.
[0174] The image security method provided in this embodiment has at least the following advantages:
[0175] (1) The present invention uses two different chaotic maps (or hyperchaotic maps) to generate a chaotic sequence with extremely high complexity in two-stage data processing. After encrypting the original image, the image is extremely difficult to crack. Therefore, the solution of this embodiment improves the confidentiality of the encryption method.
[0176] (2) The image encryption method of the present invention utilizes the statistical characteristics of the plaintext image to generate the initial value of the chaotic sequence, thereby obtaining a pseudo-random sequence related to the plaintext image. Even slight changes in the plaintext will result in completely different ciphertext. Therefore, the image encryption scheme provided by this embodiment can effectively enhance the defense against chosen-plaintext attacks and known-plaintext attacks.
[0177] Example 3
[0178] Based on Example 2, this example further provides an image decryption method, which uses the chaotic system with adjustable Lyapunov exponent in Example 1 as a decryption tool, and restores the ciphertext image E generated by the image encryption method in Example 2 to the original plaintext image A based on the known primary key and secondary key.
[0179] Specifically, if Figure 3 As shown, the image decryption method provided in this embodiment includes the following steps:
[0180] S01: Based on the known primary key and secondary key, the same process as steps S1-S6 in the image encryption method is used to generate the required scrambling sequence S and diffusion sequence Q.
[0181] S02: Convert the ciphertext image E into the corresponding one-dimensional matrix E′, and XOR it with the diffusion sequence Q to restore the scrambled image matrix B. The mathematical expression is as follows:
[0182] B(i)=E′(i)⊕Q(i).
[0183] S03: Use the sort function to sort the scrambled sequence S in ascending order to obtain the index matrix G. The mathematical expression is as follows:
[0184] [F,G]=sort(S)
[0185] Among them, F is the matrix obtained by arranging the scrambled sequence S in ascending order; G is the sorted index matrix.
[0186] S04: Use the sort function again to sort the index matrix G in ascending order to obtain the index matrix H. The mathematical expression is as follows:
[0187] [T,H]=sort(G)
[0188] Among them, T is the matrix after sorting the matrix G in ascending order, and H is the index matrix corresponding to the sorted matrix T.
[0189] S05: Use the index matrix H to restore the scrambled image matrix B to the one-dimensional plaintext image matrix P. The operation process is expressed as follows:
[0190] P(i)=B(H(i)).
[0191] S06: Use the matrix row and column number transformation function reshape to restore the one-dimensional plaintext image matrix P to the original size M×N plaintext image A. The expression is as follows:
[0192] A=reshape(P,M,N).
[0193] In addition, it is important to emphasize that: Figure 4 As shown, in the image decryption method provided in this embodiment, for the decrypted plaintext image A, the image features of the plaintext image can be further analyzed, namely: pixel average value o1, information entropy o2 and total pixel value o3; and the characteristic parameters of the image are normalized. The normalized results x1(1), y1(2), y1(3) are then compared with the same parameters in the primary key to verify whether the image obtained after decryption is completely consistent with the original plaintext image before encryption; or to evaluate the loss or noise of the data during the transmission stage.
[0194] Example 4
[0195] In combination with the solutions of the aforementioned embodiments, this embodiment further provides an image encryption transmission system for implementing encrypted transmission of image information between a data transmitter and a data receiver. The image encryption transmission system provided in this embodiment employs the image encryption method of Example 2 at the data transmitter to encrypt a plaintext image A to be transmitted, and employs the image decryption method of Example 3 at the data receiver to restore the received ciphertext image E to the original plaintext image A.
[0196] Specifically, if Figure 5 As shown, the image encryption transmission system provided by this embodiment includes: a channel, a synchronization sequence generation module, an information encryption module, an information sending module, an information receiving module, and an information decryption module.
[0197] Among them, the channel serves as a data channel for encrypted data transmission between the data sending end and the data receiving end.
[0198] The synchronization sequence generation module includes two completely synchronized chaotic sequence generation units located at the data sending end and the data receiving end, respectively. The chaotic sequence generation unit includes a primary chaotic system and a secondary chaotic system. The chaotic sequence generation unit is used to perform the following operations at the data sending end and the data receiving end, respectively, during the encrypted transmission process: (1) Based on the known primary key, the primary chaotic system is used to generate and output a set of sequence values x0 and y0, which are used as the initial values of the iteration of the secondary chaotic system. (2) Based on the known secondary key, the secondary chaotic system is used to generate two chaotic sequences with a length equal to the product of the row and column values of the plaintext image pixels, which are used as the scrambling sequence S and the diffusion sequence Q.
[0199] The information encryption module, located at the signal transmitting end, is used to generate a ciphertext image E to be transmitted based on the plaintext image A. The information encryption module includes a scrambling unit and a diffusion unit. The scrambling unit is used to first convert the M×N original image A to be encrypted into a 1×MN one-dimensional image matrix P. The scrambling sequence S is then sorted in ascending order to obtain the ascending matrix F and its corresponding index matrix G. Finally, the index matrix G is used to scramble the one-dimensional image matrix P to obtain the scrambled image matrix B. The diffusion unit is used to first perform an XOR operation on the diffusion sequence Q and the scrambled image matrix B to obtain the diffused image matrix C. The diffused image matrix C is then subjected to a matrix row-column transformation to obtain the ciphertext image E with M rows and N columns.
[0200] The information sending module is used to package the primary key, the secondary key and the ciphertext image E according to a preset data format and send them to the data receiving end through the channel.
[0201] The information receiving module receives and unpacks data packets from the signal transmitting module to obtain the corresponding primary and secondary keys and ciphertext images. These primary and secondary keys are used as input to the synchronization sequence generation module at the data receiving end, generating the corresponding scrambling sequence S and diffusion sequence Q.
[0202] The information decryption module is located at the signal receiving end and is used to restore the original plaintext image A based on the received ciphertext image E, scrambling sequence S, and diffusion sequence Q. The information decryption module includes a scrambled image restoration unit, an index matrix generation unit, a one-dimensional image restoration unit, and an image resizing unit. The scrambled image restoration unit converts the ciphertext image E into the corresponding one-dimensional matrix E′ and performs an exclusive-or operation on E′ with the diffusion sequence Q to restore the scrambled image matrix B. The index matrix generation unit first uses the sort function to sort the scrambled sequence S in ascending order to obtain the index matrix G, and then uses the sort function to sort the index matrix G in ascending order to obtain the index matrix H. The one-dimensional image restoration unit uses the index matrix H to restore the scrambled image matrix B to the one-dimensional plaintext image matrix P. The image resizing unit uses the matrix row and column number transformation function reshape to restore the one-dimensional plaintext image matrix P to the original M×N plaintext image A.
[0203] Performance Testing
[0204] In order to verify the performance of the image encryption and decryption method provided by the present invention, a corresponding performance test experiment is designed below, and the performance advantages of the image encryption / decryption method provided by the present invention are analyzed based on the experimental results.
[0205] 1. Pixel feature analysis
[0206] During the performance test, this embodiment uses two methods, histogram analysis and adjacent pixel correlation analysis, to analyze the pixel feature distribution before and after image encryption.
[0207] (1) Histogram
[0208] In this experiment, a portrait of a woman wearing a sun hat was randomly downloaded from the Internet as the original plaintext image, and the method in Example 2 was used to encrypt the plaintext image to obtain the ciphertext image. Next, the image analysis software was used to generate the histogram of the plaintext image and the ciphertext image. During the histogram analysis process, the original plaintext image and its histogram are as follows: Figure 6 As shown, the encrypted ciphertext image and its histogram are as follows Figure 7 As shown. Figure 6 and Figure 7 It can be clearly seen from the comparison:
[0209] Each pixel in a plaintext image has distinct features, making it easy for attackers to derive general information from these features. However, the encrypted image's histogram displays a uniform distribution, masking the original image's features. The frequency of each pixel is nearly uniform, providing excellent security and resistance to some attacks.
[0210] (2) Correlation between adjacent pixels
[0211] In this experiment, 4000 adjacent pixels were randomly selected in the horizontal, vertical and diagonal directions of the plaintext image and the ciphertext image to perform correlation analysis between adjacent pixels. The correlation distribution diagram of adjacent pixels in the horizontal, vertical and diagonal directions of the plaintext image is shown in the figure below. Figure 8 As shown in , the correlation distribution diagram of adjacent pixels in the horizontal, vertical and diagonal directions in the ciphertext image is as follows Figure 9 As shown. Figure 8 and Figure 9 You can see:
[0212] Adjacent pixels in the plaintext image have strong correlations in the horizontal, vertical, and diagonal directions, and can be fitted to a straight line. This is reflected in the image as a linear distribution close to the diagonal. In contrast, the correlations between adjacent pixels in the ciphertext image are close to zero. This demonstrates that the image encryption method provided by this embodiment can effectively mask the features between adjacent pixels in the image. This provides excellent resistance to conventional image cracking.
[0213] 2. Robustness Analysis
[0214] During ciphertext transmission, varying degrees of signal interference or information loss may occur, and even attackers may intentionally perturb the data. Therefore, the image encryption and decryption schemes provided must be robust against interference when decrypting ciphertext images. This means that decryption can still be successful even when portions of the ciphertext are lost or altered. To address this issue, this example uses the scheme in Example 3 to decrypt ciphertext images and designs the following pixel loss simulation and noise interference tests.
[0215] (1) Pixel loss simulation
[0216] In this experiment, we randomly select 1 / 16, 1 / 4, and 1 / 2 of the generated ciphertext image as the part of the sample image where information is lost, and set the pixel values of this part to black, and then decrypt the sample image. Finally, the comparison chart of the ciphertext image with three different pixel loss ratios and its decrypted image is shown below. Figure 10 、 11 and 12. Analyzing the above three images, we can see that:
[0217] In the image encryption and decryption solution provided in this embodiment, the smaller the proportion of pixel loss in the encrypted image, the clearer the decrypted image. Figure 12 As can be seen in the figure, even if the effective pixel loss in the encrypted image is to the extent that it contains only 1 / 2 of the original information, the decrypted image can still be visually recognizable. In other words, the image encryption and decryption method provided in this embodiment has good resistance to communication loss and is highly robust.
[0218] (2) Noise interference
[0219] In this experiment, 1%, 5% and 10% salt and pepper noise were added to the encrypted ciphertext image respectively, and then the ciphertext image with added salt and pepper noise was decrypted. Finally, the comparison of the three ciphertext images with different proportions of noise added and their decrypted images is shown below. Figure 13 、 14 and 15. Analyzing the above three pictures, we can see that:
[0220] In the image encryption and decryption solution provided in this embodiment, the less noise is contained in the image, the clearer the decrypted original image is. Figure 15 It can be seen that even when the added noise information reaches 10%, the decrypted plaintext image can still be visually recognizable. In other words, the image encryption and decryption method provided in this embodiment has good anti-communication interference performance and strong robustness.
[0221] 3. Anti-attack performance analysis
[0222] When cracking encrypted images, attackers often use completely black or white images as "special" plaintext images to attack encryption algorithms and crack the algorithm's data processing logic. In fact, these special images can invalidate the encryption algorithm's scrambling process, exposing more details of the algorithm and making it less secure.
[0223] In order to test the encryption effect of the encryption method of this embodiment on special images, this experiment selected two completely black and completely white images with sizes of 512×512 for encryption. Figure 16 As shown, the all-white image and its encryption result are as follows Figure 17 As shown. Figure 16 and Figure 17 It can be found that the encryption results of the image encryption method proposed in this embodiment for special images such as all black or all white are the same as those for ordinary images; this further proves that the image encryption method proposed in this embodiment can resist chosen plaintext attacks.
[0224] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An image encryption method, characterized in that: The method uses a chaotic system with adjustable Lyapunov exponent as an encryption tool to generate a ciphertext image E with the same size as the original plaintext image A. The image encryption method includes the following steps: S1: Transform the parabolic expansion map into the following plaintext hash functions x1(n) and y1(n), and use them as the required first-order chaotic system: In the above formula, n represents the independent variable of the plaintext hash function x1(n) and y1(n); mod is the modulo operation; a1, a2 and u are all system control parameters in the parabolic expansion mapping, and a1 and a2 are used to quantitatively adjust the Lyapunov exponent of the system; S2: Calculate the pixel average value o1, information entropy o2, and total pixel value o3 of the plaintext image A to be encrypted with a size of M×N, where M and N are the number of rows and columns of the plaintext image A, respectively. S3: Normalize the three image feature values o1, o2, and o3 obtained in the previous step to obtain normalized values x1(1), y1(2), and y1(3). Preset the values of a1, a2, and u in the first-level chaotic system, and use x1(1), y1(2), y1(3), a1, a2, and u together as the required first-level key; S4: Based on the known primary key, two chaotic sequences x and y are iteratively generated through the primary chaotic system. The output chaotic sequences x and y are randomly sampled and modulo-sampled to obtain two values, which are recorded as x0 and y0. S5: Take the hyperbolic tangent expansion map as the required secondary chaotic system, manually set the values of the control parameters a1′, a2′, and u′ in the secondary chaotic system, and use them as the secondary key; use x0, y0 as the initial values of the secondary chaotic system, and generate two chaotic sequences X and Y with a length of M×N; S6: Perform modular processing on the chaotic sequences X and Y respectively to obtain the required scrambling sequence S and diffusion sequence Q; S7: Use the scrambling sequence S to scramble the plaintext image A. The process is as follows: S71: Convert the M×N original image A to be encrypted into a one-dimensional image matrix P of 1×(M*N); S72: Arrange the scrambled sequence S in ascending order to obtain an ascending matrix F and its corresponding index matrix G; S73: Use the index matrix G to scramble the one-dimensional image matrix P to obtain a scrambled image matrix B; S8: Use the diffusion sequence Q to perform diffusion and dimension-changing operations on the scrambled image matrix B to obtain the ciphertext image E. The process is as follows: S81: Perform XOR processing on the diffusion sequence Q and the scrambled image matrix B to obtain the diffusion image matrix C; S82: Perform matrix row and column transformation on the diffusion image matrix C to obtain a ciphertext image E with M rows and N columns.
2. The image encryption method according to claim 1, wherein: The chaotic system with adjustable Lyapunov exponent is a two-dimensional chaotic system and includes a set of control parameters for visually adjusting the system's Lyapunov exponent. The chaotic system is used to generate the required two sets of chaotic sequences X and Y. The chaotic system includes two forms, namely, parabolic expansion mapping and hyperbolic tangent expansion mapping. The mapping relationship of the parabolic expansion mapping is as follows: The mapping relationship of the hyperbolic tangent expansion mapping is as follows: In the above formula, i is the number of iterations, x i ,y i is the value obtained in the i-th iteration; x i+1 ,y i+1 is the value obtained in the i+1th iteration; mod is the modulo operation; a1, a2, and u are all system control parameters in the parabolic expansion mapping, and a1 and a2 can be used to quantitatively adjust the Lyapunov exponents of the system; a1′, a2′, and u′ are all system control parameters in the hyperbolic tangent expansion mapping, and a1′ and a2′ can be used to quantitatively adjust the Lyapunov exponents of the system.
3. The image encryption method according to claim 2, wherein: In the parabola expansion mapping, the values of the control parameters a1 and a2 are the values of the two Lyapunov exponents of the system. When any one of the control parameters a1 and a2 is greater than zero, the chaotic system is in a chaotic state; when both the control parameters a1 and a2 are greater than zero, the chaotic system is in a hyperchaotic state. In the hyperbolic tangent expansion mapping, the values of the control parameters a1′ and a2′ are the values of the two Lyapunov exponents of the system; when any one of the control parameters a1′ and a2′ is greater than zero, the chaotic system is in a chaotic state; when both the control parameters a1′ and a2′ are greater than zero, the chaotic system is in a hyperchaotic state.
4. The image encryption method according to claim 2, wherein: The design method of the chaotic system is as follows: (1) Obtain the following classic one-dimensional logistic mapping: x i+1 =ux i (1-x i ) Among them, u is the control parameter; i is the number of iterations; x i is the value obtained in the i-th iteration; x i+1 is the value obtained in the i+1th iteration; when u∈[3.57,4], the mapping is in a chaotic state; (2) The one-dimensional logistic map is subjected to dimensionality increase, logical transformation, coefficient adjustment, and modulo operation to obtain the following two-dimensional parabolic expansion map: In the above formula, i is the number of iterations, x i ,y i is the value obtained in the i-th iteration; x i+1 ,y i+1 is the value obtained in the i+1th iteration; mod is the modulo operation; a1, a2 and u are a set of adjustable system control parameters; (3) Replace 1-y in the previous step i Replaced by 1-tanhy i , we get the following two-dimensional hyperbolic tangent extension map: In the above formula, a1′, a2′ and u′ are a set of adjustable system control parameters.
5. The image encryption method according to claim 4, wherein: In step S3, the normalization function of the image feature value is as follows: In the above formula, α is the preset feature magnification; β1, β2, and β3 are the preset offsets of each eigenvalue, and their values are all positive numbers less than 1; In step S4, x0 and y0, which are the initial values of the secondary chaotic system, are generated using the following sampling formula: In the above formula, λ1 and λ2 are the adjustment coefficients for controlling the iteration rounds of chaotic sequences x and y in the original samples corresponding to x0 and y0, respectively.
6. The image encryption method according to claim 5, wherein: In step S6, the chaotic sequences X and Y are modulo processed using the following formula: In the above formula, S i and Q i are the iteration values of S and Q respectively; x i and y i are the iteration values of X and Y respectively; floor represents a rounding function; The obtained scrambled sequence S is an integer sequence mapped to the range of 1-(M*N), and the obtained diffusion sequence Q is an integer sequence mapped to the range of 0-255.
7. An image decryption method, characterized in that: It uses a chaotic system with adjustable Lyapunov exponent as a decryption tool, and restores the ciphertext image E generated by the image encryption method according to any one of claims 1 to 6 to the original plaintext image A based on known primary and secondary keys; The image decryption method comprises the following steps: S01: Based on the known primary key and secondary key, the same process as steps S1-S6 in the image encryption method is used to generate the required scrambling sequence S and diffusion sequence Q; S02: Convert the ciphertext image E into the corresponding one-dimensional matrix E′, and XOR it with the diffusion sequence Q to restore the scrambled image matrix B; S03: using the sort function to sort the scrambled sequence S in ascending order to obtain an index matrix G; the sort function is a common function for performing a custom sort on elements in an array or matrix and can be used to perform an ascending sort operation; S04: using the sort function again to sort the index matrix G in ascending order to obtain an index matrix H; S05: Use the index matrix H to restore the scrambled image matrix B to a one-dimensional plaintext image matrix P; S06: Using the matrix row and column number transformation function reshape, the one-dimensional plaintext image matrix P is restored to the plaintext image A of the original size M×N.
8. An image encryption transmission system, characterized by: It is used to realize encrypted transmission of image information between a data sending end and a data receiving end; the image encryption transmission system uses the image encryption method according to any one of claims 1 to 6 to encrypt the plaintext image A to be transmitted at the data sending end, and uses the image decryption method according to claim 7 to restore the received ciphertext image E to the original plaintext image A at the data receiving end; The image encryption transmission system includes: Channel, which serves as a data channel for encrypted data transmission between the data sending end and the data receiving end; A synchronization sequence generation module includes two completely synchronized chaotic sequence generation units located at a data transmitting end and a data receiving end respectively; the chaotic sequence generation unit includes a primary chaotic system and a secondary chaotic system; the chaotic sequence generation unit is used to perform the following operations at the data transmitting end and the data receiving end respectively during the encryption transmission process: (1) based on a known primary key, using the primary chaotic system to generate and output a set of sequence values x0 and y0, and use them as the iterative initial values of the secondary chaotic system; (2) based on a known secondary key, using the secondary chaotic system to generate two chaotic sequences whose lengths are equal to the product of the row and column values of the plaintext image pixels, and use them as the scrambling sequence S and the diffusion sequence Q; An information encryption module, located at the signal transmitting end, is used to generate a ciphertext image E to be sent based on a plaintext image A. The information encryption module includes a scrambling unit and a diffusion unit. The scrambling unit is used to first convert the M×N original image A to be encrypted into a one-dimensional image matrix P of 1×(M*N); then sort the scrambled sequence S in ascending order to obtain an ascending matrix F and its corresponding index matrix G; finally, the index matrix G is used to scramble the one-dimensional image matrix P to obtain a scrambled image matrix B; the diffusion unit is used to first perform an XOR operation on the diffusion sequence Q and the scrambled image matrix B to obtain a diffused image matrix C; then, the diffused image matrix C is subjected to a matrix row and column transformation to obtain a ciphertext image E with M rows and N columns. An information sending module, which is used to package the primary key, the secondary key and the ciphertext image E in a preset data format and send them to the data receiving end through a channel; An information receiving module, which is used to receive the data packet sent by the information sending module and unpack the data packet to obtain the corresponding primary key, secondary key and ciphertext image; the primary key and secondary key are used as input to the synchronization sequence generation module at the data receiving end to generate the corresponding scrambling sequence S and diffusion sequence Q; and An information decryption module is located at the signal receiving end and is used to restore the original plaintext image A based on the received ciphertext image E, scrambling sequence S and diffusion sequence Q; the information decryption module includes a scrambled image restoration unit, an index matrix generation unit, a one-dimensional image restoration unit, and an image size restoration unit; the scrambled image restoration unit is used to convert the ciphertext image E into a corresponding one-dimensional matrix E′, and perform XOR operation on E′ and the diffusion sequence Q to restore the scrambled image matrix B; the index matrix generation unit is used to first use the sort function to arrange the scrambled sequence S in ascending order to obtain the index matrix G, and then use the sort function to arrange the index matrix G in ascending order to obtain the index matrix H; the one-dimensional image restoration unit is used to use the index matrix H to restore the scrambled image matrix B to a one-dimensional plaintext image matrix P; the image size restoration unit uses the matrix row and column number transformation function reshape to restore the one-dimensional plaintext image matrix P to the original size M×N plaintext image A.
Citation Information
Patent Citations
Digital image encryption method, decryption method and system based on chaotic system
CN114157408A
Multi-image encryption method based on variable parameter hyperchaotic system and S-shaped diffusion
CN115580687A