Ghost imaging based on oblique hadamard transform and image encryption method of chaotic system
By employing a method for image encryption based on computational ghost imaging and chaotic systems using oblique Hadamard transform, combined with a four-dimensional memristor hyperchaotic system and the Fisher-Yates algorithm, a parameterized slant-Hadamard orthogonal matrix speckle pattern is generated. This solves the problems of poor reconstruction quality and insufficient encryption security in computational ghost imaging, achieving efficient encryption and enhanced security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-16
AI Technical Summary
Existing computational ghost imaging techniques suffer from poor image quality and insufficient encryption security. They also suffer from low redundancy of random speckle information, low sampling efficiency, and fixed Hadamard matrix encoding logic that is easily cracked.
The algorithm employs oblique Hadamard transform computational ghost imaging combined with a four-dimensional memristor hyperchaotic system and the Fisher-Yates algorithm. Through image logic scrambling, row and column scrambling, and modular addition operations, a parameterized slant-Hadamard orthogonal matrix speckle pattern is generated for encryption.
It improves image reconstruction quality and sampling efficiency, enhances the security of the encryption system, forms a triple encryption protection mechanism, and increases the key space.
Smart Images

Figure CN122226901A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of image encryption methods, specifically relating to an image encryption method based on oblique Hadamard transform computation of ghost imaging and chaotic systems. Background Technology
[0002] With the rapid development of network communication and optical imaging technologies, images, as the core carrier of information transmission, are increasingly widely used in various sensitive fields. Their security and transmission efficiency have become critical issues that urgently need to be addressed. Optical image encryption technology, with its advantages of parallel processing and strong anti-interference capabilities, has greater application potential compared to traditional digital encryption technologies. Among them, computational ghost imaging (CGI), as a novel optical imaging technology, achieves imaging through structured illumination and correlation reconstruction, naturally possessing encryption characteristics and becoming a research hotspot in the field of image encryption.
[0003] Computational ghost imaging abandons the reference optical path of traditional ghost imaging. It uses a spatial light modulator (SLM) to generate a preset illumination pattern and project it onto the target object. A bucket detector collects the light intensity signal, and then the image is reconstructed by association algorithms, simplifying the system structure and reducing experimental complexity. Existing computational ghost imaging encryption schemes mostly use random speckle or standard Hadamard matrices as illumination encoding patterns. However, random speckle suffers from information redundancy and low sampling efficiency, resulting in poor image reconstruction quality after encryption. Although the standard Hadamard matrix has orthogonal properties, which can improve imaging efficiency and reconstruction accuracy, its fixed and publicly available matrix element arrangement makes it vulnerable to attackers who can crack the encoding logic through feature analysis. Furthermore, its encoding dimension and pattern lack flexibility, making it difficult to resist targeted attacks, and its security still has significant shortcomings.
[0004] In summary, existing technologies suffer from poor image quality and insufficient encryption security in ghost imaging reconstruction. Summary of the Invention
[0005] The purpose of this invention is to provide an image encryption method based on oblique Hadamard transform computational ghost imaging and chaotic systems, which solves the problems of poor image quality and insufficient encryption security in existing technologies.
[0006] The technical solution adopted in this invention is an image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems. The specific process involves: performing image logic scrambling on a grayscale plaintext image to obtain the final image. Random Sequence Generation Based on Four-Dimensional Memristor Hyperchaotic System ; random sequence With images The scrambled image is obtained by performing an XOR operation. ; random sequence Combined with Fisher-Yates for images The scrambled image is obtained by scrambling the rows. ; random sequence Combined with the Fisher-Yates algorithm for image The scrambled image is obtained by scrambling the columns. ; random sequence With images The scrambled image is obtained by performing a modulo-addition operation. ; For scrambled images Encryption yields a one-dimensional bucket probe sequence, which is then reshaped into a two-dimensional matrix to obtain a scrambled image. .
[0007] The invention is further characterized by:
[0008] Image scrambling is performed on a grayscale plaintext image to obtain an image. The specific steps are as follows: Step 1.1, as a one-dimensional nonlinear chaotic mapping, the iterative formula for the logical mapping is: (1) In equation (1), ; The bifurcation parameter represents the logical mapping. ; Step 1.2, for The grayscale plaintext image is iterated from the 2001st iteration and continues to iterate. Each iteration of the chaotic mapping is saved as a random sequence. Then, for the random sequence Sort in ascending order to obtain a new random sequence ; Step 1.3: Encode the position of each element in the random sequence U and record the new random sequence. Each element in the sequence is encoded at its position in the random sequence U, resulting in a chaotic index sequence consisting of position numbers. According to the index sequence Image logic scrambling is performed on a grayscale plaintext image to obtain .
[0009] Generating random sequences based on a four-dimensional memristor hyperchaotic system The specific steps are as follows: Step 2.1, as a high-dimensional chaotic function, the four-dimensional memristor hyperchaotic system, based on the characteristics of nonlinear memristors, is mathematically described using the following equation: (2) In equation (2), For state variables; The first derivative of the variable; For memristors, determined by magnetic flux Controlled ; parameters of a chaotic system When the state variable is initialized Take (1,1,1,1) and the parameters of the chaotic system. When the value is (20, 4, 32, 6, 0.1, 1, 0.1), the four-dimensional memristor hyperchaotic system is in a hyperchaotic state. Step 2.2, for The grayscale plaintext image is first discarded after the first 2000 iterations, and then iterated using the Runge-Kutta method. This yielded four sets of random sequences. .
[0010] random sequence With images The scrambled image is obtained by performing an XOR operation. The specific steps are as follows: Step 3.1, for the random sequence Normalize the random sequence Convert to an integer sequence that matches the pixel value. Then, the integer sequences of the same length and images Concatenate rows to convert to a one-dimensional sequence; The normalization expression is: (3) In equation (3), Represents a random sequence Element; Represents an integer sequence Element; The function returns the largest integer not greater than the input value. The function represents taking the absolute value of a number; This indicates taking the modulo of 256, which means calculating the remainder after dividing a number by 256; Step 3.2, assuming the elements of the one-dimensional sequence obtained in step 3.1 are... ,Will and Perform a bitwise XOR operation on the binary number, assigning 0 to identical bits and 1 to different bits. Then convert the binary number to a decimal number. The resulting decimal number is the element of the one-dimensional sequence. And so on, until the length is... One-dimensional sequence transformation Scrambled images ; The XOR expression is: (4) In equation (4), This indicates the XOR operation.
[0011] random sequence Combined with Fisher-Yates for images The scrambled image is obtained by scrambling the rows. The specific process is as follows: The scrambled image to be scrambled In the Fisher-Yates algorithm, from scrambled images During the process of iterating backward from the last line to the second line, the random sequence... The chaotic value at the corresponding position is normalized and mapped according to the index range of the current traversed row. After rounding, the target row index for swapping is obtained. The current traversed row is swapped with the target row based on the target row index. This operation is continued until all rows have been traversed, resulting in a scrambled image. .
[0012] random sequence Combined with the Fisher-Yates algorithm for image The scrambled image is obtained by scrambling the columns. The specific process is as follows: the image to be scrambled In the Fisher-Yates algorithm from images During the process of iterating backward from the last line to the second line, the random sequence... The chaotic value at the corresponding position is normalized and mapped according to the index range of the current traversed row. After rounding, the target row index for swapping is obtained. The current traversed row is swapped with the target row based on the target row index. This operation is continued until all rows have been traversed, resulting in a scrambled image. .
[0013] Scrambled Images Encryption yields a one-dimensional bucket probe sequence, which is then reshaped into a two-dimensional matrix to obtain a scrambled image. The specific steps are as follows: Step 7.1, for a size of Scrambled images Construct a size of 2 n The order parameterization of the Slant-Hadamard orthogonal matrix; Step 7.2, traverse row by row 2 n The 2nd order parameterized Slant-Hadamard orthogonal matrix is extracted sequentially. n The length of each row in the parameterized Slant-Hadamard orthogonal matrix is The row vector will The row vectors are reshaped into vectors of size . Extracting speckle patterns Each row corresponds to an image of size [size missing]. The speckled pattern was finally obtained. Different speckled patterns; Step 7.3, will Different speckle patterns are sequentially loaded into the spatial light modulator, while scrambled images are simultaneously... Placed on the object to be measured, a speckle pattern is continuously projected onto the scrambled image using a spatial light modulator. Then, a bucket detector is used to collect these reflected lights and record the total light intensity value for each measurement. This process is repeated continuously until a set of total light intensity values obtained from multiple measurements is finally obtained. Then, the total light intensity values collected by the bucket detector are set together. Normalization is performed to map the numerical range to a grayscale range of 0-255, and then the normalized total light intensity values are set together. Rearranged into a two-dimensional matrix, a grayscale encrypted image is ultimately generated. .
[0014] Step 7.1 involves obtaining the following process using a recursive method based on the second-order parameterized Slant-Hadamard matrix: The order parameterization of the Slant-Hadamard matrix; The expression for the second-order parameterized Slant-Hadamard matrix is: (5) The expression for the order parameterized Slant-Hadamard matrix is: (6) In equation (6), yes A zero matrix of order 1. It is a second-order identity matrix. Indicates the Kronecker product; (7) In equation (7), yes The parameterized Slant-Hadamard matrix of order 1; yes An identity matrix of order 1; In the recursive kernel matrix, and The expressions are as follows: (8) (9) In equations (8) and (9), , This represents the slope vector.
[0015] The total luminous intensity value obtained from each illumination measurement The expression is: (10) In equation (10), Represents a scrambled image ; They are planar coordinates; It is the first During secondary illumination, the incident light field is Intensity distribution at the location; It is the first The total light intensity value collected by the bucket detector during the second illumination.
[0016] The beneficial effects of this invention are as follows: Firstly, the image encryption method based on oblique Hadamard transform computational ghost imaging and chaotic systems can flexibly adjust the matrix structure through a parameterized Slant-Hadamard orthogonal measurement matrix, better characterizing image details and reflecting subtle changes in the image under test. This reduces the number of sampling operations while ensuring the amount of imaging information, improving sampling efficiency and computational ghost imaging reconstruction quality. Secondly, by employing a one-dimensional logical mapping and a four-dimensional memristor hyperchaotic mapping system, combined with the Fisher-Yates scrambling algorithm, pixel scrambling and diffusion are completed through XOR operations, row and column scrambling, and modular addition operations. This, combined with computational ghost imaging optical encryption, forms a triple encryption protection mechanism of position scrambling, numerical obfuscation, and computational ghost imaging optical encryption, significantly increasing the key space and improving the security of the encryption system. Attached Figure Description
[0017] Figure 1 This is an encryption flowchart of the image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to the present invention; Figure 2 This invention relates to an image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems, which produces a 128×128 resolution grayscale plaintext image “cameraman”. Figure 3 A schematic diagram of the logical scrambling result of the image encryption method for ghost imaging and chaotic systems based on oblique Hadamard transform of this invention; Figure 4 A schematic diagram of the scrambling result of a memristor chaotic system in the image encryption method based on oblique Hadamard transform computation of ghost imaging and chaotic systems according to the present invention; Figure 5 A schematic diagram of the computational ghost imaging experimental device in the image encryption method based on oblique Hadamard transform and chaotic systems of this invention; Figure 6 This is a flowchart illustrating the decryption process of the image encryption method for ghost imaging and chaotic systems based on oblique Hadamard transform, as described in this invention. Figure 7 This invention presents a schematic diagram of the ciphertext reconstructed by parameterized Slant-Hadamard computational ghost imaging based on the image encryption method for ghost imaging and chaotic systems using oblique Hadamard transform computational methods. Figure 8 This is a schematic diagram of the decryption result of the image encryption method based on oblique Hadamard transform calculation of ghost imaging and chaotic system in this invention under the condition of no attack; Figure 9 This is a schematic diagram of the plaintext image obtained by performing a salt-and-pepper noise attack of strength 0.1 on the ciphertext image and decrypting it in the image encryption method of ghost imaging and chaotic system based on oblique Hadamard transform of the present invention. Figure 10 This is a schematic diagram of the plaintext image obtained by performing a salt-and-pepper noise attack with a strength of 0.15 on the ciphertext image and decrypting it in the image encryption method of ghost imaging and chaotic system based on oblique Hadamard transform of the present invention. Figure 11 This is a schematic diagram of the plaintext image obtained by performing a salt-and-pepper noise attack of strength 0.2 on the ciphertext image and decrypting it in the image encryption method of ghost imaging and chaotic system based on oblique Hadamard transform of the present invention. Figure 12 This is a schematic diagram of the plaintext image obtained by performing a Gaussian noise attack with a variance of 10 on the ciphertext image and decrypting it in the image encryption method of ghost imaging and chaotic system based on oblique Hadamard transform in this invention. Figure 13 This is a schematic diagram of the plaintext image obtained by performing a Gaussian noise attack with a variance of 50 on the ciphertext image and decrypting it in the image encryption method of ghost imaging and chaotic system based on oblique Hadamard transform in this invention. Figure 14 This is a schematic diagram of the plaintext image obtained by performing a Gaussian noise attack with a variance of 300 on the ciphertext image and decrypting it in the image encryption method of ghost imaging and chaotic system based on oblique Hadamard transform in this invention. Figure 15 This is a schematic diagram of the plaintext image obtained by performing a quarter-area cropping attack on the center position of the ciphertext image and decrypting it in the image encryption method of the present invention based on oblique Hadamard transform calculation ghost imaging and chaotic system; Figure 16This is a schematic diagram of the plaintext image obtained by performing a quarter-area cropping attack on the upper left corner of the ciphertext image and decrypting it in the image encryption method of the present invention based on oblique Hadamard transform calculation ghost imaging and chaotic system. Figure 17 This is a schematic diagram of the plaintext image obtained by performing a quarter-area cropping attack on the lower right corner of the ciphertext image and decrypting it in the image encryption method based on oblique Hadamard transform computation ghost imaging and chaotic systems according to the present invention. Detailed Implementation
[0018] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0019] This invention relates to an image encryption method based on oblique Hadamard transform computation for ghost imaging and chaotic systems. The encryption process is as follows: Figure 1 As shown, the specific steps are as follows: Step 1: Perform image logic scrambling on the grayscale plaintext image to obtain the image. ; The specific process is as follows: Step 1.1, as a one-dimensional nonlinear chaotic mapping, the iterative formula for the logical mapping is: (1) In equation (1), ; The bifurcation parameter represents the logical mapping. ; The initial value is 3.99998. It is 0.35; Step 1.2, for example Figure 2 shown For a grayscale plaintext image, to improve randomness, the first 2000 iteration values of the random sequence are discarded, and iteration continues from the 2001st iteration. Each iteration of the chaotic mapping is saved as a random sequence. Then, for the random sequence Sort in ascending order to obtain a new random sequence ; Step 1.3: Encode the position of each element in the random sequence U and record the new random sequence. Each element in the sequence is encoded at its position in the random sequence U, resulting in a chaotic index sequence consisting of position numbers. According to the index sequence Image scrambling is performed on a grayscale plaintext image to obtain an image. The result of logical scrambling is as follows Figure 3 Show; The random sequence U of the logical chaotic mapping is random, and each number represents a position code (e.g., the first iteration value corresponds to code 1, the second corresponds to code 2, and so on). Then, the numbers are sorted in ascending order of their values to obtain a new random sequence. However, in the new random sequence The original position code corresponding to each value is changed. The sorted values are not retained; only the original position code corresponding to each value is extracted. The new sequence formed by these indices in the sorted order is the final chaotic index sequence. ; Example: A random sequence U = [0.8 (code 1), 0.2 (code 2), 0.5 (code 3)], after being sorted in ascending order, has values of [0.2, 0.5, 0.8] (i.e., the new random sequence). The original position code is [2, 3, 1], therefore, the chaotic index sequence is [2, 3, 1]. Subsequently, we only need to change the pixel positions of the grayscale plaintext image according to this index table to achieve the purpose of image scrambling.
[0020] Step 2: Generate random sequences based on a four-dimensional memristor hyperchaotic system ; The specific process is as follows: Step 2.1, as a high-dimensional chaotic function, the four-dimensional memristor hyperchaotic system, based on the characteristics of nonlinear memristors, is mathematically described using the following equation: (2) In equation (2), For state variables; The first derivative of the variable; For memristors, determined by magnetic flux Controlled ; Parameters of a chaotic system When the state variable is initialized Take (1,1,1,1) and the parameters of the chaotic system. When the value is (20, 4, 32, 6, 0.1, 1, 0.1), the four-dimensional memristor hyperchaotic system is in a hyperchaotic state. Step 2.2, for To further increase randomness, the grayscale plaintext image is first discarded after the first 2000 iterations, and then iterated using the Runge-Kutta method. This yielded four sets of random sequences. ; Step 3, random sequence With images The scrambled image is obtained by performing an XOR operation. ; The specific process is as follows: Step 3.1, for the random sequence Normalize the random sequence Convert to an integer sequence that matches the pixel value. (0~255), then the lengths are the same (all are...) ) integer sequence and images Concatenate rows to convert to a one-dimensional sequence; The normalization expression is: (3) In equation (3), Represents a random sequence Element; Represents an integer sequence Element; The function returns the largest integer not greater than the input value. The function represents taking the absolute value of a number; This indicates taking the modulo of 256, which means calculating the remainder after dividing a number by 256; Step 3.2, assuming the elements of the one-dimensional sequence obtained in step 3.1 are... ,Will and Following the rule that identical bits are 0 and different bits are 1, perform a bitwise XOR operation on the binary number, then convert the binary number to a decimal number. The resulting decimal number is the element of the one-dimensional sequence. And so on, until the length is... One-dimensional sequence transformation Scrambled images ; The XOR expression is: (4) In equation (4), Indicates the XOR operation; Step 4, random sequence Combined with Fisher-Yates for images The scrambled image is obtained by scrambling the rows. ; The Fisher-Yates algorithm is a random scrambling algorithm. Its core is to scramble the sequence by traversing from the end of the sequence backwards, randomly selecting an index from the previous unprocessed interval for each position and swapping the elements. The specific process is as follows: The scrambled image to be scrambled... ( (matrix), in the Fisher-Yates algorithm from scrambled images During the process of traversing from the last row of the matrix to the second row, instead of using traditional pseudo-random numbers to generate the exchange position index, a random sequence is used. The chaotic value at the corresponding position is normalized and mapped according to the index range of the current traversed row (from the starting position to the current row). After rounding, the target row index for swapping is obtained. The current traversed row is swapped with the target row based on the target row index. This operation is continued until all rows have been traversed, resulting in a scrambled image. ; Step 5, random sequence Combined with the Fisher-Yates algorithm for image The scrambled image is obtained by scrambling the columns. ; The specific process is as follows: the image to be scrambled ( (matrix), in the Fisher-Yates algorithm from the image During the process of traversing from the last row of the matrix to the second row, instead of using traditional pseudo-random numbers to generate the exchange position index, a random sequence is used. The chaotic value at the corresponding position is normalized and mapped according to the index range of the current traversed row (from the starting position to the current row). After rounding, the target row index for swapping is obtained. The current traversed row is swapped with the target row based on the target row index. This operation is continued until all rows have been traversed, resulting in a scrambled image. ; Step 6, random sequence With images Modulo addition operation yields the following result: Figure 4 The scrambled image shown ; Step 7, scramble the image Encryption yields a one-dimensional bucket probe sequence, which is then reshaped into a two-dimensional matrix to obtain a scrambled image. ; The specific process is as follows: Step 7.1, for a size of Scrambled images Construct a size of 2 n The order parameterization of the Slant-Hadamard orthogonal matrix; Step 7.2, traverse row by row 2 n The 2nd order parameterized Slant-Hadamard orthogonal matrix is extracted sequentially. n The length of each row in the parameterized Slant-Hadamard orthogonal matrix is The row vector will The row vectors are reshaped into vectors of size . Extracting speckle patterns Each row corresponds to an image of size [size missing]. The speckled pattern was finally obtained. Different speckled patterns; Step 7.3: The computational ghost imaging method is used. The experimental setup for computational ghost imaging is as follows: Figure 5 As shown, it includes a spatial light modulator, a bucket detector, and a computer. The computer is connected to the spatial light modulator and the bucket detector, and the image to be tested is placed between the spatial light modulator and the bucket detector. Different speckle patterns are sequentially loaded into the spatial light modulator, while scrambled images are simultaneously... Placed on the object to be measured, a speckle pattern is continuously projected onto the scrambled image using a spatial light modulator. Then, a bucket detector is used to collect these reflected lights and record the total light intensity value for each measurement. This process is repeated continuously until a set of total light intensity values obtained from multiple measurements is finally obtained. Then, the total light intensity values collected by the bucket detector are set together. Normalization is performed to map the numerical range to a grayscale range of 0-255, and then the normalized total light intensity values are set together. Rearranged into a two-dimensional matrix, a grayscale encrypted image is ultimately generated. This grayscale encrypted image Derived from light intensity information, it does not contain the spatial structure and texture features of the original image, presenting a visual effect similar to random noise.
[0021] Example 2 Based on Example 1, step 7.1 is as follows: Using a recursive method, obtain the 2nd-order parameterized Slant-Hadamard matrix. The order parameterization of the Slant-Hadamard matrix; The expression for the second-order parameterized Slant-Hadamard matrix is: (5) The expression for the order parameterized Slant-Hadamard matrix is: (6) In equation (6), yes A zero matrix of order 1. It is a second-order identity matrix. Indicates the Kronecker product; (7) In equation (7), yes The parameterized Slant-Hadamard matrix of order 1; yes An identity matrix of order 1; In the recursive kernel matrix, and The expressions are as follows: (8) (9) In equations (8) and (9), , This represents the slope vector.
[0022] Traditional Hadamard matrices contain only 1s and -1s, with element transitions being abrupt "abrupt changes." In imaging encoding, such drastic numerical fluctuations lead to coarse-grained light field modulation, essentially sampling the image with large pixels, easily smoothing out fine features like edges and textures. In encryption scenarios, the abruptly changing encoding matrix reduces the ciphertext's ability to represent details, resulting in blurred edges and distorted details in the decrypted image. The parameterized slant-Hadamard matrix introduces a slant vector... This results in a smoother and more nuanced distribution of matrix values. This "fine-grained" coding characteristic allows for precise modulation of image details such as edges and textures during imaging, reducing information loss during light field sampling. In encryption, the smooth coding matrix maps image details more completely into the ciphertext, enabling more accurate reconstruction of the original image's subtle structures during decryption. Simultaneously, smaller abrupt changes reduce noise interference with details. Since detail information is inherently weak, abrupt changes in the Hadamard matrix are easily masked by noise; however, a smooth, gradually changing matrix improves the signal-to-noise ratio of detail signals, ensuring that even faint details remain clearly discernible after imaging or decryption. Furthermore, parameters can be adjusted... By flexibly adjusting the values and distribution characteristics of matrix elements, the slant-Hadamard matrix breaks free from the limitations of the fixed binary values (1 / -1) of the traditional Hadamard matrix and possesses dynamically adjustable parameterization characteristics.
[0023] Example 3 Based on Example 2, the total light intensity value obtained from each illumination measurement The expression is: (10) In equation (10), Represents a scrambled image That is, the image to be measured; They are planar coordinates; It is the first During secondary illumination, the incident light field is Intensity distribution at the location; It is the first The total light intensity value collected by the bucket detector during the second illumination.
[0024] Example 4 Based on Example 3, it also includes, for example, Figure 6 The decryption process shown below involves the following steps: Step A, assuming the bucket detector collects a total of Each measured light intensity value That is, the set of total light intensity values There is Each measured light intensity value , respectively The scrambled image is recovered by performing correlation operations between each speckle pattern and its corresponding measured light intensity value. The reconstructed scrambled image is as follows Figure 7 As shown: (11) In equation (11), Indicates the overall average value; Step B involves using a four-dimensional memristor hyperchaotic system to generate the same random sequence as used in the encryption process. Then utilize the random sequence within it. For images Perform inverse modular addition (modular subtraction) operations and then perform inverse scrambling to obtain the result. ; Step C, using a random sequence Similar to the Fisher-Yates algorithm, this method works column-by-column, recording the column swap index pairs at each step according to the traversal order during encryption (from the last column to the second column of the matrix). Then, it reverses the traversal (from the second column to the last column of the matrix), swapping the current column with the target column based on the recorded index pairs. This process is repeated until all columns have been traversed, thus scrambling the image. Restore to the scrambled intermediate image Similarly, using random sequences The Fisher-Yates algorithm, on a row-by-row basis, scrambles intermediate images. Perform inverse scrambling to obtain the XOR-scrambled image. ; Step D, scramble the image The same random sequence as during encryption Performing an XOR operation yields the image after the logical mapping has been scrambled. ; Step E: Regenerate the exact same random sequence using logical mapping parameters that are exactly the same as those used in the encryption. The results are obtained by sorting in the same way as the encryption process. And record the new random sequence. The position of each element in the random sequence U is encoded to obtain the corresponding index. Then according to the index Reverse engineering to restore pixel positions and scramble the logical mapping of the image. Decrypt and restore to plaintext image The final decryption result under no attack conditions is as follows: Figure 8 As shown.
[0025] Example 5 This embodiment is based on... Figure 2 The encrypted image, after undergoing triple encryption (logical mapping encryption, four-dimensional memristor hyperchaotic system encryption, and parameterized Slant-Hadamard computational ghost imaging encryption), is subjected to three different intensities of salt-and-pepper noise attacks. The impact of these different intensities of salt-and-pepper noise attacks on decryption effectiveness and the resistance of the image encryption method based on oblique Hadamard transform computational ghost imaging and chaotic systems to salt-and-pepper noise attacks are then tested. Figure 9 The salt-and-pepper noise attack strength is 0.1. Figure 10 The salt-and-pepper noise attack strength is 0.15. Figure 11 The salt-and-pepper noise attack strength is 0.2; from Figures 9-11 As can be seen, as the intensity of the salt and pepper noise attack increases, the decrypted image still maintains good visual integrity, without overall distortion or loss of key information, demonstrating significant resistance to salt and pepper noise attacks.
[0026] Example 6 This embodiment is based on... Figure 2 The encrypted image, after undergoing triple encryption (logical mapping encryption, four-dimensional memristor hyperchaotic system encryption, and parameterized Slant-Hadamard computational ghost imaging encryption), is subjected to three different Gaussian noise attacks of varying intensities. The impact of these attacks on decryption effectiveness and the resistance of the image encryption method based on oblique Hadamard transform computational ghost imaging and chaotic systems to Gaussian noise attacks are then tested. Figure 12 The variance of the Gaussian noise in the data is 10. Figure 13 The variance of the Gaussian noise in the data is 50. Figure 14 The variance of the Gaussian noise in the data is 300. Figure 12 and Figure 13 The decrypted images all retain the complete details of the original images, and the core visual information is not distorted, even under high-intensity Gaussian noise attacks with a variance of 300. Figure 14The decrypted image still clearly distinguishes the target subject, without overall blurring or loss of key information, demonstrating significant resistance to Gaussian noise attacks.
[0027] Example 7 This embodiment is based on... Figure 2 The encrypted image, after undergoing triple encryption (logical mapping encryption, four-dimensional memristor hyperchaotic system encryption, and parameterized Slant-Hadamard computational ghost imaging encryption), is subjected to cropping attacks at different locations. The impact of these cropping attacks on decryption effectiveness and the resistance of the image encryption method based on oblique Hadamard transform computational ghost imaging and chaotic systems to cropping attacks are then tested. Figure 15 This is the decrypted image after cropping the center position. Figure 16 This is the decrypted image after cropping the top left corner. Figure 17 This is the decrypted image after cropping the bottom right corner; the cropped area is always one-quarter of the image area. Figures 15-17 As can be seen, the decrypted images all retain the core features of the original images completely, without any overall distortion or loss of key information. This demonstrates that the image encryption method based on oblique Hadamard transform computational ghost imaging and chaotic systems in this invention improves the resistance to destruction of ciphertext information, thereby endowing the method with excellent resistance to cropping attacks.
Claims
1. An image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems, characterized in that, The specific process is as follows: Image logic scrambling is performed on the grayscale plaintext image to obtain the image. ; Generating random sequences based on a four-dimensional memristor hyperchaotic system ; random sequence With images The scrambled image is obtained by performing an XOR operation. ; random sequence Combined with Fisher-Yates for images The scrambled image is obtained by scrambling the rows. ; random sequence Combined with the Fisher-Yates algorithm for image The scrambled image is obtained by scrambling the columns. ; random sequence With images The scrambled image is obtained by performing a modulo-addition operation. ; For scrambled images Encryption yields a one-dimensional bucket probe sequence, which is then reshaped into a two-dimensional matrix to obtain a scrambled image. .
2. The image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to claim 1, characterized in that, Image scrambling is performed on a grayscale plaintext image to obtain an image. The specific steps are as follows: Step 1.1, as a one-dimensional nonlinear chaotic mapping, the iterative formula for the logical mapping is: (1) In equation (1), ; The bifurcation parameter represents the logical mapping. ; Step 1.2, for The grayscale plaintext image is iterated from the 2001st iteration and continues to iterate. Each iteration of the chaotic mapping is saved as a random sequence. Then, for the random sequence Sort in ascending order to obtain a new random sequence ; Step 1.3: Encode the position of each element in the random sequence U and record the new random sequence. Each element in the sequence is encoded at its position in the random sequence U, resulting in a chaotic index sequence consisting of position numbers. According to the index sequence Image logic scrambling is performed on a grayscale plaintext image to obtain .
3. The image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to claim 1, characterized in that, Generating random sequences based on a four-dimensional memristor hyperchaotic system The specific steps are as follows: Step 2.1, as a high-dimensional chaotic function, the four-dimensional memristor hyperchaotic system, based on the characteristics of nonlinear memristors, is mathematically described using the following equation: (2) In equation (2), For state variables; The first derivative of the variable; For memristors, determined by magnetic flux Controlled ; Parameters of a chaotic system When the state variable is initialized Take (1,1,1,1) and the parameters of the chaotic system. When the value is (20, 4, 32, 6, 0.1, 1, 0.1), the four-dimensional memristor hyperchaotic system is in a hyperchaotic state. Step 2.2, for The grayscale plaintext image is first discarded after the first 2000 iterations, and then iterated using the Runge-Kutta method. This yielded four sets of random sequences. .
4. The image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to claim 1, characterized in that, random sequence With images The scrambled image is obtained by performing an XOR operation. The specific steps are as follows: Step 3.1, for the random sequence Normalize the random sequence Convert to an integer sequence that matches the pixel value. Then, the integer sequences of the same length and images Concatenate rows to convert to a one-dimensional sequence; The normalization expression is: (3) In equation (3), Represents a random sequence Element; Represents an integer sequence Element; The function returns the largest integer not greater than the input value. The function represents taking the absolute value of a number; This indicates taking the modulo of 256, which means calculating the remainder after dividing a number by 256; Step 3.2, assuming the elements of the one-dimensional sequence obtained in step 3.1 are... ,Will and Following the rule that identical bits are 0 and different bits are 1, perform a bitwise XOR operation on the binary number, then convert the binary number to a decimal number. The resulting decimal number is the element of the one-dimensional sequence. And so on, until the length is... One-dimensional sequence transformation Scrambled images ; The XOR expression is: (4) In equation (4), This indicates the XOR operation.
5. The image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to claim 1, characterized in that, random sequence Combined with Fisher-Yates for images The scrambled image is obtained by scrambling the rows. The specific process is as follows: The scrambled image to be scrambled In the Fisher-Yates algorithm, from scrambled images During the process of iterating backward from the last line to the second line, the random sequence... The chaotic value at the corresponding position is normalized and mapped according to the index range of the current traversed row. After rounding, the target row index for swapping is obtained. The current traversed row is swapped with the target row based on the target row index. This operation is continued until all rows have been traversed, resulting in a scrambled image. .
6. The image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to claim 1, characterized in that, random sequence Combined with the Fisher-Yates algorithm for image The scrambled image is obtained by scrambling the columns. The specific process is as follows: the image to be scrambled In the Fisher-Yates algorithm from images During the process of iterating backward from the last line to the second line, the random sequence... The chaotic value at the corresponding position is normalized and mapped according to the index range of the current traversed row. After rounding, the target row index for swapping is obtained. The current traversed row is swapped with the target row based on the target row index. This operation is continued until all rows have been traversed, resulting in a scrambled image. .
7. The image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to claim 1, characterized in that, Scrambled images Encryption yields a one-dimensional bucket probe sequence, which is then reshaped into a two-dimensional matrix to obtain a scrambled image. The specific steps are as follows: Step 7.1, for a size of Scrambled images Construct a size of 2 n The order parameterization of the Slant-Hadamard orthogonal matrix; Step 7.2, traverse row by row 2 n The 2nd order parameterized Slant-Hadamard orthogonal matrix is extracted sequentially. n The length of each row in the parameterized Slant-Hadamard orthogonal matrix is The row vector will The row vectors are reshaped into vectors of size . Extracting speckle patterns Each row corresponds to an image of size [size missing]. The speckled pattern was finally obtained. Different speckled patterns; Step 7.3, will Different speckle patterns are sequentially loaded into the spatial light modulator, while scrambled images are simultaneously... Placed on the object to be measured, a speckle pattern is continuously projected onto the scrambled image using a spatial light modulator. Then, a bucket detector is used to collect these reflected lights and record the total light intensity value for each measurement. This process is repeated continuously until a set of total light intensity values obtained from multiple measurements is finally obtained. Then, the total light intensity values collected by the bucket detector are set together. Normalization is performed to map the numerical range to a grayscale range of 0-255, and then the normalized total light intensity values are set together. Rearranged into a two-dimensional matrix, a grayscale encrypted image is ultimately generated. .
8. The image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to claim 7, characterized in that, Step 7.1 involves obtaining the following process using a recursive method based on the second-order parameterized Slant-Hadamard matrix: The order parameterization of the Slant-Hadamard matrix; The expression for the second-order parameterized Slant-Hadamard matrix is: (5) The expression for the order parameterized Slant-Hadamard matrix is: (6) In equation (6), yes A zero matrix of order 1. It is a second-order identity matrix. Indicates the Kronecker product; (7) In equation (7), yes The parameterized Slant-Hadamard matrix of order 1; yes An identity matrix of order 1; In the recursive kernel matrix, and The expressions are as follows: (8) (9) In equations (8) and (9), , This represents the slope vector.
9. The image encryption method based on oblique Hadamard transform for calculating ghost imaging and chaotic systems according to claim 7, characterized in that, The total luminous intensity value obtained from each illumination measurement The expression is: (10) In equation (10), Represents a scrambled image ; They are planar coordinates; It is the first During secondary illumination, the incident light field is Intensity distribution at the location; It is the first The total light intensity value collected by the bucket detector during the second illumination.