2 $x=(x_1,\ldots,x_n)$ be the $n$-bits cover vector of the image $X$,
3 $m$ be the message to embed, and
4 $y=(y_1,\ldots,y_n)$ be the $n$-bits stego vector.
5 The usual additive embedding impact of replacing $x$ by $y$ in $X$
6 is given by a distortion function
7 $D_X(x,y)= \Sigma_{i=1}^n \rho_X(i,x,y)$, where the function $\rho_X$
8 expresses the cost of replacing $x_i$ by $y_i$ in $X$.
9 Let us consider that $x$ is fixed:
10 this is for instance the LSBs of the image edge bits.
11 The objective is thus to find $y$ that minimizes $D_X(x,y)$.
13 Hamming embedding proposes a solution to this problem.
14 This is why some steganographic
15 schemes~\cite{DBLP:conf/ih/Westfeld01,DBLP:conf/ih/KimDR06,DBLP:conf/mmsec/FridrichPK07} are based on this binary embedding.
16 Furthermore this code provides a vector $y$ s.t. $Hy$ is equal to
17 $m$ for a given binary matrix $H$.
19 Let us explain this embedding on a small illustrative example where
20 $\rho_X(i,x,y)$ is identically equal to 1,
21 whereas $m$ and $x$ are respectively a 3 bits column
22 vector and a 7 bits column vector.
23 Let then $H$ be the binary Hamming matrix
26 \begin{array}{lllllll}
27 0 & 0 & 0 & 1 & 1 & 1 & 1 \\
28 0 & 1 & 1 & 0 & 0 & 1 & 1 \\
29 1 & 0 & 1 & 0 & 1 & 0 & 1
33 The objective is to modify $x$ to get $y$ s.t. $m = Hy$.
34 In this algebra, the sum and the product respectively correspond to
35 the exclusive \emph{or} and to the \emph{and} Boolean operators.
36 If $Hx$ is already equal to $m$, nothing has to be changed and $x$ can be sent.
37 Otherwise we consider the difference $\delta = d(m,Hx)$, which is expressed
40 \delta = \left( \begin{array}{l}
46 \textrm{ where $\delta_i$ is 0 if $m_i = Hx_i$ and 1 otherwise.}
48 Let us thus consider the $j-$th column of $H$, which is equal to $\delta$.
49 We denote by $\overline{x}^j$ the vector obtained by
50 switching the $j-$th component of $x$,
51 that is, $\overline{x}^j = (x_1 , \ldots, \overline{x_j},\ldots, x_n )$.
52 It is not hard to see that if $y$ is $\overline{x}^j$, then
54 It is then possible to embed 3 bits in only 7 LSBs of pixels by modifying
56 In the general case, communicating $n$ message bits in
57 $2^n-1$ pixels needs $1-1/2^n$ average changes.
61 Unfortunately, for any given $H$, finding $y$ that solves $Hy=m$ and
62 that minimizes $D_X(x,y)$, has an exponential complexity with respect to $n$.
63 The Syndrome-Trellis Codes (STC)
64 presented by Filler \emph{et al.} in~\cite{DBLP:conf/mediaforensics/FillerJF10}
65 is a practical solution to this complexity. Thanks to this contribution,
66 the solving algorithm has a linear complexity with respect to $n$.
68 First of all, Filler et al. compute the matrix $H$
69 by placing a small sub-matrix $\hat{H}$ of size $h × w$ next
70 to each other and shifted down by one row.
71 Thanks to this special form of $H$, one can represent
72 every solution of $m=Hy$ as a path through a trellis.
74 Next, the process of finding $y$ consists of two stages: a forward and a backward part.
76 \item Forward construction of the trellis that depends on $\hat{H}$, on $x$, on $m$, and on $\rho$.
77 \item Backward determination of $y$ that minimizes $D$, starting with
78 the complete path having the minimal weight.