# An Authentication Method for AMBTC Compressed Images Using Dual Embedding Strategies
## 3 The Proposed Method
### Embedding of Smoothness-Changed Blocks  
Since the \(ac_{i}\) of complex block \(I_{i}\) is embedded into the quantized values \(\left(a_{i},\ b_{i}\right)\), the smoothness of \(I_{i}\) may change to the smooth one if \(\left|\hat{b}_{i}-\hat{a}_{i}\right|<T\). In this case, it can be processed using the following procedures. Firstly, alter the value of \(a_{i}\) and \(b_{i}\) by one, and the altered results \(a_{i}^{\prime}=\left\{a_{i}-1,a_{i},a_{i}+1\right\}\) and \(b_{i}^{\prime}=\left\{b_{i}-1,b_{i},b_{i}+1\right\}\) are obtained. If \(\left|b_{i}^{\prime}-a_{i}^{\prime}\right|<T\), use the embedding technique described in Section 3.1 to perform the embedment on \(\left(a_{i}^{\prime},\ b_{i}^{\prime},B_{i}\right)\) and obtain \(\left(a_{i}^{\ast},\ b_{i}^{\ast},\ B_{i}^{\ast}\right)\), where \(\left(a_{i}^{\ast},\ b_{i}^{\ast}\right)=\left(a_{i}^{\prime},\ b_{i}^{\prime}\right)\). Otherwise, the embedment of \(\left(a_{i}^{\prime},\ b_{i}^{\prime},B_{i}\right)\) is performed using the embedding technique of complex block described in Section 3.2 to obtain \(\left(a_{i}^{\ast},\ b_{i}^{\ast},\ B_{i}^{\ast}\right)\), where \(B_{i}^{\ast}=B_{i}\). From all possible codes of \(\left(a_{i}^{\ast},\ b_{i}^{\ast},\ B_{i}^{\ast}\right)\), the code with the smallest embedding error is selected as the final output \(\left(\hat{a}_{i},\hat{b}_{i},\ \hat{b}_{i}\right)\). Figure 2 shows the embedding framework of the proposed method. Following is a simple example to illustrate the case where a complex block changes to a smooth one after embedment. Let \(\left(a_{i},\ b_{i},\ B_{i}\right)=\left(67,73,\left[0011;0011;0011;0101 \right]\right)\) be the original AMBTC code with \(n=4\), and \(T=6\). Since \(\left|b_{i}-a_{i}\right|=\left|73-67\right|=6\geq T\), the \(I_{i}\) is classified as a complex block. Then, use \(B_{i}\) and \(i\) to generate the authentication code \(ac_{i}\) using Equation (5), and employ APPM to embed \(ac_{i}\) into \(\left(a_{i},\ b_{i}\right)\) to obtain \(\left(\hat{a}_{i},\ \hat{b}_{i}\right)\). Suppose the marked quantized values \(\left(\hat{a}_{i},\ \hat{b}_{i}\right)=\left(68,\ 73\right)\). Since \(\hat{b}_{i}-\hat{a}_{i}=73-68=5<T\), the smoothness of \(\left(\hat{a}_{i},\ \hat{b}_{i}\right)\) is different from that of \(\left(a_{i},\ b_{i}\right)\). Thus, the embedment of \(\left(a_{i},\ b_{i},\ B_{i}\right)\) requires additional processing. Alter the values of \(\left(a_{i},\ b_{i}\right)\) by one unit, and the altered results \(\left(a_{i}^{\prime},\ b_{i}^{\prime}\right)\) are \(\left(66,\ 72\right)\), \(\left(66,\ 73\right)\), \(\left(66,\ 74\right)\), \(\left(67,\ 72\right)\), \(\left(67,\ 73\right)\), \(\left(67,\ 74\right)\), \(\left(68,\ 72\right)\), \(\left(68,\ 73\right)\) and \(\left(68,\ 73\right)\) respectively. The embedding framework of the proposed method is shown in Figure 3.  
Figure 2: The embedding framework of the proposed method. (68, 74). The differences of \(a^{\prime}_{i}\) and \(b^{\prime}_{i}\) less than \(T=6\) are (67, 72), (68, 72) and (68, 73), and the technique described in Section 3.1 is used to embed them. The differences of \(a^{\prime}_{i}\) and \(b^{\prime}_{i}\) larger than or equal to 6 are (66, 72), (66, 73), (66, 74), (67, 73), (67, 74) and (68, 74), and employ the technique described in Section 3.2 to embed them. Let (67, 72, [0011; 011; 0011; 0001]), (68, 72, [0011; 0010; 0011; 011]), and (68, 73, [0010; 0011; 0011; 1101]) are the embedded codes with differences of quantified values less than 6, where the underlined bits are the flipped bits. Suppose that (65, 73, \(B_{i}\)), (67, 76, \(B_{i}\)), (66, 73, \(B_{i}\)), (67, 75, \(B_{i}\)), (66, 74, \(B_{i}\)) and (68, 75, \(B_{i}\)) are the codes with differences of quantified values larger than or equal to 6. Decompress these codes and the original codes (\(a_{i}\), \(b_{i}\), \(B_{i}\)) using AMBTC to obtain the decompress block \(D^{*}_{i}\) and \(D_{i}\). Then, calculate the squared differences of \(D^{*}_{i}\) and \(D_{i}\), which are 68, 64, 68, 32, 72, 8, 32, 16 and 40.