# An Improved Product Code-Based Data Hiding Scheme
## 4 An Improved Product Code-Based Data Hiding Scheme
### Example
#### 4.3.1. Embedding  
_Step 1_: From (\(\mathbf{s}_{1}\), \(\mathbf{s}_{2}\), \(\mathbf{s}_{3}\), \(\mathbf{s}_{4}\)) = (010, 011, 010, 000) and (\(\mathbf{m}_{1}\), \(\mathbf{m}_{2}\), \(\mathbf{m}_{3}\), \(\mathbf{m}_{4}\)) = (011, 111, 101, 011), we obtain (\(\mathbf{ts}_{1}\), \(\mathbf{ts}_{2}\), \(\mathbf{ts}_{3}\), \(\mathbf{s}_{4}\)) = (\(\mathbf{s}_{1}\), \(\mathbf{s}_{2}\), \(\mathbf{s}_{3}\), \(\mathbf{s}_{4}\)) \(\oplus\) (\(\mathbf{m}_{1}\), \(\mathbf{m}_{2}\), \(\mathbf{m}_{3}\), \(\mathbf{m}_{4}\)) = (001, 100, 111, 011). Hence, (\(\mathbf{e}_{1}\), \(\mathbf{e}_{2}\), \(\mathbf{e}_{3}\), \(\mathbf{e}_{4}\)) = (0010000, 100000, 000010, 000100). Then,  
\[[\mathbf{f}_{1}\mathbf{f}_{2}\mathbf{f}_{3}\mathbf{f}_{4}\mathbf{f}_{5} \mathbf{f}_{6}\mathbf{f}_{7}]=\left[ \begin{array}{cccccc}0&0&1&0&0&0&0\\ 1&0&0&0&0&0&0\\ 0&0&0&0&0&1&0\\ 0&0&0&0&1&0&0\end{array} \right]\text{ and }\mathbf{F}=\left[ \begin{array}{cccc}0&0&0&0\\ 0&0&0&0\\ 0&0&1&0\\ 0&1&0&0\end{array} \right].\]  
_Step 2_: Since (\(\mathbf{s}_{5}\), \(\mathbf{s}_{6}\), \(\mathbf{s}_{7}\), \(\mathbf{s}_{8}\)) = (001, 000, 010, 111) and (\(\mathbf{m}_{5}\), \(\mathbf{m}_{6}\), \(\mathbf{m}_{7}\), \(\mathbf{m}_{8}\)) = (100, 010, 110, 101), therefore (\(\mathbf{ts}_{5}\), \(\mathbf{ts}_{6}\), \(\mathbf{ts}_{7}\), \(\mathbf{ts}_{8}\)) = (\(\mathbf{s}_{5}\), \(\mathbf{s}_{6}\), \(\mathbf{s}_{7}\), \(\mathbf{s}_{8}\)) \(\oplus\) (\(\mathbf{m}_{5}\), \(\mathbf{m}_{6}\), \(\mathbf{m}_{7}\), \(\mathbf{m}_{8}\)) = (101, 010, 100, 010). _Step 3_: For each \(i\), \(5\leq i\leq 8\), given \(\mathbf{ts}_{i}\) and \(\mathbf{f}_{i-1}\), \(\mathbf{t}_{i}\) can be obtained respectively through the lookup in Table 2 as follows: \(\mathbf{t}_{5}\) = [1010000], \(\mathbf{t}_{6}\) = [1110001], \(\mathbf{t}_{7}\) = [0110010], \(\mathbf{t}_{8}\) = [0100000]. _Step 4_: \(\mathbf{X}_{\text{IB}}\), \(\mathbf{X}_{\text{IB}}\)\(\oplus\)\(\mathbf{F}\), \(\mathbf{P}(\mathbf{X}_{\text{IB}}\)\(\oplus\)\(\mathbf{F})_{\text{CCH}}\), \(\mathbf{X}_{\text{CCH}}\), and \(\mathbf{P}(\mathbf{X}_{\text{IB}}\)\(\oplus\)\(\mathbf{F})_{\text{CCH}}\)\(\oplus\)\(\mathbf{X}_{\text{CCH}}\) are respectively as follows:  
\[\left[ \begin{array}{cccc}0&0&1&0\\ 0&0&0&1\\ 1&1&1&0\\ 1&0&0&0\end{array} \right],\ \left[ \begin{array}{cccc}0&0&1&0\\ 0&0&0&1\\ 1&1&0&0\\ 1&1&0&0\end{array} \right],\ \left[ \begin{array}{cccc}1&1&1\\ 1&1&1\\ 1&0&1\end{array} \right],\ \left[ \begin{array}{cccc}0&1&0\\ 1&1&0\\ 0&0&1\end{array} \right],\ \left[ \begin{array}{cccc}1&0&1\\ 0&0&1\\ 1&0&0\end{array} \right]\]  
Since (\(\mathbf{s}_{9}\), \(\mathbf{s}_{10}\), \(\mathbf{s}_{11}\)) = (101, 000, 110) and (\(\mathbf{m}_{9}\), \(\mathbf{m}_{10}\), \(\mathbf{m}_{11}\)) = (100, 011, 000), therefore (\(\mathbf{ts}_{9}\), \(\mathbf{ts}_{10}\), \(\mathbf{ts}_{11}\)) = (\(\mathbf{s}_{9}\), \(\mathbf{s}_{10}\), \(\mathbf{s}_{11}\)) \(\oplus\) (\(\mathbf{m}_{9}\), \(\mathbf{m}_{10}\), \(\mathbf{m}_{11}\)) = (001, 011, 110). Now,  
\[\mathbf{T}=\left[ \begin{array}{cccccc}0&0&1&1&1&0&0\\ 0&1&1&0&1&1&1\\ 1&1&0&1&1&1&0\\ 0&0&1&0&0&0&0\\ 1&0&0&0&0&0&0\\ 0&0&0&0&1&0\\ 0&0&0&0&1&0&0\end{array} \right].\]  
_Step 5_: For the last four columns of \(\mathbf{T}\), the fifth and sixth columns, of each has a Hamming weight of greater than 2. Take the element-wise OR operation between both columns, we obtain \(\mathbf{u}\) = (1110011). \(\mathbf{c}\) = (1110010) is the closest codeword to \(\mathbf{u}\). Then, \(\mathbf{c}\) (in the form of column vector) is added sequentially to the fifth and sixth columns. This is equivalent to vector \(\mathbf{w}\) = (0000110) being added implicitly into the first, second, third, and sixth rows. The coset leader \(\mathbf{e}\) = (1000000) of the coset to which \(\mathbf{w}\) belongs is determined and the bit 1 is located in the first component. Therefore, the codeword \(\mathbf{c}\) is also added to the 1 st column of \(\mathbf{T}\). Now, the toggle array \(\mathbf{T}\) is updated as \(\mathbf{T}^{\prime}\) with a smaller Hamming weight. \[\mathbf{T}^{\prime}=\left[