# Reversible Data Hiding in Encrypted Images Based on the Mixed Multi-Bit Layer Embedding Strategy
## 3 Proposed Scheme
### Data Embedding
For other AHBs, embed the above parameters except for \(m\), \(n\). In addition, the processing of UHBs is the same way as that of the FMLE strategy. * Capacity analysis and comparison of the two strategies  
Table 2 describes the comparison of the capacity and use conditions by using examples. Taking the AHB (\(BT_{1}\)) as an example, the capacity and error bits costs of the two strategies are compared as follows. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Max (D)** & \multicolumn{2}{c}{**Single Pixel**} & \multicolumn{2}{c}{**Single Block**} & \multicolumn{2}{c}{**Comparison (Single Block)**} \\ \hline  & FMLE (bits) & AMLE (bits) & FMLE (bits) & AMLE (bits) & Decrease in cost (bits) & Increase in cost (bits) \\
0 & \(n_{f}\) & 0 & \(n_{f}\times(l_{1}-1)\) & 0 & \(n_{f}\times(l_{1}-1)\) & \(n_{f}\) \\
1 & \(n_{f}\) & 1 & \(n_{f}\times(l_{1}-1)\) & \((l_{1}-1)\) & \((n_{f}-1)\times(l_{1}-1)\) & \(n_{f}\) \\
2–3 & \(n_{f}\) & 2 & \(n_{f}\times(l_{1}-1)\) & \(2\times(l_{1}-1)\) & \((n_{f}-2)\times(l_{1}-1)\) & \(n_{f}\) \\
4–7 & \(n_{f}\) & 3 & \(n_{f}\times(l_{1}-1)\) & \(3\times(l_{1}-1)\) & \((n_{f}-3)\times(l_{1}-1)\) & \(n_{f}\) \\
8–15 & \(n_{f}\) & 4 & \(n_{f}\times(l_{1}-1)\) & \(4\times(l_{1}-1)\) & \((n_{f}-4)\times(l_{1}-1)\) & \(n_{f}\) \\ \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) \\ T/2–T-1 & \(n_{f}\) & \(n_{f}\) & \(n_{f}\times(l_{1}-1)\) & \(n_{f}\times(l_{1}-1)\) & 0 & \(n_{f}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of two embedding strategies (FMLE and AMLE). Figure 4: Schematic diagram of the AMLE embedding strategy for AHBs with the type of \(BT_{1}\): (**a**) the AHB (the \(1\)st \(BT_{1}\) block) and (**b**) the AHB (other \(BT_{1}\) blocks and \(BT_{2}\) blocks). In Table 2, \(n_{f}=\log_{2}(T)\) means the number of error bits represented by \(T\) in binary for a single hidden pixel. Column 1 gives several cases when the pixel difference within the block is less than \(T\) and the embedding conditions are met. Columns 2 and 3 indicate the difference coding length of a single pixel in the AHB under the two strategies. It can be found that under the FMLE strategy, all the differences are encoded as \(n_{f}\) bits. While under the AMLE strategy, the bits required for the difference coding are gradually increased until they are the same as in the case of FMLE. Columns 4 and 5 show the coding length of the AHB of \(BT_{1}\) type under the two strategies. Columns 6 and 7 represent the number of bits saved and the increased cost in each block compared with AMLE and FMLE. Theoretically, AMLE uses dynamic thresholds, and the length of \(E^{\prime}\) will be shorter than \(E\) in all probability, but the fixed cost will also increase, so it is necessary to judge which strategy to choose in the processing process. The following is a brief analysis. Let the threshold be \(T\), the length of an AHB be \(l_{1}\), and the \(\max(D)\) of the block be \(T/k\) (\(k>1\)), where \(k\) is the scale factor. Under the FMLE strategy, the length of \(E\) generated by this block is:  
\[L_{BE}=(l_{1}-1)\times\log_{2}(T)(\text{bits}). \tag{10}\]  
Under the AMLE strategy, the length of \(E\) generated by this block is:  
\[L_{BE^{\prime}}=(l_{1}-1)\times\log_{2}(T/k)+\log_{2}(T)(\text{bits}). \tag{11}\]  
The calculation is as follows:  
\[ \begin{array}{rl}L_{BE}-L_{BE^{\prime}}&=(l_{1}-1)\times\log_{2}(T)-((l_{1}- 1)\times\log_{2}(T/k)+\log_{2}(T))\\ &=(l_{1}-1)\times n_{f}-((l_{1}-1)\times n_{f}-(l_{1}-1)\times\log_{2}(k)+n_{f })\\ &=(l_{1}-1)\times\log_{2}(k)-n_{f}\end{array}  \tag{12}\]  
If \(L_{BE}-L_{BE^{\prime}}>0\), the block uses FMLE to generate more auxiliary information and the hidden space is less. Therefore, AMLE should be adopted. Otherwise, FMLE is adopted. At different lengths, a mixed embedding strategy can ensure a reduction in auxiliary information and an increase in embedding capacity. The specific calculation is as follows:  
\[