A method and device for reversible information hiding in electronic bill images based on stream encryption
Through the methods of stream encryption and differential histogram embedding, the electronic bill image is channel separated and block scrambled, which solves the problems of insufficient embedding capacity and security in the existing technology, and realizes efficient information hiding and decryption recovery, which is suitable for the financial and medical fields.
Patent Information
- Application Number
- CN202510740910.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-05
AI Technical Summary
Existing reversible data hiding technologies have deficiencies in embedding capacity, security, and cloud environment adaptability, making them difficult to effectively promote in practical applications in fields such as finance and healthcare.
The stream encryption method is used to perform channel separation and block scrambling on the electronic bill image. After encryption, information is embedded through differential histogram, and the original arrangement order of the image sub-blocks is restored during decryption to ensure image quality and information reversibility.
While ensuring information capacity, it improves the decryption quality and security of images, adapts to the multi-party collaboration needs of the cloud environment, and achieves efficient information hiding and decryption recovery.
Smart Images

Figure CN120263910B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information hiding, and in particular to a method and device for reversible information hiding of an electronic bill image based on stream encryption. Background Art
[0002] In recent years, with the widespread application of electronic receipts in finance, healthcare, and other fields, reversible data hiding in encrypted images (RDH-EI) has become a research hotspot for privacy protection and data security. Driven by policy needs and closely aligned with the promotion of electronic receipts (such as VAT electronic invoices and medical electronic receipts), domestic research focuses on the coordinated optimization of stream encryption and reversible hiding.
[0003] Current reversible data hiding algorithms have the following limitations:
[0004] First, in terms of embedding capacity, most algorithms find it difficult to achieve both high embedding rate and low distortion. Although the histogram shift-based method can ensure image quality, the embedding capacity is limited (usually less than 0.5bpp). Although the compressed sensing-based method can improve the capacity, it faces the problem of high computational complexity.
[0005] Secondly, in terms of security, better encryption domain embedding algorithms (such as LSB flipping methods) rely on the statistical characteristics of pixel correlation, and their reversibility cannot be strictly guaranteed; while preprocessing algorithms can increase capacity, the unencrypted reserved space may lead to statistical information leakage.
[0006] Finally, existing algorithms have significant shortcomings in cloud environment compatibility: federated algorithms require decryption before extraction, which doesn't meet the multi-party collaboration requirements of cloud environments; while homomorphic encryption schemes support ciphertext processing, they are computationally expensive. These limitations severely restrict the practical application of reversible data hiding technology in key areas such as encrypted data transmission and cloud-based medical data sharing. Summary of the Invention
[0007] In view of this, an embodiment of the present invention provides a method and apparatus for reversible information hiding in an electronic receipt image based on stream encryption, which ensures the capacity of embedded information while improving image quality.
[0008] The technical solution adopted in the present invention is:
[0009] In a first aspect, the present invention provides a method for reversible information hiding in an electronic receipt image based on stream encryption, which is applied to the image owner. The method comprises:
[0010] Perform channel separation on the original electronic receipt image to obtain the original red channel component IR, the original green channel component IG and the original blue channel component IB;
[0011] 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 encryption pseudo-random seed sd1;
[0012] The original red channel component IR is divided into 4*4 non-overlapping image sub-blocks, each image sub-block is stream-byte encrypted using the first encrypted random key stream, and the encrypted pseudo-random seed sd1 is used to block-scramble the order of the stream-byte encrypted image sub-blocks to obtain the encrypted red channel component IR;
[0013] Perform stream byte encryption on the original green channel component IG using the second encrypted random key stream, and simultaneously perform stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain an encrypted green channel component IG and an encrypted blue channel component IB;
[0014] The encrypted red channel component IR, the encrypted green channel component IG, and the encrypted blue channel component IB are merged to obtain the ciphertext image EI.
[0015] In a second aspect, the present invention provides a method for reversible information hiding in an electronic bill image based on stream encryption, which is applied to data hiding, and the method comprises:
[0016] 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;
[0017] The R component image EIR is divided into multiple image sub-blocks, and each image sub-block is traversed to perform overflow processing on the saturated pixels with the pixel value of 0 or 255 in the image sub-block and generate the corresponding MAP array;
[0018] Obtain hidden information and generate hidden information bits, merge the MAP array with the hidden information bits to obtain the information bits to be embedded;
[0019] 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, while embedding the encrypted information bits to be embedded in the inner area of the differential histogram;
[0020] Record the MAP array length L1 and the encrypted information bit length L2 to be embedded, embed the MAP array length L1 and the encrypted information bit length L2 to be embedded into the inner area of the differential histogram, merge multiple image sub-blocks with completed information embedding, and obtain the final R component image EIR;
[0021] The final R component image EIR is merged with the G component image EIG and the B component image EIB to obtain the ciphertext image MI containing hidden information.
[0022] In a third aspect, an embodiment of the present invention provides a method for reversible information hiding in an electronic receipt image based on stream encryption, which is applied to image users. The method includes:
[0023] Perform channel separation on the ciphertext image MI to obtain component image MIR, component image MIG and component image MIB;
[0024] Obtain decryption key K1 and decryption key K2, input 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 input decryption key K2 into a pseudo-random function F(K2) to generate a decryption pseudo-random key seed sd2;
[0025] Divide the component image MIR into N non-overlapping image sub-blocks, perform inter-block inverse permutation on the image sub-blocks according to the decryption pseudo-random key seed sd2 generated by the decryption key K2, and obtain the image sub-blocks in the original arrangement order;
[0026] Decrypting each image sub-block using a first decryption random key stream includes:
[0027] use R i (1≤i≤N) represents the first decryption random key stream, and let is the jth pixel in the i-th image sub-block in the component image MIR image, and the pixels in each image sub-block are decrypted using the first decryption random key stream:
[0028]
[0029] in, Represents a bitwise exclusive OR operation, Indicates the pixel corresponding to the directly decrypted image; the decrypted image sub-block is merged into the original red channel component IR;
[0030] The second decryption random key stream and the third decryption random key stream are used 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;
[0031] Merge the original red channel component IR, the original green channel component IG, and the original blue channel component IB to obtain the direct decrypted image .
[0032] In a fourth aspect, the present invention provides a reversible information hiding device for electronic receipt images based on stream encryption, which is applied to the image owner, comprising:
[0033] The first channel separation module is used to perform channel separation on the original electronic receipt image to obtain an original red channel component IR, an original green channel component IG, and an original blue channel component IB;
[0034] A first key stream generation module is configured to input 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 input the encryption key K2 into a pseudo-random function F(K2) to generate an encryption pseudo-random seed sd1;
[0035] A first stream encryption module is used to divide the original red channel component IR into 4*4 non-overlapping image sub-blocks, perform stream byte encryption on each image sub-block using a first encrypted random key stream, and perform block scrambling on the arrangement order of the stream byte encrypted image sub-blocks using an encrypted pseudo-random seed sd1 to obtain an encrypted red channel component IR;
[0036] A 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 simultaneously perform stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain an encrypted green channel component IG and an encrypted blue channel component IB;
[0037] 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.
[0038] In a fifth aspect, the present invention provides a reversible information hiding device for electronic receipt images based on stream encryption, which is applied to data hiding, comprising:
[0039] The second channel separation module is used to perform channel separation on the ciphertext image EI to obtain an R component image EIR, a G component image EIG and a B component image EIB;
[0040] The first image segmentation module is used to divide the R component image EIR into blocks to obtain multiple image sub-blocks, and traverse each image sub-block to perform overflow processing on saturated pixels with a pixel value of 0 or 255 in the image sub-block and generate a corresponding MAP array;
[0041] An information bit generation module is used to obtain hidden information and generate hidden information bits, and merge the MAP array with the hidden information bits to obtain information bits to be embedded;
[0042] a first information embedding module, configured to encrypt information bits to be embedded using an information embedding key K3, modify each pixel value of the image sub-block by shifting a 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 embed the encrypted information bits to be embedded in an inner region of the differential histogram;
[0043] The second information embedding module is configured to record the MAP array length L1 and the encrypted information bit length L2 to be embedded, embed the MAP array length L1 and the encrypted information bit length L2 to be embedded into the inner area of the differential histogram, and merge multiple image sub-blocks in which information embedding has been completed to obtain a final R component image EIR;
[0044] 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 hidden information.
[0045] In a sixth aspect, the present invention provides a reversible information hiding device for electronic receipt images based on stream encryption, which is applied to image users and includes:
[0046] The third channel separation module is used to perform channel separation on the ciphertext image MI to obtain component images MIR, component images MIG and component images MIB;
[0047] 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 inputs the decryption key K2 into the pseudo-random function F(K2) to generate the decryption pseudo-random key seed sd2;
[0048] The second image division module is used to divide the component image MIR into N non-overlapping image sub-blocks, and perform inter-block inverse 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 using the first decryption random key stream, including:
[0049] use R i (1≤i≤N) represents the first decryption random key stream, and let is the jth pixel in the i-th image sub-block in the component image MIR image, and the pixels in each image sub-block are decrypted using the first decryption random key stream:
[0050]
[0051] in, Represents a bitwise exclusive OR operation, Indicates the pixel corresponding to the directly decrypted image; the decrypted image sub-block is merged into the original red channel component IR;
[0052] A second decryption module is used to 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;
[0053] 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 a directly decrypted image .
[0054] In summary, the beneficial effects of the present invention are as follows:
[0055] (1) The present invention adopts a specific stream encryption to divide the red channel component of the original electronic receipt image into multiple image sub-blocks. Each image sub-block is encrypted using the same key stream byte. Most of the correlation between pixels in each small block is retained. The encryption key is used to scramble the order of all stream-encrypted image sub-blocks. Feature analysis proves that this encryption algorithm can retain most of the statistical features in the plaintext image:
[0056] (2) The present invention decomposes the three color channels R, G, and B of the encrypted image, restores the original arrangement order of each image sub-block, and decrypts the pixels within each image sub-block. It can reversibly extract information and restore the image. The encrypted image has the characteristic of low distortion. Under the condition of equal hiding capacity, the encrypted image has higher quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work, and these are all within the scope of protection of the present invention.
[0058] Figure 1 Schematic diagram of the overall framework of the reversible information hiding method for electronic bill images of the present invention;
[0059] Figure 2 This is a schematic diagram of the overall process of the reversible information hiding method for electronic bill images of the present invention;
[0060] Figure 3 This is a schematic diagram of the image encryption operation flow of the present invention;
[0061] Figure 4 This is a schematic diagram of the information embedding operation flow of the present invention;
[0062] Figure 5 This is a schematic diagram of the image decryption operation flow of the present invention;
[0063] Figure 6 Schematic diagram of the image restoration process of the present invention;
[0064] Figure 7 Schematic diagram of the network structure of the original generator G;
[0065] Figure 8 Schematic diagram of the network structure of the determiner D;
[0066] Figure 9 Schematic diagram of the improved generator G network structure;
[0067] Figure 10 Schematic diagram of the improved network structure of the judge D. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with 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 of the present invention and the embodiments can be combined with each other and are all within the scope of protection of the present invention.
[0069] Existing reversible information hiding techniques for electronic receipt images based on stream encryption. Technically, scholars often use lightweight stream encryption algorithms (such as ChaCha20 and RC4) to preprocess electronic receipt images, combined with prediction error expansion (PEE) or histogram shift (HS) to embed information in the encrypted domain. Representative achievements include the block scrambling encryption domain RDH scheme proposed by Shanghai Jiao Tong University (2021) and the medical receipt privacy protection system developed by Fudan University (2022). Their core goal is to embed verification codes, hash values, or user identity information in encrypted images while supporting decryption and lossless data recovery by the recipient through key synchronization. However, domestic research faces the dual challenges of embedding capacity and security: stream encryption causes changes in image statistical properties, and traditional RDH methods generally have an embedding capacity of less than 0.5 bpp (bits per pixel) in the encrypted domain, and are insufficiently robust to key leakage and image cropping attacks. International research, on the other hand, emphasizes both theoretical breakthroughs and industrial applications.
[0070] On the theoretical level, American scholars explore the combination of public key encryption and RDH (such as Rutgers University's differential expansion scheme based on Paillier encryption, 2020), the EU team attempts to introduce fully homomorphic encryption (FHE) into reversible hiding to improve security (Fraunhofer Institute, 2021), and MIT's encrypted domain information hiding based on generative adversarial networks (GAN) (2022) significantly improves visual imperceptibility through deep learning optimized embedding strategies; in terms of industrialization, PayPal in the United States combines AES encryption with anti-counterfeiting watermarks for electronic bill authentication, and Epic Systems in Europe 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 standardized protocol construction, their technical bottlenecks are also prominent: although homomorphic encryption schemes have theoretical security, their computational complexity is extremely high (difficult to meet real-time requirements), and the efficiency advantage of stream encryption schemes comes at the expense of anti-quantum attack capabilities; in addition, privacy ethics disputes in Europe and the United States in electronic invoice scenarios (such as GDPR's compliance restrictions on data embedding) have also delayed the promotion of technology.
[0071] Currently, domestic technology approaches prioritize practicality and scenario adaptation (e.g., focusing on smart cities and medical receipts). Foreign approaches, however, rely on collaborative innovation between universities and businesses (e.g., Google and IBM's vertical integration of algorithms and chips), maintaining a leading position in interdisciplinary theories and high-security protocols. However, due to over-reliance on complex encryption frameworks, they face drawbacks such as high implementation costs and poor cross-platform compatibility. Overall, technological competition in this field has shifted from single algorithm performance to a systemic struggle between "security, efficiency, and compliance." The global adoption of electronic receipts will further highlight the strategic value of reversible information hiding in data sovereignty and privacy protection. Therefore, optimizing information hiding algorithms to address the distortion of hidden images while improving the visual quality of decrypted images is a pressing issue. Finding a balance between the amount of embedded hidden information and the quality of the hidden images, and thus enhancing the robustness of image information hiding technology, remains a pressing challenge. Addressing these challenges will enable better application of information hiding methods in fields such as finance and healthcare. Based on this, the present invention proposes a method and apparatus for reversible information hiding in electronic receipt images based on stream encryption. The detailed implementation of this invention is described in the following examples.
[0072] Example 1: Reference Figure 1-Figure 3 As shown, Figure 1 This is a schematic diagram of the overall framework of the reversible information hiding method for electronic bill images of the present invention. Figure 2 This is a schematic diagram of the overall process of the reversible information hiding method for electronic bill images. Figure 3 This is a schematic diagram of the image encryption operation process. The embodiment of the present invention provides a method for reversible information hiding of electronic receipt images based on stream encryption, which is applied to the image owner. The method specifically includes:
[0073] Perform channel separation on the original electronic receipt image to obtain the original red channel component IR, the original green channel component IG and the original blue channel component IB;
[0074] 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 encryption pseudo-random seed sd1;
[0075] The original red channel component IR is divided into 4*4 non-overlapping image sub-blocks, each image sub-block is stream-byte encrypted using the first encrypted random key stream, and the encrypted pseudo-random seed sd1 is used to block-scramble the order of the stream-byte encrypted image sub-blocks to obtain the encrypted red channel component IR;
[0076] Perform stream byte encryption on the original green channel component IG using the second encrypted random key stream, and simultaneously perform stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain an encrypted green channel component IG and an encrypted blue channel component IB;
[0077] The encrypted red channel component IR, the encrypted green channel component IG, and the encrypted blue channel component IB are merged to obtain the ciphertext image EI.
[0078] The image owner sets or generates encryption key K1, encryption key K2, decryption key K1, and decryption key K2. During decryption, the image user can obtain decryption key K1 and decryption key K2 from the image owner to decrypt the image.
[0079] In this embodiment of the present invention, image owners must encrypt their images before transmitting and sharing them. Based on an analysis of practical needs, considering the processing of color images and ensuring high fidelity in the directly decrypted image, this embodiment of the present invention selects one color channel of the color image and implements the previously described image sub-block stream encryption and block scrambling algorithm to perform reversible information hiding in the ciphertext domain. A color image can be separated into three color channels: red, green, and blue, which can then be combined to form the original color image. In other words, the separation process of the color channels of a color image is reversible, which meets the requirements of reversible information hiding. The three separated color channels of a color image each have their own characteristics. According to the human visual function curve, the human eye has different sensitivities to different wavelengths of light, being more sensitive to yellow and green light and less sensitive to red and violet light. Therefore, the red channel is selected for reversible information hiding in the ciphertext image, achieving better hiding effectiveness and higher fidelity in the directly decrypted image.
[0080] Reference Figure 3As shown, in the embodiment of the present invention, different operations are also performed on different color channels of a color image during image encryption. The specific operation process is as follows:
[0081] (1) Separate the color channels IR (red), IG (green), and IB (blue) of the color image I of the electronic receipt.
[0082] (2) The encryption key K1 generates three random key streams KStream1, KStream2, and KStream3 through a random number generator, which are used to encrypt the three channel components of the image IR, IG, and IB respectively. The IR component is first divided into non-overlapping image sub-blocks of 4*4 size, and then encrypted using the random key stream KStream1. The IG and IB components adopt the traditional classical stream encryption scheme, that is, the random key streams KStream2 and KStream3 are directly used to encrypt the IG and IB components.
[0083] (3) The IR component image, which has undergone system stream encryption, must undergo inter-block scrambling. The encryption key K2 is used to generate an encrypted pseudo-random seed sd1 through a pseudo-random function F(K2). The order of the image sub-blocks is permuted based on sd, disrupting the order of the blocks and completing the block scrambling. At this point, the IR channel component of the original color image of the electronic receipt has completed all encryption processes.
[0084] (4) Combine the RGB channel components to obtain the ciphertext image EI.
[0085] Specifically, in an embodiment of the present invention, the image owner inputs the original color image I and encrypts it using encryption keys K1 and K2 to obtain an encrypted image EI. The encryption keys K1 and 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 encryption pseudo-random seed sd1. During the image encryption operation, the image owner does not need to remember the lengthy random key stream, but only needs to remember the encryption keys K1 and K2. In addition, the encryption keys K1 and K2 can be filled in by the user or automatically generated into a 20-digit password containing uppercase and lowercase letters and numbers, which can enhance the user's operating experience. The selection of the 4*4 block size in the image encryption process and the security of the encrypted image will be analyzed and experimentally verified in subsequent embodiments.
[0086] The embodiment of the present invention adopts specific stream encryption to divide the secret image into multiple image sub-blocks, and uses the same key stream byte to encrypt each image sub-block. Most of the correlation between pixels in each small block is retained, and the encryption key is used to block scramble the arrangement order of all stream-encrypted image sub-blocks. Feature analysis proves that this encryption algorithm can retain most of the statistical features in the plaintext image.
[0087] Example 2: Reference Figure 1 and Figure 2 The overall framework and overall process of the method shown, and Figure 4 The information embedding operation flow chart shown in the figure, the present invention provides a reversible information hiding method for electronic bill images based on stream encryption, which is applied to data hiding, and the method includes:
[0088] The ciphertext image EI is channel-separated to obtain the R component image EIR, the G component image EIG and the B component image EIB.
[0089] The R component image EIR is divided into blocks to obtain multiple image sub-blocks, and each image sub-block is traversed to perform overflow processing on the saturated pixels with pixels of 0 or 255 in the image sub-block and generate the corresponding MAP array.
[0090] Obtain hidden information and generate hidden information bits, merge the MAP array with the hidden information bits to obtain information bits to be embedded.
[0091] The information bits to be embedded are encrypted using the information embedding key K3. The differential histogram of the image sub-block is moved to modify each pixel value of the image sub-block, and the modification range of each pixel value of the image sub-block is ensured to not exceed 1 pixel. At the same time, the encrypted information bits to be embedded are embedded in the inner area of the differential histogram.
[0092] Record the MAP array length L1 and the encrypted information bit length L2 to be embedded, and then embed the MAP array length L1 and the encrypted information bit length L2 into the inner area of the differential histogram. Merge multiple image sub-blocks with information embedded to obtain the final R component image EIR. The MAP array length L1 and the encrypted information bit length L2 to be embedded are embedded into the R component image EIR as auxiliary information.
[0093] The final R component image EIR is combined with the G component image EIG and the B component image EIB to obtain the ciphertext image MI containing the hidden information (or hidden information).
[0094] The data hider sets or generates an information embedding key K3 and an information extraction key K3. When extracting the embedded information, the image user can obtain the information extraction key K3 from the data hider to extract the information.
[0095] Specifically, hidden information is usually saved in the form of a file. Therefore, when embedding information, the file needs to be converted into a binary bit sequence for embedding.
[0096] Shifting the difference histogram causes changes in image pixels. The principle of the histogram shift algorithm based on differential expansion is as follows: first, a difference image is constructed, whose pixel values are the differences between adjacent pixels in the original image. A difference histogram is then generated and shifted to embed the watermark information. Because most pixel values (i.e., differences) in the difference image are close to 0, the resulting difference histogram has a larger peak. By shifting the difference histogram, watermark information or other data can be embedded in it, which causes changes in the difference image, which in turn affects the pixel values of the original image.
[0097] Therefore, the specific process of differential histogram movement is:
[0098] 1. Constructing a difference image: Calculate the difference 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, and n represents the column index. I(m,n) represents the pixel value in the mth row and nth column of the original carrier image, I(m,n+1) represents the pixel value in the mth row and n+1th column of the original carrier image, I(m,2n) represents the pixel value in the mth row and 2nth column of the original carrier image, and I(m,2n+1) represents the pixel value in the mth row and 2n+1th column of the original carrier image. D represents the difference image, and D(m,n) represents the pixel value in the mth row and nth column of the difference image.
[0099] 2. Generate a difference histogram: Calculate a histogram based on the difference image. The peak of the histogram is at 0, indicating that it has a large information capacity.
[0100] 3. Shift the histogram: Find points P and Z of the histogram, shift the points between P and Z to create a bar area, and then embed hidden information or other data into this empty space.
[0101] 4. Update the difference image: Apply the shifted histogram to the difference image to update the difference image.
[0102] 5. Update the original image: Bring the updated difference image back to the original image to obtain the carrier image with embedded information.
[0103] Through this differential histogram shifting process, the pixel values of the original image are changed to embed the desired information.
[0104] This embodiment of the present invention employs a reversible information hiding algorithm based on Difference Histogram Shifting (DHS). By decomposing the encrypted image's R, G, and B color channels, the algorithm restores the original order of each image sub-block and decrypts the pixels within each sub-block. This algorithm reversibly extracts information and restores the image, while maintaining low distortion. Due to the low distortion of the embedding algorithm, directly decrypting the encrypted image containing the hidden information can also yield a high-fidelity carrier image, achieving reversible recovery and separable manipulation.
[0105] Through analysis of effectiveness, security, accuracy and complexity, and comparison with simulation experiments and ablation experiments of various mainstream algorithms of the same type, it is verified that the reversible information hiding method proposed in the embodiment 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 high. Under the condition of equal hiding capacity, the quality of the encrypted image is higher.
[0106] Example 3: Reference Figure 1 and Figure 2 The overall framework and overall process of the method shown, and Figure 5 As shown in the image decryption operation flow chart, after the image user obtains the ciphertext image MI containing hidden information, the image is decrypted using the decryption key K1 and the decryption key K2 to obtain a directly decrypted image with higher fidelity. The image decryption operation is equivalent to the inverse operation of the image encryption operation. Therefore, the present invention provides a method for reversible information hiding of electronic bill images based on stream encryption, which is applied to image users. The method specifically includes:
[0107] Perform channel separation on the ciphertext image MI to obtain component image MIR, component image MIG and component image MIB;
[0108] Obtain decryption keys K1 and K2, input 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 input decryption key K2 into a pseudo-random function F(K2) to generate a decryption pseudo-random key seed sd2; wherein decryption keys K1 and K2 are obtained from the image owner;
[0109] Divide the component image MIR into N non-overlapping image sub-blocks, perform inter-block inverse permutation on the image sub-blocks according to the decryption pseudo-random key seed sd2 generated by the decryption key K2, and obtain the image sub-blocks in the original arrangement order;
[0110] Decrypting each image sub-block using a first decryption random key stream includes:
[0111] use R i (1≤i≤N) represents the first decryption random key stream, and let is the jth pixel in the i-th image sub-block in the component image MIR image, and the pixels in each image sub-block are decrypted using the first decryption random key stream:
[0112]
[0113] in, Represents a bitwise exclusive OR operation, Indicates the pixel corresponding to the directly decrypted image; the decrypted image sub-block is merged into the original red channel component IR;
[0114] The second decryption random key stream and the third decryption random key stream are used 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;
[0115] Merge the original red channel component IR, the original green channel component IG, and the original blue channel component IB to obtain the direct decrypted image ;
[0116] Specifically, in this embodiment of the present invention, since additional information is embedded in the encrypted image, the introduction of this information embedding operation inevitably results in distortion in the directly decrypted image. However, as analyzed in the present invention regarding the information embedding operation, the embedding algorithm employed by the system modifies the value of each pixel by at most 1 during embedding. Therefore, the directly decrypted image approximates the original carrier image with high fidelity and excellent visual quality. In practical applications, users may not necessarily require a completely lossless original image due to limitations such as usage or role. In such cases, obtaining a directly decrypted image with high fidelity at a lower computational cost and time is a very desirable option.
[0117] Furthermore, based on the aforementioned method for reversible information hiding in electronic receipt images, the method of the present invention also includes an information extraction process. Specifically, after the image user obtains the ciphertext image MI containing hidden information, the embedded hidden information can be completely and accurately extracted using the information embedding key K3. Since the data hider embeds the hidden information in the internal area of the histogram by moving the differential histogram of the image, the information extraction process also extracts relevant information through the pixels in the internal area of the differential histogram. The specific information extraction process is as follows:
[0118] Extracting the encrypted MAP array length L1 and the encrypted information bit length L2 to be embedded from the inner area of the differential histogram of the plurality of image sub-blocks;
[0119] Extracting encrypted information bits to be embedded of corresponding lengths from inner regions of the differential histograms of the plurality of image sub-blocks based on the MAP array length L1 and the encrypted information bits to be embedded length L2;
[0120] Obtaining an information extraction key K3, and decrypting the encrypted information bits to be embedded using the information extraction key K3 to obtain the information bits to be embedded; wherein the information extraction key K3 is obtained from the data hider;
[0121] The embedded information bits are split to obtain hidden information bits and a MAP array, and the hidden information bits are converted into corresponding hidden information.
[0122] Specifically, information extraction begins by isolating the red (R) channel (i.e., component image MIR) from the ciphertext image MI containing the hidden information. This component image MIR is then divided into blocks. Subsequently, the embedded information is extracted using relevant rules. The information bits representing the auxiliary information are first extracted, and the length of the MAP array, L1, and the length of the encrypted information bits to be embedded, L2, are obtained. The encrypted information bits to be embedded are then extracted and decrypted using the information extraction key, K3, to obtain the complete and intact hidden information.
[0123] In this embodiment of the present invention, image users only need the information extraction key K3 to extract relevant information; decryption keys K1 and K2 are not required, nor is the image decrypted first. This separable operation protects user privacy. For example, certain image users, such as database administrators, only need to know the relevant information embedded in the image for image management purposes, and should not have access to the original image information. Therefore, this operation of directly extracting information in a ciphertext state protects the privacy of the image owner. Furthermore, the separation of image decryption and information extraction allows the method to cope with more complex and diverse application scenarios and facilitates the rational allocation of system resources. If the user has no strict requirements for image fidelity, or only needs to extract hidden information without obtaining the image content, the system can meet this requirement with minimal computational cost through the image decryption or information extraction modules. However, if the user has very high requirements for image quality, the system must obtain the original, lossless image at a higher cost. Therefore, this separable operation helps the system provide more reasonable and efficient services.
[0124] Further, refer to Figure 6 The image restoration process shown in FIG. 1 is a flowchart of an image restoration process. The method of the embodiment of the present invention further includes an image restoration process. The specific image restoration process is as follows:
[0125] Modify the histogram, that is, move the differential histogram of the image sub-block and repair the pixel value of the image sub-block;
[0126] The MAP array is used to restore the saturated pixels of the image sub-blocks after the pixel values are repaired, and the image sub-blocks with restored saturated pixels are merged to obtain the restored image in the encrypted state.
[0127] Specifically, once the image user obtains the ciphertext image MI containing hidden information, the original carrier image can be losslessly restored using the decryption keys K1 and K2 and the information extraction key K3. Therefore, the image restoration process actually consists of two main steps: ciphertext domain image recovery and image decryption.
[0128] The steps for restoring the ciphertext domain image are as follows:
[0129] (1) Divide the image MIR into blocks, traverse each sub-block, extract the embedded information bits, modify the histogram and repair the pixel values.
[0130] (2) Use the information extraction key K3 to decrypt the extracted information bits and separate the decrypted MAP array.
[0131] (3) After information extraction and image restoration, the original encrypted image can be restored through the extracted MAP array.
[0132] The restored image of the encrypted state at this time should be the same as the encrypted ciphertext image EI. Figure 5 The image decryption operation in the above process decrypts the restored image in the encrypted state to obtain the original color image I. Therefore, when decrypting the restored image in the encrypted state, it is only necessary to replace the ciphertext image EI in the above image decryption process with the restored image in the encrypted state to perform image decryption. The specific image decryption process will not be described in detail in this embodiment.
[0133] From the description of the above image restoration operation, it can be seen that the method of the embodiment of the present invention can well restore the original carrier image. This reversible property is very suitable for medical and financial fields that have strict requirements on the confidentiality and quality of images.
[0134] Furthermore, in the process of image encryption, information embedding, image decryption, and information extraction, Gaussian noise, Poisson noise, impulse noise, etc. are inevitably generated, causing image degradation and quality reduction. Blurred images pose 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 precision restoration technology. Therefore, the method of the embodiment of the present invention also includes: improving the generative adversarial network structure to obtain an improved generative adversarial network, and performing direct decryption on the image based on the trained improved generative adversarial network. Performing accurate image restoration to obtain a clear original electronic receipt image. In addition, the color image I obtained by decrypting the restored image in the encrypted state can also be accurately restored to obtain a clear original electronic receipt image.
[0135] This paper optimizes the classic generative adversarial network (GAN) for the specific design of accurate image restoration. The classic GAN structure includes the structure of two networks: the generator G and the discriminator D, as well as the definition of the loss function.
[0136] The Generative Adversarial Network model consists of two networks: a generator (G) and a discriminator (D). The generator G receives a random noise signal z as input and generates a clear image example. The discriminator D receives both real 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 are indistinguishable from real samples x. When the discriminator D is ultimately unable to distinguish between the real clear image x and the generated clear image G(z), the generator G is considered capable of generating clear images.
[0137] Among them, the generator G consists of 3 convolution modules, 12 residual modules (ResBlocks) and 2 deconvolution modules, where each residual module consists of a convolution layer, a normalization layer and a ReLU activation layer. The network structure of the generator G is as follows Figure 7 As shown in Figure 2, the generator G generates a perceptually convincing clear image from the input blurred image, and its ultimate goal is to deceive the discriminator D so that the discriminator D judges the generated clear image as a real clear image.
[0138] The discriminator D consists of three convolutional modules and convolutional layers, LeakReLU activation layers. The convolutional module consists of convolutional layers, LeakReLU activation layers and normalization layers. The network structure of the discriminator is as follows: Figure 8 As shown in Figure 2, the discriminator D identifies the input image, determines the difference between the input image and the real clear image, and outputs the judgment result.
[0139] Therefore, the embodiment of the present invention improves the generative adversarial network structure to obtain an improved generative adversarial network, which specifically includes:
[0140] A set of first convolutional layers, normalization layers, and activation layers are added 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 structure of the improved generator G is as follows Figure 9 As shown in Figure 2, the first convolutional layer consists of a set of 3×3 convolution kernels.
[0141] In the second layer of the discriminator network (i.e. Figure 8A set of second convolutional layers, normalization layers, and activation layers are added after the first LeakReLU activation layer from left to right in the figure, so that the output size of the discriminator network remains at 32×32. The improved discriminator network structure is as follows Figure 10 As shown in Figure 2, the second convolutional layer consists of a set of 4×4 convolution kernels.
[0142] Then, the present invention conducts 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 of the real image data x, thereby obtaining a trained improved generative adversarial network model;
[0143] Finally, the trained improved generative adversarial network model is used to directly decrypt the image Perform accurate image restoration to obtain a clear original electronic receipt image.
[0144] Specifically, in the generative adversarial network, the discriminator D outputs a confidence score for each input data. If the discriminator outputs 1, it means that the input data is real data, and if it outputs 0, it means that the input data is pseudo data generated by the generator G. The goal of the discriminator D is to distinguish the two as much as possible, that is, the difference between the output result D(x) of the discriminator D and the generated data D(G(z)) output by the generator is as large as possible. The best case is that D(x) approaches 1 and D(G(z)) approaches 0. The goal of the generator G is for the discriminator D to identify the generated pseudo data as real data, and D(G(z)) approaches 1. Therefore, the training process of the discriminator D and the generator G is a process of mutual game between the two. The two conduct adversarial training and alternating optimization until the confidence of the discriminator D in the generated data G(z) is consistent with the confidence in the real data x. Then the training stops and a trained generative adversarial network model is obtained.
[0145] The embodiment of the present invention optimizes the generative adversarial network structure by changing the number of residual modules in the generative adversarial network, and trains the improved generative adversarial network. The trained generative adversarial network model is used to directly decrypt the input image. Perform accurate image restoration to obtain clear original electronic receipt images and achieve better image restoration results.
[0146] Example 4: Based on the above-mentioned Example 1, this embodiment of the present invention provides a reversible information hiding device for electronic receipt images based on stream encryption, which is applied to the image owner and includes:
[0147] The first channel separation module is used to perform channel separation on the original electronic receipt image to obtain an original red channel component IR, an original green channel component IG, and an original blue channel component IB;
[0148] A first key stream generation module is configured to input 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 input the encryption key K2 into a pseudo-random function F(K2) to generate an encryption pseudo-random seed sd1;
[0149] A first stream encryption module is used to divide the original red channel component IR into 4*4 non-overlapping image sub-blocks, perform stream byte encryption on each image sub-block using a first encrypted random key stream, and perform block scrambling on the arrangement order of the stream byte encrypted image sub-blocks using an encrypted pseudo-random seed sd1 to obtain an encrypted red channel component IR;
[0150] A 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 simultaneously perform stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain an encrypted green channel component IG and an encrypted blue channel component IB;
[0151] 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.
[0152] Example 5: Based on the above-mentioned Example 2, the embodiment of the present invention provides a reversible information hiding device for electronic receipt images based on stream encryption, which is applied to data hiding, including:
[0153] The second channel separation module is used to perform channel separation on the ciphertext image EI to obtain an R component image EIR, a G component image EIG and a B component image EIB;
[0154] The first image segmentation module is used to divide the R component image EIR into blocks to obtain multiple image sub-blocks, and traverse each image sub-block to perform overflow processing on saturated pixels with a pixel value of 0 or 255 in the image sub-block and generate a corresponding MAP array;
[0155] An information bit generation module is used to obtain hidden information and generate hidden information bits, and merge the MAP array with the hidden information bits to obtain information bits to be embedded;
[0156] a first information embedding module, configured to encrypt information bits to be embedded using an information embedding key K3, modify each pixel value of the image sub-block by shifting a 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 embed the encrypted information bits to be embedded in an inner region of the differential histogram;
[0157] The second information embedding module is configured to record the MAP array length L1 and the encrypted information bit length L2 to be embedded, embed the MAP array length L1 and the encrypted information bit length L2 to be embedded into the inner area of the differential histogram, and merge multiple image sub-blocks in which information embedding has been completed to obtain a final R component image EIR;
[0158] 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 hidden information.
[0159] Example 6: Based on the above-mentioned Example 3, the embodiment of the present invention further provides a reversible information hiding device for electronic receipt images based on stream encryption, which is applied to image users and includes:
[0160] The third channel separation module is used to perform channel separation on the ciphertext image MI to obtain component images MIR, component images MIG and component images MIB;
[0161] 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 inputs the decryption key K2 into the pseudo-random function F(K2) to generate the decryption pseudo-random key seed sd2;
[0162] The second image division module is used to divide the component image MIR into N non-overlapping image sub-blocks, and perform inter-block inverse 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 using the first decryption random key stream, including:
[0163] use R i (1≤i≤N) represents the first decryption random key stream, and let is the jth pixel in the i-th image sub-block in the component image MIR image, and the pixels in each image sub-block are decrypted using the first decryption random key stream:
[0164]
[0165] in, Represents a bitwise exclusive OR operation, Indicates the pixel corresponding to the directly decrypted image; the decrypted image sub-block is merged into the original red channel component IR;
[0166] A second decryption module is used to 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;
[0167] 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 a directly decrypted image .
[0168] In addition, the image restoration module of the embodiment of the present invention is used to improve the generative adversarial network structure to obtain an improved generative adversarial network, and to directly decrypt the image based on the trained improved generative adversarial network. The image is accurately restored to obtain a clear original electronic receipt image. The specific working principle of the image restoration module is implemented by referring to the image restoration operation process in the above embodiment 3, and the embodiment of the present invention will not be repeated here.
[0169] Example 7: Based on Examples 1-6 above, this embodiment of the present invention comprehensively designs an optimized En-RDH algorithm for reversible information hiding in ciphertext images. Based on the En-RDH algorithm, an En-RDH model can be constructed. This model, without requiring any preprocessing, is a reversible ciphertext-domain RDH model that accurately extracts embedded information and losslessly restores the carrier image. Furthermore, the information extraction and image decryption operations of the En-RDH model are separable, resulting in excellent security, practicality, and scalability. However, to ensure high fidelity of the decrypted image, En-RDH embeds information only in the R channel component, which is insensitive to the human visual system. The three color channels of color images are not fully utilized, and the system embedding efficiency still has room for improvement. The model scheme is applied to the R channel of color images for reversible information hiding. Therefore, based on the En-RDH model, a stream encryption-based reversible information hiding system for electronic receipt images can be designed to achieve reversible information hiding in the ciphertext domain of color images, making the En-RDH model more widely applicable in practical applications. The reversible information hiding system for electronic receipt images based on stream encryption involves three participants: the image owner, the data hider, and the image user. In practical applications, these three participants are often three different users. Therefore, the design of the En-RDH model focuses on user privacy protection. The image owner preprocesses the original image using an improved chaotic encryption algorithm to ensure basic privacy security. The data hider implements reversible information embedding based on compressed sensing within the encrypted domain to support various business needs. Finally, the image user achieves differentiated data access through a hierarchical key system. The general process of reversible information hiding in the ciphertext domain shows that image transmission between participants and all processing other than that by the owner are completed in an encrypted state. Therefore, reversible information hiding in the ciphertext domain can indeed provide good privacy protection for users.
[0170] In the embodiment of the present invention, a complete En-RDH model design includes five main functional modules, namely image encryption module, information embedding module, image decryption module, information extraction module and image restoration module. Figure 1In this process, the image owner first encrypts the original carrier image using encryption keys K1 and K2. The encrypted image is then transmitted to the data hider via an open channel. The data hider then embeds the hidden information using the information embedding key K3 without decrypting the image. Depending on the intended use and application scenario, the data embedder can embed information such as copyright information or classification information to manage and protect the image, or directly embed a hidden message for secret communication. Upon receiving the encrypted image containing the hidden information, the legitimate image user can perform different operations. If the image user obtains the legitimate decryption keys K1 and K2 from the image owner, they can obtain a directly decrypted image with high fidelity. If the image user obtains the legitimate information extraction key K3 from the data hider, they can fully extract the hidden information from the image. If the image user possesses both the decryption keys K1 and K2 and the information extraction key K3, they can effectively and losslessly restore the original carrier image. These three operations can be applied to different roles and practical scenarios.
[0171] The En-RDH algorithm uses key-controlled sub-block stream encryption and block scrambling technology to achieve information hiding in the ciphertext domain through differential histogram shift while retaining the statistical characteristics of the image. Through analysis of effectiveness, security, accuracy and complexity, and comparison with simulation experiments and ablation experiments of various mainstream algorithms of the same type, it is shown that the algorithm achieves a PSNR of 49.58dB in 4×4 block mode, which is 5.68dB higher than that of similar algorithms, significantly improving the quality of the encrypted image. The algorithm is particularly suitable for R channel information hiding in color images and has a wide range of engineering application value. The research results will provide security support for scenarios such as electronic management of financial bills, cloud storage of medical images, and encrypted data transmission. In the present invention, the reversible information hiding technology in the ciphertext domain performs reversible information hiding in the encrypted image, thereby realizing the management of the encrypted image.
[0172] Specifically, in the encryption algorithm, the En-RDH model uses a specific stream encryption method to divide the secret image into multiple sub-blocks. Each sub-block is encrypted using the same key stream bytes, preserving the majority of the correlation between pixels within each small block. The encryption key is then used to scramble the order of all stream-encrypted sub-blocks. Feature analysis demonstrates that this encryption algorithm can retain most of the statistical features of the plaintext image. In the embedding and extraction algorithm, a reversible information hiding algorithm based on DHS is employed. By decomposing the R, G, and B color channels of the encrypted image, the original order of each sub-block is restored, and the pixels within each sub-block are decrypted. The algorithm can reversibly extract information and restore the image, and the stored image exhibits low distortion. Due to the low distortion of the embedding algorithm, directly decrypting the encrypted image containing the hidden information can also obtain a high-fidelity carrier image. The En-RDH model design achieves reversible recovery and separability of operations. Through analysis of effectiveness, security, accuracy and complexity, and comparison with simulation experiments and ablation experiments of various similar mainstream algorithms, it is verified that the En-RDH algorithm proposed in the present invention has good performance, and the 4×4 block mode used by the model has a high embedding capacity while 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 high. Under the same hiding capacity, the quality of the encrypted image is higher. The security and effectiveness of the algorithm are proved by experimental test results. The model of the present invention has good robust performance and can resist noise attacks. In response to the noise generated in image processing, the present invention achieves better image restoration effects by changing the number of residual modules in the network through the optimized structure of the generative adversarial network.
[0173] The En-RDH model's encryption process boasts a sufficiently large key space to prevent exhaustive attacks, while maintaining excellent encryption performance and effectively protecting user privacy. Experimental testing demonstrates that the 4×4 block pattern employed by the system achieves high embedding capacity while ensuring security. System performance analysis demonstrates that the En-RDH model possesses satisfactory embedding capacity and high visual quality when directly decrypting images. From a computational complexity perspective, the system exhibits low overall computational cost.
[0174] 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 it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to 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 image owners, characterized in that: The method comprises: Perform channel separation on the original electronic receipt image to obtain the original red channel component IR, the original green channel component IG and the original blue channel component IB; 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 encryption pseudo-random seed sd1; The original red channel component IR is divided into 4×4 non-overlapping image sub-blocks, each image sub-block is stream-byte encrypted using the first encrypted random key stream, and the encrypted pseudo-random seed sd1 is used to block-scramble the order of the stream-byte encrypted image sub-blocks 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 simultaneously perform stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain an encrypted green channel component IG and an 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 merged to obtain the ciphertext image EI.
2. The method for reversible information hiding in electronic receipt images based on stream encryption according to claim 1 is characterized in that: The method comprises: 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 R component image EIR is divided into multiple image sub-blocks, and each image sub-block is traversed to perform overflow processing on the saturated pixels with the pixel value of 0 or 255 in the image sub-block and generate the corresponding MAP array; Obtain 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 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, while embedding the encrypted information bits to be embedded in the inner area of the differential histogram; Record the MAP array length L1 and the encrypted information bit length L2 to be embedded, embed the MAP array length L1 and the encrypted information bit length L2 to be embedded into the inner area of the differential histogram, merge multiple image sub-blocks with completed information embedding, and obtain the final R component image EIR; The final R component image EIR is merged with the G component image EIG and the B component image EIB to obtain the ciphertext image MI containing hidden information.
3. A reversible information hiding method for electronic receipt images based on stream encryption, applied to image users, characterized in that: The method comprises: Perform channel separation on the ciphertext image MI to obtain component image MIR, component image MIG and component image MIB; Obtain decryption key K1 and decryption key K2, input 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 input decryption key K2 into a 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, perform inter-block inverse permutation on the image sub-blocks according to the decryption pseudo-random key seed sd2 generated by the decryption key K2, and obtain the image sub-blocks in the original arrangement order; Decrypting each image sub-block using a first decryption random key stream includes: use R i (1≤i≤N) represents the first decryption random key stream, and let is the jth pixel in the i-th image sub-block in the component image MIR image, and the pixels in each image sub-block are decrypted using the first decryption random key stream: in, Represents a bitwise exclusive OR operation, Indicates the pixel corresponding to the directly decrypted image; the decrypted image sub-block is merged into the original red channel component IR; The second decryption random key stream and the third decryption random key stream are used 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 direct decrypted image .
4. The method for reversible information hiding in electronic receipt images based on stream encryption according to claim 3 is characterized in that: Also includes: Extracting the encrypted MAP array length L1 and the encrypted information bit length L2 to be embedded from the inner area of the differential histogram of the plurality of image sub-blocks; Extracting encrypted information bits to be embedded of corresponding lengths from inner regions of the differential histograms of the plurality of image sub-blocks based on the MAP array length L1 and the encrypted information bits to be embedded length L2; Obtaining the information extraction key K3, and decrypting the encrypted information bits to be embedded using the information extraction key K3 to obtain the information bits to be embedded; The embedded information bits are split to obtain hidden information bits and a MAP array, and the hidden information bits are converted into corresponding hidden information.
5. The method for reversible information hiding in electronic receipt images based on stream encryption according to claim 4 is characterized in that: Also includes: The difference histogram of the moving image sub-block is used to repair the pixel value of the image sub-block; The MAP array is used to restore the saturated pixels of the image sub-blocks after the pixel values are repaired, and the image sub-blocks with restored saturated pixels are merged to obtain the restored image in the encrypted state.
6. The method for reversible information hiding in electronic receipt images based on stream encryption according to claim 3 is characterized in that: Also includes: The generative adversarial network structure is improved to obtain an improved generative adversarial network; the generative adversarial network includes a generator G and a discriminator D; wherein the generator G includes 3 convolution modules, 12 residual modules and 2 deconvolution modules; Based on the real image data x, the improved generative adversarial network is trained until the confidence of the discriminator D in the generated data G(z) output by the generator G is consistent with the confidence of the real image data x, and a trained improved generative adversarial network model is obtained; Use the trained improved generative adversarial network model to directly decrypt the image Perform accurate image restoration to obtain a clear original electronic receipt image.
7. The method for reversible information hiding in electronic receipt images based on stream encryption according to claim 6 is characterized in that: The improved generative adversarial network structure is improved to obtain an improved generative adversarial network, including: A set of first convolutional layers, normalization layers, and activation layers are added 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 first convolutional layer consists of a set of 3×3 convolution kernels; A set of second convolutional layers, normalization layers, and activation layers are added after the second hierarchical structure of the discriminator D, so that the output size of the discriminator network remains at 32×32; the second convolutional layer consists of a set of 4×4 convolution kernels.
8. A device for reversible information hiding of an electronic receipt image based on stream encryption, implemented by the method for reversible information hiding of an electronic receipt image based on stream encryption according to claim 1, applied to an image owner, characterized in that: include: The first channel separation module is used to perform channel separation on the original electronic receipt image to obtain an original red channel component IR, an original green channel component IG, and an original blue channel component IB; A first key stream generation module is configured to input 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 input the encryption key K2 into a pseudo-random function F(K2) to generate an encryption pseudo-random seed sd1; A first stream encryption module is used to divide the original red channel component IR into 4×4 non-overlapping image sub-blocks, perform stream byte encryption on each image sub-block using a first encrypted random key stream, and perform block scrambling on the arrangement order of the stream byte encrypted image sub-blocks using an encrypted pseudo-random seed sd1 to obtain an encrypted red channel component IR; A 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 simultaneously perform stream byte encryption on the original blue channel component IB using the third encrypted random key stream to obtain an encrypted green channel component IG and an 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. The reversible information hiding device for electronic receipt images based on stream encryption according to claim 8 is characterized in that: The device comprises: The second channel separation module is used to perform channel separation on the ciphertext image EI to obtain an R component image EIR, a G component image EIG and a B component image EIB; The first image segmentation module is used to divide the R component image EIR into blocks to obtain multiple image sub-blocks, and traverse each image sub-block to perform overflow processing on saturated pixels with a pixel value of 0 or 255 in the image sub-block and generate a corresponding MAP array; An information bit generation module is used to obtain hidden information and generate hidden information bits, and merge the MAP array with the hidden information bits to obtain information bits to be embedded; a first information embedding module, configured to encrypt information bits to be embedded using an information embedding key K3, modify each pixel value of the image sub-block by shifting a 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 embed the encrypted information bits to be embedded in an inner region of the differential histogram; The second information embedding module is configured to record the MAP array length L1 and the encrypted information bit length L2 to be embedded, embed the MAP array length L1 and the encrypted information bit length L2 to be embedded into the inner area of the differential histogram, and merge multiple image sub-blocks in which information embedding has been completed to obtain a 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 hidden information.
10. A device for reversible information hiding of an electronic receipt image based on stream encryption, implemented by the method for reversible information hiding of an electronic receipt image based on stream encryption according to any one of claims 3 to 7, applied to an image user, characterized in that: include: The third channel separation module is used to perform channel separation on the ciphertext image MI to obtain component images MIR, component images MIG and component images 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 inputs the decryption key K2 into the pseudo-random function F(K2) to generate the decryption pseudo-random key seed sd2; The second image division module is used to divide the component image MIR into N non-overlapping image sub-blocks, and use the decryption pseudo-random key seed sd2 to perform inter-block inverse permutation on the image sub-blocks to obtain the image sub-blocks in the original arrangement order; A first decryption module, configured to decrypt each image sub-block using a first decryption random key stream, comprising: use R i (1≤i≤N) represents the first decryption random key stream, and let is the jth pixel in the i-th image sub-block in the component image MIR image, and the pixels in each image sub-block are decrypted using the first decryption random key stream: in, Represents a bitwise exclusive OR operation, Indicates the pixel corresponding to the directly decrypted image; the decrypted image sub-block is merged into the original red channel component IR; A second decryption module is used to 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; 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 a directly decrypted image .
Citation Information
Patent Citations
Single channel color image encryption method based on GT conversion and chaos
CN103761703A
Color image encryption method based on finger vein secret key and off-axis digital holography
CN119484724A