## 3 The Proposed Method
\begin{table}
\begin{tabular}{c l} \hline \hline
**Input** & Stego key (\(K\)), secret message (\(m\)), and cover image (\(\mathbb{C}\)) \\ \hline
**Output** & Stego image (\(S\)) \\ \hline
**Step 1** & Convert \(K\) into _Sum_ value. \\ \hline  & Find values of \(K\) components \(P_{1}\), \(P_{2}\), \(P_{3}\),..., \(P_{k}\) where \(k\) is the length of \(K\) using ASCII table. (e.g., \(K=\text{Ali}\text{Zs}\)) \\
**(a)** & i.  Refer ASCII table to search values of \(K\) components. \\  & \(P_{1}=\text{A}=65\), \(P_{2}=1=108\), \(P_{3}=\text{i}=105\), \(P_{4}=\text{f}=102\), \(P_{5}=2=50\), \(P_{6}=\text{s}=115\) \\ \hline  & Compute _Sum_ value using the following formula \\
**(b)** & i. \(Sum=\sum_{k=1}^{k}(P_{i}\times i)\bmod 256\) \\  & \(=[(65\times 1)+(108\times 2)+(105\times 3)+(102\times 4)+(50\times 5)+(115 \times 6)]\bmod 256\) \\ \hline
**Step 2** & Compute \(M\). \\ \hline
**(a)** & Set the bits in \(m\) as \(m_{\text{bit}}=m_{1}\), \(m_{2}\), \(m_{3}\),..., \(m_{n}\) where \(n\) is the length of \(m\). \\ \hline
**(b)** & Set the permutated bits in \(m\) as \(S_{\text{bit}}=g_{1}\), \(g_{2}\), \(g_{3}\),..., \(g_{n}\). \\ \hline
**(c)** & Set the bits in \(M\) as \(M_{\text{bit}}=M_{\text{bit}}\), \(M_{\text{bit}}\), \(M_{\text{bit}}\),..., \(M_{\text{bit}}\). \\ \hline
**(d)** & Set the permutated bit position of \(m_{\text{bit}}\) as \(pos_{\text{bit}}=pos_{\text{bit}},pos_{\text{bit}},pos_{\text{bit}},\ldots,pos_{n}\). \\ \hline  & Find \(M\) by permuting \(m_{\text{bit}}\) using following formula. \\  & i.  For \(1\leq i\leq n\), compute \(pos_{i}=(i+Sum)\bmod(n+1)\) \\
**(e)** & ii.  For \(1\leq i\leq n\), \(g_{1}=n_{\text{pair}}\) \\  & iii.  For \(1\leq i\leq n\), set \(M_{\text{bit}}=g_{1}\) \\  & iv.  Combine all \(M_{\text{bit}}\) as \(M\). \\ \hline
**Step 3** & Group \(M\) bits into pairs (e.g., total number of \(M\) bits = 32). \(M_{\text{pair}}=M_{1}\), \(M_{2}\), \(M_{3},\ldots,M_{\text{f}_{0}}\). \\ \hline
**Step 4** & Group four MSBs in every pixel of \(\mathbb{C}\) into two pairs. \\ \hline
**(a)** & Two MSBs are grouped in a pair. \(\mathbb{C}_{\text{L,P,pixel}}=\mathbb{C}_{\text{L,1}}\), \(\mathbb{C}_{\text{L,2}}\), \(\mathbb{C}_{\text{L,3}}\),..., \(\mathbb{C}_{\text{L,16}}\). \\ \hline
**(b)** & The remaining two bits are grouped in a pair. \(\mathbb{C}_{\text{R,pixel}}=\mathbb{C}_{\text{K,J}}\), \(\mathbb{C}_{\text{R,2}}\), \(\mathbb{C}_{\text{K,3}}\),..., \(\mathbb{C}_{\text{K,16}}\). \\ \hline
**Step 5** & Set the two LSBs in every pixel as \(B_{\text{L,P,pixel}}\) and \(B_{\text{R,pixel}}\). \\ \hline
**(a)** & The LSB is assigned as \(B_{\text{R,pixel}}=B_{\text{R,J}}\), \(B_{\text{R,J}}\),..., \(B_{\text{R,16}}\). \\ \hline
**(b)** & The remaining bit is assigned as \(B_{\text{L,P,pixel}}=B_{\text{L,1}}\), \(B_{\text{L,2}}\), \(B_{\text{L,3}}\),..., \(B_{\text{L,16}}\). \\ \hline
**Step 6** & Embedding process \\ \hline
**(a)** & Compare \(M_{1}\) with \(C_{\text{L,1}}\). If the bits are equal, replace \(B_{\text{L,1}}\) with 1. Otherwise, replace with 0 \\ \hline
**(b)** & Compare \(M_{2}\) with \(\mathbb{C}_{\text{K,1}}\). If the bits are equal, replace \(B_{\text{K,1}}\) with 1. Otherwise, replace with 0 \\ \hline  & If \([B_{\text{L,1}};B_{\text{R,J}}]=[1;0]\) \\
**(c)** & i.  Refer \([B_{\text{L,2}};B_{\text{R,2}}]\) with \(M_{2}\). \\  & i.  Repeat Step 6 with pixel number 3 of \(\mathbb{C}\). Continine with \(M_{3}\) and \(M_{4}\). \\ \hline  & If \([B_{\text{L,1}};B_{\text{R,J}}]=[0;1]\) \\  & i.  Repe \([B_{\text{L,2}};B_{\text{R,2}}]\) with \(M_{1}\). \\  & ii.  Repeat Step 6 with pixel number 3 of \(\mathbb{C}\). Continine with \(M_{3}\) and \(M_{4}\). \\ \hline  & If \([B_{\text{L,1}};B_{\text{R,J}}]=[0;0]\) \\  & i.  Repeat Step 6 with pixel number 2 of \(\mathbb{C}\). Continine with \(M_{1}\) and \(M_{2}\). \\ \hline  & If \([B_{\text{L,1}};B_{\text{R,J}}]=[1;1]\) \\  & i.  Repeat Step 6 with pixel number 3 of \(\mathbb{C}\). Continine with \(M_{3}\) and \(M_{4}\). \\ \hline
**Step 7** & Stop if all \(M_{\text{pair}}\) have been used. \\ \hline \hline \end{tabular}
\end{table}