Compression and encryption method for double random phase-DNA iterative diffusion coding

Through the dual random phase-DNA iterative diffusion encoding method, the problem of single diffusion direction and easy to attack in the existing image encryption method is solved, and a complex and difficult-to-capture diffusion direction is achieved, which improves the security and key space of the encryption method.

CN119865304AActive Publication Date: 2025-04-22CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510076206.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-04-22
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

Existing image encryption methods cannot achieve complex and difficult to capture diffusion, with a single diffusion direction and are susceptible to attack.

Method used

The dual random phase-DNA iterative diffusion encoding method is adopted, and the plaintext image is divided into multiple sub-blocks, and the zigzag blocks are built-in mess and inter-block mess are performed, and complex diffusion is achieved using DRPE and DNA encoding.

Benefits of technology

The complex and difficult to capture diffusion direction is achieved, the security of the encryption method is improved, the dynamic complexity and traversality are higher, and the greater key space and nonlinear complexity are provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865304A_ABST
    Figure CN119865304A_ABST
Patent Text Reader

Abstract

The invention discloses a compression and encryption method for double random phase-DNA iterative diffusion coding, belongs to the field of image encryption, and realizes more complex diffusion characteristics and compression functions. According to the method, a plaintext image is divided into a plurality of sub-blocks, and the sub-blocks are sequentially used as input images of double random phase coding after zigzag block built-in scrambling and inter-block scrambling. And the middle ciphertext output in each round is subjected to DNA coding to serve as a series of masks in the second stage of double random phase coding, and a compressed ciphertext image is finally obtained through multiple iterations. In the whole process, a series of masks of the first stage of double random phase coding and a dynamic coding strategy of DNA coding are generated through the improved four-dimensional hyperchaotic system, the improved system has higher dynamic complexity and ergodicity, and key sensitivity and key space are provided for the method. In addition, the method can be popularized to multi-image encryption. The characteristics reflect the safety and practicability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image encryption. Background Art

[0002] Shannon, the "father of information theory", proposed that a general encryption system includes two basic steps: scrambling and diffusion. Most of the current image encryption methods are based on this idea. Diffusion refers to hiding the information of each plaintext pixel in as many ciphertext pixels as possible, so that any relationship between the ciphertext and the plaintext is difficult to detect. The degree of diffusion of each pixel information in the plaintext image is an important factor in evaluating the security of the encryption method.

[0003] So far, the image encryption diffusion step usually divides and rearranges the plaintext image in a specific way, and then superimposes its pixel information in a predefined direction. Specifically, it is divided into the following three categories. The first category is to treat the pixel values ​​of the plaintext image as a one-dimensional sequence, and perform pairwise operations on the pixel value sequence in turn to achieve diffusion. This type of method has a single diffusion direction and is easy to attack. The second type is to regard the plaintext image as a two-dimensional matrix and perform pixel diffusion in different directions such as up and down, left and right, and diagonal. Although the diffusion direction is increased, the direction is still clear and fixed. The third method encodes or transforms the plaintext information, defines the diffusion rules in the transform domain to achieve diffusion. Although the diffusion dimension is further increased, it is still impossible to achieve random and secure diffusion. Therefore, it is necessary to design an image encryption method to achieve complex and difficult-to-capture diffusion. Summary of the invention

[0004] The present invention proposes a compression encryption method of double random phase-DNA iterative diffusion coding to achieve compression characteristics and complex diffusion. Different from the previous diffusion methods, the present invention adopts double random phase encoding (DRPE) combined with DNA coding as the diffusion structure, and uses blocks and pixels within blocks as diffusion units to realize double random phase-DNA iterative diffusion coding. The complex diffusion direction of this method is determined by the block segmentation method, the random scrambling of the blocks, and DRPE. In addition, we also propose an improved four-dimensional hyperchaotic system, which shows better dynamic complexity and ergodicity than the original system, and provides key sensitivity and key space for this encryption method.

[0005] The working principle of the present invention is as follows: the plaintext image is divided into multiple sub-blocks, which are sequentially input into DRPE after zigzag intra-block scrambling and inter-block scrambling. Each output intermediate ciphertext is DNA-encoded and then used as a sub-key for the second-stage mask of DRPE. After multiple cyclic superpositions, a ciphertext with a smaller size than the original plaintext image can be obtained. In the whole process, a series of random phase masks and DNA-encoded dynamic coding strategies of the first stage of DRPE are generated by an improved four-dimensional hyperchaotic system.

[0006] The compression encryption method of the dual random phase-DNA iterative diffusion coding of the present invention comprises three stages: key generation, encryption and decryption: (1) Key generation stage: The SHA-256 function hash value of the plaintext image is combined with an external key to generate a chaotic initial value, and then an improved four-dimensional hyperchaotic system is used to iteratively output a series of key streams. The key streams are subsequently used as a series of masks and DNA coding dynamic encoding strategies in the first stage of DRPE. (2) Encryption stage: The plaintext image is divided into multiple sub-blocks, which are used as the input images of DRPE after zigzag intra-block scrambling and inter-block scrambling. The intermediate ciphertext output in each round will be DNA encoded as a series of masks in the second stage of DRPE. After multiple iterations, the compressed ciphertext image is finally obtained. The encryption process is as follows: Figure 1 As shown; (3) Decryption stage: Generate a chaotic sequence based on the chaotic initial value key, perform DNA encoding on the intermediate ciphertext to obtain a series of masks corresponding to the second stage of DRPE, perform inverse DNA encoding on the ciphertext image C and combine the result with the intermediate ciphertext into a series of complex-valued matrices, and obtain image blocks through the inverse operation of DRPE. Finally, perform inter-block inverse scrambling and intra-block inverse zigzag scrambling to obtain a series of image blocks, and reassemble the image blocks to obtain the plaintext image. The decryption process is as follows: Figure 2 shown.

[0007] The specific implementation process of step (1) is as follows: (1a) Generating chaotic initial values :For size The plaintext image uses the SHA-256 algorithm to obtain a 256-bit binary number summary of the plaintext image. Each 8 bits is regarded as a group, generating 32 decimal numbers, expressed as ; The calculation formula of chaos initial value is as follows: in, A random integer external key in the range [0, 255]; (1b) Generate chaotic key stream :According to the initial value Improved four-dimensional hyperchaotic system iteration To avoid transient effects, remove the As a result of the iteration, four sets of key streams are obtained. , , , , the improved four-dimensional hyperchaotic system formula is as follows: in , , , , , , , are system parameters and their value ranges, is the delay time and , the obtained value in each round Output in sequence to get the chaotic sequence .

[0008] The specific implementation process of step (2) is as follows: (2a) Scrambling phase: The plaintext image Divide into size Image blocks , random number , ;right Using zigzag scrambling within the block, we get ;right Sort in ascending order to get the corresponding index sequence. Rearrange and get the scrambled image blocks ; (2b) Key stream reorganization phase: The key stream Arrange The image is then divided into blocks, and obtain four block sequences , , , ; and XOR operation is performed on the corresponding pixels to obtain , As the starting phase mask for the second stage of DRPE; As the first stage random phase mask of DRPE ; Use respectively , , As a key image for DNA XOR, DNA encoding, and DNA decoding; (2c) Double random phase-DNA iterative diffusion coding stage: scrambled image block sequence Execute in sequence Wheel DRPE; Figure 4 As shown in In the wheel, parallel light is incident from the left side. with the first random phase plate in the input plane After the Fourier transform into the Fourier transform domain, it is multiplied by the second random phase mask on the spectrum plane. multiply; it is worth noting that Depend on The real part of is calculated by DNA coding; the complex value matrix with white noise characteristics is obtained by inverse Fourier transform ; In this way, after Rounds of double random phase-DNA iterative diffusion coding, we get ; Finally, The real part of is encoded by DNA to obtain the compressed ciphertext image ; The iterative expression of double random phase-DNA iterative diffusion coding is described by the following formula: in represents the Fourier transform, Represents the inverse Fourier transform.

[0009] The specific implementation process of step (3) is as follows: (3a) Key stream generation process: Based on the key Iterating the four-dimensional chaotic system to obtain the key stream , reorganizing the key stream into a sequence of four blocks , , , ;right and The initial random phase mask of the first stage of DRPE is obtained by performing XOR operation on the corresponding pixels of ; For the key The real part of is encoded by DNA to obtain the random phase mask of the second stage of DRPE ;and , , They are used as key images for DNA XOR, DNA encoding and DNA decoding respectively; (3b) DRPE inverse process: for the ciphertext image The real part of DNA coding is inversely calculated to obtain ,use As a random phase mask in the first stage of DRPE , combined with the second stage random phase mask , respectively Perform DRPE inverse operation to obtain the scrambled image block ; (3c) Scrambling inverse process: According to Get the reverse index sequence for the graphic block sequence Reverse the permutation to get , then Perform zigzag reverse scrambling to get , Reconstruction into plaintext image .

[0010] Compared with the traditional diffusion-based image encryption method, the present invention has the following beneficial effects: (1) It can realize more complex and difficult-to-capture diffusion. The diffusion direction of this method is determined by the block segmentation method, the random arrangement of the blocks, and DRPE. It is also combined with a chaotic system with nonlinear characteristics, which makes it more secure. (2) The improved four-dimensional hyperchaotic system has higher dynamic complexity and ergodicity than the original system, which provides a larger key space, key sensitivity and nonlinear complexity for this method; (3) The special compression characteristics can save transmission space. Unlike traditional compression, the compression characteristics of this method are based on the separability and superposition of images. (4) Scalability: This method can be extended to a multi-image encryption method by simply replacing the segmented image with multiple different images. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] FIG1 is a schematic diagram of the encryption stage of the method of the present invention.

[0012] FIG2 is a schematic diagram showing the principle of the decryption stage of the method of the present invention.

[0013] Figure 3 is a schematic diagram of the DRPE-DNA encoded iterative diffusion principle.

[0014] 4(a)-(c) are respectively a plaintext image, an encrypted image and a decrypted image in an embodiment of the present invention.

[0015] The diagram numbers in the above drawings are: 1 Lens DETAILED DESCRIPTION

[0016] The present invention is further described below with reference to the accompanying drawings, and a specific embodiment of the present invention is described.

[0017] In this example, MatlabR2023b is used for simulation. The computer environment configuration is Windows 11, 32.00GB memory, Intel(R) Core (TM) i9-13900HX 2.20 GHz. Select the 256 256 grayscale images are used as samples. The segmented image block size is , chaotic system parameters , , , , , , , , .

[0018] The entire encryption and decryption process can be implemented in the following steps: (1) Key generation phase The pair size is 256 The SHA-256 algorithm is used to generate a 256-bit binary digest of the plaintext image of 256. This step introduces the plaintext features into the encryption process and can effectively resist specific plaintext attacks. Then, each 8 bits is regarded as a group, and 32 decimal numbers are obtained, which are expressed as , calculated according to formulas (1) and (2) ; According to formulas (3) and (4), the improved four-dimensional hyperchaotic system is iterated To avoid transient effects, remove the As a result of the iteration, four sets of key streams are obtained. , , , . (2) Encryption stage like Figure 1 As shown, the size is The plaintext image Divide into size Image blocks , ,right Using zigzag scrambling within the block ;right Sort in ascending order to get the corresponding index sequence, and sort according to the index order. Rearrange and get the scrambled image blocks ; The key stream Arrange The image is then divided into blocks, and obtain four block sequences , , , ; and XOR operation is performed on the corresponding pixels to obtain , As the starting phase mask for the second stage of DRPE; As the first stage random phase mask of DRPE ; Use respectively , , As a key image for DNA XOR, DNA encoding and DNA decoding; for scrambled image block sequences Execute 16 rounds of DRPE in sequence; Figure 3 As shown in In the wheel, , parallel light is incident from the left, with the first random phase plate in the input plane After the Fourier transform into the Fourier transform domain, it is multiplied by the second random phase mask on the spectrum plane. multiply; it is worth noting that Depend on The real part of is calculated by DNA coding; the complex value matrix with white noise characteristics is obtained by inverse Fourier transform ; Thus, after 16 rounds of dual random phase-DNA iterative diffusion coding, we get ; Finally, The real part of is encoded by DNA to obtain the superimposed ciphertext image Iterative diffusion makes any pixel information of the plaintext image affect any pixel point of the ciphertext image, and due to the characteristics of DRPE, the diffusion direction is random and complex, which increases the encryption method's ability to resist plaintext attacks. (3) Decryption stage like Figure 2 As shown, according to the key Iterating the four-dimensional hyperchaotic system to obtain the key stream , reorganizing the key stream into a sequence of four blocks , , , ;right and The initial random phase mask of the first stage of DRPE is obtained by performing XOR operation on the corresponding pixels of ; For the key The real part of is encoded by DNA to obtain the random phase mask of the second stage of DRPE ;and , , As key images for DNA XOR, DNA encoding and DNA decoding respectively; for ciphertext images The real part of DNA coding is inversely calculated to obtain ,use As a random phase mask in the first stage of DRPE , combined with the second stage random phase mask , respectively Perform DRPE inverse operation to obtain the scrambled image block ; Traverse Get the reverse index sequence for the graphic block sequence Reverse the permutation to get ,right Perform zigzag reverse scrambling to get , Reconstruction into plaintext image .

[0019] like Figure 4 (a)-(c) show the plaintext image, ciphertext image and decrypted image of the sample image respectively. It can be seen that when the block size is selected In the case of , the ciphertext image size is 1 / 16 of the plaintext image, which reflects the compression characteristics of the method of the present invention. Different from traditional compression, the compression of the present invention is based on the divisibility and superposition of images, and the smaller the block size, the higher the compression rate, and the quality of the decrypted image is not affected. However, under the DRPE-DNA iterative diffusion model, the smaller the block size, the smaller the parallel light projection area. In extreme cases, this may require a very small or even a completely new DRPE-DNA iterative diffusion architecture.

Claims

1. A compression encryption method of double random phase-DNA iterative diffusion coding, characterized in that In the key generation phase, an improved four-dimensional chaotic system is used to generate the key stream. The improved system has better dynamic complexity and ergodicity than the original system. Double Random Phase Encoding (DRPE) combined with DNA coding is used as the diffusion structure, and different image blocks and pixels within blocks are used as diffusion units to achieve a complex and difficult-to-attack diffusion method. A compressed ciphertext image is generated through an iterative diffusion process, and the size of the compressed ciphertext image is equivalent to the size of the image block; the method can be extended to a multi-image encryption method by replacing the sub-blocks in the method with multiple images of the same size; the image encryption method comprises the following steps: (1) Key generation stage: The SHA-256 function hash value of the plaintext image is combined with an external key to generate a chaotic initial value, and then an improved four-dimensional hyperchaotic system is used to iteratively output a series of key streams. The key streams are subsequently used as a series of masks and DNA coding dynamic encoding strategies in the first stage of DRPE. (2) Encryption stage: The plaintext image is divided into multiple sub-blocks, which are used as the input images of DRPE in turn after zigzag intra-block scrambling and inter-block scrambling. The intermediate ciphertext output in each round will be DNA encoded as a series of masks for the second stage of DRPE. After multiple iterations, the compressed ciphertext image is finally obtained. (3) Decryption stage: Generate a chaotic sequence based on the chaotic initial key, perform DNA encoding on the intermediate ciphertext to obtain a series of masks corresponding to the second stage of DRPE, and combine the results of inverse DNA encoding of the ciphertext image C with the intermediate ciphertext into a series of complex-valued matrices. After the inverse operation of DRPE, image blocks are obtained. Finally, inter-block inverse scrambling and intra-block inverse zigzag scrambling are performed to obtain a series of image blocks. The image blocks are reassembled to obtain the plaintext image.

2. The compression encryption method of dual random phase-DNA iterative diffusion coding according to claim 1 is characterized in that An improved four-dimensional chaotic system is used to generate a key stream, which enhances the dynamic complexity and ergodicity of the key stream. The specific implementation process of step (1) is as follows: (1a) Generating chaotic initial values :For size The plaintext image uses the SHA-256 algorithm to obtain a 256-bit binary number summary of the plaintext image. Each 8 bits is regarded as a group, generating 32 decimal numbers, expressed as ; The calculation formula of chaos initial value is as follows: ; ; in, A random integer external key in the range [0, 255]; (1b) Generate chaotic key stream :According to the initial value Improved four-dimensional hyperchaotic system iteration To avoid transient effects, remove the As a result of the iteration, four sets of key streams are obtained. , , , , the improved four-dimensional hyperchaotic system formula is as follows: ; ; in are system parameters and their value ranges, is the delay time and , the obtained value in each round Output in sequence to get the chaotic sequence .

3. The compression encryption method of dual random phase-DNA iterative diffusion coding according to claim 1 is characterized in that DRPE combined with DNA coding is used as the diffusion structure, and different image blocks and pixels within the blocks are used as diffusion units, thereby realizing a complex and difficult-to-attack diffusion method and compression characteristics; the specific implementation process of step (2) is as follows: (2a) Scrambling phase: The plaintext image Divide into size Image blocks , random number , ;right Using zigzag scrambling within the block ;right Sort in ascending order to get the corresponding index sequence. Rearrange and get the scrambled image blocks ; (2b) Key stream reorganization phase: The key stream Arrange The image is then divided into blocks, and obtain four block sequences , , , ; and XOR operation is performed on the corresponding pixels to obtain , As the starting phase mask for the second stage of DRPE; use As the first stage random phase mask of DRPE ; Use respectively , , As a key image for DNA XOR, DNA encoding, and DNA decoding; (2c) Double random phase-DNA iterative diffusion coding stage: scrambled image block sequence Execute in sequence round DRPE; In the wheel, parallel light is incident from the left side. with the first random phase plate in the input plane After the Fourier transform into the Fourier transform domain, it is multiplied by the second random phase mask on the spectrum plane. multiply; it is worth noting that Depend on The real part of is calculated by DNA coding; the complex value matrix with white noise characteristics is obtained by inverse Fourier transform , so, after The double random phase-DNA iterative diffusion coding of the round is obtained. ; Finally, The real part of is encoded by DNA to obtain the compressed ciphertext image ; The iterative expression of double random phase-DNA iterative diffusion coding is described by the following formula: ; in represents the Fourier transform, represents the inverse Fourier transform.

4. The compression encryption method of dual random phase-DNA iterative diffusion coding according to claim 1 is characterized in that: This method can be extended to a multi-image encryption method by simply replacing the sub-blocks in the method with multiple images of the same size, and obtaining a ciphertext image of the size of a single image after encryption.

5. The compression encryption method of dual random phase-DNA iterative diffusion coding according to claim 1 is characterized in that The decryption process is more efficient than the encryption process and can be executed in parallel with the DRPE inverse process. The specific implementation process of step (3) is as follows: (3a) Key stream generation process: Based on the key Iterating the four-dimensional chaotic system to obtain the key stream , reorganizing the key stream into a sequence of four blocks , , , ;right and The initial random phase mask of the first stage of DRPE is obtained by performing XOR operation on the corresponding pixels of ; For the key The real part of is encoded by DNA to obtain the random phase mask of the second stage of DRPE ;and , , They are used as key images for DNA XOR, DNA encoding and DNA decoding respectively; (3b) DRPE inverse process: for the ciphertext image The real part of DNA coding is inversely calculated to obtain ,use As the first stage random phase mask of DRPE , combined with the second stage random phase mask , respectively Perform DRPE inverse operation to obtain the scrambled image block ; (3c) Reverse process of scrambling: traversal Get the reverse index sequence for the graphic block sequence Reverse the permutation to get , then Perform zigzag reverse scrambling to get , Reconstruction into plaintext image .

Citation Information

Patent Citations

  • Image encryption method based on multidirectional diffusion and DNA coding

    CN111008383A

  • Image compression encryption method and cloud auxiliary decryption method based on compressed sensing and optical transformation

    CN112134681A

  • Image compression encryption method based on compressed sensing and in-cloud decryption authentication method

    CN116073981A

  • Enterprise information image encryption method based on chaotic system and biological evolution strategy

    CN116346302A

  • Image encryption method and system based on chaotic system and DNA coding

    CN119071404A