High capacity image ciphertext domain reversible hiding method and system
By segmenting the image into blocks through coarse-grained and fine-grained encryption stages, and utilizing the histogram modification method based on the prediction errors of the median and submaximum values, the reversible information hiding technology in the ciphertext domain is optimized. This solves the problem of insufficient embedding capacity in existing technologies and achieves more efficient data protection and information embedding.
Patent Information
- Application Number
- CN202411751785.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Existing reversible information hiding techniques in the ciphertext field have limitations in terms of embedding capacity and separability. In particular, methods based on pixel value sorting and histogram modification fail to fully utilize the ciphertext coefficients, resulting in insufficient data security and additional information embedding capacity.
The plaintext image is encrypted using coarse-grained and fine-grained encryption stages. By dividing the image into sub-blocks and adjusting their arrangement, combined with the histogram modification method based on the prediction errors of the median and second-most extreme values, information is embedded using high-frequency coefficients, thus optimizing the image segmentation and histogram modification process.
It significantly improves the embedding capacity and separation of the image ciphertext domain, enhances pixel utilization, and achieves more efficient data protection and information carrying capabilities.
Smart Images

Figure CN119449967B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image ciphertext information hiding technology, specifically to a high-capacity image ciphertext domain reversible hiding method and system based on pixel value sorting and histogram modification. Background Technology
[0002] In today's digital age, the rapid development of the Internet of Things and cloud computing has spurred the generation and exchange of massive amounts of data, while also bringing increasingly serious risks of data exposure. To address these challenges, cryptographic techniques and reversible information hiding techniques in ciphertext fields have gradually become research hotspots.
[0003] Cryptography has long been a core means of protecting multimedia content security. Encryption ensures data confidentiality during transmission and storage. However, traditional cryptographic techniques, while protecting data content, have a significant limitation: they cannot carry and manage additional information, such as data management and authentication information. This deficiency restricts the flexibility and practicality of data in secure transmission. To overcome this deficiency, reversible information hiding technology in ciphertext fields has emerged. This technology allows for the embedding of additional information into the ciphertext while ensuring data content encryption. Its core lies in introducing redundancy to achieve information embedding, specifically through two methods: pre-encryption and post-encryption redundancy introduction. Pre-encryption redundancy introduction typically involves retaining fixed pixels or features during encryption to provide space for subsequent information embedding. While effective, this method has limitations in terms of flexibility and capacity. In contrast, post-encryption redundancy introduction has become the mainstream research direction. This method introduces redundancy by applying a compression-like technique to the ciphertext, compressing the ciphertext coefficients. This method has significant advantages: First, data encryption and information embedding are two relatively independent processes with good separation; second, the embedding capacity is large, which can carry more additional information without affecting the security of the original data.
[0004] For the latter, methods based on pixel value sorting and histogram modification perform well in terms of embedding capacity and have good separation, but they do not achieve optimal results in utilizing ciphertext coefficients, and their capacity has not yet reached its limit. Therefore, researching high-capacity ciphertext field reversible information hiding techniques is of significant research value. Continued exploration in this field is expected to provide more comprehensive and efficient solutions for data protection in the Internet of Things and cloud computing environments. Summary of the Invention
[0005] The purpose of this invention is to provide a high-capacity image ciphertext domain reversible hiding method and system based on pixel value sorting and histogram modification, so as to solve at least one of the technical problems existing in the above-mentioned background art.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a high-capacity image ciphertext domain reversible hiding method, comprising:
[0008] The plaintext image is encrypted through two stages: coarse-grained encryption and fine-grained encryption.
[0009] Preprocess the encrypted plaintext image: Divide the encrypted image into non-overlapping sub-blocks of fixed size, set the variable EL to expand the coefficients in each sub-block, determine whether the sub-block is an overflow block or a valid block, arrange the valid sub-blocks according to the raster scan order, and arrange the overflow sub-blocks according to the reverse raster scan order to achieve block recombination;
[0010] For a non-overlapping valid sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the coefficients of the maximum and minimum values. The four prediction error values of all valid blocks are statistically analyzed together to construct a histogram. The high-frequency coefficients are used to expand and modify the prediction error. The encrypted secret information, the length of the position map, the position map after arithmetic encoding compression, and the end flag are expanded to realize information embedding.
[0011] Furthermore, the plaintext image encryption process employs a block encryption method, divided into two stages: coarse-grained encryption and fine-grained encryption. In the coarse-grained encryption stage, the original plaintext carrier image is divided into multiple 2×3 non-overlapping sub-blocks. A pseudo-random sequence is generated using an encryption key to rearrange the order of these sub-blocks, forming a preliminary coarse-grained encryption effect. In the fine-grained encryption stage, the same key as in the coarse-grained encryption is used to scramble the coefficient order within each sub-block, further disrupting the coefficients and enhancing the unrecognizable nature of the image content.
[0012] Furthermore, the preprocessing of the encrypted plaintext image includes: first, dividing the encrypted image into non-overlapping sub-blocks of a fixed size of 2×3; for any sub-block, processing the pixels (p1, ..., p...) within it... n ) sorting in order yields (p σ(1) , ..., p σ(n) ), where σ:{1,…,n}→{1,…,n} is a one-to-one unique mapping satisfying p σ(1) ≤…≤p σ(n) n = 6; when p σ(i) =p σ(j) And when i < j, σ(i) < σ(j) is satisfied; set variable EL to expand the coefficients within each sub-block, where the maximum modification of a pixel is (EL+1)×2. For a standard grayscale image of size M×N, first use the position map LM to record all possible overflow sub-block positions, where when the i-th sub-block satisfies pσ(n) +2×EL>253 or p σ(1) When -2×EL<2, the sub-block is an overflow block, and LM(i)=1 is recorded; otherwise, it is a valid block, and LM(i)=0 is recorded.
[0013] Furthermore, valid sub-blocks are arranged in raster scan order, while overflow sub-blocks are arranged in reverse raster scan order to achieve block reorganization. For overflow sub-blocks, reverse raster scan order is used to avoid conflicts with valid sub-blocks when processing overflow data. The operation is performed on all valid sub-blocks, and all coefficients in each sub-block are sorted in ascending order.
[0014] Furthermore, information is embedded in the prediction stage. First, for a sorted 2×3 non-overlapping valid sub-block, the median coefficient of the sub-block is used to predict the coefficients of the maximum and minimum values; specifically, the third largest pixel value p is used. σ(4) To predict the maximum value p σ(6) and the second largest value p σ(5) The corresponding prediction error is:
[0015]
[0016] Among them, u max =max(p σ(5) p σ(6) ), v max =min(p σ(5) p σ(6) ), u max and v max These represent the initial position indices of the maximum and second-largest pixel values, respectively.
[0017] Use the third smallest pixel value p σ(3) To predict the minimum value p σ(1) and the second smallest value p σ(2) The corresponding prediction error is:
[0018]
[0019] Among them, u min =min(p σ(1) p σ(2) ), v min =max(p σ(1) p σ(2) ), u min and v min These represent the initial position indices of the minimum and second minimum pixel values, respectively.
[0020] A sub-block receives four distinct prediction error values. The four prediction error values for all valid blocks are then calculated. We can perform statistical analysis together to construct a histogram.
[0021] Furthermore, during the coefficient modification stage, the prediction error is modified as follows:
[0022]
[0023] The encrypted secret information, the length of the location map, the arithmetically encoded compressed location map, and the end flag are used to embed information through extension.
[0024] In a second aspect, the present invention provides a high-capacity image ciphertext domain reversible hiding system, comprising:
[0025] The encryption module is used to encrypt plaintext images through two stages: coarse-grained encryption and fine-grained encryption.
[0026] The preprocessing module is used to preprocess the encrypted plaintext image: the encrypted image is divided into non-overlapping sub-blocks of fixed size, the variable EL is set to expand the coefficients in each sub-block, the sub-block is determined to be an overflow block or a valid block, the valid sub-blocks are arranged in the raster scan order, and the overflow sub-blocks are arranged in the reverse raster scan order to realize the reorganization of the blocks;
[0027] The embedding module is used to predict the maximum and minimum values of a sorted, non-overlapping valid sub-block using the median coefficient of the sub-block, and to construct a histogram by statistically analyzing the four prediction error values of all valid blocks. It also uses high-frequency coefficients to expand and modify the prediction error, and expands the encrypted secret information, the length of the position map, the arithmetically encoded compressed position map, and the end flag to achieve information embedding.
[0028] Thirdly, the present invention provides a non-transitory computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification as described in the first aspect.
[0029] Fourthly, the present invention provides a computer device including a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor invokes the program instructions to execute the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification as described in the first aspect.
[0030] Fifthly, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification as described in the first aspect.
[0031] The beneficial effects of this invention are: considering larger image blocks and using the median to predict the maximum and second-maximum values, more coefficients are involved in the embedding process, increasing the upper limit of pixel utilization; the histogram modification method based on optimized mapping makes full use of high-frequency coefficient prediction errors, further improving the embedding capacity.
[0032] The advantages of additional aspects of the invention will be set forth more clearly in the following description or will be learned by practice of the invention. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a framework diagram of the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification, as described in an embodiment of the present invention.
[0035] Figure 2 This is a comparison diagram of the before and after mapping optimization based on high-frequency coefficient adjustment as described in an embodiment of the present invention. Figure 2 (a) is before optimization. Figure 2 (b) is the optimized version.
[0036] Figure 3 This is a comparison chart of the prediction error histograms before and after optimization of the predictor described in this embodiment of the invention.
[0037] Figure 4 This is the original Baboon image described in an embodiment of the present invention.
[0038] Figure 5 This is the original image of Lena as described in an embodiment of the present invention.
[0039] Figure 6 This is the original image of the Airplane described in an embodiment of the present invention. Detailed Implementation
[0040] Embodiments of the present invention are described in detail below, examples of which 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.
[0041] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0042] It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as here.
[0043] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or groups thereof.
[0044] 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 present invention. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0045] To facilitate understanding of the present invention, the present invention will be further explained and described below with reference to the accompanying drawings and specific embodiments. However, the specific embodiments do not constitute a limitation on the embodiments of the present invention.
[0046] Those skilled in the art should understand that the accompanying drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily essential for implementing the present invention.
[0047] The purpose of this invention is to effectively improve the embedding capacity of the method by optimizing the image block coefficient prediction and histogram shifting method in the encrypted domain, while ensuring reversibility. Compared with previous algorithms, this invention first considers larger image blocks and uses the median to predict the maximum and second-maximum values, allowing more coefficients to participate in the embedding process and increasing the upper limit of pixel utilization. Secondly, it proposes a histogram modification method based on optimized mapping, which makes full use of high-frequency coefficient prediction errors to further improve the embedding capacity.
[0048] The high-capacity image ciphertext domain reversible information hiding scheme based on pixel value sorting and histogram modification in this invention includes the following steps: image encryption; preprocessing; information embedding; image restoration and information extraction.
[0049] The image encryption steps are as follows: Plaintext image encryption employs a block-level encryption method, comprising two stages: coarse-grained encryption and fine-grained encryption. First, the original plaintext carrier image is divided into non-overlapping sub-blocks. Then, a random sequence is generated using the encryption key, and the order of the coefficients in the sub-blocks is rearranged to scramble the plaintext image content, achieving coarse-grained encryption. Afterward, the same key is used to scramble the coefficients within each sub-block again, achieving fine-grained encryption.
[0050] The preprocessing steps are as follows: First, the encrypted image is divided into non-overlapping sub-blocks of size n1×n2. Then, based on a pre-set modification amount, a position map of the overflow coefficients is calculated to classify the sub-blocks into valid sub-blocks and overflow sub-blocks. Valid sub-blocks are arranged in raster scan order, and overflow sub-blocks are arranged in reverse raster scan order to achieve block reassembly. Next, operations are performed on all valid sub-blocks to sort all coefficients within each sub-block.
[0051] The information embedding steps are as follows: The embedding process is performed on the reconstructed image blocks one by one according to the raster scanning order. First, for valid sub-blocks, the median of the sub-block is used to predict the maximum and minimum values. Next, the prediction errors of all valid blocks are calculated to obtain a prediction error histogram. Then, the length of the position map, the arithmetically encoded compressed position map, the encrypted secret information, and the end flag are used to embed the information using a given histogram translation method.
[0052] The image restoration and information extraction steps are as follows: First, the encrypted image is divided into non-overlapping sub-blocks of size n1×n2. Then, the median of each sub-block is used to predict the maximum and minimum values and obtain the prediction error. Next, the coefficients are recovered according to a given histogram translation method, and the embedded information is extracted. Finally, based on the key holding situation, three types can be identified: 1) Only the image encryption key is available, in which case the extractor can only obtain the decrypted image; 2) Only the information encryption key is available, in which case the extractor can only obtain the secret information; 3) Both keys are available, in which case the extractor obtains both the decrypted image and the secret information.
[0053] Compared to existing technologies, this invention improves the upper limit of coefficient utilization by adjusting the predictor size and simultaneously embedding information using extreme and near-extreme values. Furthermore, this invention fully utilizes high-frequency prediction errors through a histogram modification scheme based on high-frequency coefficient adjustments. Compared to existing technologies, this invention significantly increases the maximum effective embedding capacity.
[0054] Example 1
[0055] like Figure 1 As shown, this embodiment first provides a high-capacity image ciphertext domain reversible hiding system, including: an encryption module, used to encrypt the plaintext image through two stages: coarse-grained encryption and fine-grained encryption; a preprocessing module, used to preprocess the encrypted plaintext image: dividing the encrypted image into non-overlapping sub-blocks of fixed size, setting a variable EL to expand the coefficients within each sub-block, determining whether the sub-block is an overflow block or a valid block, arranging the valid sub-blocks according to the raster scan order, and arranging the overflow sub-blocks according to the reverse raster scan order to achieve block recombination; an embedding module, used to predict the maximum and minimum value coefficients of a sequentially sorted non-overlapping valid sub-block using the median coefficient of the sub-block, statistically analyzing the four prediction error values of all valid blocks together to achieve histogram construction; expanding using high-frequency coefficients to modify the prediction error; and expanding the encrypted secret information, the length of the position map, the arithmetic-coded compressed position map, and the end flag bit to achieve information embedding.
[0056] In this embodiment, the above-described system is used to implement a high-capacity image ciphertext domain reversible hiding technique based on pixel value sorting and histogram modification, which mainly includes image encryption, preprocessing and information embedding.
[0057] The image encryption process employs a block-based encryption method, divided into two stages: coarse-grained encryption and fine-grained encryption. First, in the coarse-grained encryption stage, the original plaintext image is divided into multiple 2×3 non-overlapping sub-blocks. This division facilitates subsequent encryption operations and information hiding. Next, a pseudo-random sequence is generated using the encryption key to rearrange the order of these sub-blocks. This perturbation disrupts the order of the sub-blocks, blurring the overall content of the plaintext image and achieving a preliminary coarse-grained encryption effect. In the second stage, fine-grained encryption, the same key as in the coarse-grained encryption stage is used to further perturb the coefficient order within each sub-block. This further scrambles the coefficients within each sub-block, significantly increasing the unrecognizable nature of the image content, making it difficult to recover the original plaintext image structure even at the sub-block level. These two encryption stages complement each other, ensuring image security while providing a solid foundation for subsequent reversible information hiding.
[0058] The preprocessing steps are as follows: First, divide the encrypted image into non-overlapping sub-blocks of fixed size n1×n2=2×3. For any sub-block, assign each pixel (p1, ..., p...) to a specific value. n ) sorting in order yields (p σ(1) , ..., p σ(n) ), where σ: {1, ..., n} → {1, ..., n} is a one-to-one unique mapping satisfying p σ(1) ≤…≤p σ(n) n = 6. When p σ(i) =p σ(j) And when i < j, σ(i) < σ(j) is satisfied. The division of sub-blocks is based on the capacity requirement of image embedding information to ensure that each sub-block can be processed independently in subsequent processing, effectively reducing the overall computational complexity. Then, the variable EL is set to expand the coefficients within each sub-block. In this method, the maximum modification of a pixel is (EL+1)×2. For a standard grayscale image of size M×N, the location map LM is first used to record the positions of all sub-blocks that may overflow. Specifically, when the i-th sub-block satisfies p σ(n) +2×EL>253 or p σ(1) When -2×EL < 2, the sub-block is an overflow block, and LM(i) = 1 is recorded. Otherwise, it is a valid block, and LM(i) = 0 is recorded. Then, LM is compressed using arithmetic coding, and the compressed length is recorded as M. cNext, the valid sub-blocks are arranged in raster scan order, while the overflow sub-blocks are arranged in reverse raster scan order, thus reassembling the blocks. Raster scan order is a common arrangement method based on image data, arranging pixels sequentially from left to right and top to bottom for consistent processing. For overflow sub-blocks, a reverse raster scan order is used to avoid conflicts with valid sub-blocks when processing overflow data. This ordered arrangement not only facilitates subsequent operations but also provides convenience for quickly locating the positions of each sub-block during embedding and decoding. Finally, operations are performed on all valid sub-blocks, sorting all coefficients within each sub-block in ascending order. The purpose of this sorting is to optimize the coefficient distribution within the sub-block, making it conform to a specific embedding pattern to facilitate the embedding of subsequent information.
[0059] The steps of information embedding can be divided into two stages: prediction and coefficient modification.
[0060] In the prediction phase, firstly, for a sorted 2×3 non-overlapping valid sub-block, the median coefficient of the sub-block is used to predict the coefficients of the maximum and minimum values. Specifically, the third largest pixel value p is used. σ(4) To predict the maximum value p σ(6) and the second largest value p σ(5) The corresponding prediction error is
[0061]
[0062] Among them, u max =max(p σ(5) p σ(6) ), v max =min(p σ(5) p σ(6) Here, u max and v max These represent the initial position indices of the maximum and second-largest pixel values, respectively. Similarly, the third-smallest pixel value, p, is used. σ(3) To predict the minimum value p σ(1) and the second smallest value p σ(2) The corresponding prediction error is
[0063]
[0064] Among them, u min =min(p σ(1) p σ(2) ), v min =max(p σ(1) p σ(2) Here, u min and v minThese represent the initial position indices of the minimum and second minimum pixel values, respectively. A sub-block can obtain four distinct prediction error values. Next, the four prediction error values of all valid blocks are... We can perform statistical analysis together to construct a histogram.
[0065] During the coefficient modification phase, taking variable EL==2 as an example, Figure 2 (a) illustrates the expansion method before optimization. Through... Figure 2 The optimization of the expansion method in (a) significantly improves the utilization efficiency of high-frequency coefficients. Specifically, taking one bit of information to be embedded as an example: when the embedded ternary information is 0, the coefficient at the current position remains unchanged (expansion value is 0); when the embedded information is 1, the coefficient at the current position increases by 3; when the embedded information is 2, the coefficient at the current position increases by 6. Compared to Figure 2 (a) The original method, this optimized extension technique significantly improves embedding efficiency, while the prediction error is modified as follows:
[0066]
[0067] Finally, the encrypted secret information, the length of the location map, the arithmetically encoded compressed location map, and auxiliary information such as the end flag are transmitted through... Figure 2 (b) extends the method to achieve information embedding.
[0068] In this embodiment, a method for restoring and extracting information from an image that has been encrypted and hidden through the above process is also provided, which is divided into three types according to the key possessed by the extractor.
[0069] The first scenario involves the extractor possessing only the encryption key. First, the encrypted image carrying the key is divided into 2x3 sub-blocks. For each sub-block, the key-carrying pixels are... Sequential sorting yields a sequence Then calculate the prediction error:
[0070]
[0071] in,
[0072]
[0073] Since the embedding process only modifies the extreme and near-extreme values, therefore, and The embedded secret information W is
[0074]
[0075] This process is repeated for all valid sub-blocks until the end flag is encountered. Then, the extracted ternary information is converted to binary information. Previously... The encrypted secret information is extracted from bits, and the compressed location map length M is determined. c The position map LM is compressed using arithmetic encoding. Finally, the secret information is decrypted using the secret information key. Then, the encrypted secret information is decrypted using the information encryption key. Finally, the encrypted blocks are restored to their original order using the position map, but the original image cannot be decrypted.
[0076] The second scenario involves the extractor possessing only the image encryption key. The extractor first obtains the encrypted secret information in the same manner as described above, compressing the location map to a length M. c The location map LM after arithmetic coding compression. Original predicted values within sub-blocks. It can be recovered using the following formula:
[0077]
[0078] W can be obtained through the first case. Then the original pixels in the block... for
[0079]
[0080]
[0081]
[0082]
[0083] After block recovery, the location map LM is decompressed and used to guide the recovery of the original arrangement of all blocks, resulting in an encrypted image. Finally, the original image is recovered using the image encryption key, but the secret information cannot be decrypted.
[0084] The third scenario occurs when the extractor possesses both the information encryption key and the image encryption key. The extractor can extract the secret information without loss, similar to the first scenario. Simultaneously, the original carrier image can be perfectly recovered, similar to the second scenario.
[0085] To effectively illustrate the performance of the method described in this embodiment, the experimental results are presented and analyzed below using accompanying drawings and tabular data.
[0086] In this experiment, effective embedding capacity (EC) was used as the performance evaluation metric. Figure 3 The histograms of prediction errors obtained from the two prediction methods were compared. For example... Figure 3 As shown, the blue bars represent the prediction error histogram obtained by the improved predictor, while the red bars correspond to existing mainstream methods. Clearly, the prediction error histogram obtained by our method has a significantly higher frequency than that of mainstream methods. In particular, the peak positions are significantly improved, which is highly beneficial for increasing the final embedding capacity. Figures 4 to 6 These are: the original image of Baboon, the original image of Lena, and the original image of Airplane.
[0087] Table 1 in the tabular data results shows the compression location map length M on the test image when using different ELs. c Number of valid blocks N mb And the effective embedding capacity (EC). Comparing the embedding capacity of various test images under different expansion coefficients, it can be concluded that Baboon, due to its complex texture, has a relatively small number of effective blocks under the same parameters, making the position map difficult to compress and affecting the maximum embedding capacity. In contrast, smoother images such as Lena and Airplane have fewer overflow blocks under the same parameters, allowing for effective compression of the position map. Compared to Baboon, the maximum embedding capacity increases by more than 50%, indicating that image texture affects the final embedding capacity. To more comprehensively illustrate the advantages of this method, Table 2 shows a comparison of the maximum embedding capacity between this method and other mainstream methods. It can be seen that the maximum embedding capacity of this method is 263,442 bits. In comparison, the maximum embedding capacity of other mainstream methods is 129,035 bits, an improvement of nearly 104.2%. For the most complex texture, Baboon, the maximum embedding capacity of this method is 199,798 bits, an improvement of nearly 90.7% compared to the 104,784 bits of other mainstream methods. Similarly, on the smooth image "Airplane", the maximum embedding capacity is 253,822 bits, which is nearly 98.1% higher than the maximum embedding capacity of 128,155 bits for other mainstream methods. Furthermore, all data shows significant differences in maximum embedding capacity across different images. The maximum embedding capacity of our method on different test images ranges from [199,798 to 263,442]. This method provides a more stable and higher embedding capacity than other comparative methods, which is more valuable for practical applications of reversible information hiding in the ciphertext domain.
[0088] Table 1 Embedding capacity under different extension coefficients
[0089]
[0090]
[0091] Table 2
[0092]
[0093] In summary, this embodiment proposes a high-capacity image ciphertext domain reversible information hiding scheme based on pixel value sorting and histogram modification. To protect privacy, the original image is first encrypted using a block-level encryption perturbation method. Subsequently, the pixel utilization efficiency is effectively improved by optimizing the predictor, and the embedding capacity is further increased by making fuller use of high-frequency coefficients for data embedding. Compared with the current state-of-the-art methods, this method shows a significant advantage in embedding capacity, while also being simple in design and having certain reference value. In addition, the computational process of this method is concise and has low complexity, making it very suitable for application in high-efficiency practical scenarios.
[0094] Example 2
[0095] This embodiment 2 provides a non-transitory computer-readable storage medium for storing computer instructions. When executed by a processor, the computer instructions implement the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification as described above. The method includes:
[0096] The plaintext image is encrypted through two stages: coarse-grained encryption and fine-grained encryption.
[0097] Preprocess the encrypted plaintext image: Divide the encrypted image into non-overlapping sub-blocks of fixed size, set the variable EL to expand the coefficients in each sub-block, determine whether the sub-block is an overflow block or a valid block, arrange the valid sub-blocks according to the raster scan order, and arrange the overflow sub-blocks according to the reverse raster scan order to achieve block recombination;
[0098] For a non-overlapping valid sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the coefficients of the maximum and minimum values. The four prediction error values of all valid blocks are statistically analyzed together to construct a histogram. The high-frequency coefficients are used to expand and modify the prediction error. The encrypted secret information, the length of the position map, the position map after arithmetic encoding compression, and the end flag are expanded to realize information embedding.
[0099] Example 3
[0100] This embodiment 3 provides a computer device, including a memory and a processor, wherein the processor and the memory communicate with each other, and the memory stores program instructions executable by the processor. The processor calls the program instructions to execute the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification as described above, the method including:
[0101] The plaintext image is encrypted through two stages: coarse-grained encryption and fine-grained encryption.
[0102] Preprocess the encrypted plaintext image: Divide the encrypted image into non-overlapping sub-blocks of fixed size, set the variable EL to expand the coefficients in each sub-block, determine whether the sub-block is an overflow block or a valid block, arrange the valid sub-blocks according to the raster scan order, and arrange the overflow sub-blocks according to the reverse raster scan order to achieve block recombination;
[0103] For a non-overlapping valid sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the coefficients of the maximum and minimum values. The four prediction error values of all valid blocks are statistically analyzed together to construct a histogram. The high-frequency coefficients are used to expand and modify the prediction error. The encrypted secret information, the length of the position map, the position map after arithmetic encoding compression, and the end flag are expanded to realize information embedding.
[0104] Example 4
[0105] This embodiment 4 provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification as described above. The method includes:
[0106] The plaintext image is encrypted through two stages: coarse-grained encryption and fine-grained encryption.
[0107] Preprocess the encrypted plaintext image: Divide the encrypted image into non-overlapping sub-blocks of fixed size, set the variable EL to expand the coefficients in each sub-block, determine whether the sub-block is an overflow block or a valid block, arrange the valid sub-blocks according to the raster scan order, and arrange the overflow sub-blocks according to the reverse raster scan order to achieve block recombination;
[0108] For a non-overlapping valid sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the coefficients of the maximum and minimum values. The four prediction error values of all valid blocks are statistically analyzed together to construct a histogram. The high-frequency coefficients are used to expand and modify the prediction error. The encrypted secret information, the length of the position map, the position map after arithmetic encoding compression, and the end flag are expanded to realize information embedding.
[0109] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0110] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0111] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0112] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment, whereby a series of operational steps are performed to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0113] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that, based on the technical solutions disclosed in the present invention, various modifications or variations that can be made by those skilled in the art without creative effort should be included within the scope of protection of the present invention.
Claims
1. A high-capacity image ciphertext domain reversible hiding method, characterized in that, include: The plaintext image is encrypted through two stages: coarse-grained encryption and fine-grained encryption. The plaintext image encryption process uses a block encryption method, which is divided into two stages: coarse-grained encryption and fine-grained encryption. In the coarse-grained encryption stage, the original plaintext carrier image is divided into multiple... Non-overlapping sub-blocks of different sizes are used to generate a pseudo-random sequence using an encryption key. This sequence is then rearranged to create a preliminary coarse-grained encryption effect. In fine-grained encryption, the same key as in coarse-grained encryption is used to scramble the order of coefficients within each sub-block. The coefficients within each sub-block are further scrambled, enhancing the unrecognizable nature of the image content. Preprocess the encrypted plaintext image: Divide the encrypted image into non-overlapping sub-blocks of fixed size and set variables. The process involves expanding the coefficients within each sub-block to determine whether it is an overflow or valid sub-block. Valid sub-blocks are arranged in raster scan order, while overflow sub-blocks are arranged in reverse raster scan order, thus reorganizing the blocks. Specifically, this includes: first, dividing the encrypted image into blocks of fixed size... For any non-overlapping sub-block, the pixels within it are... Sequential sorting yields ,in, It is a one-to-one unique mapping that satisfies , ;when and When, satisfy Set variables The coefficients within each sub-block are expanded, where the maximum modification amount for a pixel is... ,for A standard grayscale image of the specified size is first obtained using a positional map. Record the positions of all possible overflowing sub-blocks, where, when the... Sub-block satisfies or When this occurs, the sub-block is an overflow sub-block, denoted as... Otherwise, it is a valid sub-block, recorded as follows: ; For a sorted, non-overlapping valid sub-block, the median coefficient of the valid sub-blocks is used to predict the coefficients of the maximum and minimum values. The four prediction errors of all valid sub-blocks are statistically analyzed together to construct a histogram. High-frequency coefficients are used for expansion to modify the prediction error. The encrypted secret information, the length of the position map, the arithmetically encoded compressed position map, and the end flag are expanded to achieve information embedding. Information embedding occurs during the prediction phase. First, for a sorted, non-overlapping valid sub-block... For valid sub-blocks of the same size and without overlap, the median coefficient of these valid sub-blocks is used to predict the coefficients of the maximum and minimum values; specifically, the third largest pixel value is used. To predict the maximum value and the second largest value The corresponding prediction error is: ; in, , , and These represent the initial position indices of the maximum and second-largest pixel values, respectively. Use the third smallest pixel value To predict the minimum value and the second smallest value The corresponding prediction error is: ; in, , , and These represent the initial position indices of the minimum and second minimum pixel values, respectively. A valid sub-block yields four distinct prediction errors. The four prediction errors for all valid sub-blocks are calculated as follows: Together, we can perform statistical analysis to construct a histogram. The method for modifying the prediction error is as follows: ; The encrypted secret information, the length of the location map, the arithmetically encoded compressed location map, and the end flag are used to embed information through extension.
2. The high-capacity image ciphertext domain reversible hiding method according to claim 1, characterized in that, For overflow sub-blocks, a reverse raster scan order is used to arrange them to avoid conflicts with valid sub-blocks when processing overflow data; operations are performed on all valid sub-blocks, and all coefficients within each valid sub-block are sorted in ascending order.
3. A high-capacity image ciphertext domain reversible hiding system, characterized in that, include: The encryption module is used to encrypt plaintext images through two stages: coarse-grained encryption and fine-grained encryption. The plaintext image encryption process employs a block encryption method, divided into two stages: coarse-grained encryption and fine-grained encryption. In the coarse-grained encryption stage, the original plaintext carrier image is divided into multiple... Non-overlapping sub-blocks of different sizes are used to generate a pseudo-random sequence using an encryption key. This sequence is then rearranged to create a preliminary coarse-grained encryption effect. In fine-grained encryption, the same key as in coarse-grained encryption is used to scramble the order of coefficients within each sub-block. The coefficients within each sub-block are further scrambled, enhancing the unrecognizable nature of the image content. The preprocessing module is used to preprocess the encrypted plaintext image: it divides the encrypted image into non-overlapping sub-blocks of fixed size and sets variables. The process involves expanding the coefficients within each sub-block to determine whether it is an overflow or valid sub-block. Valid sub-blocks are arranged in raster scan order, while overflow sub-blocks are arranged in reverse raster scan order, thus reorganizing the blocks. Specifically, this includes: first, dividing the encrypted image into blocks of fixed size... For any non-overlapping sub-block, the pixels within it are... Sequential sorting yields ,in, It is a one-to-one unique mapping that satisfies , ;when and When, satisfy Set variables The coefficients within each sub-block are expanded, where the maximum modification amount for a pixel is... ,for A standard grayscale image of the specified size is first obtained using a positional map. Record the positions of all possible overflowing sub-blocks, where, when the... Sub-block satisfies or When this occurs, the sub-block is an overflow sub-block, denoted as... Otherwise, it is a valid sub-block, recorded as follows: ; The embedding module is used to predict the maximum and minimum value coefficients of a sorted, non-overlapping valid sub-block using the median coefficient of the valid sub-blocks. It then calculates the four prediction errors of all valid sub-blocks together to construct a histogram. High-frequency coefficients are used for expansion to modify the prediction error. The encrypted secret information, the length of the position map, the arithmetically encoded compressed position map, and the end flag are expanded to achieve information embedding. During the prediction phase, information embedding first... For valid sub-blocks of the same size and without overlap, the median coefficient of these valid sub-blocks is used to predict the coefficients of the maximum and minimum values; specifically, the third largest pixel value is used. To predict the maximum value and the second largest value The corresponding prediction error is: ; in, , , and These represent the initial position indices of the maximum and second-largest pixel values, respectively. Use the third smallest pixel value To predict the minimum value and the second smallest value The corresponding prediction error is: ; in, , , and These represent the initial position indices of the minimum and second minimum pixel values, respectively. A valid sub-block yields four distinct prediction errors. The four prediction errors for all valid sub-blocks are calculated as follows: Together, we can perform statistical analysis to construct a histogram. The method for modifying the prediction error is as follows: ; The encrypted secret information, the length of the location map, the arithmetically encoded compressed location map, and the end flag are used to embed information through extension.
4. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the high-capacity image ciphertext domain reversible hiding method as described in claim 1 or 2.
5. A computer device, characterized in that, The method includes a memory and a processor, which communicate with each other. The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the high-capacity image ciphertext domain reversible hiding method as described in claim 1 or 2.
6. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the high-capacity image ciphertext domain reversible hiding method as described in claim 1 or 2.
Citation Information
Patent Citations
Reversible data hiding method based on prediction error correction and adaptive optimization mapping
CN116389650A
High-capacity encrypted image reversible information hiding method based on recursive MSB plane prediction
CN118590587A