Color image hybrid encryption method, terminal equipment and storage medium
By scrambling the R, G, and B channels of color images respectively and using the Logistic chaotic system to control the Lorentz super chaotic system encryption method, the problem of poor encryption effect of the existing single chaotic algorithm is solved, and more efficient and reliable Image encryption reduces the correlation between components and enhances the security of image information.
Patent Information
- Application Number
- CN202310740288.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-24
AI Technical Summary
The image encryption system of the existing single chaotic algorithm is not effective, and it is difficult to effectively protect the security of image information, especially during image transmission to prevent unauthorized users from stealing and malicious modification.
Using color image hybrid encryption method, the three channels R, G, and B are respectively chaotic, and the Lorentz superchaotic system is used to control the Lorentz superchaotic system to generate superchaotic sequences, encrypt the image, and diffusion processing is performed, adding secrets Key space to improve the effectiveness and reliability of encryption.
The correlation between the R, G, and B components of color images is reduced, the nonlinear dynamic characteristics of chaotic sequences are improved, the security and reliability of image encryption are enhanced, and the transmission security of image information is effectively protected.
Smart Images

Figure CN119182504A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data encryption, and in particular to a color image hybrid encryption method, terminal equipment and storage medium. Background Art
[0002] In today's information age, with the continuous innovation and development of Internet technology and communication technology, the speed of information transmission is getting faster and faster, and the carrier of information is also changing. In the past, it was mainly text and voice, but now digital images have become one of the important carriers of information. Using images as a carrier of information is more convenient, intuitive and vivid. Using images as an information medium has brought great convenience to people's information exchange. However, there are many security risks in the transmission process of images. When these image information is captured by illegal elements and used for malicious modification and spread to the Internet, the consequences are unimaginable. The security of image information not only involves personal privacy, but also involves security issues such as corporate interests. Therefore, the issue of secure transmission of image information has become a hot topic of research.
[0003] At present, the most effective and important technology to solve the image security problem is image encryption, which has been introduced into many fields. The core of digital image encryption technology is to hide or modify information in the original image, thereby prohibiting unauthorized users from stealing image information and protecting the image during the transmission process. Existing encryption systems that use a single chaotic algorithm usually do not work well, and require a combination of multiple encryption algorithms to achieve better results. Therefore, when studying encryption algorithms, the design of a chaotic system with excellent performance and the cross-integration of encryption algorithms with other encryption schemes are valuable research areas. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a color image hybrid encryption method, a terminal device and a storage medium.
[0005] The specific plan is as follows:
[0006] A color image hybrid encryption method comprises the following steps:
[0007] S1: Scramble the components of the three channels R, G, and B of the encrypted image separately to obtain an image after the three components are scrambled;
[0008] S2: Use the one-dimensional Logistic chaotic system to control the Lorentz hyperchaotic system to generate three sets of hyperchaotic sequences, and use the three sets of hyperchaotic sequences to encrypt the scrambled images of the three components respectively;
[0009] S3: Perform diffusion processing on the three encrypted images respectively to obtain the ciphertext matrices of three components;
[0010] S4: Concatenate the three component ciphertext matrices to obtain a ciphertext image.
[0011] Furthermore, in step S2, the method of using the one-dimensional Logistic chaotic system to control the Lorentz hyperchaotic system to generate three sets of hyperchaotic sequences is:
[0012] Generate three sets of one-dimensional Logistic chaotic sequences;
[0013] Based on the differences between three groups of one-dimensional Logistic chaotic sequences and fixed values, three groups of control factors of Lorentz hyperchaotic systems are obtained;
[0014] Based on the obtained three groups of control factors of Lorentz hyperchaotic systems, three hyperchaotic functions are obtained. The three hyperchaotic functions are discretized by the Runge-Kutta method to obtain three groups of hyperchaotic sequences.
[0015] Furthermore, a method for encrypting an image after scrambling each color component by using a set of hyperchaotic sequences is as follows: calculating a corresponding key stream based on the hyperchaotic sequence; dividing the secret key stream into two sub-key streams from the middle, and encrypting the scrambled image based on the two sub-key streams to obtain a secret image.
[0016] Furthermore, the calculation formula of the key stream corresponding to the hyperchaotic sequence is:
[0017] SC1=mod(floor((S L1 +100)×10 10 ),10×max(M,N))+1
[0018] Among them, SC1 represents the key stream, S L1 represents a hyperchaotic sequence, mod represents a modulo operation, floor represents a rounding operation, max represents the maximum value, and M and N represent the number of pixels contained in the length and width of the image respectively.
[0019] Furthermore, based on the subkey stream SC 1a and SC 1b The calculation formula for encrypting the scrambled image to obtain the encrypted image is:
[0020] P R2 =mod(SC 1a +SC 1b ×k,M×N)+1
[0021] Among them, P R2 represents the encrypted image, mod represents the modulus operation, k represents the sequence number of each element in the sequence, and M and N represent the number of pixels contained in the length and width of the image respectively.
[0022] Furthermore, the method for performing diffusion processing on the encrypted image includes: performing forward diffusion on the encrypted image; and performing backward diffusion on the encrypted image based on the forward diffusion result.
[0023] Furthermore, the forward diffusion method is: the key stream SC1 calculated based on the hyperchaotic sequence is divided into two groups of sub-key streams according to the odd and even sequence numbers, and the sub-key stream SC1 composed of elements with odd sequence numbers is divided into two groups of sub-key streams according to the odd and even sequence numbers. 1c , the forward diffusion result is calculated by the following formula:
[0024]
[0025] Among them, P R3 (1) P R3 (k-1) and P R3 (k) represent the 1st, k-1th and kth pixels of the image after forward diffusion, respectively. R3 (0) indicates the preset forward diffusion initial value, SC 1c (1) and SC 1c (k) represent the sub-key stream SC 1c The first and kth elements in P R2 (1) and P R2 (k) represent the first and kth pixels of the encrypted image, respectively. Represents the exclusive-or operation.
[0026] Furthermore, the backward diffusion method is: the key stream SC1 calculated based on the hyperchaotic sequence is divided into two groups of sub-key streams according to the odd and even sequence numbers, and the sub-key stream SC1 composed of elements with even sequence numbers is divided into two groups of sub-key streams according to the odd and even sequence numbers. 1d , the back diffusion result is calculated by the following formula:
[0027]
[0028] Among them, P R4 (M×N),P R4 (k) and P R4 (k+1) represent the M×Nth, kth, and k+1th pixels of the image after back diffusion, respectively. R4 (0) indicates the preset initial value of back diffusion, SC 1d (M×N) and SC 1d (k) represent the sub-key stream SC 1d The M×Nth and kth elements in P R3 (M×N) and P R3 (k) represent the M×Nth and kth pixels of the image after forward diffusion, Represents the exclusive-or operation.
[0029] A color image hybrid encryption terminal device comprises a processor, a memory and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above in the embodiment of the present invention are implemented.
[0030] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.
[0031] The present invention adopts the above technical solution and has the following beneficial effects:
[0032] (1) The R, G, and B channels of the color image are encrypted separately to reduce the interaction between the three channels and the correlation between the R, G, and B components.
[0033] (2) Use one-dimensional Logistic discrete chaotic sequence to control the hyperchaotic Lorentz system to obtain more complex nonlinear dynamic characteristics and improve the performance of the chaotic sequence itself.
[0034] (3) The three-level encryption mode of scrambling-chaotic encryption-diffusion is adopted to increase the key space and improve the effectiveness and reliability of image encryption. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Shown is a flow chart of Embodiment 1 of the present invention.
[0036] Figure 2 Shown is the logistic chaos bifurcation diagram in this embodiment.
[0037] Figure 3 Shown is a two-dimensional Henon chaotic bifurcation diagram in this embodiment.
[0038] Figure 4 Shown is the Lorentz chaotic attractor diagram in this embodiment.
[0039] Figure 5 Shown is the phase diagram of the hyperchaotic Lorentz system in this embodiment. DETAILED DESCRIPTION
[0040] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.
[0041] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0042] Example 1:
[0043] The embodiment of the present invention provides a method for hybrid encryption of color images, as Figure 1 shown, the method includes the following steps:
[0044] S1: The components of the R (red), G (green), and B (blue) channels of the image to be encrypted are separately scrambled to obtain three images with scrambled components.
[0045] Let the image to be encrypted (color) be P. After loading, a matrix of M×N×3 is read. M and N respectively represent the number of pixel points included in the length and width of the image. The components of its R, G, and B channels are P R , P G , P B .
[0046] The Arnold transform is a classic scrambling algorithm. Its principle is to regard an image as a two-dimensional matrix and change the positions of the image pixels through the Arnold scrambling, so that the original image pixel positions are randomized, thus achieving the purpose of not being able to distinguish the original image. In this embodiment, the Arnold transform is used for scrambling. The Arnold transform expression is shown in Equation 1, where a, b < N are scrambling parameters.
[0047]
[0048] Each time the Arnold transform is performed on the image, it is a scrambling of the image. Using the Arnold transform to scramble the image realizes the hiding of the original information of the image.
[0049] Take a = b = 1, and use the Arnold transform formula shown in Equation 1 to scramble the pixel positions of the P R channel component to obtain a new scrambled image P R1 . The scrambling methods for the other two channels are the same, and P G1 , P B1 are obtained respectively.
[0050] S2: Use a one-dimensional Logistic chaotic system to control a Lorentz hyperchaotic system to generate three groups of hyperchaotic sequences, and encrypt the three images with scrambled components through the three groups of hyperchaotic sequences respectively.
[0051] Chaos refers to the uncertain or accidental random phenomenon that appears in a specific macroscopic nonlinear system under certain conditions. Chaos is the state that occurs in a nonlinear dynamic system under certain control conditions and has sensitive dependence on the initial conditions. Such a behavioral system is called a chaotic system. So far, there is no standard definition because the singularities and complexities of chaotic systems have not been fully understood.
[0052] One of the classic definitions of chaos is the Li-York definition. If there is a continuous self-mapping f(x) on a closed interval U, then f(x) can be called chaotic if the following conditions are met:
[0053] (1) The period at the periodic point f is unbounded;
[0054] (2) On the closed interval U there are uncountable subsets S that satisfy
[0055] (i) When any x, y∈S, x≠y, there is lim n→∞ sup|f n (x)-f n (y)|>0;
[0056] (ii) When any x,y∈S, there is lim n→∞ inf|f n (x)-f n (y)|=0;
[0057] (iii) For any x∈S and any periodic point y of f, we have lim n→∞ sup|f n (x)-f n (y)|>0. Among them, f n (x) = f(f…f(x)) represents an n-fold function relationship. The first limit shows that for any two initial values in the set S after n iterations, the upper limit of the distance between the two sequences can be any positive number greater than zero; the second limit shows that for any two initial values in the set S after n iterations, the lower limit of the distance between the two sequences is 0; the third limit means that the subset is not close to any periodic point. This definition depicts three characteristics of chaotic sequences: (1) there are infinitely many uncountable non-periodic orbits; (2) there are infinitely many countable stable periodic orbits; (3) there is at least one unstable periodic orbit. This definition of chaos only predicts the existence of non-periodic orbits, but does not indicate whether the set of these non-periodic points has a non-zero metric or directly point out which period is stable.
[0058] As a complex nonlinear dynamic system, the characteristics of chaos can be summarized as follows:
[0059] (1) Randomness. The complexity exhibited by a system is due to its internal dynamics rather than its external environment.
[0060] (2) Boundedness. The range of chaotic motion is bounded. Under no circumstances will its orbit go beyond this range, so it has a certain degree of stability.
[0061] (3) Ergodicity. Due to the finiteness and randomness of the chaotic system, that is, there is no repeated movement behavior during the movement process, so the behavior gradually passes through each position in a specific area.
[0062] (4) Initial value sensitivity. Chaotic systems are very sensitive to initial conditions, and small changes in the initial state are very important to the system's motion state. Internal randomness and initial sensitivity determine the long-term unpredictability of chaotic systems.
[0063] (5) Universality. This refers to certain common characteristics of a system as it tends toward a chaotic state, which does not vary from system to system and does not change due to changes in specific parameters or the system's equation of motion.
[0064] Typical chaotic sequences include the following:
[0065] (1) One-dimensional Logistic chaotic system
[0066] The Logistic chaotic system is a simple one-dimensional discrete dynamical system, defined as:
[0067] x n+1 =f(x n )=αx n (1 n ), n ∈[0,1](2)
[0068] Among them, α is the control parameter, and the input x0 at the first iteration is called the initial value. When α∈[3.57, 4], the system enters a pure state. The bifurcation diagram of Logistic chaos is shown in Figure 2 shown.
[0069] From the bifurcation diagram of the one-dimensional logistic chaotic system, we can see that when 0≤α≤1, x stays at 0, and the system is in a static state; when 1<α≤3, as α changes, the corresponding x value has only one definite value, and the system is in a stable state; when 3<α≤3.4, the x value has two solutions, and as α continues to grow, the system has countless solutions, and when 3.57<α≤4, the system exhibits chaotic phenomena.
[0070] (2) Two-dimensional Henon chaotic system
[0071] The Hénon map is a typical two-dimensional discrete chaotic system, which is defined as follows:
[0072]
[0073] Where a and b are real numbers. The bifurcation diagram when a=0.4 and b=0.3 is as follows: Figure 3As shown, the horizontal axis represents the iteration time t, and the vertical axis represents the iteration value x. It can be clearly seen from the figure that after two bifurcations, the system enters a chaotic state.
[0074] (3) Three-dimensional Lorentz chaotic system
[0075] The Lorentz chaotic system was proposed by American meteorologist Lorentz in 1963 when he was studying the model. This chaotic system is different from the one-dimensional and two-dimensional chaotic systems in that they are dispersed. The three-dimensional Lorentz chaotic system is continuous, and its equation is defined as:
[0076]
[0077] After a lot of calculations by meteorologist Lorentz, it was found that when the parameters a = 10, b = 28, c = 8 / 3, the system orbit in three-dimensional space always moves around a point in the middle. This point is the strange attractor. At this time, the Lorentz system is in a chaotic state. The Lorentz chaotic attractor diagram is shown in the figure below. Figure 4 shown.
[0078] (4) Hyperchaotic Lorentz system
[0079] The hyperchaotic Lorentz system is a chaotic state when the chaotic system has more than four dimensional orbits. A nonlinear controller w is introduced on the basis of the Lorentz chaotic system and discretized using the fourth-order Runge-Kutta method. The equation is shown in (5).
[0080]
[0081] Where a=10,b=8 / 3,c=28,r is the control parameter. When -1.52≤r≤-0.06, the system exhibits hyperchaotic behavior.
[0082] The dissipativeness of the hyperchaotic Lorentz system equation (5) is obtained as shown in equation (6).
[0083]
[0084] At this time, the dissipative structure form is satisfied to generate a chaotic attractor. From the calculation results of formula (6), we can know that the maximum value of r is 13.667.
[0085] The phase diagram of the hyperchaotic Lorentz system obtained by using the Runge-Kutta method according to the determined parameters is as follows: Figure 5 The corresponding initial value range is shown as follows: x0: (-40, 40), y0: (-40, 40), z0: (1, 81), w0: (-250, 250). Figure 5It can be seen from the phase diagram that the hyperchaotic Lorentz system has the phenomenon of contraction and divergence on a plane and has complex dynamic behavior, so the chaotic sequence generated by the hyperchaotic Lorentz system has strong randomness.
[0086] In this embodiment, the method of using a one-dimensional Logistic chaotic system to control a Lorentz hyperchaotic system to generate three sets of hyperchaotic sequences is as follows:
[0087] Step 1: Generate three sets of one-dimensional Logistic chaotic sequences X1, X2 and X3.
[0088] Step 2: Based on the differences between the three sets of one-dimensional Logistic chaotic sequences X1, X2 and X3 and the fixed value, three sets of control factors r1, r2 and r3 of the Lorentz hyperchaotic system are obtained. In this embodiment, the fixed value is set to 1.006, that is, r i =X i -1.006,i=1,2,3.
[0089] Step 3: Based on the three sets of control factors r1, r2 and r3 of the Lorentz hyperchaotic system, three hyperchaotic functions are obtained. The three hyperchaotic functions are discretized by the Runge-Kutta method to obtain three sets of hyperchaotic sequences S L1 , S L2 and S L3 In this embodiment, the initial key is set to x0=2.0, y0=4.0, z0=6.0, and w0=8.0.
[0090] The image encryption algorithm designed in this embodiment starts from the two perspectives of reducing the position correlation and pixel grayscale correlation of the image pixels, and adopts the mixed processing method of image scrambling and chaotic sequence to encrypt the image. Specifically, the method of encrypting the image after scrambling a component by a group of hyperchaotic sequences is as follows:
[0091] Step 1: Based on the hyperchaotic sequence S L1 Calculate the corresponding key stream SC1:
[0092] SC1=mod(floor((S L1 +100)×10 10 ),10×max(M,N))+1
[0093] Among them, mod represents the modulo operation, and floor represents the integer operation.
[0094] Step 2: Cut the secret key stream SC1 into two sub-key streams SC 1a and SC 1b , based on two sub-key streams SC 1a and SC 1bThe scrambled image is encrypted using the following formula to obtain the secret image:
[0095] P R2 =mod(SC 1a +SC 1b ×k,M×N)+1
[0096] Among them, P R2 represents the encrypted image, and k represents the sequence number of each element in the sequence.
[0097] The three components R, G, and B are encrypted through the above steps to obtain the encrypted image P of the three components. R2 , P G2 , P B2 .
[0098] S3: Perform diffusion processing on the three encrypted images respectively to obtain the ciphertext matrices of three components.
[0099] The image diffusion algorithm hides as much information of the plaintext pixel as possible in the pixel of the ciphertext image by changing the image pixel value while keeping the image pixel position unchanged. The methods of changing image pixels generally include diffusion based on XOR operation and diffusion algorithm based on addition and modulus operation. The principle of the diffusion algorithm based on XOR operation is shown in formula (7).
[0100]
[0101] Among them, B(i) is the diffusion ciphertext pixel result, S(i) is the diffusion key stream, A(i) is the plaintext pixel value, and B(i-1) is the ciphertext generated by the previous encryption. Using XOR diffusion to change the pixel value of the image makes it impossible for attackers to simply attack the encrypted image, which enhances the complexity and security of the encryption algorithm.
[0102] In this embodiment, the method for performing diffusion processing on the encrypted image is performed in two steps, including: performing forward diffusion on the encrypted image; and performing backward diffusion on the encrypted image based on the forward diffusion result.
[0103] The forward diffusion method is: divide the key stream SC1 calculated based on the hyperchaotic sequence into two groups of sub-key streams according to the odd and even sequence numbers, and divide the sub-key stream SC1 composed of elements with odd sequence numbers into two groups of sub-key streams. 1c , the forward diffusion result is calculated by the following formula:
[0104]
[0105] Among them, P R3 (1) P R3 (k-1) and P R3(k) represent the 1st, k-1th and kth pixels of the image after forward diffusion, respectively. R3 (0) represents the preset forward diffusion initial value (i.e., forward diffusion secret key), SC 1c (1) and SC 1c (k) represent the sub-key stream SC 1c The first and kth elements in P R2 (1) and P R2 (k) represent the first and kth pixels of the encrypted image, respectively. Represents the exclusive-or operation.
[0106] The backward diffusion method is: divide the key stream SC1 calculated based on the hyperchaotic sequence into two groups of sub-key streams according to the odd and even sequence numbers, and the sub-key stream SC1 composed of elements with even sequence numbers is divided into two groups of sub-key streams according to the odd and even sequence numbers. 1d , the back diffusion result is calculated by the following formula:
[0107]
[0108] Among them, P R4 (M×N),P R4 (k) and P R4 (k+1) represent the M×Nth, kth, and k+1th pixels of the image after back diffusion, respectively. R4 (0) represents the preset back-diffusion initial value (i.e., back-diffusion key), SC 1d (M×N) and SC 1d (k) represent the sub-key stream SC 1d The M×Nth and kth elements in P R3 (M×N) and P R3 (k) represent the M×N and k-th pixels of the image after forward diffusion, respectively.
[0109] Through the above diffusion process, the diffused image P of the three components is obtained. R4 , P G4 , P B4 .
[0110] S4: Concatenate the three component ciphertext matrices to obtain a ciphertext image.
[0111] The above steps complete the encryption of the image.
[0112] The decryption process is essentially the reverse process of the encryption process. E The three components P R4 , P G4 , P B4 Just decrypt it.
[0113] (1) P R4 The reverse process of back-diffusion restoration of the ciphertext component is shown in formula (8), and we get P R5 .
[0114] Then the reverse process of forward diffusion reduction is performed as shown in formula (9), and the de-diffusion component P is obtained. R6 .
[0115]
[0116]
[0117] Where P R5 (0) = P R6 (0) = 0, SC 1c is the subkey stream during forward diffusion, SC 1d is the sub-key stream during backward diffusion.
[0118] (2) After de-diffusion, the image P R6 After chaotic decryption, we get image P R7 .
[0119] P R7 =mod(SC 1b +SC 1a ×k,M×N)+1
[0120] (3) P R7 Perform Arnold descrambling to restore the channel plaintext component P R8 , similarly, the ciphertext component P G4 and P B4 After the inverse operation of backward diffusion and forward diffusion, chaotic decryption and Arnold descrambling are performed to obtain the other two channel plaintext components P G8 , P B8 .
[0121] (4) Finally, P R8 , P G8 , P B8 The three channel plaintext components are synthesized into a complete plaintext color image, and the entire decryption process is completed.
[0122] The embodiments of the present invention have the following beneficial effects:
[0123] (1) The R, G, and B channels of the color image are encrypted separately to reduce the interaction between the three channels and the correlation between the R, G, and B components.
[0124] (2) Use one-dimensional Logistic discrete chaotic sequence to control the hyperchaotic Lorentz system to obtain more complex nonlinear dynamic characteristics and improve the performance of the chaotic sequence itself.
[0125] (3) The three-level encryption mode of scrambling-chaotic encryption-diffusion is adopted to increase the key space and improve the effectiveness and reliability of image encryption.
[0126] Embodiment 2:
[0127] The present invention also provides a color image hybrid encryption terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above method embodiment of embodiment 1 of the present invention when executing the computer program.
[0128] Further, as an executable solution, the color image hybrid encryption terminal device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The color image hybrid encryption terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the composition structure of the above-mentioned color image hybrid encryption terminal device is only an example of a color image hybrid encryption terminal device, and does not constitute a limitation on the color image hybrid encryption terminal device. It may include more or less components than the above-mentioned, or a combination of certain components, or different components. For example, the color image hybrid encryption terminal device may also include input and output devices, network access devices, buses, etc., and the embodiments of the present invention do not limit this.
[0129] Further, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the color image hybrid encryption terminal device, and uses various interfaces and lines to connect various parts of the entire color image hybrid encryption terminal device.
[0130] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the color image hybrid encryption terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0131] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.
[0132] If the module / unit integrated in the color image hybrid encryption terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory) and software distribution medium, etc.
[0133] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A color image hybrid encryption method, characterized in that: The following steps are involved: S1: Scramble the components of the three channels R, G, and B of the encrypted image separately to obtain an image after the three components are scrambled; S2: Use the one-dimensional Logistic chaotic system to control the Lorentz hyperchaotic system to generate three sets of hyperchaotic sequences, and use the three sets of hyperchaotic sequences to encrypt the scrambled images of the three components respectively; S3: Perform diffusion processing on the three encrypted images respectively to obtain the ciphertext matrices of three components; S4: Concatenate the three component ciphertext matrices to obtain a ciphertext image.
2. The color image hybrid encryption method according to claim 1, characterized in that: The method of using a one-dimensional Logistic chaotic system to control a Lorentz hyperchaotic system to generate three sets of hyperchaotic sequences in step S2 is: Generate three sets of one-dimensional Logistic chaotic sequences; Based on the differences between three groups of one-dimensional Logistic chaotic sequences and fixed values, three groups of control factors of Lorentz hyperchaotic systems are obtained; Based on the obtained three groups of control factors of Lorentz hyperchaotic systems, three hyperchaotic functions are obtained. The three hyperchaotic functions are discretized by the Runge-Kutta method to obtain three groups of hyperchaotic sequences.
3. The color image hybrid encryption method according to claim 1, characterized in that: The method of encrypting the scrambled image of each color component by a set of hyperchaotic sequences is as follows: calculating the corresponding key stream based on the hyperchaotic sequence; dividing the secret key stream into two sub-key streams from the middle, and encrypting the scrambled image based on the two sub-key streams to obtain a secret image.
4. The color image hybrid encryption method according to claim 3 is characterized in that: The calculation formula of the key stream corresponding to the hyperchaotic sequence is: SC1=mod(floor((S L1 +100)×10 10 ),10×max(M,N))+1 Among them, SC1 represents the key stream, S L1 represents a hyperchaotic sequence, mod represents a modulo operation, floor represents a rounding operation, max represents the maximum value, and M and N represent the number of pixels contained in the length and width of the image respectively.
5. The color image hybrid encryption method according to claim 3 is characterized in that: Based on sub-key stream SC 1a and SC 1b The calculation formula for encrypting the scrambled image to obtain the encrypted image is: P R2 =mod(SC 1a +SC 1b ×k,M×N)+1 Among them, P R2 represents the encrypted image, mod represents the modulus operation, k represents the sequence number of each element in the sequence, and M and N represent the number of pixels contained in the length and width of the image respectively.
6. The color image hybrid encryption method according to claim 1, characterized in that: The method for performing diffusion processing on the encrypted image includes: performing forward diffusion on the encrypted image; and performing backward diffusion on the encrypted image based on the forward diffusion result.
7. The color image hybrid encryption method according to claim 6, characterized in that: The forward diffusion method is: divide the key stream SC1 calculated based on the hyperchaotic sequence into two groups of sub-key streams according to the odd and even sequence numbers, and divide the sub-key stream SC1 composed of elements with odd sequence numbers into two groups of sub-key streams. 1c , the forward diffusion result is calculated by the following formula: Among them, P R3 (1) P R3 (k-1) and P R3 (k) represent the 1st, k-1th and kth pixels of the image after forward diffusion, respectively. R3 (0) indicates the preset forward diffusion initial value, SC 1c (1) and SC 1c (k) represent the sub-key stream SC 1c The first and kth elements in P R2 (1) and P R2 (k) represent the first and kth pixels of the encrypted image, respectively. Represents the exclusive-or operation.
8. The color image hybrid encryption method according to claim 6, characterized in that: The backward diffusion method is: divide the key stream SC1 calculated based on the hyperchaotic sequence into two groups of sub-key streams according to the odd and even sequence numbers, and the sub-key stream SC1 composed of elements with even sequence numbers is divided into two groups of sub-key streams according to the odd and even sequence numbers. 1d , the back diffusion result is calculated by the following formula: Among them, P R4 (M×N),P R4 (k) and P R4 (k+1) represent the M×Nth, kth, and k+1th pixels of the image after back diffusion, respectively. R4 (0) indicates the preset initial value of back diffusion, SC 1d (M×N) and SC 1d (k) represent the sub-key stream SC 1d The M×Nth and kth elements in P R3 (M×N) and P R3 (k) represent the M×Nth and kth pixels of the image after forward diffusion, Represents the exclusive-or operation.
9. A color image hybrid encryption terminal device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
