An adaptive image steganographic sending and receiving method
By performing adaptive processing such as image augmentation, segmentation, scrambling, and cropping, the problem of input and output size limitations in image steganography models is solved, and high-quality image steganography transmission is achieved.
Patent Information
- Application Number
- CN202211339945.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-10-27
AI Technical Summary
Existing image steganography models suffer from poor practicality and low quality of steganographic images due to limitations in input and output size, making them unable to effectively transmit normal-sized photos.
Before steganography, the image is expanded and adjusted to match the model input size, and then segmented and randomly scrambled. It is then processed in the steganography model, and finally merged and cropped. The key is transmitted using public key encryption.
This improves the practicality and generalization ability of image steganography models, ensures security and invisibility, and avoids the problem of poor steganography quality caused by image size mismatch.
Smart Images

Figure CN116055648B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an adaptive image steganography transmission and reception method, belonging to the field of image steganography technology. Background Technology
[0002] In recent years, with the rapid development of the mobile internet, information exchange between people has become increasingly convenient and frequent. At the same time, a large amount of private data is transmitted on transparent internet platforms, facing the risk of being stolen and tampered with by criminals. While cryptography can encrypt private information to some extent to prevent third-party attacks, the encrypted information can still be detected and decrypted by third parties. Now, there is a method called steganography that can hide this private information as ordinary information, making it difficult to detect and suspect, directly reducing the probability of attack and thus enabling secret communication. This technology is now mainly used for national information security and has significant value in the field of military communications. In the context of the internet today, a large amount of digital images, audio, video, and other multimedia information is generated. Steganography embeds this secret information into multimedia carriers that are difficult for others to suspect, completing secret communication. Similar to digital watermarking technology, since a large amount of multimedia data is easily copied and disseminated on the internet, this undoubtedly causes losses to the creators' interests. Digital watermarking technology can embed copyright and ownership information into the data. This can effectively reduce piracy and abuse, protecting the legitimate rights and interests of the original author. The difference between these two technologies is that steganography places greater emphasis on confidentiality. Choosing multimedia data as a carrier can also ensure that the embedded information is not detected by third parties as much as possible, while digital watermarking focuses more on protecting multimedia data and tracking its owner through the watermark. Traditional steganography mainly modifies some bits on the image carrier based on the spatial and transform domains and embeds information into these bits. The design of mutation and distortion functions requires designers to have a deep understanding of image steganography. However, due to their targeted design, these methods often only work better for certain types of images, while in other cases, the steganography effect is greatly reduced. Corresponding to steganography, there is also steganalysis, which is responsible for detecting whether there is hidden information in the image, thereby cracking the steganography; the two have always been in conflict.
[0003] Inspired by the encoding and decoding architecture of traditional steganography algorithms, convolutional neural networks have been applied to image steganography. Its basic principle is to fuse secret information with a carrier image. The embedding of secret information is achieved by adjusting the parameters of the convolutional kernel, activation function, and loss function. The secret information is resized to the same size as the image and merged, thus distributing the secret information across every pixel of the image. Steganography is an extensively researched subject aimed at hiding messages such as audio, images, and hyperlinks in a difficult-to-discover location. Image steganography takes the secret and carrier image as input to produce a steganographic image. In the reverse process, only the receiver with an extraction network can reconstruct the secret information from the steganographic image, visually identical to the carrier image. Steganographic analysis techniques typically distinguish the carrier and steganographic images by color, frequency, and other features. Therefore, the secret image should be hidden in the invisible domain of the carrier image. In applications, embedding as much confidential data as possible into the carrier image is also valuable and evaluated as payload capacity. Image steganography aims to maintain concealment while considering security and non-identifiability to steganalysis. Existing steganography schemes cannot strike a balance between ignorance and high payload capacity. Traditional steganography methods hide secret information in the spatial and frequency domains, achieving a capacity of 0.2-0.21 bits per pixel (BPP). However, the secret data is usually embedded in parts with little meaning or that are indistinguishable, thus limiting the amount of secret information that can be conveyed.
[0004] Deep learning-based steganography leverages the latent capabilities of images by treating preprocessing, hiding, and revealing as separate modules and designing networks with independent parameters for these modules. Recent attempts have introduced invertible neural networks into low-level inverse problems such as denoising, recreding, and colorization, showing impressive potential in autoencoder GANs and other learning-based architectures. Image steganography, consisting of the hiding and revealing processes, can be viewed as a pair of inverse problems. Furthermore, by increasing the number of channels in an image, multiple secret images can be easily hidden in a single container. This allows steganography models to improve their steganographic capabilities, making Unet the state-of-the-art image hiding technique among many deep learning models. While deep learning-based image steganography models achieve excellent hiding results, most require a fixed kernel size, which in turn necessitates that the input and output images be fixed as squares.
[0005] Therefore, the steganography process of current deep neural network steganography models is as follows: Figure 2 As shown, due to the size limitations of the input and output of the steganography model, many normal-sized photos cannot be transmitted through the steganography network. Even if some can be steganized, the size and quality of the images output by the model are far inferior to the original images. Summary of the Invention
[0006] The purpose of this invention is to provide an adaptive image steganography sending and receiving method to solve the problems of poor practicality and low quality of steganographic images caused by the limitation of the input size of the image steganography model in the current image steganography process.
[0007] To solve the above-mentioned technical problems, this invention provides an adaptive image steganography transmission method, which includes the following steps:
[0008] 1) Obtain the trained image steganalysis model and the size of the input image for the image steganalysis model;
[0009] 2) Obtain the image to be steganized and the carrier image. Expand and adjust the image to be steganized and the carrier image according to the input image size of the image steganography model so that the size of the image to be steganized and the carrier image meets the input image size requirements of the image steganography model.
[0010] 3) The expanded and adjusted image to be steganized and the carrier image are segmented separately, and the order of the segmented images to be steganized is randomly shuffled.
[0011] 4) The scrambled images to be steganized and the normally ordered carrier images are fed into the trained image steganography model for steganography processing;
[0012] 5) After stitching the steganographically processed images together in the normal order, the steganographically processed image is obtained. The cropped steganographically processed image and the key for random scrambling are then sent to the recipient.
[0013] Before using a steganography model, this invention first expands the image to be steganized (the secret image) and the carrier image according to the input size of the steganography model. This completes the carrier image and the secret image into squares with the same size as the input of the image steganography model, and fills the excess parts with a solid color. Then, the images are segmented and scrambled before being input into the steganography model for processing. Finally, the outputs of the steganography model are merged, and the excess parts are cropped. Therefore, the steganography model of this invention can support images of various sizes, ensuring the security and invisibility of the image steganography model while improving its practicality and generalization ability; it also avoids the problem of poor steganographic image quality due to image size mismatch.
[0014] Furthermore, in step 2), the actual length H after expansion is determined based on the required image size H and W to be expanded and the input image size L of the image steganography model. A for:
[0015] H A =l+max{H,W}
[0016]
[0017] Or the actual length H A for:
[0018] H A =w+min{H,W}
[0019]
[0020] in This indicates the floor function.
[0021] This invention uses the input size of the image steganography model and the size of the image to be expanded to determine the actual length after expansion. This method is simple, and the determined actual length is closest to the requirements of the steganography model.
[0022] Furthermore, in step 2), during the expansion process, the original image to be expanded is centered and then expanded according to the actual length H. A Expand; during step 5), determine the lengths for top, bottom, left, and right cutting based on the actual length during expansion, and then perform top, bottom, left, and right cutting accordingly.
[0023] This invention uses a centered approach for expansion, which can prevent the original image to be steganographically attached to the edge from causing distortion and improve the steganography quality of the model.
[0024] Furthermore, when inputting the scrambled images to be steganized into the image steganalysis model, the images are input into the image steganalysis model sequentially according to the scrambling order, or the images to be steganized are stitched together into a four-dimensional tensor according to the scrambling order before being input into the image steganalysis model.
[0025] This invention can select the appropriate input method according to the actual situation of the image steganography model, further improving the practicality and flexibility of the steganography model.
[0026] Furthermore, in step 5), the key is sent to the recipient using public-key encryption.
[0027] This invention uses public-key encryption to transmit the key, which is highly secure and difficult to crack, thus improving the security of graphic steganography.
[0028] Furthermore, the formula used to calculate the number of parts in step 3) is:
[0029]
[0030] Where N is the number of parts to be divided.
[0031] The present invention also provides an adaptive image steganography receiving method, which includes the following steps:
[0032] 1) Obtain the key for the encrypted image and the random scrambling operation, and then expand the encrypted image;
[0033] 2) The augmented secret image is segmented to obtain each secret image, and then input into the image steganography model for extraction to obtain each secret image;
[0034] 3) Use the key of the random scrambling operation to restore the order of each secret image, and then stitch the restored secret images together.
[0035] 4) Crop the spliced secret image.
[0036] After acquiring the steganographic image, this invention first expands the image according to the input size of the image steganography model, filling the excess parts with a solid color. Then, it segments the image and inputs the segments into the extraction network of the steganography model for extraction, obtaining individual steganographic images. The order of these images is then restored based on the key used during the scrambling operation. Finally, the restored images are merged, and excess parts are cropped to obtain the final steganographic image. Therefore, the image steganography model of this invention can support images of various sizes, ensuring the security and invisibility of the steganography model while improving its practicality and generalization ability. Furthermore, it avoids the problem of poor steganographic image quality due to image size mismatch.
[0037] Furthermore, in step 2), the expansion determines the actual length H after expansion based on the required image sizes H and W to be expanded and the input image size L of the image steganography model. A for:
[0038] H A =l+max{H,W}
[0039]
[0040] Or the actual length H A for:
[0041] H A =w+min{H,W}
[0042]
[0043] in This indicates the floor function.
[0044] This invention uses the input size of the image steganography model and the size of the image to be expanded to determine the actual length after expansion. This method is simple, and the determined actual length is closest to the requirements of the steganography model.
[0045] Furthermore, in step 1), during the expansion process, the original image to be expanded is centered and then expanded according to the actual length H. A Expand; during step 4), determine the lengths for top, bottom, left, and right cutting based on the actual length during expansion, and then perform top, bottom, left, and right cutting accordingly.
[0046] This invention uses a centered approach for expansion, which can prevent the original image to be steganographically attached to the edge from causing distortion and improve the steganography quality of the model.
[0047] Further, in step 1), the private key corresponding to the encryption public key is used to decrypt the key to obtain the key for the random scrambling operation. Attached Figure Description
[0048] Figure 1 This is a flowchart of the adaptive image steganography model technology in the embodiments of the present invention;
[0049] Figure 2 This is a schematic diagram illustrating the working process of the general image steganalysis neural network model in the embodiments of the present invention;
[0050] Figure 3 A schematic diagram of the general image steganalysis neural network model technology;
[0051] Figure 4 This is an example of the application of the adaptive image steganography transmission method of the present invention in various network carrier images and secret images;
[0052] Figure 5 This is a schematic diagram of public key encryption applied in key transmission in an embodiment of the adaptive image steganography transmission method of the present invention;
[0053] Figure 6 This is a schematic diagram illustrating the effect of the method applied to the Baluja image steganography network in an embodiment of the present invention;
[0054] Figure 7 This is a schematic diagram illustrating the effect of the Swin_Unet image steganography network applied in an embodiment of the method of the present invention;
[0055] Figure 8 This is a schematic diagram illustrating the effect of the method applied to the DIGDH image steganography network in an embodiment of the present invention. Detailed Implementation
[0056] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0057] The adaptive image steganography method of the present invention includes a sending process and a receiving process, such as... Figure 1 and Figure 3 As shown. During transmission, the carrier image and secret image of arbitrary size are compared with the input image size of the steganography model. The carrier image and secret image are padded into a square, and the excess parts are filled with a solid color. Then, they are divided into several sizes and sequentially put into the steganography model. Finally, the output images are merged, and the excess parts are cropped. Then, the image is transmitted through a public channel. During reception, the same process of expansion and segmentation is performed. After segmentation, the secret image is extracted by the steganography model and stitched together according to the restored order to obtain the secret image. Appropriate cropping is then performed to obtain the final result. Therefore, this invention can increase the practicality and generalization ability of the image steganography model while ensuring the security and invisibility of the model.
[0058] Implementation examples of adaptive image steganography transmission methods:
[0059] The sending method of the present invention is completed at the sender, and will be described in detail below with reference to specific examples.
[0060] 1. Obtain the trained image steganography model, the image size of the image steganography model, and the steganography mode.
[0061] The image steganalysis model obtained in this invention is a deep neural network steganalysis model, including a HidingNet and an ExtractionNet. The HidingNet consists of 7 convolutional layers, 6 ReLU activation layers, and 6 Batch Normalization (BN) layers. It includes 4 upsampling layers and 3 downsampling layers. The HidingNet structure is shown in Table 1.
[0062] Table 1
[0063]
[0064] The extraction network still consists of several convolutional layers, all of which are downsampling modules. Five of these layers have Batch Normalization (BN) layers and ReLU activation layers. Its specific structure is shown in Table 2.
[0065] Table 2
[0066]
[0067] The sender needs to train the constructed steganography model. The training parameters and environment configuration in this embodiment are as follows: DataSet: ImageNet; BatchSize: 32; ImageSize: 256; Epoch: 200; Learning rate: 0.001; CUDA: cuda0; Operating system: Ubuntu 18.04; Python version: 3.7; Torch version: 1.14; Cudann version: 11.0.
[0068] The sender obtains the ImageSize of the steganography model, as well as the steganography mode, such as whether it is one image hiding one image, one image hiding multiple images, or multiple images hiding one image.
[0069] 2) Obtain the image to be steganized and the carrier image, and adjust the carrier image and the steganographic image according to the image size of the steganography model.
[0070] The adjustment process for both the carrier image and the image to be steganized is the same. Here, we will use the adjustment process for the image to be steganized (i.e., the secret image) as an example. The sender obtains the size of the image to be steganized, and then performs a modulo operation with the ImageSize of the steganography model. Let ImageSize be L, and the size of the image to be steganized be H and W. Then the required extension length l is the remainder when the maximum value of L minus H and W is taken and L is subtracted from L. This can be expressed by the following formula:
[0071]
[0072] The required width expansion is w, which is the length to be expanded plus H, the maximum value of W, and the minimum value of H and W. This can be expressed by the following formula:
[0073]
[0074] So the actual length H after expansion A for:
[0075] H A =l+max{H,W} (3)
[0076] It can also be expressed as:
[0077] H A =w+min{H,W} (4)
[0078] The above formula is used to determine the required width and length expansion, which are multiples of imageSize. This also ensures a 1:1 ratio after expansion, facilitating the next step of inserting the images into the steganography model for steganography. It also makes it easier to stitch together the images output by the model and crop them back to the original image.
[0079] To prevent distortion caused by the original image being too close to the edges, it needs to be displayed in the center. This is achieved by extending OpenCV, first by creating an H... A The image is a square with sides of a certain length. The original image to be steganized is then centered and filled into the newly created image. The carrier image can be expanded in the same way. The carrier image and the secret image obtained in this embodiment are as follows: Figure 4 As shown.
[0080] 3. Segment and randomly shuffle the expanded and adjusted image.
[0081] Both the carrier image and the image to be steganized need to be segmented separately. The segmentation process for both is similar, and this embodiment will use the image to be steganized as an example. First, it is necessary to determine the number of segments the image to be steganized needs to be divided into. To prevent errors in the calculation process, the original data will still be used for calculation. Assuming that the image to be steganized is divided into N parts, then N can be expressed by the formula:
[0082]
[0083] Then, OpenCV is used to segment the augmented image, resulting in N segmented images, including N secret images and N carrier images.
[0084] The N segments of the secret image are scrambled using the Knuth random scrambling algorithm. Let the order of the N secret images be S. r Given the sequence {1, 2, 3, ..., n} and the key sercet, the scrambled sequence S is... f Expressed using a formula:
[0085] S f =KnuthEncoder(sercet,S r {1,2,3,...,n}) (6)
[0086] 4. The scrambled secret image and the normally ordered carrier image are fed into the trained image steganography model for steganography processing to obtain the secret image.
[0087] After scrambling, the secret image and the carrier image in normal order are sequentially fed into the model (if the model supports batch processing, they can be stitched together into a four-dimensional tensor according to the scrambling order and directly fed into the model to retrieve the result). Then, the images are stitched together according to the restored order. Since these operations are still performed on the sender, the calculation results of formulas (3) and (5) can be directly used. OpenCV is used to create a new image with a side length of H. A The square image is then restored to its original order. Following the calculation results of formula (5), the square root of N is taken to obtain the value of each row and column. Paste the images one by one into the original image.
[0088] In this embodiment, the sender calls the model API to hide the image in the adaptive image steganography model technology. The adaptive image steganography model technology is integrated into a Python package. The image_grad.py package is simply imported when performing steganography. In actual use, the imagegrad.Hidingprocess() method is called and the model and other relevant parameters are input to perform steganography. The method is simple and convenient.
[0089] 5. The obtained encrypted image is cropped and then transmitted.
[0090] Since the image directly stitched in step 4 still has solid color edges, these edges need to be cropped. This requires calculating the cropping lengths on the top, bottom, left, and right sides. Because the expansion is centered, the cropping must also correspond accordingly. Let the width to be cropped on the left and right be W. crop The width of the top and bottom cuts is H. crop This can be expressed by the formula:
[0091]
[0092] The cropped image is transmitted via a public channel, along with a key generated by the Knuth random scrambling algorithm. To prevent the image from being intercepted and decrypted midway, this invention encrypts the key before transmission. In this embodiment, public-key encryption is used to encrypt the key, and the implementation process is as follows: Figure 5 As shown, both the sender and receiver use a public-key encryption algorithm to generate their own public and private keys. The sender publishes the public key and keeps the private key private. The sender uses the receiver's public key to encrypt the key and transmits it through a public channel. After receiving the key, the receiver decrypts it using their own private key to obtain the key.
[0093] Through the above process, the sender can complete adaptive image steganography transmission, hiding the secret image within the carrier image before sending it out.
[0094] Example of an adaptive image steganography receiving method:
[0095] After receiving the coded image sent according to the adaptive image steganography transmission method embodiment, the receiver expands, segments, and extracts the image, restores the order of the extracted images using a key, and then splices them together to obtain the secret image. This process is described in detail below.
[0096] 1. Expand the received encrypted image.
[0097] After the receiver receives the image, it still needs to be expanded because the steganography model has requirements on the image input size. After expansion, it can refer to step 2 in the embodiment of the adaptive image steganography transmission method and directly use the results of formula (1) and formula (2) to expand in the center. It will not be described in detail here.
[0098] 2. Perform segmentation and extraction processing on the expanded image.
[0099] The expanded image is segmented. Here, the result of formula (5) in the embodiment of the adaptive image steganography transmission method can still be used directly. The operation process is basically the same as step 3. After segmentation, the images are sequentially sent to the extraction network in the steganography model for extraction to obtain each secret image.
[0100] 3. Restore the order of the secret images and stitch them together.
[0101] After obtaining the output of the extraction model in the previous step, the key is first used to restore the order of the secret image. Let the final restored order be S. l This can be expressed by the formula:
[0102] S l =KnuthDecoder(sercet,S f {...}) (9)
[0103] The restored secret images are stitched together sequentially. Here, we still directly use the calculation results of formula (3) and formula (5) to create a new image with a side length of H using OpenCV. A The square image is then restored to its original order. Following the calculation results of formula (5), the square root of N is taken to obtain the value of each row and column. Each image is a square image of the secret image, pasted in its restored order. The decrypted carrier image does not need to be restored; it is directly stitched together in its original order, following a similar process to stitching the secret image.
[0104] 4. Crop the stitched image.
[0105] Since the result obtained in the previous step is the expanded result, it is necessary to crop the stitched image. The cropping method can also refer to the cropping method in step 5 of the previous embodiment. The revealed carrier image and the secret image are cropped to finally obtain the original secret image and carrier image.
[0106] This layered encryption method makes the hiding process more difficult to detect and crack. Even if a third-party attacker knows that the image contains secret information, they cannot extract the secret information through technical means. The reason why the image is not transmitted using public key encryption is that using public key encryption would make attackers clearly feel that the image contains secret information (not because of the image's inherent steganography capabilities, but because of the encryption method used, which makes people feel that there must be secret information hidden in it). Therefore, this invention does not use public key encryption for the image.
[0107] This invention used three different steganography models for effect experiments, and tested them on Balujia, Swin_Unet, and DIGDH steganography networks, respectively. The effects were respectively... Figure 6 , Figure 7 , Figure 8 The results show that this method is applicable not only to vertical charts but also to horizontal charts, and performs well in all three models.
Claims
1. A method for adaptive image steganographic transmission, characterized in that, The method comprises the following steps: 1) obtaining a trained image steganography model and an input image size required by the image steganography model; the input image required by the image steganography model is square, and the size is the side length of the square; 2) obtaining an image to be steganographed and a carrier image, and expanding and adjusting the image to be steganographed and the carrier image according to the input image size of the image steganography model, so that the length and width of the image to be steganographed and the carrier image are equal, and are the minimum integral multiples of the input image size of the image steganography model; 3) respectively carrying out segmentation processing on the expanded and adjusted image needing steganography and the carrier image to obtain N images needing steganography and N carrier images, and performing random shuffling operation on the order of the segmented images needing steganography; , L is the input image size of the image steganography model, H A is the size of the expanded image needing steganography and the expanded carrier image. 4) inputting the scrambled image to be steganographed and the carrier image with normal order into the trained image steganography model for steganography processing; 5) obtaining a stego image by splicing the steganography-processed images in normal order, cutting the stego image in a manner corresponding to the expansion manner, and sending the cut image and the secret key of the random scrambling operation to a receiver.
2. The adaptive image steganographic transmission method of claim 1, wherein, The expansion adjustment in the step 2) is according to the image size to be expanded H , W The input image size of the image steganography model L Determining the length to be expanded l And the width to be expanded w : wherein denotes a floor operation.
3. The adaptive image steganographic transmission method of claim 2, wherein, The step 2) when performing the expansion, according to H A The step 5) when performing the cropping, the length of the upper and lower, left and right cropping is determined according to the actual length when the expansion is performed, and the upper, lower, left and right cropping is performed accordingly.
4. The adaptive image steganographic transmission method of claim 1 or 2, characterized in that, When the scrambled image to be steganographed is input into the image steganography model, the image steganography model is input in sequence according to the scrambling order, or the image to be steganographed is spliced into a four-dimensional tensor according to the scrambling order and then input into the image steganography model.
5. The adaptive image steganographic transmission method of claim 1 or 2, characterized in that, The step 5) sends the secret key to the receiver in a public key encryption manner.
6. An adaptive image steganographic receiving method, characterized by, The receiving method comprises the following steps: 1) obtaining a stego image and a secret key of a random scrambling operation, and expanding the stego image, so that the length and width of the stego image are equal, and are the minimum integral multiples of the input image size required by the image steganography model; the input image required by the image steganography model is square, and the size is the side length of the square; 2) the expanded steganographic image is segmented to obtain each steganographic image, which is input into the image steganography model to extract each secret image; , N the number of steganographic image segments, L the input image size of the image steganography model, H A the size of the expanded steganographic image; 3) restoring the order of the secret images by using the secret key of the random scrambling operation, and splicing the secret images with restored order; 4) cutting the spliced secret image in a manner corresponding to the expansion manner.
7. The adaptive image steganographic receiving method of claim 6, wherein, The expansion in the step 2) is according to the image size to be expanded H , W The input image size of the image steganography model L Determining the length to be expanded l And the width to be expanded w : wherein denotes a floor operation.
8. The adaptive image steganographic receiving method of claim 7, wherein, The step 1) when performing the expansion, according to H A The step 4) when performing the cropping, the length of the upper and lower, left and right cropping is determined according to the actual length when the expansion is performed, and the upper, lower, left and right cropping is performed accordingly.
9. The adaptive image steganographic receiving method of claim 6 or 7, characterized in that, The step 1) decrypts by using a private key corresponding to the encryption public key, to obtain the secret key of the random scrambling operation.
Citation Information
Patent Citations
Video image splitting encryption transmission method, device and system
CN110996132A
Information hiding image processing model construction method and device, terminal and medium
CN113542767A