An image encryption method, system, image decryption method, and decryption system.
By combining computational holographic GS algorithm and Logistic chaotic system, and using pseudo-random block partitioning and bitwise XOR operation, the problems of poor encryption performance and small key space in existing image encryption technology are solved, and higher confidentiality and security are achieved.
Patent Information
- Application Number
- CN202210880340.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-25
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-07-25
AI Technical Summary
Existing image encryption technologies suffer from poor encryption performance, small key space, and high correlation between image pixels, making them easy to crack.
The computational holographic GS algorithm is used to encode a pure phase holographic encrypted image. A pseudo-random sequence is generated by combining it with a Logistic chaotic system. The image is then scrambled and encrypted by spreading through pseudo-random block division and bitwise XOR operation.
It improves encryption performance, increases key space, and ensures the confidentiality and security of images during transmission and use.
Smart Images

Figure CN115391796B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of information security, and more specifically, to an image encryption method, system, image decryption method, and decryption system. Background Technology
[0002] In today's globally networked information age, information security has received increasing attention, and the security of image information transmission has gradually become a hot topic of social concern. In important commercial, scientific research, and military fields, images, as carriers of a large amount of information, require extremely high confidentiality during transmission.
[0003] Images are easily intercepted, stolen, or tampered with by third parties during transmission. Therefore, an increasing number of digital images require highly secure encryption methods to improve security during storage and transmission. Image encryption technologies can be divided into compression encryption and spatial encryption. Compression encryption is based on a specific compression format or technique, such as JPEG, arithmetic coding, or wavelet compression. Spatial encryption encrypts uncompressed images, treating them as two-dimensional data.
[0004] With the surge of research into hyperchaotic systems, many spatial image encryption technologies are now based on encryption algorithms for various hyperchaotic systems. An existing technology discloses an image block encryption method based on chaos and computational holography. First, the plaintext image to be encrypted is decomposed into three channels using RGB, resulting in three single-channel grayscale images. Each of these three single-channel grayscale images is then divided into sub-images of equal size. A subset of these sub-images is randomly selected, and a pseudo-random sequence is generated using a Lorenz hyperchaotic system. Pixels in each sub-image are then scrambled, followed by pixel diffusion. Both scrambling and diffusion operations increase the difficulty of decryption. Then, the phase restoration GS algorithm from computational holography is used to convert the remaining sub-images into holograms. This hologram conversion process itself constitutes another form of encryption. Compared to simple chaos-based encryption, this method stores a larger amount of information, is easier to operate on a computer system, and improves the flexibility of encryption operations. The scrambled and diffused sub-images are then combined with the holographically converted sub-images to form a complete single-channel encrypted image. Finally, a complete encrypted image is obtained using three-channel RGB synthesis, effectively ensuring the confidentiality and security of image information during use and transmission. However, in this process, during sub-image segmentation, the three single-channel grayscale images are explicitly divided into sub-images of the same size. The pixels after segmentation are highly correlated. Once a pixel is cracked after encryption, the other related pixels will be easily cracked. Therefore, the encryption performance is poor and the key space is small. Summary of the Invention
[0005] To address the issues of poor encryption performance and small key space in current image encryption methods, this invention proposes an image encryption method, system, image decryption method, and decryption system. By utilizing a pseudo-random block partitioning method, the encryption performance is improved and the key space is larger, resulting in better confidentiality and security of images during transmission and use.
[0006] To achieve the above-mentioned technical effects, the technical solution of the present invention is as follows:
[0007] An image encryption method, the method comprising the following steps:
[0008] S1. Obtain the original image to be encrypted;
[0009] S2. The original image is encoded into a pure phase holographic encrypted image based on the computational holographic GS algorithm;
[0010] S3. Use the Logistic chaotic system to generate a pseudo-random sequence array, generate a complementary array based on the pseudo-random sequence array, and preprocess the pseudo-random sequence array and the complementary array to obtain the preprocessed pseudo-random sequence array and its complementary array.
[0011] S4. Based on the preprocessed pseudo-random sequence array and its complementary array, the pure phase holographic encryption image is randomly masked and divided into blocks to obtain the block sub-images;
[0012] S5. Use the Logistic chaotic system to perform bitwise XOR operation on the segmented sub-images to obtain scrambled and encrypted sub-images;
[0013] S6. Combine the scrambled and encrypted sub-images into a complete encrypted image.
[0014] In this technical solution, the original image is encoded into a pure phase holographic encrypted image using the computational holographic GS algorithm. Then, based on a pseudo-random block-based method, a pseudo-random sequence is generated using a Logistic chaotic system, and its complementary sequence is obtained. These two sequences are used to divide the pure phase holographic encrypted image into blocks, generating two complementary sub-images. This avoids strong correlation between image pixels and ensures the reliability of encryption for each image pixel. Next, the Logistic chaotic system is used to perform a bitwise XOR operation on the block sub-images to obtain scrambled encrypted sub-images. Finally, the scrambled encrypted sub-images are combined to form a complete encrypted image. This results in better encryption performance and a larger key space, giving the image better confidentiality and security during transmission and use.
[0015] Preferably, the process of encoding the original image into a pure phase holographic encrypted image based on the computational holographic GS algorithm is as follows:
[0016] S21. Introduce a random phase matrix with the same pixel size as the original image. Starting from the spatial domain of the original image, use the original image and the random phase matrix as the amplitude and phase of the iterative input, respectively, and set a threshold.
[0017] S22. Perform Fourier transform on the amplitude and phase to obtain the frequency domain distribution, then apply frequency domain constraints, preserve phase information, and normalize the amplitude;
[0018] S23. Perform an inverse Fourier transform on the frequency domain distribution after applying frequency domain constraints to obtain the spatial domain distribution, and then apply spatial domain constraints.
[0019] S24. Repeat steps S22 to S23. During the execution, calculate the error between the target image and the pixel result of the current iteration output image. When the correlation coefficient between the image pixels is greater than or equal to the threshold, the iteration terminates and the final pure phase holographic encrypted image is output.
[0020] Here, we consider the image data input to the computer as analogous to a wave function, with its amplitude and phase as typical features. Then, we define the size of the random phase matrix by the pixel size of the input image. We use the original image and the random phase matrix as the amplitude and phase of the iterative input, respectively. Based on the computational holographic GS algorithm, we iteratively calculate to obtain a pure phase holographic encrypted image.
[0021] Preferably, let the original image be represented as f(x, y), g(u, v) be the image to be encrypted, φ(x, y) be the random phase, x and y be the horizontal and vertical coordinates in the spatial domain, and u and v be the horizontal and vertical coordinates in the frequency domain, then the process of encoding the original image into a pure phase holographic encrypted image based on the computational holographic GS algorithm satisfies the following formula:
[0022] F(x,y)=f(x,y)·φ(x,y)
[0023]
[0024]
[0025]
[0026] Where FT stands for Fast Fourier Transform, and IFT stands for Inverse Fast Fourier Transform; g n (u, v) are the coordinates of the image in the frequency domain after the nth transformation, f n (x, y) are the spatial coordinates of the image after the nth transformation.
[0027] Preferably, the process of generating a pseudo-random sequence array using a Logistic chaotic system and then generating a complementary array based on the pseudo-random sequence array is as follows:
[0028] S31. Introduce the nonlinear iterative equation of the Logistic chaotic system, set the first set of initial values, and use the nonlinear iterative equation to generate a mapping variable;
[0029] S32. Determine the number of pixels in the pure phase holographic encryption image, use this as the number of iterations for the mapping variable, and generate an initial pseudo-random array by performing nonlinear iterative equation calculations again.
[0030] S33. Assign the value 0 to the elements less than or equal to 0.5 in the initial pseudo-random sequence array, and assign the value 1 to the remaining elements to generate a pseudo-random sequence array containing only 0 and 1 in random positions.
[0031] S34. Introduce a set of arrays of the same size where all values are 1, and subtract this array from the pseudo-random sequence array in S33 to obtain a complementary array;
[0032] In step S31, the nonlinear iterative equation of the Logistic chaotic system is:
[0033] X = U·X·(1-X)
[0034] In the first set of initial values, U takes the value U1 and X takes the value X1.
[0035] The preprocessing of the pseudo-random sequence array and the complementary array is as follows: normalize the pseudo-random sequence array and the complementary array to 0 and 1, normalize the elements less than or equal to 0.5 to 0, and normalize the rest to 1.
[0036] Preferably, when performing random masking on the pure phase holographic encryption image based on the preprocessed pseudo-random sequence array and its complementary array, the pseudo-random sequence array and its complementary array are multiplied by the pixels of the pure phase holographic encryption image to obtain two sub-images.
[0037] Here, based on a pseudo-random block division method, the strong correlation between image pixels is avoided, ensuring the reliability of encryption for each image pixel.
[0038] Preferably, the process of using a Logistic chaotic system to perform bitwise XOR operations on the segmented sub-images to obtain scrambled and encrypted sub-images is as follows:
[0039] S51. Introduce the nonlinear iterative equation of the Logistic chaotic system, set the second set of initial values and the third set of initial values, and use the nonlinear iterative equation to generate two different mapping variables respectively.
[0040] S52. Using the number of pixels in the two segmented sub-images as the number of iterations for the two mapping variables, and then performing operations through nonlinear iterative equations, two sets of random and unequal pseudo-random sequence arrays are generated.
[0041] S53. Multiply the two sets of pseudo-random sequence arrays by 255, and convert the elements in the two sets of pseudo-random sequence arrays into integer data types with values between 0 and 255;
[0042] S54. Perform a Bitxor bitwise XOR operation between the two sets of pseudo-random sequence arrays after S53 and the two block sub-images respectively to generate two scrambled and encrypted sub-images;
[0043] In step S51, the nonlinear iterative equation of the Logistic chaotic system is:
[0044] X = U·X·(1-X)
[0045] In the second set of initial values, U is set to U2 and X is set to X2. In the third set of initial values, U is set to U3 and X is set to X3.
[0046] The expression for bitwise XOR is:
[0047]
[0048] Among them, C I C0 is the output image, and S is the input image. I This is a cryptographic stream.
[0049] The present invention also proposes an image encryption system, the system comprising:
[0050] The original image acquisition unit is used to acquire the original image to be encrypted;
[0051] The holographic encryption unit encodes the original image into a pure phase holographic encrypted image based on the computational holography GS algorithm.
[0052] The pseudo-random preprocessing unit is used to generate a pseudo-random sequence array using the Logistic chaotic system, generate a complementary array based on the pseudo-random sequence array, and preprocess the pseudo-random sequence array and the complementary array to obtain the preprocessed pseudo-random sequence array and its complementary array.
[0053] The random masking unit, based on the preprocessed pseudo-random sequence array and its complementary array, performs random masking on the pure phase holographic encryption image to obtain the segmented sub-images;
[0054] The scrambling encryption unit uses a Logistic chaotic system to perform a bitwise XOR operation on the segmented sub-images to spread them, thus obtaining scrambling and encrypted sub-images.
[0055] The encryption synthesis unit is used to synthesize scrambled and encrypted sub-images into a complete encrypted image.
[0056] This invention also proposes an image decryption method, which includes the following steps:
[0057] SA. Based on the random masking method used during image encryption, select the block area and divide the encrypted image into two sub-images;
[0058] SB. Perform an inverse bitwise XOR operation on the two sub-images to spread them, resulting in two scrambled sub-images;
[0059] SC. Combine two sub-images into a single complete image;
[0060] SD. Holographic reconstruction of the image yields the original image.
[0061] Here, unlike the existing image encryption and decryption process, instead of using a pure inverse encryption process, for encrypted images that are divided into blocks using a random mask block method, the block method is first determined, and then the inverse operation of the encryption process is performed in the corresponding block area, which also demonstrates the superior encryption performance.
[0062] Preferably, in step SA, the random mask block division method for image encryption is as follows:
[0063] A pseudo-random sequence array is generated using a Logistic chaotic system. A complementary array is then generated based on the pseudo-random sequence array. The pseudo-random sequence array and the complementary array are preprocessed to obtain a preprocessed pseudo-random sequence array and its complementary array. Based on the preprocessed pseudo-random sequence array and its complementary array, a pure phase holographic encryption image is randomly masked and divided into blocks to obtain block sub-images.
[0064] This application also proposes an image decryption system, the system comprising:
[0065] The inverse block unit selects the block region according to the random mask block method during image encryption, and divides the encrypted image into two sub-images;
[0066] The XOR scrambling unit performs a bitwise XOR operation on the two sub-images obtained from the inverse block unit to spread them, resulting in two scrambled sub-images.
[0067] The decryption synthesis unit combines two sub-images into a complete image;
[0068] The holographic restoration unit restores the image into a hologram to obtain the original image.
[0069] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0070] This invention proposes an image encryption method, system, and decryption method and system. First, the original image is encoded into a pure phase holographic encryption image using the computational holographic GS algorithm. Then, based on a pseudo-random block partitioning method, a pseudo-random sequence is generated using a Logistic chaotic system, and its complementary sequence is obtained. These two sequences are used to partition the pure phase holographic encryption image into two complementary sub-images, avoiding strong correlation between image pixels and ensuring the reliability of encryption for each pixel. Next, the Logistic chaotic system is used to perform a bitwise XOR operation on the partitioned sub-images to obtain scrambled encrypted sub-images. Finally, the scrambled encrypted sub-images are synthesized into a complete encrypted image. This results in better encryption performance and a larger key space, providing better confidentiality and security during image transmission and use. During decryption, unlike existing encrypted image decryption processes, a purely inverse encryption process is not used. For encrypted images partitioned using a random mask method, the partitioning method is first determined, and then the inverse encryption process is performed within the corresponding partitioned areas, further demonstrating superior encryption performance. Attached Figure Description
[0071] Figure 1 A schematic flowchart illustrating the image encryption method proposed in Embodiment 1 of the present invention;
[0072] Figure 2 This diagram illustrates the structure of the image encryption system proposed in Embodiment 2 of the present invention.
[0073] Figure 3 A flowchart illustrating the image decryption method proposed in Embodiment 3 of the present invention;
[0074] Figure 4 This is a structural diagram of the image decryption system proposed in Embodiment 4 of the present invention. Detailed Implementation
[0075] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.
[0076] To better illustrate this embodiment, some parts of the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions;
[0077] It is understandable to those skilled in the art that some well-known details may be omitted from the accompanying drawings.
[0078] The positional relationships depicted in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.
[0079] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0080] Example 1
[0081] This embodiment proposes an image encryption method, see [link to relevant documentation] Figure 1 The flowchart shown illustrates the method, which includes the following steps:
[0082] S1. Obtain the original image to be encrypted;
[0083] S2. Encode the original image into a pure phase holographic encrypted image based on the computational holographic GS algorithm. In this step, the image data input to the computer is considered analogous to a wave function, with its amplitude and phase as typical features. Then, the size of the random phase matrix is defined by the pixel size of the input image. The original image and the random phase matrix are used as the amplitude and phase of the iterative input, respectively. Based on the computational holographic GS algorithm, the pure phase holographic encrypted image is obtained through iterative calculation. Let the original image be represented as f(x, y), g(u, v) be the image to be encrypted, φ(x, y) be the random phase, x and y be the horizontal and vertical coordinates in the spatial domain, and u and v be the horizontal and vertical coordinates in the frequency domain. Then, the process of encoding the original image into a pure phase holographic encrypted image based on the computational holographic GS algorithm satisfies the formula:
[0084] F(x,y)=f(x,y)·φ(x,y)
[0085]
[0086]
[0087]
[0088] Where FT stands for Fast Fourier Transform, and IFT stands for Inverse Fast Fourier Transform; g n (u, v) are the coordinates of the image in the frequency domain after the nth transformation, f n (x, y) are the spatial coordinates of the image after the nth transformation. The specific implementation process is as follows:
[0089] S21. Introduce a random phase matrix with the same pixel size as the original image. Starting from the spatial domain of the original image, use the original image and the random phase matrix as the amplitude and phase of the iterative input, respectively, and set a threshold.
[0090] S22. Perform Fourier transform on the amplitude and phase to obtain the frequency domain distribution, then apply frequency domain constraints, preserve phase information, and normalize the amplitude;
[0091] S23. Perform an inverse Fourier transform on the frequency domain distribution after applying frequency domain constraints to obtain the spatial domain distribution, and then apply spatial domain constraints.
[0092] S24. Repeat steps S22 to S23, i.e., iterate repeatedly. During the execution, the error between the target image and the pixel result of the current iteration is calculated. When the correlation coefficient between the image pixels is greater than or equal to the threshold, the iteration terminates and the final pure phase holographic encrypted image is output. In this embodiment, the threshold is set to 0.99995.
[0093] After generating the pure phase holographic encryption image, proceed to step S3:
[0094] S3. Use the Logistic chaotic system to generate a pseudo-random sequence array, generate a complementary array based on the pseudo-random sequence array, and preprocess the pseudo-random sequence array and the complementary array to obtain the preprocessed pseudo-random sequence array and its complementary array.
[0095] S4. Based on the preprocessed pseudo-random sequence array and its complementary array, the pure phase holographic encryption image is randomly masked and divided into blocks to obtain the block sub-images;
[0096] In this embodiment, for step S3, in specific implementation, based on the Matlab platform, the nonlinear iterative equation of the Logistic chaotic system is input into Matlab, that is:
[0097] S31. Introduce the nonlinear iterative equation of the Logistic chaotic system, set the first set of initial values, and use the nonlinear iterative equation to generate a mapping variable;
[0098] The nonlinear iterative equation for a Logistic chaotic system is:
[0099] X = U·X·(1-X)
[0100] In the first set of initial values, U is set to U1 = 4, and X is set to X1 = 0.2; that is, the following conditions are met:
[0101] X1 = U1·X1·(1-X1)
[0102] S32. Determine the number of pixels in the pure phase holographic encryption image, and use this as the number of iterations for the mapping variable. Take 200, and then perform nonlinear iterative equation calculations again to generate a set of initial pseudo-random arrays.
[0103] S33. Assign the value 0 to the elements less than or equal to 0.5 in the initial pseudo-random sequence array, and assign the value 1 to the remaining elements to generate a pseudo-random sequence array containing only 0 and 1 in random positions.
[0104] S34. Introduce a set of arrays of the same size where all values are 1, and subtract this array from the pseudo-random sequence array in S33 to obtain a complementary array;
[0105] The preprocessing of the pseudo-random sequence array and the complementary array is as follows: normalize the pseudo-random sequence array and the complementary array to 0 and 1, normalize the elements less than or equal to 0.5 to 0, and normalize the rest to 1.
[0106] Based on the preprocessed pseudo-random sequence array and its complementary array, when performing random masking on the pure phase holographic encryption image, the pseudo-random sequence array and its complementary array are multiplied by the pixels of the pure phase holographic encryption image to obtain two sub-images. This pseudo-random block-based method avoids the strong correlation between image pixels, realizes the block processing of the pure phase holographic encryption image, and ensures the reliability of encryption of each image pixel.
[0107] S5. Use the Logistic chaotic system to perform bitwise XOR operation on the segmented sub-images to obtain scrambled and encrypted sub-images;
[0108] The process is as follows:
[0109] S51. Introduce the nonlinear iterative equation for the Logistic chaotic system, set a second set of initial values and a third set of initial values, and use the nonlinear iterative equation to generate two different mapping variables respectively; the nonlinear iterative equation for the Logistic chaotic system is:
[0110] X = U·X·(1-X)
[0111] In the second set of initial values, U is set to U2 = 4 and X is set to X2 = 0.3. In the third set of initial values, U is set to U3 = 4 and X is set to X3 = 0.4, that is:
[0112] X2 = U2·X2·(1-X2)
[0113] X3 = U3·X3·(1-X3)
[0114] Here, the initial values are different for both the random block division process and the scrambling diffusion process.
[0115] S52. Using the number of pixels in the two segmented sub-images as the number of iterations for the two mapping variables, and then performing operations through nonlinear iterative equations, two sets of random and unequal pseudo-random sequence arrays are generated.
[0116] S53. Multiply the two sets of pseudo-random sequence arrays by 255, and convert the elements in the two sets of pseudo-random sequence arrays into integer data types with values between 0 and 255;
[0117] S54. Perform a Bitxor bitwise XOR operation between the two sets of pseudo-random sequence arrays after S53 and the two block sub-images respectively to generate two scrambled and encrypted sub-images;
[0118] The expression for bitwise XOR with BBitxor is:
[0119]
[0120] Among them, C I C0 is the output image, and S is the input image. I This is a cryptographic stream.
[0121] S6. Combine the scrambled and encrypted sub-images into a complete encrypted image.
[0122] In this embodiment, the scrambled and encrypted sub-images are combined into a complete encrypted image using the Matlab combine function.
[0123] Example 2
[0124] like Figure 2 As shown, this embodiment proposes an image encryption system, see [link to relevant documentation]. Figure 2 The system includes:
[0125] The original image acquisition unit is used to acquire the original image to be encrypted;
[0126] The holographic encryption unit encodes the original image into a pure phase holographic encrypted image based on the computational holography GS algorithm.
[0127] The pseudo-random preprocessing unit is used to generate a pseudo-random sequence array using the Logistic chaotic system, generate a complementary array based on the pseudo-random sequence array, and preprocess the pseudo-random sequence array and the complementary array to obtain the preprocessed pseudo-random sequence array and its complementary array.
[0128] The random masking unit, based on the preprocessed pseudo-random sequence array and its complementary array, performs random masking on the pure phase holographic encryption image to obtain the segmented sub-images;
[0129] The scrambling encryption unit uses a Logistic chaotic system to perform a bitwise XOR operation on the segmented sub-images to spread them, thus obtaining scrambling and encrypted sub-images.
[0130] The encryption synthesis unit is used to synthesize scrambled and encrypted sub-images into a complete encrypted image.
[0131] This system uses the computational holographic GS algorithm to encode the original image into a pure phase holographic encrypted image. Then, based on a pseudo-random block-based approach, a Logistic chaotic system is used to generate a pseudo-random sequence and obtain its complementary sequence. These two sequences are used to divide the pure phase holographic encrypted image into blocks, generating two complementary sub-images. This avoids strong correlations between image pixels and ensures the reliability of encryption for each image pixel. Next, the Logistic chaotic system is used to perform a bitwise XOR operation on the block sub-images to spread them, resulting in scrambled encrypted sub-images. Finally, the scrambled encrypted sub-images are combined to form a complete encrypted image. This results in better encryption performance and a larger key space, giving the image better confidentiality and security during transmission and use, preventing interception and decryption by third parties.
[0132] Example 3
[0133] See Figure 3 This embodiment proposes an image decryption method, which includes the following steps:
[0134] SA. Based on the random masking method used during image encryption, select the block area and divide the encrypted image into two sub-images;
[0135] SB. Perform an inverse bitwise XOR operation on the two sub-images to spread them, resulting in two scrambled sub-images;
[0136] SC. Combine two sub-images into a single complete image;
[0137] SD. Holographic reconstruction of the image yields the original image. This process is the inverse of the computation of the holographic GS algorithm.
[0138] Unlike existing image encryption and decryption processes, instead of using a pure inverse encryption process, for encrypted images that are divided into blocks using a random masking method, the block division method is first determined, and then the inverse encryption process is performed within the corresponding block area. This also demonstrates the superior encryption performance, because if a simple inverse process is used for decryption, the original image cannot be decrypted. To decrypt the original image, the random block division method needs to be determined first. After determining the random masking block division method, according to the principle, pixel scrambling is performed, and the matrix in the original encryption process is XORed and diffused again.
[0139] In step SA, the random mask block division method for image encryption is as follows:
[0140] A pseudo-random sequence array is generated using a Logistic chaotic system. A complementary array is then generated based on the pseudo-random sequence array. The pseudo-random sequence array and the complementary array are preprocessed to obtain a preprocessed pseudo-random sequence array and its complementary array. Based on the preprocessed pseudo-random sequence array and its complementary array, a pure phase holographic encryption image is randomly masked and divided into blocks to obtain block sub-images.
[0141] Example 4
[0142] like Figure 4 As shown, this embodiment proposes an image decryption system, see [link to documentation]. Figure 4 The system includes:
[0143] The inverse block unit selects the block region according to the random mask block method during image encryption, and divides the encrypted image into two sub-images;
[0144] The XOR scrambling unit performs a bitwise XOR operation on the two sub-images obtained from the inverse block unit to spread them, resulting in two scrambled sub-images.
[0145] The decryption synthesis unit combines two sub-images into a complete image;
[0146] The holographic restoration unit restores the image into a hologram to obtain the original image.
[0147] For encrypted images that are divided into blocks using a random masking method, the block division method is first determined, and then the reverse operation of the encryption process is performed in the corresponding block area. This also demonstrates the superior encryption performance, because if the decryption is performed using a simple reverse process, the original image cannot be decrypted. To decrypt the original image, the random block division method needs to be determined first. After determining the random masking block division method, according to the principle, the pixels are scrambled, and the matrix in the original encryption process is XORed and diffused again.
[0148] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. An image encryption method characterized by, The method comprises the following steps: S1. Obtain an original image to be encrypted; S2. Encode the original image into a pure phase holographic encryption image based on a computational holographic GS algorithm; S3. Generate a pseudo-random sequence array by using a Logistic chaotic system, generate a complementary array based on the pseudo-random sequence array, and pre-process the pseudo-random sequence array and the complementary array to obtain the pre-processed pseudo-random sequence array and the complementary array thereof; The process of generating a pseudo-random sequence array by using a Logistic chaotic system and generating a complementary array based on the pseudo-random sequence array is as follows: S31. Introduce a nonlinear iterative equation of the Logistic chaotic system, set a first group of initial values, and generate a mapping variable by using the nonlinear iterative equation; S32. Determine the number of pixels of the pure phase holographic encryption image as the iteration times of the mapping variable, and generate a group of initial pseudo-random arrays by using the nonlinear iterative equation again; S33. Assign 0 to elements less than or equal to 0.5 in the initial pseudo-random sequence array, and assign 1 to the remaining elements, to generate a group of pseudo-random sequence arrays with only 0 and 1 and random positions; S34. Introduce a group of arrays with the same size and all values of 1, subtract the group of arrays from the pseudo-random sequence array of S33 to obtain a complementary array; In step S31, the nonlinear iterative equation of the Logistic chaotic system is: wherein, in the first set of initial values, U take , take ; The pre-processing of the pseudo-random sequence array and the complementary array is: 0 and 1 normalization is performed on the pseudo-random sequence array and the complementary array, and elements less than or equal to 0.5 are assigned to 0, and the remaining elements are assigned to 1; S4. Perform random mask blocking on the pure phase holographic encryption image based on the pre-processed pseudo-random sequence array and the complementary array thereof to obtain a blocked sub-image; S5. Perform bitwise XOR operation diffusion on the blocked sub-image by using the Logistic chaotic system to obtain a scrambled and encrypted sub-image; S6. Synthesize the scrambled and encrypted sub-image into a complete encrypted image.
2. The image encryption method according to claim 1, characterized in that, The process of encoding the original image into a pure phase holographic encryption image based on a computational holographic GS algorithm is as follows: S21. Introduce a random phase matrix with the same size as the pixel size of the original image, start from the spatial domain of the original image, take the original image and the random phase matrix as the amplitude and phase of the iterative input respectively, and set a threshold value; S22. Perform Fourier transform on the amplitude and phase to obtain a frequency domain distribution, then apply a frequency domain constraint to retain the phase information and normalize the amplitude; S23. Perform inverse Fourier transform on the frequency domain distribution after applying the frequency domain constraint to obtain a spatial domain distribution, and then apply a spatial domain constraint; S24. Repeat steps S22-S23, and in the execution process, calculate the error between the target image and the pixel result of the iteration output image at this time, and when the correlation coefficient between the image pixels is greater than or equal to the threshold value, the iteration is terminated, and the final pure phase holographic encryption image is output.
3. The image encryption method of claim 1, wherein, When the pure phase holographic encryption image is randomly masked and blocked based on the pre-processed pseudo-random sequence array and the complementary array thereof, the pseudo-random sequence array and the complementary array thereof are respectively multiplied with the pixels of the pure phase holographic encryption image to obtain two blocked sub-images.
4. The image encryption method according to claim 3, characterized in that, The process of performing bit XOR operation diffusion on the block sub-images by using the Logistic chaotic system to obtain the scrambled and encrypted sub-images is as follows: S51. A nonlinear iterative equation of a Logistic chaotic system is introduced, a second set of initial values and a third set of initial values are set, and two different mapping variables are generated by using the nonlinear iterative equation respectively; S52. The pixel numbers of the two block sub-images are respectively taken as the iteration times of the two mapping variables, and two groups of random and unequal pseudo-random sequence arrays are generated by respectively performing the operation of the nonlinear iterative equation; S53. The two groups of pseudo-random sequence arrays are multiplied by 255, and the elements in the two groups of pseudo-random sequence arrays are respectively converted into integer data types and have values in the range from 0 to 255; S54. The two groups of pseudo-random sequence arrays after S53 are subjected to Bitxor bit XOR operation with the two block sub-images respectively, and two scrambled and encrypted sub-images are generated; In step S51, the nonlinear iterative equation of the Logistic chaotic system is: In the second set of initial values, U Take , Take In the third set of initial values, U Take , Take ; The expression of Bitxor bit XOR operation is: wherein, is the output image, is the input image, is the cipher stream.
5. An image encryption system characterized by, The system comprises: An original image acquisition unit configured to acquire an original image to be encrypted; A holographic encryption unit configured to encode the original image into a pure-phase holographic encryption image based on a computed holographic GS algorithm; A pseudo-random preprocessing unit configured to generate a pseudo-random sequence array by using a Logistic chaotic system, generate a complementary array based on the pseudo-random sequence array, and preprocess the pseudo-random sequence array and the complementary array to obtain a preprocessed pseudo-random sequence array and a complementary array thereof; The process of generating the pseudo-random sequence array by using the Logistic chaotic system and generating the complementary array based on the pseudo-random sequence array is as follows: S31. A nonlinear iterative equation of a Logistic chaotic system is introduced, a first set of initial values is set, and a mapping variable is generated by using the nonlinear iterative equation; S32. The pixel number of the pure-phase holographic encryption image is determined as the iteration time of the mapping variable, and a group of initial pseudo-random sequence arrays is generated by performing the operation of the nonlinear iterative equation again; S33. The elements in the initial pseudo-random sequence array that are less than or equal to 0.5 are assigned a value of 0, and the remaining elements are assigned a value of 1, to generate a group of pseudo-random sequence arrays that only have 0 and 1 and are randomly positioned; S34. A group of arrays of the same size and all having a value of 1 are introduced, and the arrays are subtracted from the pseudo-random sequence array of S33 to obtain a complementary array; In step S31, the nonlinear iterative equation of the Logistic chaotic system is: wherein, in the first set of initial values, U take , take ; The preprocessing of the pseudo-random sequence array and the complementary array is: 0 and 1 normalization is performed on the pseudo-random sequence array and the complementary array, and the elements less than or equal to 0.5 are assigned a value of 0, and the remaining elements are assigned a value of 1; A random mask blocking unit configured to perform random mask blocking on the pure-phase holographic encryption image based on the preprocessed pseudo-random sequence array and the complementary array thereof to obtain block sub-images; A scrambling and encryption unit configured to perform bit XOR operation diffusion on the block sub-images by using the Logistic chaotic system to obtain scrambled and encrypted sub-images; An encryption synthesis unit configured to synthesize the scrambled and encrypted sub-images into a complete encrypted image.
6. An image decryption method characterized by, The method decrypts an image encrypted by the image encryption method of claim 1, and comprises the following steps: SA. selecting a block region according to a random mask block mode in image encryption, and dividing the encrypted image into two sub-images; SB. performing inverse bitwise XOR operation diffusion on the two sub-images to obtain two sub-images after permutation and scrambling; SC. combining the two sub-images into a complete image; SD. performing holographic reduction on the image to obtain an original image.
7. The image decryption method of claim 6, wherein, In step SA, the random mask block mode in image encryption is as follows: A pseudo-random sequence array is generated by using a Logistic chaotic system, a complementary array is generated based on the pseudo-random sequence array, and the pseudo-random sequence array and the complementary array are preprocessed to obtain a preprocessed pseudo-random sequence array and a complementary array thereof; and the pure phase holographic encrypted image is randomly masked and blocked based on the preprocessed pseudo-random sequence array and the complementary array thereof, to obtain a block sub-image.
8. An image decryption system characterized by comprising: The system is used for decrypting an image encrypted by the image encryption system of claim 5, and comprises: an inverse block unit configured to select a block region according to a random mask block mode in image encryption, and divide the encrypted image into two sub-images; an XOR permutation unit configured to perform bitwise XOR operation diffusion on the two sub-images obtained by the inverse block unit to obtain two sub-images after permutation and scrambling; a decryption combination unit configured to combine the two sub-images into a complete image; a holographic reduction unit configured to perform holographic reduction on the image to obtain an original image.
Citation Information
Patent Citations
Multi-diffusion image encryption and decryption method based on chaotic segmentation
CN108965639A
Random blocking chaotic image encryption method
CN111444522A