Errorless robust JPEG steganography using steganographic polar codes

Recently, a robust steganographic algorithm that achieves errorless robustness against JPEG recompression has been proposed. The method employs a lattice embedding scheme and utilizes the syndrome-trellis code (STC) for practical embedding. However, we have noticed that errorless robust embedding with STC may encounter failures due to modifications on wet coefficients, especially when a high quality factor is used by the compression channel. To solve this problem, we have discovered that using steganographic polar code (SPC) for embedding has better performance in avoiding modifications on wet coefficients. In this paper, we conduct theoretical analysis to prove the better performance of SPC in wet paper embedding. We establish the condition of avoiding modifications on wet coefficients, followed by presenting a recursive calculation method for determining the distribution of columns in the generator matrix of SPC. The findings reveal that SPC can avoid modifications on wet coefficients under a larger number of wet coefficients compared with STC, and therefore we propose a better errorless robust embedding method employing SPC. The experimental results demonstrate that under close security performance, the proposed method achieves a higher success rate compared with embedding with STC. Specifically, when the quality factor of the compressor is 95 and the payload size is 0.4 bpnzac, our method achieves a success rate of 99.85%, surpassing the 91.95% success rate of the embedding with STC.


Introduction
Steganography means to modify multimedia files like images, audio, and videos without introducing apparent traces, and the information can be extracted from modified files.Steganalysis means to detect the traces that the steganographic algorithms have introduced.To improve the security performance of the most popular multimedia type, i.e., JPEG images, researchers have proposed some adaptive JPEG steganographic algorithms.Usually, adaptive steganography consists of a cost function and a steganographic code.The cost functions in the JPEG domain include J-UNIWARD [1], UED [2], UERD [3], and JMIPOD [4].In the past decade, most steganographic algorithms have adopted syndrome-trellis code (STC) [5] as the steganographic code.Until recently, steganographic polar code (SPC) [6] and its variant [7] have been proposed with a better performance compared with STC.
Nowadays, using social networks as channels for steganography can be more secure due to their multi-user interaction feature [8].However, social network channels can be lossy for JPEG compression is usually used to reduce bandwidth.Unfortunately, most adaptive steganographic methods assume that the transmission channel is errorless.For achieving robustness against compression, robust steganography has been proposed.In [9,10], robust steganographic methods that utilize techniques from watermarking to enhance robustness while ensuring the steganographic security have been proposed.In [11,12], the authors achieve robustness by generating intermediate stego images using accurate channel modeling or an auto-encoder, where the coefficients of stego images are restored after channel compression.In [13], the authors propose to repeatedly compress images to generate robust images that barely change after compression, and the cost function is modified in [14] to restore the robust domain formed by multiple compression.In [15], the authors improve robustness by embedding on channel-processed cover images and avoiding modifying coefficients that introduce compression errors.
Most robust steganographic algorithms rely on reducing the error rate of the recompressed stego image to improve the success rate of extraction.In practice, the uncertainty of successful extraction increases the difficulty of achieving covert communication.Robust steganography that ensures the receiver can correctly extract the secret message on the sender's side is very important.Recently, in [16], an errorless robust embedding is constructed by using a local JPEG compressor to obtain the behavior of the compressed DCT coefficients to select robust coefficients, and it uses a lattice embedding method to resolve the correlation between coefficients.Since the method sets the non-robust coefficients as wet coefficients, when steganographic codes are used, it is possible that embedding fails due to the modifications on wet coefficients.The method [16] uses STC for practical embedding and the results show it has the non-negligible possibility of changing wet coefficients, especially when the number of wet coefficients is high.Suppose to enhance the quality of channel images, social networks employ a high-quality factor valued at 95 for compression.In such scenarios, the failure rate for errorless robust steganography using STC embedding [16] is close to 8% when the payload size is 0.4 bpnzac.The performance inevitably diminishes the efficiency of steganographic communication in practical applications.Consequently, there is a demand for an errorless robust embedding method that performs better in avoiding wet coefficient modifications.Through our observation, the SPC embedding has better performance in wet paper embedding.Thus, in this paper, we propose an errorless embedding method using SPC for message embedding to improve the success rate.
In previous studies [5,6], the analysis of the performance of steganographic codes in wet paper embedding was mostly conducted through experiments rather than theoretical analyses.The main contributions of this paper are the theoretical analysis that proves the better performance of SPC in wet paper embedding and we proposing an errorless robust embedding method that improves the success rate.The analyzing process are as follows.Firstly, we prove the condition for avoiding wet coefficient modification in steganographic codes.Secondly, by analyzing the construction of the generator matrix of SPC, we deduce a recursive calculation method to compute the distribution of columns with different numbers of ones in the matrix.Then, we verify that the ability of SPC to avoid modifications in wet coefficients is better compared with STC.Without the obvious reduction in security performance, the proposed robust embedding method with SPC enhances the success embedding rate and enables errorless robust embedding in practical scenarios.
The rest of the paper is organized as follows.Section 2 gives the preliminaries of this paper, which include the STC and SPC embedding process, as well as a brief description of errorless robust embedding.In Section 3, the condition of avoiding wet coefficient modification is given, the better performance of SPC embedding is explained, and the proposed errorless embedding method is introduced.Section 4 presents the experimental results under different quality factors and JPEG compressors.Section 5 is the conclusion of this paper.

The optimal embedding
Suppose y and x are stego and cover images with the length n.In adaptive steganography, the distortion function measures the impact of embedding changes based on local characteristics of the image, such as texture and edges.Let ρ(y i ) represent the local distortion measure and indicate the cost of replacing pixel x i with y i .Under the additive distortion scenario where the local distortion of each changed pixel is independent, the distortion after embedding is: Set the possibility of changing x i to y i as π y i , the mes- sage m with length m.In binary embedding, the value of y i ∈ I i = {x i , xi }, xi � = x i .The PLS (payload limited sender) problem can be written as: When the optimization problem is solved by the maximum entropy principle, the optimal distribution π is (2) where ( > 0) is the parameter which can be solved by Eq. (3).

Errorless robust steganography
To ensure errorless robust embedding, robust steganography should preserve the coefficients of a stego image after compression.To achieve this goal, the method in [16] generates a robust set R with the output of the JPEG encoder.A coefficient in the robust set satisfies three requirements: (1) it does not change processed coefficients, (2) it preserves the modification, and (3) it preserves its value if there is no change.If a coefficient does not satisfy these requirements, it belongs to the nonrobust set with the cost of the modification as infinity, and the value after recompression is used as the embedding domain.Considering the influence of different modifications in the same DCT block, the method divides an image into 64 lattices by the mode in a DCT block.After calculating costs for all coefficients, the method calculates using Eq. ( 3).The payload in each lattice can be calculated with and the costs of coefficients in the lattice.The cost calculation and embedding are then performed sequentially in each lattice.

STC and SPC embedding
STC uses the standard trellis representation of convolutional codes to embed messages.In STC, the parity-check matrix H ∈ {0, 1} m×n of length n and codimension m is obtained by placing a small submatrix Ĥ of size h × w as in Fig. 1, where h is called constraint heights, and w is equal to ⌊n/m⌋ , where ⌊•⌋ is the floor function.Each z ∈ {0, 1} n satisfying Hz = m is represented as a path in the syndrome trellis.In the forward Viterbi algorithm, (4) , 1 ≤ i ≤ n, the path with the smaller cost is chosen, and in the backward Viterbi algorithm, the stego image is obtained.
A polar code is specified by The successive cancelation (SC) decoder is the inherent decoder for polar codes.For a binary channel W, suppose that the received word is r .Given frozen bits u A c and the estimated u i−1 1 , the successive cancelation decoder estimates u i by computing Log-likelihood Ratio (LLR) as The value of u i can be determined by where 1 can be calculated using the following recursive formula: where , and g(θ , ω, u) (−1) u θ + ω , and u o and u e are subvectors with odd and even indices of u respectively.The initial log-likelihood ratio L (1)  1 The structure of the STC parity-check matrix is a greedy search on a code tree.In contrast, the successive cancelation list (SCL) decoder with list size l can be seen as a breadth-first tree search that preserves the top l paths for decoding.The path with the maximum metric is selected from these l candidates after decoding all the codes.Notably, the SCL decoder reduces to the SC decoder when l = 1.
In steganographic polar code [6], the method treats the steganographic binary channel as the binary symmetric channel with . The embedding process of SPC is firstly calculating the Bhattacharyya parameters Z as: where Z W The positions of m channels with the largest Z values are chosen as the frozen indices A c .Then is solved by Eq. ( 3), and the initial log-likelihood ratio is calculated as where P(x) is the parity of x.Then, u A c , L (1)  1 , list size l, A c , and P(x) are input into the successive cancelation list decoder, where u A c = m , which generates u .Then, the stego image y can be obtained by uG n , and the process is denoted as y = SCL(u A c , A c , L (1)  1 , l, P(x)) .The informa- tion can be extracted by P(y)G n and A c .The default list size l = 6 in this paper.In [7], the steganographic polar code with high computational efficiency is developed based on sub-polarized channels.
The time complexity of SPC is O l • n log 2 n , while the time complexity of STC is O 2 h n .Given that the length of the cover image is finite, the execution time of SPC embedding may be less than that of STC.For instance, when the image size is 1024 × 1024 , with h = 10 and l = 1 , n log 2 n = 20n < 1024n .The results in [6] indicate that SPC embedding is applicable with higher embedding efficiency and lower embedding complexity.

The condition of avoiding wet points modification
In errorless robust steganography, the success rate depends on the ability of embedding codes to avoid embedding in wet coefficients.When polar codes are used for steganographic embedding, to maximize the probability of finding a solution in wet paper embedding, the frozen bits used to embed messages should correspond to columns with most ones in the generation matrix.Under this condition, in [17], the authors prove (8) that when the message length is log 2 n + 1 , solutions can always be found in wet paper embedding with polar codes if the number of wet points is less than or equal to n/2 − 1 .In STC embedding, at most h × w cover ele- ments can be changed to embed one bit of information.
We use the elimination method in solving linear equations [18] to reduce the number of stego elements in each equation of matrix embedding.After elimination, the input message is changed, but because the message after elimination is derived from the original message, we consider the message after elimination as the updated input message.In STC or polar-code-based steganographic codes, suppose that the minimum length of cover elements used to embed one bit of updated messages is l m , where l m ≥ 1 .Let the number of wet coefficients be w n .
There are always solutions without changing wet coefficients if w n ≤ l m − 1 .The proof is as follows, where the values of x , y , and m are in the binary domain: 1) When l m = 1 and w n = 0 , there is no wet coefficient to be changed when embedding.2) Assuming that when l m = k and w n ≤ k − 1 , a solu- tion can always be found without changing wet coefficients.When l m = k + 1 and w n ≤ k , sup- pose cover element x i is the wet coefficient, and it is used to embed updated message m j with other k cover elements.Then, delete x i and replace m j with m j ⊕ x i .If there are other updated message bits B that are also embedded using x i , replace them with m p ⊕ x i , m p ∈ B and remove x i .The operations result in l m = k and w n ≤ k − 1 .Since we assume that a solution can be found in this case, when l m = k + 1 and w n ≤ k , the solution can be found without changing wet coefficients.
We provide an example of the determination of the value of l m .Suppose the cover length is 4, and the mes- sage length is 2. The matrix Ĥ in Fig. 1 and Eq. ( 5) are used for embedding.To acquire the minimum number of cover elements to embed one bit of the updated message, we utilize the elimination method that is used for solving linear equations.After elimination, the STC embedding can be written as Eq. ( 10), and the polarcode-based embedding can be written as Eq.(11).
In this case, the l m value in STC is 1, and the number of wet coefficients it can always avoid modifying is 0. It is clear that when x 1 is a wet coefficient, it must be modi- fied if x 1 = m 1 .The l m value in polar-code-based stegano- graphic codes is 2, so it can always avoid changing wet (10) coefficients when the number of wet coefficients is 1.This example illustrates the method used to determine the value of l m , but it does not demonstrate that the perfor- mance of polar-code-based steganographic codes is consistently superior to that of STC.A detailed comparison is provided in the following section.

Performance of SPC on wet paper embedding
When embedding the same length of messages, the coding scheme with larger l m can find a solution in wet paper embedding with the tolerance of larger w n .Suppose the cover size n = 2 s .Let N x (2 s ) represent the number of columns in generator matrix G 2 s that have 2 (s−x+1) ones, where x is an integer and x ≥ 0 .From Eq. ( 5), we can find that N 1 (2 2 ) = 1 , N 2 (2 2 ) = 2 , and N 3 (2 2 ) = 1 .We set N x (2 s ) = 0, x > s + 1 and N 0 (2 s ) = 0 .The recursive method for calculating the distribution of columns in the generator matrix can be concluded as: This is because when s increased by 1, supposing P s+1 = F ⊗s ⊗ F , the number of ones in the columns of the left half matrix in P s+1 doubles the number of ones in P s , whereas the number of ones in the right half remains the same as in P s .When the length of message is log n 2 + 1 , the l m in polar-code-based codes is n/2, as proven by [17].For STC, l m is min(⌊n/(log n 2 + 1))⌋ × h, n) with h = 10 , where min(•) gets the minimum value of inputs.The function min (•) ensures that ⌊n/(log n 2 + 1))⌋ × h does not exceed n, as the maximum number of cover elements (12 for embedding one bit of messages is the length of the cover n.Suppose l m of STC is n/(log n 2 + 1)) × h when the message length is log n 2 + 1 .As n increases, the value h/(log n 2 + 1) becomes less than 1/2.Therefore, as the length of n increases, under the same payload value of (log n 2 + 1)/n , the l m value of steganographic polar-code- based codes is greater than that of STC.
Set l m in STC as min(⌊n/m)⌋ × h, n) for payload size m/n ≤ 1/2 .When the payload is larger than 1/2, the value of l m in STC becomes 1.This is because when 2/n < m ≤ n , we use previous m cover elements for embedding.Based on the proposed recursive calculation method of the distribution of columns in the generator matrix, we can easily evaluate the performance of polarcode-based steganographic codes in avoiding modifications on wet coefficients given any cover lengths and payload sizes.The l m in polar-code-based steganographic code is equal to the number of ones in the mth column when the columns are sorted in descending order by the number of ones in each column.In Fig. 2a, we present the log 2 (l m )/s of polar-code-based steganographic codes and STC under different s and message lengths.As n = 2 s increases, there are more payload values where l m of polar-code-based codes is greater than that of STC, and the difference between two codes becomes larger.This is because in STC, l m is only related with the pay- load size and h, while in polar-code-based codes, it also depends on the length of the cover image.With the larger image length, the value of l m of polar-code-based codes increases under the same payload size.Figure 2b shows the largest payload size p f for which l m in STC is larger than that of polar-code-based codes with different s and h.The results indicate that as h increases, the p f value increases.More importantly, as s increases, the p f value decreases.This demonstrates that the resisting-wet-modification performance of polar-code-based codes is better than that of STC when s becomes larger.When s > 12 , for almost all payload values, the performance of polarcode-based codes is superior to that of STC.
The above comparisons are made based on theoretical analysis, we then evaluate the performance of SPC and STC in actual embedding.We define the wet ratio as w r = w n /n , and the payload size on dry coefficients as p d = m/(n − w n ) .To obtain the possibility of chang- ing wet coefficients P w in actual embedding, we test P w under different w r and p d values using SPC and STC with n = 2 12 .In each case of different w r and p d values, ran- dom messages are embedded by binary embedding with random cover and random positions for wet coefficients, and the process repeats 100 times.Since ternary embedding can be split into two binary embedding, the results can be extended to ternary embedding as well.The results under the square cost profile are shown in Fig. 3.It can be seen that there are more cases where P w = 0 in SPC embedding compared with STC, and most of them are located in cases where p d is slightly larger than 0.5.When p d is close to 1, neither of two codes can avoid changing wet coefficients, because l m decreases as p d increases as shown in Fig. 2a.When both w r and p d are high, there are instances where P w of STC is slightly lower than that of SPC.This occurs because, when the payload is small, the l m of STC can be larger than that of SPC.However, the effect is small because P w of both codes is relatively high ( P w ≥ 0.49).
When errorless robust steganography is performed with a representative JPEG compressor, the mean and standard deviation values of w r and p d in the last lattice when embedding with the random scanning strategy and the payload 0.5 bpnzac are illustrated in Fig. 4. Images are compressed with convert in ImageMagick 1 under different quality factors (QFs).When QF > 95 , p d is not drawn for its mean value is above 1.The result obtained from a classic JPEG compressor that as the quality factor increases, w r and p d generally increase.From the result of Fig. 3, in most situations of different pairs of w r and p d in Fig. 4, the SPC embedding has a higher success rate compared with STC when compressed by the tested compressor.

The embedding and extraction process
Since steganographic polar code has a higher possibility of success in wet paper embedding, we propose a method called errorless robust steganography with SPC (ERSSPC), which has a high successful errorless robust embedding rate.The embedding process is similar with [16] and is described in Algorithm 1.After the stego image is recompressed by the targeted compressor, the SPC extraction algorithm could be used to extract the message in each lattice, and the receiver can restore the embedded message using the message splitting method shared by the embedder and receiver.The extraction process is described in Algorithm 2.

Experimental setups
The setups of the experiments are as follows.The testing images are grayscale images with size 512 × 512 from BossBase ver 1.01 [19].The cover images are generated by JPEG compression using ImageMagick's convert with quality factors 75, 85, 90, and 95.The steganalysis algorithms used for testing the security performance are DCTR [20] and GFR [21] features equipped with ensemble classifiers.The performance is evaluated with ten tests with random splits of testing images, and the average value of error rate E oob in every test that minimizes the overall detection error rate is used as the quantification of security performance.The cost function used is UERD [3] for its computational efficiency and satisfying security performance.

Success rate and security performance
The successful embedding means that the message can be successfully embedded into the cover image, and it can be correctly extracted after recompression.The robust embedding used for comparison is errorless robust embedding implemented with STC (errorless STC).The parameter h = 10 in STC embedding.The different set- tings of l in SPC are tested.The results are shown in Table 1.The results demonstrate that STC always has the possibility of embedding failure.The proposed ERSSPC can successfully achieve errorless embedding when QF = 75 , 85, and 90.When QF = 95 , the proposed method has a small chance of embedding failure, but its success rate is still higher than that of STC.When the payload is 0.4 bpnzac and QF = 95 , the large gap between the two methods is caused by the fact that p d at this time is mostly distributed in the area in Fig. 3 where the P w = 0 while the STC is not.
The security performance of the proposed method, errorless embedding with STC, and embedding without changing costs based on robustness using two steganographic codes are shown in Fig. 5. From the results, we can observe that using robust costs decreases the security performance, and the decrement is more pronounced at higher quality factors.This is because a higher quality factor results in more non-robust coefficients, leading to more embedding costs being modified.Furthermore, the results illustrate the security performance of ERSSPC is close to errorless STC.The maximum decline in security of the proposed method is 1.74% when l = 6 , QF = 75 , and the payload 0.2 bpnzac detected by GFR fea- tures.Additionally, the comparison between embedding with STC and SPC, both without introducing robustness costs, reveals that the security performance of SPC is comparatively lower.This decrement can be attributed to the lower cover length in each lattice in our experiments compared with the setting in [6], explaining the observed drop in security performance in ERSSPC compared to errorless STC.

Influence of the cover size on success embedding rate
In this part, the influence of the cover size on the success embedding rate is tested.We generate three datasets with different image sizes based on grayscale spatial images from Bossbase.The spatial images are resized by imresize function in Matlab and compressed with ImageMagick's convert with the quality factor 95.The embedding payload is 0.4 bpnzac.The parameter l = 8 when ERSSPC is performed.We denote NF as the number of images that fail to embed the message due to modified wet coefficients.The results are presented in Table 2.In Section 3.2, the analysis reveals the different performance when the payload size is calculated with m/n.Therefore, the value of payload size calculated as the ratio of message size to the number of all DCT coefficients influences the performance of errorless STC and ERSSPC.In this case, we use bpc (bits per coefficient) to measure the payload size calculated with the number of all DCT coefficients.Table 2 provides the average payload size value in bpc and average wet ratio calculated in the last lattice when embedding with the payload size 0.4 bpnzac.The robustness performance when the payload size is 0.4 bpc is shown in Table 3.As we have discussed in Section 3.2, the maximum number of wet coefficients that STC can avoid modifying is determined by the payload size, whereas in SPC, it is further influenced by the cover size.The larger the size of the cover image is, the better the ability of SPC to resist wet point modification compared with STC.In Table 2 and Table 3, we present the ratio of the number of failed embedding images of ERRSPC to  The results demonstrate that the ratio decreases as the image size increases, thus validating the aforementioned analysis.
In Table 2, the success rate of errorless STC increases as the image size increases.This is because when the payload embedded is measured in bpnzac, the average payload size in bpc decreases as the image size increases, and thus errorless STC can resist more wet coefficients.When the payload size is measured in bpc and remains constant across different image sizes, as illustrated in Table 3, the success rate of errorless STC decreases with the increased cover size.This decline occurs because, with a constant payload size in bpc, the number of wet coefficients that STC can resist remains unchanged.Consequently, under a similar wet ratio, a larger cover size results in a higher number of wet coefficients, leading to a reduced success rate for Errorless STC.In contrast, with a constant payload size in bpc, the number of wet coefficients that ERSSPC can resist increases as the cover size grows.Therefore, the success rate of the proposed ERSSPC improves as the cover size increases.

Success rate on the mozjpeg compression
In this part, we test the robustness performance on the compression channel with mozjpeg.The payload is equally divided in each lattice in this part.The parameter l = 8 when ERSSPC is performed.
The robust performance of compression of mozjpegnotrilles2 with different payloads and quality factors are shown in Table 4. From the results, we can see that with the mozjpeg compressor, the success rate of ERSSPC is still better than errorless embedding implemented with STC, which proves that the performance of ERSSPC is better under the different JPEG compressor.

Conclusion
In this paper, we have proved the better performance of SPC on wet paper embedding with theoretical analysis.The analysis includes the condition of avoiding wet point modifications in wet paper embedding and presenting a recursive calculation method to compute the distribution of columns with different numbers of ones in the generator matrix of SPC.Based on the analysis, we mitigate the problem of failed embedding in errorless robust embedding by employing SPC.The method can achieve errorless robust embedding with the success rate of 99.85% when a high quality factor is used by compression channels, significantly improving the steganographic communication efficiency in social networks.Approaching errorless robust embedding with a high success rate under complex compression channels is our future research topic.

F 1 .
the set of information indices car- rying information u A , and indices set A c carries frozen bits u A c of dimension n − k .The choice of A c corresponds to the section of n − k worst polarized channels.The source code u is formed by u = (u A , u A c ) , and the code- word c is generated by c = uG n .The generator matrix G n = B n F ⊗s for n = 2 s , where B n is the bit-reversal per- mutation matrix, F ⊗s denotes the sth Kronecker power of The generator matrix of s = 2 is (1) n = α and α = m/n is the payload size.

Fig. 2 a
Fig. 2 a The value of log 2 (l m )/s of different codes with different n = 2 s and payloads (m/n).b Under different values of h and s, the largest payload size p f under which the l m of STC is greater than that in polar-code-based codes

Algorithm 1 Fig. 3 Fig. 4 Algorithm 2
Fig. 3 The value of P w when embedding is performed with different w r and p d under the square cost profile.a Embedding with STC.b Embedding with SPC

Table 1
Success rate (%) of proposed ERSSPC and errorless robust embedding with STC with different quality factors and payloads (bpnzac)

Table 2
The success embedding rate of different image sizes.The value of ratio is the ratio of the number of failed embedding images of ERSSPC and that of errorless STC.The payload size is 0.4 bpnzac and QF = 95

Table 3
The success embedding rate of different image sizes.The value of ratio is the ratio of the number of failed embedding images of ERSSPC and that of errorless STC.The payload size is 0.4 bpc and QF = 95

Table 4
Success rate (%) of proposed ERSSPC and errorless robust embedding with STC with different quality factors and payloads (bpnzac) when the compressor is Mozjpeg -notrellis.The message is equally divided in each lattice