Electronic bill image reversible information hiding method and device based on stream encryption
Through stream encryption and differential histogram translation algorithm combined with a generative adversarial network, the embedding capacity and security problems of reversible information hidden in electronic ticket images in the prior art are solved, and high-fidelity image recovery and information extraction are achieved, which is suitable for multi-party collaboration in cloud environments.
Patent Information
- Application Number
- CN202510740910.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-05
AI Technical Summary
The existing reversible data hiding technology has shortcomings in terms of embedded capacity, security and computing complexity, and is difficult to effectively apply in cloud environments, especially in the privacy protection and data security of electronic ticket images.
The electronic ticket image is separated by stream encryption method and block scrambled, random key stream processing is encrypted, information is embedded in combination with the differential histogram translation algorithm, and image recovery is carried out through a generative adversarial network to achieve high-fidelity reversible information hiding.
While ensuring image quality, it improves the embedded capacity and security. It is suitable for multi-party collaboration in cloud environments, supports efficient image decryption and information extraction, and is suitable for fields such as finance and medical care.
Smart Images

Figure CN120263910A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information hiding, and in particular, to a reversible information hiding method and device for electronic bill images based on stream encryption. Background Art
[0002] In recent years, with the wide application of electronic bills in fields such as finance and healthcare, the technology of reversible data hiding in encrypted images (RDH-EI) based on stream encryption has become a research hotspot for privacy protection and data security. Domestic research is driven by policy requirements, closely combined with the promotion scenarios of electronic bills (such as value-added tax electronic invoices, medical electronic bills), and focuses on the collaborative optimization of stream encryption and reversible hiding.
[0003] The current reversible data hiding algorithms mainly have the following limitations: Firstly, in terms of embedding capacity, most algorithms are difficult to balance high embedding rate and low distortion. The histogram shift-based method can ensure image quality but has limited embedding capacity (usually less than 0.5 bpp), while the compressive sensing-based method can increase capacity but faces the problem of high computational complexity.
[0004] Secondly, in terms of security, better embedding algorithms in the encrypted domain (such as LSB flipping methods) rely on the statistical characteristics of pixel correlation, and their reversibility cannot be strictly guaranteed; while the preprocessing algorithms can increase capacity, but the unencrypted reserved space may lead to statistical information leakage.
[0005] Finally, in terms of cloud environment adaptability, the existing algorithms have significant defects: the combined algorithms require decryption before extraction, which does not meet the multi-party collaboration requirements of the cloud environment; although the homomorphic encryption scheme supports ciphertext processing, the computational overhead is too large. These limitations seriously restrict the practical application of reversible data hiding technology in key fields such as encrypted data transmission and cloud-based medical data sharing. Summary of the Invention
[0006] In view of this, embodiments of the present invention provide a reversible information hiding method and device for electronic bill images based on stream encryption, which ensure the embedding information capacity while improving the image quality.
[0007] The technical solution adopted by the present invention is: In the first aspect, the present invention provides a reversible information hiding method for electronic bill images based on stream encryption, which is applied to an image owner, and the method includes: Separating the channels of the original electronic bill image to obtain the original red channel component IR, the original green channel component IG, and the original blue channel component IB respectively; Input the encryption key K1 into a random number generator to generate the first encrypted random key stream, the second encrypted random key stream, and the third encrypted random key stream, and input the encryption key K2 into the pseudo-random function F(K2) to generate the encrypted pseudo-random seed sd1; Divide the original red channel component IR into non-overlapping image sub-blocks of size 4*4, perform stream byte encryption on each image sub-block using the first encrypted random key stream, and perform block scrambling on the arrangement order of the image sub-blocks after stream byte encryption using the encrypted pseudo-random seed sd1 to obtain the encrypted red channel component IR; Perform stream byte encryption on the original green channel component IG using the second encrypted random key stream, and at the same time perform stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain the encrypted green channel component IG and the encrypted blue channel component IB; Merge the encrypted red channel component IR, the encrypted green channel component IG, and the encrypted blue channel component IB to obtain the ciphertext image EI.
[0008] In a second aspect, the present invention provides a reversible information hiding method for electronic bill images based on stream encryption, which is applied to a data hider. The method includes: Separate the channels of the ciphertext image EI to obtain the R-component image EIR, the G-component image EIG, and the B-component image EIB; Divide the R-component image EIR into blocks to obtain multiple image sub-blocks, traverse each image sub-block, perform overflow processing on saturated pixels with pixel values of 0 or 255 in the image sub-blocks, and generate a corresponding MAP array at the same time; Obtain the hidden information and generate hidden information bits, merge the MAP array with the hidden information bits to obtain the information bits to be embedded; Encrypt the information bits to be embedded using the information embedding key K3, modify each pixel value of the image sub-block by moving the differential histogram of the image sub-block, and ensure that the modification range of each pixel value of the image sub-block does not exceed 1 pixel, and at the same time embed the encrypted information bits to be embedded in the internal area of the differential histogram; Record the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded, and embed the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded in the internal area of the differential histogram, merge multiple image sub-blocks that have completed information embedding to obtain the final R-component image EIR; Merge the final R-component image EIR with the G-component image EIG and the B-component image EIB to obtain the ciphertext image MI containing the hidden information.
[0009] In a third aspect, an embodiment of the present invention provides a reversible information hiding method for electronic bill images based on stream encryption, which is applied to an image user. The method includes: Separate the channels of the ciphertext image MI to obtain a component image MIR, a component image MIG, and a component image MIB; Obtain a decryption key K1 and a decryption key K2. Input the decryption key K1 into a random number generator to generate a first decryption random key stream, a second decryption random key stream, and a third decryption random key stream. At the same time, input the decryption key K2 into the pseudo-random function F(K2) to generate a decryption pseudo-random key seed sd2; Divide the component image MIR into N non-overlapping image sub-blocks of the same size. Perform an inverse block permutation on the image sub-blocks according to the decryption pseudo-random key seed sd2 generated by the decryption key K2 to obtain the image sub-blocks in the original arrangement order; Decrypt each image sub-block using the first decryption random key stream, including: Use R i (1 ≤ i ≤ N) represents the first decryption random key stream, and let be the j-th pixel in the i-th image sub-block of the component image MIR. Decrypt the pixels in each image sub-block using the first decryption random key stream: where, represents the bitwise XOR operation, represents directly decrypting the corresponding pixel of the image; Combine the decrypted image sub-blocks into the original red channel component IR; Use the second decryption random key stream and the third decryption random key stream to perform bitwise XOR decryption on the component image MIG and the component image MIB respectively to obtain the original green channel component IG and the original blue channel component IB; Combine the original red channel component IR, the original green channel component IG, and the original blue channel component IB to obtain the directly decrypted image .
[0010] In a fourth aspect, the present invention provides a reversible information hiding device for electronic ticket images based on stream encryption, which is applied to the image owner and includes: A first channel separation module for separating the channels of the original electronic ticket image to obtain the original red channel component IR, the original green channel component IG, and the original blue channel component IB respectively; A first key stream generation module for inputting the encryption key K1 into a random number generator to generate a first encryption random key stream, a second encryption random key stream, and a third encryption random key stream, and inputting the encryption key K2 into the pseudo-random function F(K2) to generate an encryption pseudo-random seed sd1; The first stream encryption module is used to divide the original red channel component IR into non - overlapping image sub - blocks of size 4*4, perform stream - byte encryption on each image sub - block using the first encrypted random key stream, and perform block scrambling on the arrangement order of the image sub - blocks after stream - byte encryption using the encrypted pseudo - random seed sd1 to obtain the encrypted red channel component IR; The second stream encryption module is used to perform stream - byte encryption on the original green channel component IG using the second encrypted random key stream, and at the same time perform stream - byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain the encrypted green channel component IG and the encrypted blue channel component IB; The channel merging module is used to merge the encrypted red channel component IR, the encrypted green channel component IG, and the encrypted blue channel component IB to obtain the ciphertext image EI.
[0011] In a fifth aspect, the present invention provides a reversible information hiding device for electronic bill images based on stream encryption, which is applied to data hiders and includes: The second channel separation module is used to perform channel separation on the ciphertext image EI to obtain the R - component image EIR, the G - component image EIG, and the B - component image EIB; The first image partitioning module is used to partition the R - component image EIR into multiple image sub - blocks, traverse each image sub - block, perform overflow processing on saturated pixels with pixel values of 0 or 255 in the image sub - block, and generate a corresponding MAP array at the same time; The information bit generation module is used to obtain the hidden information, generate hidden information bits, and merge the MAP array with the hidden information bits to obtain the information bits to be embedded; The first information embedding module is used to encrypt the information bits to be embedded using the information embedding key K3, modify each pixel value of the image sub - block by moving the differential histogram of the image sub - block, and ensure that the modification range of each pixel value of the image sub - block does not exceed 1 pixel, and at the same time embed the encrypted information bits to be embedded in the internal area of the differential histogram; The second information embedding module is used to record the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded, and embed the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded in the internal area of the differential histogram, and merge multiple image sub - blocks that have completed information embedding to obtain the final R - component image EIR; The RGB merging module is used to merge the final R - component image EIR with the G - component image EIG and the B - component image EIB to obtain the ciphertext image MI containing the hidden information.
[0012] In a sixth aspect, the present invention provides a reversible information hiding device for electronic bill images based on stream encryption, which is applied to image users and includes: The third channel separation module is used to separate the channels of the ciphertext image MI to obtain a component image MIR, a component image MIG, and a component image MIB; The second key stream generation module obtains a decryption key K1 and a decryption key K2, inputs the decryption key K1 into a random number generator to generate a first decryption random key stream, a second decryption random key stream, and a third decryption random key stream, and at the same time inputs the decryption key K2 into a pseudo-random function F(K2) to generate a decryption pseudo-random key seed sd2; The second image partitioning module is used to partition the component image MIR into N non-overlapping image sub-blocks of the same size, and perform an inverse block permutation on the image sub-blocks using the decryption pseudo-random key seed sd2 to obtain image sub-blocks in the original arrangement order; the first decryption module is used to decrypt each image sub-block using the first decryption random key stream, including: Use R i (1 ≤ i ≤ N) represents the first decryption random key stream, and let be the j-th pixel in the i-th image sub-block of the component image MIR, and decrypt the pixels in each image sub-block using the first decryption random key stream: Wherein, represents a bitwise XOR operation, represents directly decrypting the corresponding pixel of the image; merge the decrypted image sub-blocks into the original red channel component IR; The second decryption module is used to perform bitwise XOR decryption on the component image MIG and the component image MIB using the second decryption random key stream and the third decryption random key stream respectively to obtain the original green channel component IG and the original blue channel component IB; The channel component merging module merges the original red channel component IR, the original green channel component IG, and the original blue channel component IB to obtain the directly decrypted image .
[0013] In summary, the beneficial effects of the present invention are as follows: (1) The present invention uses specific stream encryption, divides the red channel component of the original electronic bill image into multiple image sub-blocks, encrypts each image sub-block using the same key stream byte, and most of the correlation between pixels in each small block is retained. The encryption key is used to perform block scrambling on the arrangement order of all image sub-blocks encrypted by the stream, and feature analysis proves that this encryption algorithm can retain most of the statistical features in the plaintext image: (2) By decomposing the R, G, and B color channels of the encrypted image, restoring the original arrangement order of each image sub-block, and decrypting the pixels within each image sub-block, the present invention can reversibly extract information and restore the image, and the encrypted image has the characteristic of low distortion. Under the same hiding capacity, the quality of the encrypted image is higher. Description of the Drawings
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings, and all of these are within the protection scope of the present invention.
[0015] Figure 1 Schematic diagram of the overall framework of the reversible information hiding method for electronic bill images of the present invention; Figure 2 Schematic diagram of the overall process of the reversible information hiding method for electronic bill images of the present invention; Figure 3 Schematic diagram of the image encryption operation process of the present invention; Figure 4 Schematic diagram of the information embedding operation process of the present invention; Figure 5 Schematic diagram of the image decryption operation process of the present invention; Figure 6 Schematic diagram of the image restoration operation process of the present invention; Figure 7 Schematic diagram of the structure of the original generator G network; Figure 8 Schematic diagram of the structure of the discriminator D network; Figure 9 Schematic diagram of the structure of the improved generator G network; Figure 10 Schematic diagram of the structure of the improved discriminator D network. Detailed Embodiments
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. If there is no conflict, the various features in the present invention and its embodiments can be combined with each other, and all are within the protection scope of the present invention.
[0017] In the existing reversible information hiding technology for electronic bill images based on stream encryption, at the technical level, scholars mostly use lightweight stream encryption algorithms (such as ChaCha20, RC4) to preprocess electronic bill images, and combine prediction error expansion (PEE) or histogram shifting (HS) to achieve information embedding in the encrypted domain. Representative achievements include the block scrambling encryption domain RDH scheme proposed by Shanghai Jiao Tong University (2021) and the medical bill privacy protection system developed by Fudan University (2022). Its core goal is to embed verification codes, hash values or user identity information in the encrypted image, and at the same time support the receiving party to achieve decryption and lossless data recovery through key synchronization. However, domestic research faces the dual challenges of embedding capacity and security: stream encryption causes changes in the statistical characteristics of images. The embedding capacity of traditional RDH methods in the encrypted domain is generally lower than 0.5 bpp (bits per pixel), and they are not robust enough against key leakage or image cropping attacks. Foreign research shows the characteristics of "equal emphasis on theoretical breakthroughs and industrial applications".
[0018] At the theoretical level, American scholars explore the combination of public key encryption and RDH (such as the difference expansion scheme based on Paillier encryption by Rutgers University, 2020). EU teams try to introduce fully homomorphic encryption (FHE) into reversible hiding to improve security (Fraunhofer Institute, 2021). And the encrypted domain information hiding based on generative adversarial networks (GAN) by MIT (2022) optimizes the embedding strategy through deep learning, significantly improving visual imperceptibility. In terms of industrialization, American PayPal combines AES encryption with anti-counterfeiting watermarks for electronic bill authentication, and European Epic Systems embeds reversible metadata in medical DICOM images to support diagnosis and privacy protection. Although foreign countries have advantages in interdisciplinary integration (such as quantum security, deep learning) and standardization protocol construction, their technical bottlenecks are also prominent: homomorphic encryption schemes have theoretical security but extremely high computational complexity (difficult to meet real-time requirements), while the efficiency advantage of stream encryption schemes comes at the cost of sacrificing the ability to resist quantum attacks. In addition, privacy ethics disputes in the electronic bill scenario in Europe and the United States (such as GDPR's compliance restrictions on data embedding) have also delayed the promotion of technology.
[0019] At present, the domestic technical path pays more attention to practicality and scenario adaptation (such as focusing on smart cities and medical bills); abroad, it relies on the collaborative innovation of universities and enterprises (such as the vertical integration of algorithms and chips by Google and IBM), leading in interdisciplinary theories and high-security protocols, but facing the disadvantages of high implementation costs and poor cross-platform compatibility due to over-reliance on complex encryption frameworks. Generally speaking, the technology competition in this field has shifted from single-algorithm performance to a systematic game of "security-efficiency-compliance", and the global popularization of electronic bills will further highlight the strategic value of reversible information hiding in data sovereignty and privacy protection. Therefore, how to optimize the information hiding algorithm, solve the distortion problem of the stego-image, and at the same time improve the visual quality of the decrypted image. How to find the balance point between the embedded information hiding amount and the quality guarantee of the hidden image, and improve the robustness of the image information hiding technology has become an urgent matter to be solved. Solving such problems can better apply the information hiding method to fields such as finance and healthcare. Based on this, the present invention proposes a reversible information hiding method and device for electronic bill images based on stream encryption. The detailed implementation process of the present invention is shown in the following embodiments.
[0020] Example 1: Refer to Figures 1-3 As shown in Figure 1 is the overall framework schematic diagram of the reversible information hiding method for electronic bill images of the present invention, Figure 2 is the overall process schematic diagram of the reversible information hiding method for electronic bill images, Figure 3 is the schematic diagram of the image encryption operation process. The reversible information hiding method for electronic bill images based on stream encryption provided by the embodiments of the present invention is applied to the image owner, and the method specifically includes: Separate the channels of the original electronic bill image to obtain the original red channel component IR, the original green channel component IG, and the original blue channel component IB respectively; Input the encryption key K1 into the random number generator to generate the first encrypted random key stream, the second encrypted random key stream, and the third encrypted random key stream, and input the encryption key K2 into the pseudo-random function F(K2) to generate the encrypted pseudo-random seed sd1; Divide the original red channel component IR into non-overlapping image sub-blocks of 4*4 size, perform stream byte encryption on each image sub-block using the first encrypted random key stream, and perform block scrambling on the arrangement order of the image sub-blocks after stream byte encryption using the encrypted pseudo-random seed sd1 to obtain the encrypted red channel component IR; Perform stream byte encryption on the original green channel component IG using the second encrypted random key stream, and at the same time perform stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain the encrypted green channel component IG and the encrypted blue channel component IB; The encrypted red channel component IR, the encrypted green channel component IG, and the encrypted blue channel component IB are combined to obtain the ciphertext image EI.
[0021] Among them, the image owner will set or generate the encryption key K1, the encryption key K2, the decryption key K1, and the decryption key K2. When decrypting, the image user can obtain the decryption key K1 and the decryption key K2 from the image owner to decrypt the image.
[0022] In the embodiments of the present invention, the image owner must encrypt the image before transmitting and sharing it. Through the analysis of actual requirements, considering the processing of color images, and in order to ensure that the directly decrypted image has a high fidelity, the embodiments of the present invention select a color channel of the color image to complete reversible information hiding in the ciphertext domain by using the algorithms of image sub-block stream encryption and block scrambling in the foregoing text. A color image can be separated into three color channels: red, green, and blue, and these three color channels can be combined into the original color image. That is to say, the separation process of the color channels of a color image is reversible, which is in line with the requirements of reversible information hiding. The three color channels separated from the color image each have their own characteristics. According to the visual function curve of the human eye, the human eye is sensitive to light of different wavelengths to different degrees, and is sensitive to yellow light and green light, and insensitive to red light and purple light. Therefore, the red channel is selected to complete the reversible information hiding of the ciphertext image to obtain a better hiding effect and a higher fidelity of the directly decrypted image.
[0023] Refer to Figure 3 As shown, in the embodiments of the present invention, different operations are also performed on different color channels of the color image during image encryption. The specific operation process is as follows: (1) Separate each color channel IR (red), IG (green), and IB (blue) of the color image I of the electronic bill.
[0024] (2) The encryption key K1 generates 3 segments of random key streams KStream1, KStream2, and KStream3 through a random number generator, which are respectively used for encrypting the three channel components IR, IG, and IB of the image. Among them, the IR component is first divided into non-overlapping image sub-blocks of 4*4 size, and then encrypted with the random key stream KStream1. The IG and IB components adopt the traditional classical stream encryption scheme, that is, directly use the random key streams KStream2 and KStream3 to encrypt the IG and IB components.
[0025] (3) The IR component image after systematic stream encryption also needs to be scrambled between blocks. The encryption key K2 generates an encrypted pseudo-random seed sd1 through a pseudo-random function F(K2). According to sd, the order of image sub-blocks is permuted, and the arrangement order between each block is disrupted to complete block scrambling. So far, all the encryption processes of the IR channel component of the original color image of the electronic bill are completed.
[0026] (4) Merge the RGB channel components to obtain the ciphertext image EI.
[0027] Specifically, in the embodiment of the present invention, the image owner inputs the original color image I, and the encrypted image EI can be obtained by using the encryption key K1 and the encryption key K2. Among them, the encryption key K1 and the encryption key K2 are equivalent to a key seed. The encryption key K1 generates the random key stream required for encryption, and the encryption key K2 generates the encrypted pseudo-random seed sd1. During the image encryption operation process, the image owner does not need to memorize the long random key stream, but only needs to memorize the encryption key K1 and the encryption key K2. In addition, the encryption key K1 and the encryption key K2 can be filled in by the user himself or choose to automatically generate a 20-bit password containing uppercase and lowercase letters and numbers, which can improve the user's operation experience when using. Regarding the selection of the 4*4 block size in the image encryption process and the security of the encrypted image, analysis and experimental verification will be carried out in subsequent embodiments.
[0028] The embodiment of the present invention adopts specific stream encryption, divides the stego image into multiple image sub-blocks, encrypts each image sub-block with the same key stream byte, and most of the correlation between pixels in each small block is retained. The encryption key is used to scramble the arrangement order of all the image sub-blocks that have undergone stream encryption. Feature analysis proves that this encryption algorithm can retain most of the statistical features in the plaintext image.
[0029] Embodiment 2: Refer to Figure 1 and Figure 2 The overall framework and overall process of the method shown, as well as Figure 4 The information embedding operation flowchart shown, the present invention provides a reversible information hiding method for electronic bill images based on stream encryption, which is applied to data hiders. The method includes: Separate the channels of the ciphertext image EI to obtain the R component image EIR, the G component image EIG, and the B component image EIB.
[0030] Divide the R component image EIR into blocks to obtain multiple image sub-blocks, traverse each image sub-block, and perform overflow processing on the saturated pixels with pixel values of 0 or 255 in the image sub-block and generate the corresponding MAP array at the same time.
[0031] Obtain the hidden information, generate hidden information bits, merge the MAP array with the hidden information bits to obtain the information bits to be embedded.
[0032] Encrypt the information bits to be embedded using the information embedding key K3, modify each pixel value of the image sub-block by shifting the differential histogram of the image sub-block, and ensure that the modification range of each pixel value of the image sub-block does not exceed 1 pixel. At the same time, embed the encrypted information bits to be embedded in the internal area of the differential histogram.
[0033] Record the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded, and embed the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded in the internal area of the differential histogram. Merge multiple image sub-blocks that have completed information embedding to obtain the final R-component image EIR. Among them, the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded are embedded into the R-component image EIR as auxiliary information.
[0034] Merge the final R-component image EIR with the G-component image EIG and the B-component image EIB to obtain the ciphertext image MI containing the hidden information (or the hidden information).
[0035] Among them, the data hider sets or generates the information embedding key K3 and the information extraction key K3. When extracting the embedded information, the image user can obtain the information extraction key K3 from the data hider for information extraction.
[0036] Specifically, the hidden information is usually saved in the form of a file. Therefore, when embedding information, it is necessary to convert the file into a binary bit sequence for embedding.
[0037] Among them, the movement of the differential histogram will cause changes in the image pixels. The principle of the histogram translation algorithm based on differential expansion is: First, construct a difference image, whose pixel values are the differences between adjacent pixels in the original image, then generate a difference histogram, and translate the difference histogram to embed the watermark information. Since most of the pixel values (i.e., differences) in the difference image are close to 0, the generated difference histogram has a larger peak. By translating the difference histogram, watermark information or other data can be embedded in it, which will cause changes in the difference image, and thus affect the pixel values of the original image.
[0038] Therefore, the specific process of moving the differential histogram is as follows: 1. Construct a difference image: Calculate the differences between adjacent pixels in the original image to form a difference image. For example, the first calculation method is D(m,n)=I(m,2n)−I(m,2n + 1), and the second calculation method is D(m,n)=I(m,n)−I(m,n + 1). Here, I represents the original carrier image, m represents the row index, n represents the column index, I(m,n) represents the pixel value at the m-th row and n-th column in the original carrier image, I(m,n + 1) represents the pixel value at the m-th row and the (n + 1)-th column in the original carrier image, I(m,2n) represents the pixel value at the m-th row and 2n-th column in the original carrier image, I(m,2n + 1) represents the pixel value at the m-th row and the (2n + 1)-th column in the original carrier image; D represents the difference image, and D(m,n) represents the pixel value at the m-th row and n-th column in the difference image.
[0039] 2. Generate a difference histogram: Calculate the histogram based on the difference image. The peak of the histogram is at 0, indicating a relatively large information capacity.
[0040] 3. Translate the histogram: Locate the P point and Z point of the histogram, translate the points between the P point and Z point, leaving an empty bar area, and then embed the hidden information or other data into this empty position.
[0041] 4. Update the difference image: Apply the translated histogram to the difference image to update the difference image.
[0042] 5. Update the original image: Bring the updated difference image back into the original image to obtain the carrier image with the embedded information.
[0043] Through this process of difference histogram shifting, the pixel values of the original image will change to embed the required information.
[0044] The embodiment of the present invention adopts a reversible information hiding algorithm based on Difference Histogram Shifting (DHS). By decomposing the R, G, and B color channels of the encrypted image, restoring the original arrangement order of each image sub-block, and decrypting the pixels within each image sub-block, the algorithm can reversibly extract information and restore the image, and the encrypted image has the characteristic of low distortion. Due to the low-distortion characteristic of the embedding algorithm, directly decrypting the encrypted image containing hidden information can also obtain a high-fidelity carrier image, realizing reversible recovery and the separability of operations.
[0045] Through the analysis of effectiveness, security, accuracy, and complexity, and comparison with the simulation experiments and ablation experiments of multiple mainstream algorithms of the same kind, it is verified that the reversible information hiding method proposed in the embodiments of the present invention has good performance. The 4×4 block mode used has a high embedding capacity while ensuring security, and the visual quality of the directly decrypted image is relatively high. Under the condition of the same hiding capacity, the quality of the encrypted image is higher.
[0046] Example 3: Refer to Figure 1 and Figure 2 the overall framework and overall process of the method shown, as well as Figure 5 the image decryption operation flowchart shown. After the image user obtains the ciphertext image MI containing hidden information, the image is decrypted through the decryption key K1 and the decryption key K2, and a directly decrypted image with relatively high fidelity can be obtained . The image decryption operation is equivalent to the inverse operation of the image encryption operation. Therefore, the present invention provides a reversible information hiding method for electronic bill images based on stream encryption, which is applied to image users. The method specifically includes: Separate the channels of the ciphertext image MI to obtain the component image MIR, the component image MIG, and the component image MIB; Obtain the decryption key K1 and the decryption key K2. Input the decryption key K1 into the random number generator to generate the first decryption random key stream, the second decryption random key stream, and the third decryption random key stream. At the same time, input the decryption key K2 into the pseudo-random function F(K2) to generate the decryption pseudo-random key seed sd2; among them, the decryption key K1 and the decryption key K2 are obtained from the image owner; Divide the component image MIR into N non-overlapping image sub-blocks of the same size, and perform an inverse inter-block permutation on the image sub-blocks according to the decryption pseudo-random key seed sd2 generated by the decryption key K2 to obtain the image sub-blocks in the original arrangement order; Use the first decryption random key stream to decrypt each image sub-block, including: Use R i (1≤i≤N) to represent the first decryption random key stream, and set as the jth pixel in the ith image sub-block of the component image MIR. Use the first decryption random key stream to decrypt the pixels in each image sub-block: Among them, represents the bitwise exclusive OR operation, represents the pixel corresponding to the directly decrypted image; merge the decrypted image sub-blocks into the original red channel component IR; Use the second decryption random key stream and the third decryption random key stream to perform bitwise XOR decryption on the component image MIG and the component image MIB respectively to obtain the original green channel component IG and the original blue channel component IB; Merge the original red channel component IR, the original green channel component IG, and the original blue channel component IB to obtain the directly decrypted image ; Specifically, in the embodiments of the present invention, since additional information is embedded after image encryption, the introduction of the information embedding operation makes the directly decrypted image necessarily distorted. However, as analyzed in the information embedding operation of the present invention, the embedding algorithm adopted by the system modifies the value of each pixel by at most 1 during embedding. Therefore, the directly decrypted image will approach the original carrier image with high fidelity and good visual effects. In practical applications, sometimes users do not necessarily need the completely lossless original image due to limitations such as usage or role. At this time, obtaining a directly decrypted image with high fidelity at a low computational cost and computational time is a very good choice.
[0047] Furthermore, based on the above reversible information hiding method for electronic bill images, the method of the embodiments of the present invention further includes an information extraction process. Specifically, after obtaining the ciphertext image MI containing hidden information, the image user can accurately extract the embedded hidden information through the information embedding key K3. Since the data hider embeds the hidden information in the internal area of the differential histogram of the moving image, relevant information is also extracted from the pixels in the internal area of the differential histogram in the information extraction process. The specific information extraction process is as follows: Extract the encrypted MAP array length L1 and the encrypted length L2 of the information bits to be embedded from the internal area of the differential histograms of multiple image sub-blocks; Based on the MAP array length L1 and the encrypted length L2 of the information bits to be embedded, extract the encrypted information bits to be embedded with the corresponding length from the internal area of the differential histograms of multiple image sub-blocks; Obtain the information extraction key K3, and use the information extraction key K3 to decrypt the encrypted information bits to be embedded to obtain the information bits to be embedded; among them, the information extraction key K3 is obtained from the data hider; Split the information bits to be embedded to obtain the hidden information bits and the MAP array, and convert the hidden information bits into the corresponding hidden information.
[0048] Specifically, when extracting information, first isolate the red (R) channel in the ciphertext image MI containing hidden information (i.e., the component image MIR), and divide the component image MIR into blocks. Subsequently, use relevant rules to extract the embedded information. First, extract the information bits representing auxiliary information, and obtain the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded. Then, extract the encrypted information bits to be embedded with the corresponding length, and decrypt the information bits using the information extraction key K3 to obtain the complete and lossless hidden information.
[0049] In the embodiment of the present invention, the image user only needs to have the information extraction key K3 to extract relevant information, without the decryption keys K1 and K2, and without decrypting the image first. This separable operation protects the privacy and security of users. For example, for some image users such as database administrators, they only need to know the relevant information embedded in the image for image management, and should not know the original information of the image. Therefore, this operation of directly extracting information in the ciphertext state realizes the privacy protection of the image owner. On the other hand, the separable operation of image decryption and information extraction enables the method to handle more complex and changeable application scenarios, and is conducive to the reasonable allocation of system resources. If the user does not have strict requirements for the fidelity of the image, or the user only needs to extract the hidden information without obtaining the image content, the system can meet the user's needs at a very low computational cost through the image decryption or information extraction module; while if the user has very high requirements for the image quality, the system needs to obtain the lossless original image at a higher cost. Therefore, the separable operation is conducive to the system providing more reasonable and efficient services.
[0050] Furthermore, referring to Figure 6 the image restoration operation process shown, the method of the embodiment of the present invention further includes an image restoration operation. The specific image restoration process is as follows: Modify the histogram, that is, move the differential histogram of the image sub-blocks and repair the pixel values of the image sub-blocks; Use the MAP array to perform saturation pixel restoration on the image sub-blocks with repaired pixel values, and merge the image sub-blocks with restored saturation pixels to obtain the restored image in the encrypted state.
[0051] Specifically, when the image user obtains the ciphertext image MI containing hidden information, the original carrier image can be restored losslessly through the decryption keys K1, K2 and the information extraction key K3. Therefore, the image restoration process actually includes two main steps: ciphertext domain image restoration and image decryption.
[0052] Among them, the operation steps of the ciphertext domain image restoration are as follows: (1) Divide the image MIR into blocks, traverse each sub-block, extract the embedded information bits while modifying the histogram and repairing the pixel values.
[0053] (2) Use the information extraction key K3 to decrypt the extracted information bits and separate the decrypted MAP array.
[0054] (3) After information extraction and image restoration, the original encrypted image can be restored through the extracted MAP array.
[0055] The restored image in the encrypted state at this time should be the same as the encrypted ciphertext image EI. Using the above Figure 5 The image decryption operation in the original color image I can be obtained by decrypting the restored image in the encrypted state. Therefore, when decrypting the restored image in the encrypted state, only the ciphertext image EI in the above image decryption operation process needs to be replaced with the restored image in the encrypted state to perform image decryption. The specific image decryption operation process will not be elaborated in this embodiment of the present aspect.
[0056] It can be seen from the description of the above image restoration operation that the method of the embodiment of the present invention can better restore the original carrier image. This reversible property is very suitable for medical, financial and other occasions where strict requirements are imposed on both the confidentiality and quality of images.
[0057] Further, in the process of image encryption, information embedding, image decryption, and information extraction, Gaussian noise, Poisson noise, impulse noise, etc. are inevitably generated, resulting in image degradation and quality decline. Blurred images cause difficulties in applications in the fields of remote sensing and telemetry, astronomical observation, and financial bills. How to restore blurred images to clarity, obtain more effective information, and improve the utilization rate of images is the significance of image precise restoration technology. Therefore, the method of the embodiment of the present invention further includes: improving the generative adversarial network structure to obtain an improved generative adversarial network, and based on the trained improved generative adversarial network, directly decrypt the image Perform image precise restoration to obtain a clear original electronic bill image. In addition, image precise restoration can also be performed on the color image I obtained by decrypting the restored image in the encrypted state to obtain a clear original electronic bill image.
[0058] The present invention optimizes the classic generative adversarial network (GAN) for the specific design of image precise restoration. The classic generative adversarial network structure includes the structures of two networks, a generator G and a discriminator D, and the definition of a loss function.
[0059] The generative adversarial network model consists of two networks: the generator (Generator, G) model and the discriminator (Discriminator, D). The generator G takes a random noise signal z as input and generates a clear image example. The discriminator D receives real clear images and generated clear images and distinguishes between them. The goal of the generator G is to deceive the discriminator by generating perceptually convincing images that cannot be distinguished from real samples x. When the final discriminator D can no longer distinguish between the real clear image x and the generated clear image G(z), it can be considered that the generator G has the ability to generate clear images.
[0060] Among them, the generator G consists of 3 convolutional modules, 12 residual modules (ResBlocks), and 2 transposed convolutional modules. Each residual module consists of a convolutional layer, a normalization layer, and a ReLU activation layer. The network structure of the generator G is as Figure 7 shown. The generator G generates perceptually convincing clear images from the input blurred images. Its ultimate goal is to deceive the discriminator D so that the discriminator D determines the generated clear images as real clear images.
[0061] The discriminator D consists of 3 convolutional modules, a convolutional layer, and a LeakyReLU activation layer. The convolutional module consists of a convolutional layer, a LeakyReLU activation layer, and a normalization layer. The network structure of the discriminator is as Figure 8 shown. The discriminator D discriminates the input images, judges the difference between the input images and the real clear images, and outputs the judgment results.
[0062] Therefore, the embodiments of the present invention improve the generative adversarial network structure to obtain an improved generative adversarial network, specifically including: Add a set of first convolutional layer, normalization layer, and activation layer before and after each of the 12 residual modules of the generator G, while keeping the size of the original feature map in the residual layer unchanged. The improved structure of the generator G is as Figure 9 shown. Among them, the first convolutional layer consists of a set of convolutional kernels of size 3×3.
[0063] Add a set of second convolutional layer, normalization layer, and activation layer behind the second hierarchical structure of the discriminator network (i.e., Figure 8 the first LeakyReLU activation layer from left to right in Figure 10 ), so that the output size of the discriminator network remains 32×32. The improved structure of the discriminator network is as
[0064] Then, the present invention performs adversarial training on the improved generative adversarial network based on the real image data x until the confidence of the discriminator D in the generated data G(z) output by the generator G is consistent with the confidence in the real image data x, and a trained improved generative adversarial network model is obtained; Finally, the directly decrypted image is processed using the trained improved generative adversarial network model to perform precise image restoration and obtain a clear original electronic bill image.
[0065] Specifically, in the generative adversarial network, the discriminator D outputs a confidence for each input data. If the discriminator outputs 1, it means the input data is real data, and if it outputs 0, it means the input data is fake data generated by the generator G. The goal of the discriminator D is to distinguish the two as much as possible, that is, the output result D(x) of the discriminator D and the generated data D(G(z)) output by the generator are as different as possible. The best case is that D(x) approaches 1 and D(G(z)) approaches 0. And the goal of the generator G is for the discriminator D to identify the generated fake data as real data, that is, D(G(z)) approaches 1. Therefore, the training processes of the discriminator D and the generator G are a process of mutual game, adversarial training, and alternating optimization. Training stops until the confidence of the discriminator D in the generated data G(z) is consistent with the confidence in the real data x, and a trained generative adversarial network model is obtained.
[0066] In the embodiment of the present invention, by changing the number of residual modules in the generative adversarial network, the structure of the generative adversarial network is optimized, and the improved generative adversarial network is trained. The directly decrypted image input is processed using the trained generative adversarial network model to perform precise image restoration and obtain a clear original electronic bill image, achieving a better image precise restoration effect.
[0067] Embodiment 4: Based on the above Embodiment 1, the embodiment of the present invention provides a reversible information hiding device for electronic bill images based on stream encryption, which is applied to the image owner and includes: A first channel separation module, configured to perform channel separation on the original electronic bill image to respectively obtain the original red channel component IR, the original green channel component IG, and the original blue channel component IB; A first key stream generation module, configured to input the encryption key K1 into a random number generator to generate a first encrypted random key stream, a second encrypted random key stream, and a third encrypted random key stream, and input the encryption key K2 into the pseudo-random function F(K2) to generate an encrypted pseudo-random seed sd1; The first stream encryption module is used to divide the original red channel component IR into non - overlapping image sub - blocks of size 4*4, perform stream - byte encryption on each image sub - block using the first encrypted random key stream, and perform block scrambling on the arrangement order of the image sub - blocks after stream - byte encryption using the encrypted pseudo - random seed sd1 to obtain the encrypted red channel component IR; The second stream encryption module is used to perform stream - byte encryption on the original green channel component IG using the second encrypted random key stream, and at the same time perform stream - byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain the encrypted green channel component IG and the encrypted blue channel component IB; The channel merging module is used to merge the encrypted red channel component IR, the encrypted green channel component IG, and the encrypted blue channel component IB to obtain the ciphertext image EI.
[0068] Embodiment 5: Based on the above - mentioned Embodiment 2, an electronic bill image reversible information hiding device based on stream encryption provided by an embodiment of the present invention is applied to a data hider and includes: The second channel separation module is used to perform channel separation on the ciphertext image EI to obtain the R - component image EIR, the G - component image EIG, and the B - component image EIB; The first image partitioning module is used to partition the R - component image EIR into multiple image sub - blocks, traverse each image sub - block, perform overflow processing on saturated pixels with pixel values of 0 or 255 in the image sub - block, and generate a corresponding MAP array at the same time; The information bit generation module is used to obtain the hidden information, generate hidden information bits, and merge the MAP array with the hidden information bits to obtain the information bits to be embedded; The first information embedding module is used to encrypt the information bits to be embedded using the information embedding key K3, modify each pixel value of the image sub - block by moving the differential histogram of the image sub - block, ensure that the modification range of each pixel value of the image sub - block does not exceed 1 pixel, and at the same time embed the encrypted information bits to be embedded in the internal area of the differential histogram; The second information embedding module is used to record the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded, and embed the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded in the internal area of the differential histogram, and merge multiple image sub - blocks that have completed information embedding to obtain the final R - component image EIR; The RGB merging module is used to merge the final R - component image EIR with the G - component image EIG and the B - component image EIB to obtain the ciphertext image MI containing the hidden information.
[0069] Embodiment 6: Based on the above Embodiment 3, an embodiment of the present invention further provides a reversible information hiding device for electronic bill images based on stream encryption, which is applied to image users and includes: A third channel separation module, configured to perform channel separation on the ciphertext image MI to obtain a component image MIR, a component image MIG, and a component image MIB; A second key stream generation module, which obtains a decryption key K1 and a decryption key K2, inputs the decryption key K1 into a random number generator to generate a first decryption random key stream, a second decryption random key stream, and a third decryption random key stream, and at the same time inputs the decryption key K2 into a pseudo-random function F(K2) to generate a decryption pseudo-random key seed sd2; A second image partitioning module, configured to partition the component image MIR into N non-overlapping image sub-blocks of the same size, and perform an inverse inter-block permutation on the image sub-blocks using the decryption pseudo-random key seed sd2 to obtain image sub-blocks in the original arrangement order; a first decryption module, configured to decrypt each image sub-block using the first decryption random key stream, including: Use R i (1 ≤ i ≤ N) to represent the first decryption random key stream, and set to be the j-th pixel in the i-th image sub-block of the component image MIR, and decrypt the pixels in each image sub-block using the first decryption random key stream: Wherein, represents the bitwise XOR operation, represents directly decrypting the corresponding pixel of the image; merge the decrypted image sub-blocks into the original red channel component IR; A second decryption module, configured to perform bitwise XOR decryption on the component image MIG and the component image MIB using the second decryption random key stream and the third decryption random key stream respectively to obtain the original green channel component IG and the original blue channel component IB; A channel component merging module, which merges the original red channel component IR, the original green channel component IG, and the original blue channel component IB to obtain the directly decrypted image .
[0070] In addition, an image restoration module of an embodiment of the present invention is configured to improve the generative adversarial network structure to obtain an improved generative adversarial network, and perform precise image restoration on the directly decrypted image based on the trained improved generative adversarial network to obtain a clear original electronic bill image. The specific working principle of the image restoration module is implemented with reference to the image restoration operation process in the above Embodiment 3, and will not be elaborated herein in this embodiment of the present invention.
[0071] Example 7: Based on the above Examples 1 to 6, an optimized reversible information hiding En-RDH algorithm for encrypted images is comprehensively designed in the embodiments of the present invention. An En-RDH model can be constructed based on the En-RDH algorithm. Without preprocessing operations, this model is a reversible RDH model in the encrypted domain, which can accurately extract the embedded information and losslessly recover the carrier image. In addition, the information extraction and image decryption operations of the En-RDH model are separable, with good security, practicability, and scalability. However, to ensure a high fidelity of the decrypted image, En-RDH only embeds information in the R channel component that is insensitive to the human visual system, and the three color channels of the color image are not fully utilized, and there is still room for improvement in the system embedding rate. The model scheme is applied to the R channel of the color image for reversible information hiding. Therefore, a reversible information hiding system for electronic bill images based on stream encryption can be designed based on the En-RDH model to achieve reversible information hiding in the encrypted domain of the color image, making the En-RDH model have a wider application value in the actual application environment. The reversible information hiding system for electronic bill images based on stream encryption includes three participants, namely the image owner, the data hider, and the image user. In the actual application scenario, the three participants are often three different users. Therefore, the design of the En-RDH model should focus on protecting the privacy of users. Among them, the image owner preprocesses the original image using an improved chaotic encryption algorithm to ensure basic privacy security; the data hider performs reversible information embedding operations based on compressive sensing in the encrypted domain to support various service requirements; finally, the image user realizes differential data access through a hierarchical key system. It can be seen from the general process of reversible information hiding in the encrypted domain that the transmission of the image among the participants and all processing except the owner are completed in the encrypted state. Therefore, reversible information hiding in the encrypted domain can indeed provide good privacy protection for users.
[0072] In the embodiments of the present invention, the design of a complete En-RDH model includes five main functional modules, namely an image encryption module, an information embedding module, an image decryption module, an information extraction module, and an image restoration module, as Figure 1, where the image owner first encrypts the original carrier image using encryption keys K1 and K2. Subsequently, the encrypted image is transmitted to the data hider through a public channel, and the data hider completes the embedding of the hidden information using the information embedding key K3 without decrypting the image. Depending on the purpose of use and application scenarios, the data embedder can embed information such as copyright information and classification information to manage and protect the image, or directly embed a hidden message to achieve secure communication. When a legitimate image user receives the encrypted image containing the hidden information, different operations can be performed. If the image user obtains the legitimate decryption keys K1 and K2 from the image owner, a directly decrypted image with relatively high fidelity can be obtained; if the image user obtains the legitimate information extraction key K3 from the data hider, the hidden information in the image can be completely extracted; if the image user has both the decryption keys K1, K2 and the information extraction key K3, the original carrier image can be restored losslessly and well. The three operations of the image user can be applied to different roles and actual application scenarios respectively.
[0073] The En-RDH algorithm adopts key-controlled sub-block stream encryption and block scrambling technology. While preserving the statistical characteristics of the image, it realizes information hiding in the ciphertext domain through differential histogram shifting. Through the analysis of effectiveness, security, accuracy, and complexity, and the comparison of simulation experiments and ablation experiments with various mainstream algorithms of the same kind, it shows that the PSNR of this algorithm reaches 49.58 dB in the 4×4 block mode, which is 5.68 dB higher than that of the same kind of algorithms, significantly improving the quality of the encrypted image. This algorithm is particularly suitable for information hiding in the R channel of color images and has wide engineering application value. The research results will provide security support for scenarios such as the electronic management of financial bills, the cloud storage of medical images, and encrypted data transmission. In this invention, the reversible information hiding technology in the ciphertext domain performs reversible information hiding in the encrypted image, thus realizing the management of the encrypted image.
[0074] Specifically, in the encryption algorithm part, the En-RDH model adopts specific stream encryption. The stego-image is divided into multiple sub-blocks, and each sub-block is encrypted with the same key stream byte. Most of the correlations between pixels in each small block are retained. The encryption key is used to perform block scrambling on the arrangement order of all sub-blocks encrypted by the stream encryption. Feature analysis proves that this encryption algorithm can retain most of the statistical features in the plaintext image. In the embedding and extraction algorithm part, a reversible information hiding algorithm based on DHS is adopted. By decomposing the R, G, and B color channels of the encrypted image, the original arrangement order of each sub-block is restored, and the pixels in each sub-block are decrypted. The algorithm can reversibly extract information and restore the image, and the encrypted image with the secret has the characteristic of low distortion. Due to the low-distortion characteristic of the embedding algorithm, directly decrypting the encrypted image containing hidden information can also obtain a high-fidelity carrier image. The En-RDH model design realizes the reversible recovery and the separability of operations. Through the analysis of effectiveness, security, accuracy, and complexity, and the comparison with the simulation experiments and ablation experiments of various mainstream algorithms of the same kind, it is verified that the En-RDH algorithm proposed by the present invention has good performance. The 4×4 block mode used by the model has a high embedding capacity on the premise of ensuring security. Performance analysis proves that the En-RDH model has a satisfactory embedding capacity, and the visual quality of the directly decrypted image is relatively high. Under the condition of the same hiding capacity, the quality of the encrypted image with the secret is higher. The experimental test results prove the security and effectiveness of the algorithm. The model of the present invention has good robustness and can resist noise attacks. Aiming at the noise generated in image processing, the present invention optimizes the structure of the generative adversarial network and changes the number of residual modules in the network to achieve better image restoration effects.
[0075] The encryption process of the En-RDH model has a large enough key space to prevent brute-force attacks, and the encryption performance is good, which can well protect the privacy and security of users. After experimental tests, the 4×4 block mode used by the system has a high embedding capacity on the premise of ensuring security. System performance analysis proves that the En-RDH model has a satisfactory embedding capacity, and the visual quality of the directly decrypted image is relatively high. From the perspective of computational complexity, the overall computational cost of the system is relatively low.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A reversible information hiding method for electronic bill images based on stream encryption, applied to the image owner, characterized in that, The method includes: Separating channels of the original electronic bill image to obtain the original red channel component IR, the original green channel component IG, and the original blue channel component IB respectively; Inputting the encryption key K1 into a random number generator to generate the first encrypted random key stream, the second encrypted random key stream, and the third encrypted random key stream, and inputting the encryption key K2 into the pseudo-random function F(K2) to generate the encrypted pseudo-random seed sd1; Dividing the original red channel component IR into non-overlapping image sub-blocks of size 4*4, performing stream byte encryption on each image sub-block using the first encrypted random key stream, and performing block scrambling on the arranged order of the image sub-blocks after stream byte encryption using the encrypted pseudo-random seed sd1 to obtain the encrypted red channel component IR; Performing stream byte encryption on the original green channel component IG using the second encrypted random key stream, and performing stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain the encrypted green channel component IG and the encrypted blue channel component IB; Merging the encrypted red channel component IR, the encrypted green channel component IG, and the encrypted blue channel component IB to obtain the ciphertext image EI.
2. A reversible information hiding method for electronic bill images based on stream encryption, applied to data hiders, characterized in that, The method includes: Separating channels of the ciphertext image EI to obtain the R-component image EIR, the G-component image EIG, and the B-component image EIB; Dividing the R-component image EIR into blocks to obtain multiple image sub-blocks, traversing each image sub-block, performing overflow processing on the saturated pixels with pixel values of 0 or 255 in the image sub-block and generating the corresponding MAP array; Obtaining the hidden information and generating hidden information bits, merging the MAP array and the hidden information bits to obtain the information bits to be embedded; Encrypting the information bits to be embedded using the information embedding key K3, modifying each pixel value of the image sub-block by moving the differential histogram of the image sub-block, ensuring that the modification range of each pixel value of the image sub-block does not exceed 1 pixel, and embedding the encrypted information bits to be embedded in the internal area of the differential histogram; Recording the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded, embedding the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded in the internal area of the differential histogram, and merging multiple image sub-blocks that have completed information embedding to obtain the final R-component image EIR; Merging the final R-component image EIR with the G-component image EIG and the B-component image EIB to obtain the ciphertext image MI containing the hidden information.
3. A reversible information hiding method for electronic bill images based on stream encryption, applied to image users, characterized in that, The method includes: Separating channels of the ciphertext image MI to obtain the component image MIR, the component image MIG, and the component image MIB; Obtaining the decryption key K1 and the decryption key K2, inputting the decryption key K1 into a random number generator to generate the first decrypted random key stream, the second decrypted random key stream, and the third decrypted random key stream, and simultaneously inputting the decryption key K2 into the pseudo-random function F(K2) to generate the decrypted pseudo-random key seed sd2; Divide the component image MIR into N non - overlapping image sub - blocks of the same size, and perform an inverse block permutation on the image sub - blocks using the decryption pseudo - random key seed sd2 generated according to the decryption key K2 to obtain the image sub - blocks in the original permutation order; Decrypt each image sub - block using the first decryption random key stream, including: Use R i (1 ≤ i ≤ N) represents the first decryption random key stream, and let be the j-th pixel in the i-th image sub-block of the component image MIR image, and decrypt the pixels within each image sub-block using the first decryption random key stream: Among them, represents a bitwise exclusive OR operation, represents directly decrypting the pixels corresponding to the image; merging the decrypted image sub-blocks into the original red channel component IR; Perform bit - by - bit exclusive - OR decryption on the component image MIG and the component image MIB using the second decryption random key stream and the third decryption random key stream respectively to obtain the original green - channel component IG and the original blue - channel component IB; Merge the original red channel component IR, the original green channel component IG, and the original blue channel component IB to obtain the directly decrypted image .
4. The reversible information hiding method for electronic bill images based on stream encryption according to claim 3, characterized in that, It also includes: Extract the encrypted MAP array length L1 and the encrypted length L2 of the information bits to be embedded from the internal region of the differential histograms of multiple image sub - blocks; Extract the encrypted information bits to be embedded with the corresponding length from the internal region of the differential histograms of multiple image sub - blocks based on the MAP array length L1 and the encrypted length L2 of the information bits to be embedded; Obtain the information extraction key K3, and decrypt the encrypted information bits to be embedded using the information extraction key K3 to obtain the information bits to be embedded; Split the information bits to be embedded to obtain the hidden information bits and the MAP array, and convert the hidden information bits into the corresponding hidden information.
5. The reversible information hiding method for electronic bill images based on stream encryption according to claim 4, characterized in that, It also includes: Move the differential histograms of the image sub - blocks to repair the pixel values of the image sub - blocks; Perform saturated pixel recovery on the image sub - blocks with repaired pixel values using the MAP array, and merge the image sub - blocks with recovered saturated pixels to obtain the restored image in the encrypted state.
6. The reversible information hiding method for electronic bill images based on stream encryption according to claim 3, wherein, It also includes: Improve the generative adversarial network structure to obtain an improved generative adversarial network; the generative adversarial network includes a generator G and a discriminator D; among them, the generator G includes 3 convolutional modules, 12 residual modules, and 2 transposed convolutional modules; Perform adversarial training on the improved generative adversarial network based on the real - image data x until the confidence of the discriminator D in the generated data G(z) output by the generator G is the same as the confidence in the real - image data x, and obtain the trained improved generative adversarial network model; Use the trained improved generative adversarial network model to directly decrypt the image Perform precise image restoration to obtain a clear original electronic bill image.
7. The reversible information hiding method for electronic bill images based on stream encryption according to claim 6, characterized in that The improvement of the generative adversarial network structure to obtain an improved generative adversarial network includes: Add a set of first convolutional layers, normalization layers, and activation layers before and after the 12 residual modules of the generator G, while keeping the size of the original feature map in the residual layer unchanged; the first convolutional layer consists of a set of convolutional kernels of size 3×3; Add a set of second convolutional layers, normalization layers, and activation layers behind the second hierarchical structure of the discriminator D to keep the output size of the discriminator network as 32×32; the second convolutional layer consists of a set of convolutional kernels of size 4×4.
8. A reversible information hiding device for electronic bill images based on stream encryption, which is applied to the image owner, and is characterized in that It includes: The first channel separation module is used to separate the channels of the original electronic bill image to obtain the original red - channel component IR, the original green - channel component IG, and the original blue - channel component IB respectively; The first key - stream generation module is used to input the encryption key K1 into the random number generator to generate the first encryption random key stream, the second encryption random key stream, and the third encryption random key stream, and input the encryption key K2 into the pseudo - random function F(K2) to generate the encrypted pseudo - random seed sd1; The first stream encryption module is used to divide the original red channel component IR into non - overlapping image sub - blocks of size 4*4, perform stream - byte encryption on each image sub - block using the first encrypted random key stream, and perform block scrambling on the arrangement order of the image sub - blocks after stream - byte encryption using the encrypted pseudo - random seed sd1 to obtain the encrypted red channel component IR; The second stream encryption module is used to perform stream - byte encryption on the original green channel component IG using the second encrypted random key stream, and at the same time perform stream - byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain the encrypted green channel component IG and the encrypted blue channel component IB; The channel merging module is used to merge the encrypted red channel component IR, the encrypted green channel component IG, and the encrypted blue channel component IB to obtain the ciphertext image EI.
9. A reversible information hiding device for electronic bill images based on stream encryption, applied to data hiders, characterized in that, It includes: The second channel separation module is used to perform channel separation on the ciphertext image EI to obtain the R - component image EIR, the G - component image EIG, and the B - component image EIB; The first image partitioning module is used to partition the R - component image EIR into multiple image sub - blocks, traverse each image sub - block, perform overflow processing on saturated pixels with pixel values of 0 or 255 in the image sub - block and generate the corresponding MAP array at the same time; The information bit generation module is used to obtain the hidden information, generate hidden information bits, and merge the MAP array with the hidden information bits to obtain the information bits to be embedded; The first information embedding module is used to encrypt the information bits to be embedded using the information embedding key K3, modify each pixel value of the image sub - block by shifting the differential histogram of the image sub - block, ensure that the modification range of each pixel value of the image sub - block does not exceed 1 pixel, and at the same time embed the encrypted information bits to be embedded in the internal area of the differential histogram; The second information embedding module is used to record the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded, embed the length L1 of the MAP array and the length L2 of the encrypted information bits to be embedded in the internal area of the differential histogram, and merge multiple image sub - blocks that have completed information embedding to obtain the final R - component image EIR; The RGB merging module is used to merge the final R - component image EIR with the G - component image EIG and the B - component image EIB to obtain the ciphertext image MI containing the hidden information.
10. A reversible information hiding device for electronic bill images based on stream encryption, which is applied to image users, and is characterized in that It includes: The third channel separation module is used to perform channel separation on the ciphertext image MI to obtain the component image MIR, the component image MIG, and the component image MIB; The second key - stream generation module obtains the decryption key K1 and the decryption key K2, inputs the decryption key K1 into the random number generator to generate the first decryption random key stream, the second decryption random key stream, and the third decryption random key stream, and at the same time inputs the decryption key K2 into the pseudo - random function F(K2) to generate the decryption pseudo - random key seed sd2; The second image partitioning module is used to divide the component image MIR into N non - overlapping image sub - blocks of a certain size, perform inverse block - permutation on the image sub - blocks using the decryption pseudo - random key seed sd2 to obtain the image sub - blocks in the original arrangement order; The first decryption module is used to decrypt each image sub-block by using the first decryption random key stream, including: Use R i (1 ≤ i ≤ N) represents the first decryption random key stream, and let be the j-th pixel in the i-th image sub-block of the component image MIR image, and decrypt the pixels in each image sub-block using the first decryption random key stream: Among them, represents a bitwise exclusive OR operation, represents directly decrypting the pixels corresponding to the image; merging the decrypted image sub-blocks into the original red channel component IR; The second decryption module is used to perform bitwise XOR decryption on the component image MIG and the component image MIB by using the second decryption random key stream and the third decryption random key stream respectively, so as to obtain the original green channel component IG and the original blue channel component IB; Channel component merging module, which merges the original red channel component IR, the original green channel component IG, and the original blue channel component IB to obtain a directly decrypted image .
Citation Information
Patent Citations
Color image encryption and decryption method based on multiple-fractional-order chaotic systems
CN102982499A
Single channel color image encryption method based on GT conversion and chaos
CN103761703A
PNG electronic invoice image watermark embedding and authentication method based on block sorting
CN104036447A
Image encryption method based on finite time synchronization of fractional order driven response system
CN113556223A
Color image encryption method based on finger vein secret key and off-axis digital holography
CN119484724A
Cited By
Encryption method, device and equipment for preventing reverse cracking of data image
CN120512501A