High-capacity image ciphertext domain reversible hiding method and system
By using pixel value sorting and histogram modification methods in the image ciphertext domain, the image is encrypted and preprocessed in blocks, and the median coefficient prediction error and information embedding are used to solve the problem of insufficient embedding capacity in the prior art. , achieving higher embedding capacity and flexibility.
Patent Information
- Application Number
- CN202411751785.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-12-02
AI Technical Summary
The prior art In the reversible information hiding technology of image ciphertext domain, the embedding capacity has not yet reached the limit, and the utilization of ciphertext coefficients is insufficient, which limits the flexibility and practicality of data in secure transmission.
Using a high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification, plaintext images are encrypted through coarse-grained encryption and fine-grained encryption, preprocessing is performed to divide effective sub-blocks and overflow sub-blocks, and utilized The value coefficient predicts the most and second most value coefficients, statistically predict the histogram of the prediction error, and uses high-frequency coefficients to expand to realize information embedding.
The embedding capacity of the image ciphertext domain is improved, the upper limit of pixel usage is improved, the high-frequency coefficient prediction error is fully utilized, and the embedding capacity is significantly improved, meeting higher data protection needs.
Smart Images

Figure CN119449967A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image ciphertext information hiding, and in particular to a high-capacity image ciphertext domain reversible hiding method and system based on pixel value sorting and histogram modification. Background Art
[0002] In today's digital age, the rapid development of the Internet of Things and cloud computing has led to the generation and exchange of massive amounts of data, but it has also brought about increasingly serious risks of data exposure. In order to meet these challenges, cryptography and ciphertext domain reversible information hiding technology have gradually become research hotspots.
[0003] Cryptography has long been the core means of protecting the security of multimedia content. Through encryption, data can be kept confidential during transmission and storage. However, while protecting data content, traditional cryptography has an important limitation: it cannot carry and manage additional information, such as data management and authentication information. This deficiency limits the flexibility and practicality of data in secure transmission. In order to make up for this shortcoming, ciphertext domain reversible information hiding technology came into being. This technology allows additional information to be embedded in ciphertext while ensuring the encryption of data content. Its core lies in embedding information by introducing redundancy, which can be specifically divided into two methods: introducing redundancy before encryption and introducing redundancy after encryption. The method of introducing redundancy before encryption usually retains fixed pixels or features during the encryption process to provide space for subsequent information embedding. Although this method is effective, it has certain limitations in flexibility and capacity. In contrast, the method of introducing redundancy after encryption has become the mainstream research direction. This method compresses the ciphertext coefficients by applying a method similar to compression technology on the ciphertext, thereby introducing redundancy. 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 and can carry more additional information without affecting the security of the original data.
[0004] For the latter, the method based on pixel value sorting and histogram modification performs well in terms of embedding capacity and has good separation, but it does not achieve the best effect in the utilization of ciphertext coefficients, and the capacity has not yet reached its limit. Therefore, it is of great research value to study high-capacity reversible information hiding technology in ciphertext domain. Continuous 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 object of the present invention is to provide a high-capacity image ciphertext domain reversible hiding method and system based on pixel value sorting and histogram modification to solve at least one technical problem existing in the above-mentioned background technology.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[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 in raster scan order, and arrange the overflow sub-blocks in reverse raster scan order to achieve block reorganization;
[0010] For a valid non-overlapping sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the maximum and second maximum coefficients, and the four prediction error values of all valid blocks are counted together to realize histogram construction; the high-frequency coefficients are used for expansion to modify the prediction error; the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag are expanded to realize information embedding.
[0011] Furthermore, the plaintext image encryption process adopts 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 2×3 non-overlapping sub-blocks, and a pseudo-random sequence is generated through the encryption key to rearrange the order of these sub-blocks to form a preliminary coarse-grained encryption effect. In the fine-grained encryption, the same key as the coarse-grained encryption is used to scramble the order of coefficients within each sub-block, and the coefficients within the sub-block are further disrupted to improve the unrecognizable nature of the image content.
[0012] Furthermore, the encrypted plaintext image is preprocessed as follows: first, the encrypted image is divided into non-overlapping sub-blocks of a fixed size of 2×3, and for any sub-block, the pixels (p1, ..., p n ) order to get (p σ(1) ,…,p σ(n) ), where σ:{1,…,n}→{1,…,n} is a one-to-one unique mapping that satisfies p σ(1) ≤…≤p σ(n) , n = 6; when p σ(i) =p σ(j) When i<j, σ(i)<σ(j); set the variable EL to expand the coefficients in each sub-block, where the maximum pixel modification amount is (EL+1)×2. For a standard grayscale image of size M×N, first use the position map LM to record the positions of all sub-blocks where overflow may occur. 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; otherwise, it is a valid block, and LM(i)=0.
[0013] Furthermore, the valid sub-blocks are arranged in a raster scan order, and the overflow sub-blocks are arranged in a reverse raster scan order to achieve block reorganization; for the overflow sub-blocks, they are arranged in a reverse raster scan order to avoid conflicts with the valid sub-blocks when processing the overflow data; all valid sub-blocks are operated on, and all coefficients in the sub-blocks are sorted in ascending order one by one.
[0014] Furthermore, information is embedded in the prediction stage. First, for a valid sub-block of 2×3 size that is sorted and does not overlap, the median coefficient of the sub-block is used to predict the maximum and second maximum coefficients; specifically, the third largest pixel value p is used. σ(4) To predict the maximum value p σ(6) and the next 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 Represent the initial position indexes of the maximum value pixel and the second largest value pixel respectively;
[0017] Use the third smallest pixel value p σ(3) To predict the minimum value p σ(1) and the next 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 Respectively represent the initial position indexes of the minimum pixel and the second minimum pixel;
[0020] One sub-block gets four different prediction error values, and the four prediction error values of all valid blocks are Count together to realize histogram construction.
[0021] Furthermore, in the coefficient modification stage, the prediction error is modified as follows:
[0022]
[0023] The encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag are extended to achieve information embedding.
[0024] In a second aspect, the present invention provides a high-capacity image ciphertext domain reversible hiding system, comprising:
[0025] An encryption module, used to encrypt the plaintext image through two stages: coarse-grained encryption and fine-grained encryption;
[0026] The preprocessing module is used to 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 in raster scanning order, and arrange the overflow sub-blocks in reverse raster scanning order to achieve block reorganization;
[0027] The embedding module is used to predict the maximum and second maximum coefficients of a sequentially sorted non-overlapping valid sub-block using the median coefficient of the sub-block, and to count the four prediction error values of all valid blocks together to realize histogram construction; to expand using high-frequency coefficients to modify the prediction error; to expand the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag to realize information embedding.
[0028] In a third aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification as described in the first aspect is implemented.
[0029] In a fourth aspect, the present invention provides a computer device comprising 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 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 in the first aspect.
[0030] In a fifth aspect, the present invention provides an electronic device, comprising: 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, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes 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 the present invention are as follows: larger image blocks are considered, and the maximum and sub-maximum values are predicted using the median value, so that more coefficients are involved in the embedding process, thereby increasing the upper limit of pixel utilization; a histogram modification method based on optimized mapping makes full use of high-frequency coefficient prediction errors, thereby further improving the embedding capacity.
[0032] Additional advantages of the present invention will be more clearly given in the following description or learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[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 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 according to an embodiment of the present invention. Figure 2 (a) is before optimization. Figure 2 (b) After optimization.
[0036] Figure 3 This is a comparison diagram of the prediction error histograms before and after the optimization of the predictor described in the embodiment of the present invention.
[0037] Figure 4 It is the Baboon original image described in the embodiment of the present invention.
[0038] Figure 5 It is the original Lena image described in the embodiment of the present invention.
[0039] Figure 6 It is the original image of Airplane described in the embodiment of the present invention. DETAILED DESCRIPTION
[0040] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below by the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0041] It should be understood by those skilled in the art that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.
[0042] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with that in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.
[0043] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the 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, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. Different embodiments or examples described in this specification and features of different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
[0045] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and 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 drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.
[0047] The purpose of the present invention is to effectively improve the embedding capacity of the method by optimizing the prediction and histogram shifting method of the ciphertext domain image block coefficients under the premise of ensuring reversibility. Compared with the previous algorithm, the present invention first considers larger image blocks, and uses the median to predict the maximum and second maximum values, so that more coefficients participate in the embedding process and increase the upper limit of pixel utilization; secondly, a histogram modification method based on optimized mapping is proposed to make full use of high-frequency coefficient prediction errors to further improve the embedding capacity.
[0048] In the present invention, a high-capacity image ciphertext domain reversible information hiding scheme based on pixel value sorting and histogram modification includes the following steps: image encryption; preprocessing; information embedding; image restoration and information extraction.
[0049] The steps of image encryption are as follows: block-level encryption is used for plaintext image encryption, including 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 an encryption key to rearrange the order of sub-block coefficients to disrupt the plaintext image content and achieve coarse-grained encryption. Afterwards, the coefficients in the sub-block are disrupted again using the same key to achieve 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, according to the preset modification amount, the position map of the overflow coefficient is calculated to classify the sub-blocks into valid sub-blocks and overflow sub-blocks. The valid sub-blocks are arranged in raster scanning order, and the overflow sub-blocks are arranged in reverse raster scanning order to achieve block reorganization. Next, all valid sub-blocks are operated to achieve the order of all coefficients in each sub-block.
[0051] The steps of information embedding are as follows: the embedding process is performed on the reorganized image blocks one by one according to the raster scanning order. First, for the valid sub-blocks, the maximum value and the second maximum value are predicted using the median value of the sub-blocks. Then, the prediction errors of all valid blocks are counted to obtain a prediction error histogram. Then, the length of the position map, the position map compressed by arithmetic coding, the encrypted secret information and the end flag are embedded in the information through a given histogram shift method.
[0052] The steps of image recovery and information extraction are as follows: first, the encrypted image is divided into non-overlapping sub-blocks of size n1×n2. Then, the median of the sub-block is used to predict the maximum and the second maximum and obtain the prediction error. Next, the coefficients are restored and the embedded information is extracted according to the given histogram shift method. Finally, according to the key possession, it can be divided into three types. 1) Only the image encryption key, in this case, the extractor can only obtain the decrypted image; 2) Only the information encryption key, in this case, the extractor can only obtain the secret information; 3) Both keys are possessed at the same time, in this case, the extractor obtains both the decrypted image and the secret information.
[0053] Compared with the prior art, the present invention adjusts the predictor size and uses the maximum and sub-maximum values to embed information at the same time, thereby improving the upper limit of coefficient utilization. At the same time, the present invention makes full use of high-frequency prediction errors through a histogram modification scheme based on high-frequency coefficient adjustment. Compared with the prior art, the maximum effective embedding capacity of the present invention is significantly improved.
[0054] Example 1
[0055] like Figure 1 As shown, in this embodiment, firstly, a high-capacity image ciphertext domain reversible hiding system is provided, including: an encryption module, which is used to encrypt the plaintext image through two stages of coarse-grained encryption and fine-grained encryption; a preprocessing module, which is used to 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 in a raster scan order, and arrange the overflow sub-blocks in a reverse raster scan order to achieve block reorganization; an embedding module, which is used to predict the maximum and second maximum coefficients of a non-overlapping valid sub-block after a sequential sorting using the median coefficient of the sub-block, and count the four prediction error values of all valid blocks together to achieve histogram construction; expand using high-frequency coefficients to modify the prediction error; expand the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag to achieve information embedding.
[0056] In this embodiment, the above system is used to implement a high-capacity image ciphertext domain reversible hiding technology based on pixel value sorting and histogram modification, which mainly includes image encryption, preprocessing and information embedding.
[0057] The steps of image encryption are as follows: the plaintext image encryption process adopts block encryption method, which is divided into two stages: coarse-grained encryption and fine-grained encryption. First, in the coarse-grained encryption stage, the original plaintext carrier image is divided into multiple 2×3 non-overlapping sub-blocks, which facilitates the implementation of subsequent encryption operations and information hiding processes. Then, a pseudo-random sequence is generated by the encryption key to rearrange the order of these sub-blocks. Through this disturbance, the arrangement order of the sub-blocks is disrupted, blurring the content of the plaintext image as a whole, forming a preliminary coarse-grained encryption effect. In the second stage of fine-grained encryption, the same key as the coarse-grained encryption is used to perform a deeper disturbance operation on the coefficient order within each sub-block. Through this operation, the coefficients within the sub-block are further disrupted, thereby greatly improving the unrecognizable nature of the image content, making it difficult to restore the original plaintext image structure even at the sub-block level. These two encryption stages complement each other, ensuring image security while also providing a solid foundation for subsequent reversible information hiding.
[0058] The preprocessing steps are: first, divide the encrypted image into non-overlapping sub-blocks of fixed size n1×n2=2×3. For any sub-block, the pixels (p1, ..., p n ) order to get (p σ(1) , ..., p σ(n) ), where σ:{1,...,n}→{1,...,n} is a one-to-one unique mapping that satisfies 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 in each sub-block. In this method, the maximum modification amount of a pixel is (EL+1)×2. For a standard grayscale image of size M×N, the position map LM is first used to record the positions of all sub-blocks where overflow may occur. 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. Otherwise, it is a valid block, and LM(i)=0. Then, LM is compressed using arithmetic coding, and the compressed length is M. c. Next, arrange the valid sub-blocks in raster scan order, and the overflow sub-blocks in reverse raster scan order to achieve block reorganization. Raster scan order is a common arrangement method based on image data. Pixels are arranged in order from left to right and from top to bottom to facilitate uniform processing. For overflow sub-blocks, reverse raster scan order is used to avoid conflicts with valid sub-blocks when processing overflow data. This orderly arrangement not only facilitates subsequent operations, but also facilitates the rapid positioning of each sub-block during embedding and decoding. Finally, all valid sub-blocks are operated, and all coefficients in the sub-blocks are sorted in ascending order one by one. The purpose of sorting is to optimize the coefficient distribution within the sub-block so that it conforms to a specific embedding mode and facilitates the embedding of subsequent information.
[0059] The steps of information embedding are: specifically, it can be divided into two stages: prediction and coefficient modification.
[0060] In the prediction stage, first, for a valid sub-block of 2×3 size that is sorted and does not overlap, the median coefficient of the sub-block is used to predict the maximum and second maximum coefficients. Specifically, the third largest pixel value p is used. σ(4) To predict the maximum value p σ(6) and the next 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 Represent the initial position index of the maximum value pixel and the second largest value pixel respectively. Similarly, use the third smallest pixel value p σ(3) To predict the minimum value p σ(1) and the next 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 minRepresents the initial position index of the minimum pixel and the second minimum pixel respectively. A sub-block can get four different prediction error values. Next, the four prediction error values of all valid blocks are Count together to realize histogram construction.
[0065] In the coefficient modification stage. Taking the variable EL==2 as an example, Figure 2 (a) shows the expansion method before optimization. Figure 2 The optimization of the expansion method in (a) fully 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 of the current position remains unchanged (the expansion value is 0); when the embedded information is 1, the coefficient of the current position increases by 3; when the embedded information is 2, the coefficient of the current position increases by 6. Compared with Figure 2 (a), this optimized expansion technique significantly improves the embedding efficiency, while the prediction error is modified as follows:
[0066]
[0067] Finally, the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag and other auxiliary information are passed through Figure 2 (b) The extended method realizes information embedding.
[0068] In this embodiment, a method for recovering and extracting information from an image that has been encrypted and hidden by the above process is also provided, which is divided into three types according to the key status of the extractor.
[0069] The first case is when the extractor only has the information encryption key. First, the encrypted image is divided into 2×3 sub-blocks. For each sub-block, the encrypted pixels Sort by order to get the sequence Then calculate the prediction error:
[0070]
[0071] in,
[0072]
[0073] Since the embedding process only modifies the maximum and second-maximum values, and Then 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 into binary information. bits to extract the encrypted secret information and compress the position map length M c and the position map LM compressed by arithmetic coding. Finally, the secret information is decrypted using the secret information key to obtain the secret information. Then, the encrypted secret information is decrypted using the information encryption key. Finally, the encrypted blocks are restored to the order before reorganization through the position map, but the original image cannot be decrypted.
[0076] In the second case, when the extractor only has the image encryption key, the extractor first obtains the encrypted secret information in the same way as above, and compresses the position map length M c The original prediction value in the sub-block is It is recovered by the following formula:
[0077]
[0078] Among them, W can be obtained through the first case. Then the original pixels in the block for
[0079]
[0080]
[0081]
[0082]
[0083] After the blocks are restored, the position map LM is decompressed and used to guide the restoration of the original arrangement of all blocks to obtain the encrypted image. Finally, the original image is restored by the image encryption key, but the secret information cannot be decrypted.
[0084] In the third case, when the extractor has both the information encryption key and the image encryption key, the extractor can extract the secret information losslessly, just like in the first case. At the same time, the original carrier image can also be perfectly restored, just like in the second case.
[0085] In order to effectively illustrate the performance of the method described in this embodiment, the experimental results are displayed and analyzed using figures and table data.
[0086] In this experimental result, the effective embedding capacity (EC) is used as the performance evaluation index. Figure 3 In , the prediction error histograms obtained by the two prediction methods are compared. Figure 3 As shown in the figure, the blue column represents the prediction error histogram obtained by the improved predictor, and the red column corresponds to the existing mainstream method. Obviously, the frequency of the prediction error histogram obtained by this method is significantly higher than that of the mainstream method. Among them, the peak position is significantly improved, which is very beneficial to the improvement of the final embedding capacity. Figures 4 to 6 They are: Baboon original image, Lena original image, Airplane original image.
[0087] In the tabular data results, Table 1 shows the compressed position map length M on the test image when this method uses different ELs. c 、Number of valid blocks mb and effective embedding capacity EC. By comparing the embedding capacity of each test image under different expansion coefficients, it can be concluded that Baboon has a complex texture and a relatively small number of valid blocks under the same parameters, and the position map is difficult to compress, which affects the maximum embedding capacity. For smoother images such as Lena and Airplane, there are fewer overflow blocks with the same parameters, and the position map can be effectively compressed. Compared with Baboon, the maximum embedding capacity has increased by more than 50%, which shows that the image texture will affect the final embedding capacity. In order to more comprehensively illustrate the advantages of this method, Table 2 shows the comparison of the maximum embedding capacity between this method and similar mainstream methods. It can be seen that the maximum embedding capacity of this method is 263442 bits. In contrast, the maximum value of the maximum embedding capacity of other mainstream methods is 129035 bits, which is an increase of nearly 104.2%. For Baboon, which has the most complex texture, the maximum embedding capacity of this method is 199798 bits, which is nearly 90.7% higher than the 104784 bits of other mainstream methods. Similarly, on the smoothed image Airplane, the maximum embedding capacity is 253822 bits, which is nearly 98.1% higher than the maximum embedding capacity of 128155 bits s of other mainstream methods. In addition, through all the data, it can be found that the maximum embedding capacity of different images is significantly different. The maximum embedding capacity of this method on different test images ranges from [199798, 263442]. This method can provide a more stable and higher embedding capacity than other comparison methods, which is more valuable for practical cipher domain reversible information hiding applications.
[0088] Table 1 Embedding capacity under different expansion factors
[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 scrambling method. Subsequently, the utilization efficiency of pixels is effectively improved by optimizing the predictor, and the embedding capacity is further improved by more fully utilizing high-frequency coefficients for data embedding. Compared with the most advanced methods, this method shows significant advantages in embedding capacity, and is simple in design and has certain reference value. In addition, the calculation process of this method is simple and low in complexity, which is very suitable for application in efficient practical scenarios.
[0094] Example 2
[0095] This embodiment 2 provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the high-capacity image ciphertext domain reversible hiding method based on pixel value sorting and histogram modification as described above is implemented. 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 in raster scan order, and arrange the overflow sub-blocks in reverse raster scan order to achieve block reorganization;
[0098] For a valid non-overlapping sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the maximum and second maximum coefficients, and the four prediction error values of all valid blocks are counted together to realize histogram construction; the high-frequency coefficients are used for expansion to modify the prediction error; the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, 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, the processor and the memory 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 based on pixel value sorting and histogram modification as described above, the method comprising:
[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 in raster scan order, and arrange the overflow sub-blocks in reverse raster scan order to achieve block reorganization;
[0103] For a valid non-overlapping sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the maximum and second maximum coefficients, and the four prediction error values of all valid blocks are counted together to realize histogram construction; the high-frequency coefficients are used for expansion to modify the prediction error; the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag are expanded to realize information embedding.
[0104] Example 4
[0105] Embodiment 4 provides an electronic device, including: 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, so that the electronic device executes 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 comprising:
[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 in raster scan order, and arrange the overflow sub-blocks in reverse raster scan order to achieve block reorganization;
[0108] For a valid non-overlapping sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the maximum and second maximum coefficients, and the four prediction error values of all valid blocks are counted together to realize histogram construction; the high-frequency coefficients are used for expansion to modify the prediction error; the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag are expanded to realize information embedding.
[0109] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0111] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0113] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative work on the basis of the technical solution disclosed in the present invention should be included in 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; 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 in raster scan order, and arrange the overflow sub-blocks in reverse raster scan order to achieve block reorganization; For a valid non-overlapping sub-block after sequential sorting, the median coefficient of the sub-block is used to predict the maximum and second maximum coefficients, and the four prediction error values of all valid blocks are counted together to realize histogram construction; the high-frequency coefficients are used for expansion to modify the prediction error; the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag are expanded to realize information embedding.
2. The high-capacity image ciphertext domain reversible hiding method according to claim 1 is characterized in that: The plaintext image encryption process adopts 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 2×3 non-overlapping sub-blocks, and a pseudo-random sequence is generated by the encryption key to rearrange the order of these sub-blocks to form a preliminary coarse-grained encryption effect. In the fine-grained encryption, the same key as the coarse-grained encryption is used to scramble the order of coefficients within each sub-block, and the coefficients within the sub-block are further disrupted to improve the unrecognizable nature of the image content.
3. The high-capacity image ciphertext domain reversible hiding method according to claim 1 is characterized in that: Preprocessing the encrypted plaintext image includes: First, divide the encrypted image into non-overlapping sub-blocks of a fixed size of n1×n2 = 2×3. For any sub-block, sort the pixels (p1,..., p n ) in order to obtain (p σ(1) ,..., p σ(n) ), where σ: {1,..., n} → {1,..., n} is a one-to-one unique mapping that satisfies p σ(1) ≤ … ≤ p σ(n) , n = 6; when p σ(i) = p σ(j) and i < j, σ(i) < σ(j) is satisfied; set the variable EL to expand the coefficients within each sub-block. Among them, the maximum modification amount of the pixels is (EL + 1)×2. For a standard grayscale image of size M×N, first use the position map LM to record the positions of all sub-blocks where overflow may occur. Among them, when the i-th sub-block satisfies p σ(n) + 2×EL > 253 or p σ(1) - 2×EL < 2, this sub-block is an overflow block, denoted as LM(i) = 1, otherwise it is a valid block, denoted as LM(i) = 0.
4. The high-capacity image ciphertext domain reversible hiding method according to claim 3 is characterized in that: Arrange the valid sub-blocks in raster scan order and the overflow sub-blocks in reverse raster scan order to achieve block reorganization; for the overflow sub-blocks, arrange them in reverse raster scan order to avoid conflicts with valid sub-blocks when processing overflow data; operate on all valid sub-blocks and sort all coefficients in the sub-blocks in ascending order one by one.
5. The high-capacity image ciphertext domain reversible hiding method according to claim 1 is characterized in that: Information embedding is carried out in the prediction stage. First, for a valid sub-block of 2×3 size that is sorted and does not overlap, the median coefficient of the sub-block is used to predict the maximum and second maximum coefficients. Specifically, the third largest pixel value p is used. σ(4) To predict the maximum value p σ(6) and the next largest value p σ(5) , the corresponding prediction error is: Among them, u max =max(p σ(5) , p σ(6) ), v max =min(p σ(5) , p σ(6) ),u max and v max Represent the initial position indexes of the maximum value pixel and the second largest value pixel respectively; Use the third smallest pixel value p σ(3) To predict the minimum value p σ(1) and the next smallest value p σ(2) , the corresponding prediction error is: Among them, u min =min(p σ(1) , p σ(2) ), v min =max(p σ(1) , p σ(2) ),u min and v min Respectively represent the initial position indexes of the minimum pixel and the second minimum pixel; One sub-block gets four different prediction error values, and the four prediction error values of all valid blocks are Count together to realize histogram construction.
6. The high-capacity image ciphertext domain reversible hiding method according to claim 5 is characterized in that: In the coefficient modification stage, the prediction error is modified as follows: The encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag are extended to achieve information embedding.
7. A high-capacity image ciphertext domain reversible hiding system, characterized in that: include: An encryption module, used to encrypt the plaintext image through two stages: coarse-grained encryption and fine-grained encryption; The preprocessing module is used to 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 in raster scanning order, and arrange the overflow sub-blocks in reverse raster scanning order to achieve block reorganization; The embedding module is used to predict the maximum and second maximum coefficients of a sequentially sorted non-overlapping valid sub-block using the median coefficient of the sub-block, and to count the four prediction error values of all valid blocks together to realize histogram construction; to expand using high-frequency coefficients to modify the prediction error; to expand the encrypted secret information, the length of the position map, the position map compressed by arithmetic coding, and the end flag to realize information embedding.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the high-capacity image ciphertext domain reversible hiding method as described in any one of claims 1-6 is implemented.
9. A computer device, characterized in that: It includes a memory and a processor, the processor and the memory 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 any one of claims 1-6.
10. An electronic device, characterized in that: include: 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 so that the electronic device executes instructions for implementing the high-capacity image ciphertext domain reversible hiding method as described in any one of claims 1-6.
Citation Information
Patent Citations
Image encryption algorithm based on smallest granularity full scrambling
CN108133449A
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
Image-coding apparatus and image-decoding apparatus
JP2003163946A
Image compression apparatus, image decompression apparatus, image compression method, and image decompression method
JP2023013262A
Cited By
Two-dimensional reversible data hiding method based on single-step bounded extension and mapping optimization
CN122578784A