A visual rough visible sensitivity image desensitization method
By constructing a reversible desensitization method for visually coarsely perceptible sensitive images and adopting a three-level encryption chain architecture, the problem of balancing visual usability and privacy protection in existing technologies is solved. This achieves reversible desensitization and anti-attack capabilities for images, making it suitable for security-sensitive scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS
- Filing Date
- 2026-05-26
- Publication Date
- 2026-06-23
AI Technical Summary
Existing image desensitization technologies struggle to balance visual usability and privacy protection, and lack resistance to differential attacks and reversible restoration capabilities, making them unsuitable for security-sensitive scenarios.
A three-level encryption chain architecture based on color channels is adopted. By maintaining encryption operations and a pseudo-random function generator, a strong encryption dependency relationship is built between pixels, image blocks, and color channels, thereby achieving reversible desensitization of images.
It achieves a balance between visual usability and privacy protection of images, possesses an avalanche effect, can resist local tampering and statistical analysis, and supports lossless and reversible image restoration.
Smart Images

Figure CN122268995A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image desensitization technology, and in particular to a method for reversible desensitization of visually coarsely perceptible sensitive images. Background Technology
[0002] In an era of deep integration of digitalization and information technology, images, as an intuitive and efficient carrier of information, are widely used in numerous fields such as social media sharing, cloud storage backup, medical image transmission, visual sensor networks, and enterprise office collaboration. While the large-scale circulation and use of image data brings convenience to production and daily life, it also brings serious privacy and security risks. Sensitive content contained in images, such as personal identity, scene information, and trade secrets, is highly susceptible to damage to personal rights and loss of corporate profits due to illegal theft, tampering, or leakage. Therefore, de-identifying sensitive images to achieve a balance between privacy protection and compliant use has become one of the core research directions in the field of multimedia security.
[0003] Traditional image anonymization methods often employ pixel scrambling, overall encryption, or regional masking. While these methods can hide privacy information, they often excessively sacrifice the visual usability of the image. The anonymized image completely loses its macroscopic visual features, making it impossible for users to perform basic operations such as image preview, retrieval, and classification without decryption. This results in an inefficiency of "blind use" and fails to meet the visual usability requirements of practical applications. To address this issue, image anonymization technologies with visual usability have emerged. These technologies achieve a preliminary balance between privacy protection and visual usability by preserving macroscopic visual information and blurring sensitive details. However, existing technologies still have significant shortcomings: the anonymization processes for pixels, image blocks, and color channels in most schemes are independent and lack encryption dependencies. This leads to excessively robust anonymized images, where minor alterations do not significantly change the restored results, making them vulnerable to attacks such as statistical analysis and local tampering, resulting in insufficient security protection. Furthermore, the visual usability of some schemes is fixed, making it impossible to flexibly optimize for the anonymization needs of specific scenarios, and they lack reversible restoration mechanisms, failing to meet the requirements for the legitimate reuse of anonymized images.
[0004] Furthermore, existing image desensitization technologies with visual usability have not yet achieved the "avalanche effect." Minor local modifications to the original image or the desensitized image cannot be propagated globally through the desensitization / restoration process. This results in weak resistance to differential attacks and fault analysis capabilities of the desensitization solution, making it difficult to meet the high-level privacy protection requirements of security-sensitive scenarios such as finance, healthcare, and government. Summary of the Invention
[0005] In view of the above situation, the main objective of the present invention is to propose a reversible desensitization method for visually coarsely visible sensitive images in order to solve the above-mentioned technical problems.
[0006] This invention proposes a reversible desensitization method for visually coarsely perceptible sensitive images, the method comprising the following steps: Step 1: Based on the original image's color channel data and preset desensitization parameters, construct a color channel pixel matrix; use the color channel pixel matrix to calculate the block size, and perform non-overlapping block division on each channel according to the block size to obtain image blocks; Step 2: Combine the first two adjacent pixels in the first image block into an original pixel group, and perform encryption on the original pixel group to obtain a ciphertext pixel group; combine the second pixel of the current ciphertext pixel group with the next unencrypted pixel to form a new pixel group to be encrypted; use a pseudo-random function generator and encryption key to iterate the new pixel group to be encrypted and output a pseudo-random number sequence, repeat the encryption process until all ciphertext pixel groups in the image block have been processed to obtain a ciphertext block; Step 3: Use a pseudo-random function generator and encryption key to generate a random number sequence of the same length as the ciphertext block and obtain a one-dimensional vector; reshape the one-dimensional vector into a two-dimensional matrix, and rearrange the positions of the elements in the ciphertext block according to the values of the two-dimensional matrix to obtain the permutation-encrypted ciphertext block; Step 4: Concatenate the current permutation-encrypted ciphertext block with the encryption key and input it into the hash function to calculate the derived key, which is then used as the encryption key for the next image block for permutation encryption. After all image blocks in the current channel have been processed, the last permutation-encrypted ciphertext block and its corresponding encryption key for the current channel are obtained. Step 5: Concatenate the last permutation-encrypted ciphertext block of the current channel with the corresponding encryption key and input it into the hash function. Use the calculated cross-channel derived key as the encryption key for the first image block of the next channel. Repeat steps 1 to 4 until all channels have been permuted and encrypted. Then, reassemble the permutation-encrypted ciphertext blocks of each channel in the original channel order to obtain the final desensitized image.
[0007] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention strictly adheres to the principle of pixel value sum preservation by performing a sum-preservation encryption operation on pixel groups. That is, the sum of two pixel values in the encrypted pixel group is completely consistent with the sum of two pixel values in the original pixel group before encryption. This sum-preservation principle is the core foundation for preserving macroscopic visual information between image blocks and enabling desensitized images to have rough visual characteristics. At the same time, through the encrypted reconstruction of pixel groups within blocks, effective desensitization of sensitive information in details within blocks is achieved.
[0008] 2. This invention establishes a three-level encryption chain architecture that is interconnected and propagates layer by layer. This architecture creates a strong encryption dependency between the pixels, image blocks, and color channels of an image, achieving an avalanche effect in the desensitization process. That is, any minor modification at any level of the image can be propagated layer by layer to all subsequent encryption stages through the three-level encryption chain, causing a significant change in the overall desensitization result. Furthermore, during the restoration process, any minor tampering with the desensitized image will also be propagated in reverse through the three-level encryption chain, causing the restoration result to become completely invalid and preventing the leakage of any effective sensitive information.
[0009] 3. The restoration process of this invention is executed in reverse order of “channel-level encryption chain → block-level encryption chain → pixel-level encryption chain”. Based on the initial encryption key, the decryption key of each color channel and each image block is derived in reverse order. Then, the reverse operation of encryption and maintaining encryption is performed on the ciphertext pixel group in each image block, and the original pixel group, original image block and original image are restored step by step, so as to realize the lossless and reversible restoration of the image. Attached Figure Description
[0010] Figure 1 This is a flowchart of the reversible desensitization method for visually coarsely visible sensitive images proposed in this invention; Figure 2 This is a schematic diagram illustrating the sensitivity effect of the visually coarsely visible reversible desensitization method for sensitive images proposed in this invention. Detailed Implementation
[0011] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0012] These and other aspects of the embodiments of the present invention will become clear from the following description and accompanying drawings. In these descriptions and drawings, some specific embodiments of the present invention are specifically disclosed to illustrate some ways of implementing the principles of the embodiments of the present invention; however, it should be understood that the scope of the embodiments of the present invention is not limited thereto.
[0013] Please see Figure 1 This invention proposes a reversible desensitization method for visually coarsely perceptible sensitive images, which includes the following steps: Step 1: Based on the original image's color channel data and preset desensitization parameters, construct a color channel pixel matrix; use the color channel pixel matrix to calculate the block size, and perform non-overlapping block division on each channel according to the block size to obtain image blocks; In step 1, a color channel pixel matrix is constructed based on the original image's color channel data and preset desensitization parameters. The block size is calculated using the color channel pixel matrix, and each channel is divided into non-overlapping blocks according to the block size to obtain image blocks. The specific steps are as follows: Obtain pixel data for each color channel in the original image and preset desensitization parameters; construct a color channel pixel matrix using the pixel data for each color channel in the original image; The block size is calculated using the desensitization parameters and the color channel pixel matrix; the original image is then divided into non-overlapping blocks using the block size to obtain image blocks.
[0014] Specifically, the desensitization parameters ( The parameter value is an adjustable positive integer. It is negatively correlated with the visual presentation effect of the image and positively correlated with the privacy desensitization effect. That is, the larger the parameter value, the larger the image block size, the weaker the visual presentation effect of the desensitized image, and the stronger the privacy desensitization effect; the smaller the parameter value, the smaller the image block size, the better the visual presentation effect of the desensitized image, and the weaker the privacy desensitization effect. It can be flexibly adjusted according to the actual visual usage needs and privacy desensitization needs.
[0015] Step 2: Combine the first two adjacent pixels in the first image block into an original pixel group, and perform encryption on the original pixel group to obtain a ciphertext pixel group; combine the second pixel of the current ciphertext pixel group with the next unencrypted pixel to form a new pixel group to be encrypted; use a pseudo-random function generator and encryption key to iterate the new pixel group to be encrypted and output a pseudo-random number sequence, repeat the encryption process until all ciphertext pixel groups in the image block have been processed to obtain a ciphertext block; In step 2, the first two adjacent pixels within the first image block are combined into an original pixel group, and the original pixel group is encrypted to obtain a ciphertext pixel group. The second pixel of the current ciphertext pixel group is combined with the next unencrypted pixel to form a new pixel group to be encrypted. A pseudo-random function generator and an encryption key are used to iterate through the new pixel group to be encrypted and output a pseudo-random number sequence. The encryption process is repeated until all ciphertext pixel groups within the image block have been processed to obtain the ciphertext block. The specific steps are as follows: Step 201: Combine the first two adjacent pixels in the first image block into a pixel group to obtain the original pixel group; Step 202: Perform a sum-and-hold encryption process on the original pixel group using a sum-and-hold encryption function to obtain a ciphertext pixel group; wherein the sum of the pixel values in the ciphertext pixel group is consistent with the sum of the pixel values in the original pixel group; Step 203: Combine the second pixel of the current encrypted pixel group with the next unencrypted original pixel to obtain a new pixel group to be encrypted; Step 204: Using a pseudo-random function generator and an encryption key, iterate through the new pixel group to be encrypted and output a pseudo-random number sequence; Step 205: Using a pseudo-random number sequence, repeat the encryption process of step 202 until all pixel groups within the image block have been processed, thus obtaining the ciphertext block.
[0016] Specifically, in the process of forming a pixel group from the first two adjacent pixels within the first image block to obtain the original pixel group, the following relationship exists: ; in, Represents the original pixel group. and All represent unencrypted pixels; In the process of performing encryption and preservation encryption on the original pixel group to obtain the ciphertext pixel group, the following relationship exists: ; in, Represents ciphertext pixel groups, Representing and maintaining encryption functions, This indicates that the sum of the element values is calculated. As can be seen from the formula, the encryption operation of pixel groups strictly follows the principle of preservation, and the sum of the pixel values of the ciphertext pixel group and the original pixel group remains completely consistent. In the process of iterating over a new group of pixels to be encrypted using a pseudo-random function generator and an encryption key, and outputting a sequence of pseudo-random numbers, the following relationship exists: ; in, Indicates the output A random number, Indicates the number of pixel groups in an image block. This indicates that it is processed using a pseudo-random function generator. , and All represent random numbers. Indicates the number of pixels in an image patch. Indicate driver Iteration Second-rate, Represents an image block.
[0017] Furthermore, in the process of encrypting and preserving the original pixel group, the encryption and preservation function is implemented by sorting first and then encrypting, with the specific steps as follows: Calculate the sum of the pixel groups in each original pixel group, enumerate all legal pixel groups with the same sum, and construct a set of legal pixel groups. Assign a unique index to each pixel group in the set of legal pixel groups. The corresponding process follows the following relationship: ; in, Represents the set of legal pixel groups. Represents a pixel group. This represents the sum of pixel values in a pixel group. This represents the pixel group with index 0. This indicates the pixel group with sequence number 1. Indicates the sequence number is Pixel groups; The original index of a pixel group in the set of legal pixel groups is calculated, and the corresponding process follows the following relationship: ; in, This indicates processing via a function that calculates the ordinal number. Represents a pixel group. This represents the value of the first pixel in the pixel group; This represents the maximum valid value for a pixel, with a value of 255. The original sequence number of a pixel group within the set of valid pixel groups is encrypted using a modulo addition operation to obtain the ciphertext sequence number. The corresponding process follows the following relationship: ; in, Indicates the ciphertext sequence number, This indicates the index of the pixel group within the set of valid pixel groups. Represents a random number. The modulo symbol is used to represent the remainder. This indicates the number of elements in the set of valid pixel groups; The ciphertext sequence number is converted into a pixel group using a function to obtain the ciphertext pixel group. The corresponding process has the following relationship: ; in, express The inverse function is used to convert the index into a pixel group. It should be noted that in this invention, a chain-like encryption operation is performed sequentially on the pixel groups within the image block.
[0018] Specifically, starting with pseudo-random number sequences Take the first random number from The first pixel in the first encrypted pixel group interacts with the first original pixel group within the image block, completing the encryption of that pixel group. The second pixel of the first encrypted pixel group is then recombined with the first unencrypted element pixel in the image block to form a new pixel group to be encrypted. This process is iterated until all pixel groups within the image block are encrypted in a chain, ultimately forming a pixel-level encryption chain. This encryption method allows any change in the value of any pixel within the image block to be propagated layer by layer through the pixel-level encryption chain to subsequent encryption stages, thereby triggering correlated changes in the subsequent encryption results.
[0019] Step 3: Use a pseudo-random function generator and encryption key to generate a random number sequence of the same length as the ciphertext block and obtain a one-dimensional vector; reshape the one-dimensional vector into a two-dimensional matrix, and rearrange the positions of the elements in the ciphertext block according to the values of the two-dimensional matrix to obtain the permutation-encrypted ciphertext block; In step 3, a random number sequence of the same length as the ciphertext block is generated using a pseudo-random function generator and the encryption key, resulting in a one-dimensional vector. This one-dimensional vector is then reshaped into a two-dimensional matrix, and the positions of the elements in the ciphertext block are rearranged according to the values of the two-dimensional matrix to obtain the permutation-encrypted ciphertext block. The specific steps are as follows: Using a pseudo-random function generator and an encryption key, generate a sequence of random numbers with the same number of elements as the ciphertext block; The elements in the random number sequence are encoded in ascending order to obtain a one-dimensional vector; The one-dimensional vector is reshaped into a two-dimensional matrix with the same size as the ciphertext block; the positions of the elements in the ciphertext block are rearranged according to the values in the two-dimensional matrix to obtain the permutation-encrypted ciphertext block.
[0020] Specifically, in the process of generating a random number sequence with the same number of elements as the ciphertext block using a pseudo-random function generator and an encryption key, the following relationship exists: ; in, Indicates the output A random number, , and All represent random numbers. Indicate driver Iteration Second-rate.
[0021] Step 4: Concatenate the current permutation-encrypted ciphertext block with the encryption key and input it into the hash function to calculate the derived key, which is then used as the encryption key for the next image block for permutation encryption. After all image blocks in the current channel have been processed, the last permutation-encrypted ciphertext block and its corresponding encryption key for the current channel are obtained. In step 4, the current permutation-encrypted ciphertext block is concatenated with the encryption key and input into a hash function to calculate the derived key, which is then used as the encryption key for the next image block for permutation encryption. After all image blocks in the current channel have been processed, the last permutation-encrypted ciphertext block and its corresponding encryption key for the current channel are obtained. The specific steps are as follows: Step 401: Concatenate the currently permuted encrypted ciphertext block with the encryption key to obtain the concatenated data string; Step 402: Input the concatenated data string into the hash function to calculate the derived key; Step 403: Use the derived key as the encryption key for the next image block and encrypt it to obtain the next permutation-encrypted ciphertext block; Step 404: Repeat steps 401 to 403 until all image blocks in the current channel have been permuted and encrypted to obtain the last permuted and encrypted ciphertext block in the current channel and the corresponding encryption key.
[0022] Specifically, in the process of inputting the concatenated data string into the hash function and calculating the derived key, the following relationship exists: ; in, Indicates the derived key. This indicates the key used to encrypt the image block. This indicates that it is processed using a hash function.
[0023] Furthermore, in this invention, the first block of the first channel of the image is encrypted under the action of the initialization key; subsequently, according to the key derivation rule, all subsequent image blocks in the channel are processed sequentially until the encryption of the last image block of the channel is completed; the last image block of the channel is concatenated with its corresponding encryption key and input into a hash function for calculation to derive a new initialization key, which serves as the initial encryption key for the second channel and is used for the encryption operation of the first image block of the second channel; all image blocks in the second channel are encrypted sequentially according to the processing method of the first channel; all other subsequent channels also follow the unified processing flow of the above channels to complete the full-process encryption operation sequentially.
[0024] Step 5: Concatenate the last permutation-encrypted ciphertext block of the current channel with the corresponding encryption key and input it into the hash function. Use the calculated cross-channel derived key as the encryption key for the first image block of the next channel. Repeat steps 1 to 4 until all channels have been permuted and encrypted. Then, reassemble the permutation-encrypted ciphertext blocks of each channel in the original channel order to obtain the final desensitized image. In step 5, the last permutation-encrypted ciphertext block of the current channel and its corresponding encryption key are concatenated and input into the hash function. The calculated cross-channel derived key is used as the encryption key for the first image block of the next channel. Steps 1 to 4 are repeated until all channels have undergone permutation encryption. Then, the permutation-encrypted ciphertext blocks of each channel are reassembled in the original channel order to obtain the final desensitized image. The specific steps are as follows: Step 501: Concatenate the last permutation-encrypted ciphertext block of the current channel with the corresponding encryption key to obtain the concatenated cross-channel data string. Step 502: Input the concatenated cross-channel data string into the hash function to calculate the cross-channel derived key; Step 503: Repeat steps 1 to 4, using the cross-channel derived key as the encryption key for the first image block of the next channel, to perform permutation encryption on the first image block of the next channel. After completing the permutation encryption of all image blocks in the next channel, the last permutation encrypted ciphertext block of the next channel and the corresponding encryption key are obtained. Step 504: Repeat steps 501 to 503 until all channels have been permuted and encrypted. Then, reassemble the ciphertext blocks of each channel in the original channel order to obtain the final desensitized image.
[0025] It should be noted that the present invention constitutes a three-level chain encryption architecture of "pixel-image block-channel". It establishes a chain encryption dependency of pixels within an image block, a key chain dependency of blocks within a channel, and a key chain dependency of channels across channels, realizing a global cryptographic association in the encryption process, making the visually coarsely visible reversible desensitization method sensitive.
[0026] Please see Figure 2 , Figure 2 The left side shows the result of the original image after being desensitized using this method. The middle image shows the desensitized image obtained by modifying only one pixel in the original image and then going through the same desensitization process. The right side shows the visualization result of the absolute value of the pixel-by-pixel difference between the two desensitized images.
[0027] pass Figure 2 As shown, although only a small modification was made to a single pixel in the original image, the final desensitized image underwent a global and significant change: although the macroscopic visual contours of the two desensitized images remained consistent due to the preservation of encryption characteristics, the values of a large number of pixels had changed significantly. The difference map on the right showed a large area of high-amplitude pixel change, rather than only local differences at the modified location.
[0028] This phenomenon fully verifies the core technical effect of the present invention: a tiny modification to a single pixel will be passed layer by layer within the block through a pixel-level encryption chain, causing changes in the encryption results of all subsequent pixels within the block; this change further affects the keys and encryption results of all subsequent blocks within the channel through a block-level encryption chain, and finally spreads to all channels of the entire image through a channel-level encryption chain, achieving an avalanche effect.
[0029] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0030] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0031] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A method for reversible desensitization of visually coarsely perceptible sensitive images, characterized in that, The method includes the following steps: Step 1: Based on the original image's color channel data and preset desensitization parameters, construct a color channel pixel matrix; use the color channel pixel matrix to calculate the block size, and perform non-overlapping block division on each channel according to the block size to obtain image blocks; Step 2: Combine the first two adjacent pixels in the first image block into an original pixel group, and perform encryption on the original pixel group to obtain a ciphertext pixel group; combine the second pixel of the current ciphertext pixel group with the next unencrypted pixel to form a new pixel group to be encrypted; use a pseudo-random function generator and encryption key to iterate the new pixel group to be encrypted and output a pseudo-random number sequence, repeat the encryption process until all ciphertext pixel groups in the image block have been processed to obtain a ciphertext block; Step 3: Using a pseudo-random function generator and an encryption key, generate a random number sequence of the same length as the ciphertext block and obtain a one-dimensional vector; reshape the one-dimensional vector into a two-dimensional matrix, and rearrange the positions of the elements in the ciphertext block according to the values of the two-dimensional matrix to obtain the permutation-encrypted ciphertext block; Step 4: Concatenate the current permutation-encrypted ciphertext block with the encryption key and input it into the hash function to calculate the derived key, which is then used as the encryption key for the next image block for permutation encryption. After all image blocks in the current channel have been processed, the last permutation-encrypted ciphertext block and its corresponding encryption key for the current channel are obtained. Step 5: Concatenate the last permutation-encrypted ciphertext block of the current channel with the corresponding encryption key and input it into the hash function. Use the calculated cross-channel derived key as the encryption key for the first image block of the next channel. Repeat steps 1 to 4 until all channels have been permuted and encrypted. Then, reassemble the permutation-encrypted ciphertext blocks of each channel in the original channel order to obtain the final desensitized image.
2. The reversible desensitization method for visually coarsely visible sensitive images according to claim 1, characterized in that, In step 1, a color channel pixel matrix is constructed based on the original image's color channel data and preset desensitization parameters. The block size is calculated using the color channel pixel matrix, and each channel is divided into non-overlapping blocks according to the block size to obtain image blocks. The specific steps are as follows: Obtain pixel data for each color channel in the original image and preset desensitization parameters; construct a color channel pixel matrix using the pixel data for each color channel in the original image; The block size is calculated using the desensitization parameters and the color channel pixel matrix; The original image is divided into non-overlapping blocks based on the block size to obtain image blocks.
3. The reversible desensitization method for visually coarsely visible sensitive images according to claim 2, characterized in that, In step 2, the first two adjacent pixels within the first image block are combined into an original pixel group, and the original pixel group is encrypted to obtain a ciphertext pixel group. The second pixel of the current ciphertext pixel group is combined with the next unencrypted pixel to form a new pixel group to be encrypted. A pseudo-random function generator and an encryption key are used to iterate the new pixel group to be encrypted and output a pseudo-random number sequence. The encryption process is repeated until all ciphertext pixel groups within the image block have been processed to obtain the ciphertext block. The specific steps are as follows: Step 201: Combine the first two adjacent pixels in the first image block into a pixel group to obtain the original pixel group; Step 202: Perform a sum-and-hold encryption process on the original pixel group using a sum-and-hold encryption function to obtain a ciphertext pixel group; wherein the sum of the pixel values in the ciphertext pixel group is consistent with the sum of the pixel values in the original pixel group; Step 203: Combine the second pixel of the current encrypted pixel group with the next unencrypted original pixel to obtain a new pixel group to be encrypted; Step 204: Using a pseudo-random function generator and an encryption key, iterate through the new pixel group to be encrypted and output a pseudo-random number sequence; Step 205: Using a pseudo-random number sequence, repeat the encryption process of step 202 until all pixel groups within the image block have been processed, thus obtaining the ciphertext block.
4. The reversible desensitization method for visually coarsely visible sensitive images according to claim 3, characterized in that, In the process of forming a pixel group from the first two adjacent pixels within the first image block to obtain the original pixel group, the following relationship exists: ; in, Represents the original pixel group. and All represent unencrypted pixels; In the process of performing encryption and preservation encryption on the original pixel group to obtain the ciphertext pixel group, the following relationship exists: ; in, Represents ciphertext pixel groups, Representing and maintaining encryption functions, This indicates that the sum of the element values is calculated. In the process of iterating over a new group of pixels to be encrypted using a pseudo-random function generator and an encryption key, and outputting a sequence of pseudo-random numbers, the following relationship exists: ; in, Indicates the output A random number, Indicates the number of pixel groups in an image block. This indicates that it is processed using a pseudo-random function generator. , and All represent random numbers. Indicates the number of pixels in an image patch. Represents an image block.
5. The reversible desensitization method for visually coarsely visible sensitive images according to claim 4, characterized in that, The specific steps for encrypting and preserving the original pixel group are as follows: Calculate the sum of the pixel groups in each original pixel group, enumerate all legal pixel groups with the same sum, and construct a set of legal pixel groups. Assign a unique index to each pixel group in the set of legal pixel groups. The corresponding process follows the following relationship: ; in, Represents the set of legal pixel groups. Represents a pixel group. This represents the sum of pixel values in a pixel group. This represents the pixel group with index 0. This indicates the pixel group with sequence number 1. Indicates the sequence number is Pixel groups; The original index of a pixel group in the set of legal pixel groups is calculated, and the corresponding process follows the following relationship: ; in, This indicates processing via a function that calculates the ordinal number. Represents a pixel group. This represents the value of the first pixel in the pixel group. This represents the maximum valid value of a pixel; The original sequence number of a pixel group within the set of valid pixel groups is encrypted using a modulo addition operation to obtain the ciphertext sequence number. The corresponding process follows the following relationship: ; in, Indicates the ciphertext sequence number, This indicates the index of the pixel group within the set of valid pixel groups. Represents a random number. The modulo symbol is used to represent the remainder. This indicates the number of elements in the set of valid pixel groups; The ciphertext sequence number is converted into a pixel group using a function to obtain the ciphertext pixel group. The corresponding process has the following relationship: ; in, express The inverse function of .
6. The method for reversible desensitization of visually coarsely visible sensitive images according to claim 5, characterized in that, In step 3, a random number sequence of the same length as the ciphertext block is generated using a pseudo-random function generator and an encryption key, resulting in a one-dimensional vector. This one-dimensional vector is then reshaped into a two-dimensional matrix, and the positions of the elements in the ciphertext block are rearranged according to the values of the two-dimensional matrix to obtain the permutation-encrypted ciphertext block. The specific steps are as follows: Using a pseudo-random function generator and an encryption key, generate a sequence of random numbers with the same number of elements as the ciphertext block; The elements in the random number sequence are encoded in ascending order to obtain a one-dimensional vector; The one-dimensional vector is reshaped into a two-dimensional matrix with the same size as the ciphertext block; the positions of the elements in the ciphertext block are rearranged according to the values in the two-dimensional matrix to obtain the permutation-encrypted ciphertext block.
7. The reversible desensitization method for visually coarsely visible sensitive images according to claim 6, characterized in that, In the process of generating a random number sequence with the same number of elements as the ciphertext block using a pseudo-random function generator and an encryption key, the following relationship holds: ; in, Indicates the output A random number, , and All represent random numbers. Indicate driver Iteration Second-rate.
8. The reversible desensitization method for visually coarsely visible sensitive images according to claim 7, characterized in that, In step 4, the current permutation-encrypted ciphertext block is concatenated with the encryption key and input into a hash function to calculate the derived key, which is then used as the encryption key for the next image block for permutation encryption. After all image blocks in the current channel have been processed, the last permutation-encrypted ciphertext block and its corresponding encryption key for the current channel are obtained. The specific steps are as follows: Step 401: Concatenate the currently permuted encrypted ciphertext block with the encryption key to obtain the concatenated data string; Step 402: Input the concatenated data string into the hash function to calculate the derived key; Step 403: Use the derived key as the encryption key for the next image block and encrypt it to obtain the next permutation-encrypted ciphertext block; Step 404: Repeat steps 401 to 403 until all image blocks in the current channel have been permuted and encrypted to obtain the last permuted and encrypted ciphertext block in the current channel and the corresponding encryption key.
9. The reversible desensitization method for visually coarsely visible sensitive images according to claim 8, characterized in that, When the concatenated data string is input into the hash function to calculate the derived key, the following relationship exists: ; in, Indicates the derived key. This indicates the key used to encrypt the image block. This indicates that it is processed using a hash function.
10. The method for reversible desensitization of visually coarsely visible sensitive images according to claim 9, characterized in that, In step 5, the last permutation-encrypted ciphertext block of the current channel and its corresponding encryption key are concatenated and input into a hash function. The calculated cross-channel derived key is used as the encryption key for the first image block of the next channel. Steps 1 to 4 are repeated until all channels have undergone permutation encryption. Then, the permutation-encrypted ciphertext blocks of each channel are reassembled in the original channel order to obtain the final desensitized image. The specific steps are as follows: Step 501: Concatenate the last permutation-encrypted ciphertext block of the current channel with the corresponding encryption key to obtain the concatenated cross-channel data string. Step 502: Input the concatenated cross-channel data string into the hash function to calculate the cross-channel derived key; Step 503: Repeat steps 1 to 4, using the cross-channel derived key as the encryption key for the first image block of the next channel, to perform permutation encryption on the first image block of the next channel. After completing the permutation encryption of all image blocks in the next channel, the last permutation encrypted ciphertext block of the next channel and the corresponding encryption key are obtained. Step 504: Repeat steps 501 to 503 until all channels have been permuted and encrypted. Then, reassemble the ciphertext blocks of each channel in the original channel order to obtain the final desensitized image.