## 3 Proposed Work
### Data-Hiding Phase  
In this phase, data are embedded in an image \(E\) of size \(X\times Y\) pixels. The image \(E\) is considered to be an encrypted image, processed as independent \(H\times H\) blocks. Thus, the encrypted image \(E\) is given as follows:  
\[E=E^{1}_{H\times H},E^{2}_{H\times H^{\prime}},\ldots,E^{N}_{H\times H}, \tag{1}\]  
where \(N\) is the maximum blocks of size \(H\times H\) pixels, derived from \(E\), which are not overlapping. Now,\[N=\left\lfloor\frac{X}{H}\right\rfloor\times\left\lfloor\frac{Y}{H}\right\rfloor. \tag{2}\]  
Furthermore,  
\[E=\bigcup_{i=1}^{N}E_{H\times H}^{i}. \tag{3}\]  
Since the newly introduced \(MPSA\) scheme allows the data hider to conceal two bits of information in one image block, the secret message \(D\) is chosen accordingly. The properties of the secret data \(D\) are mathematically defined in Equations (4) and (5). \[|D|=2.N. \tag{4}\]  
\[D=(X_{1},X_{2},\ldots,X_{i}),\quad\text{where}\;\;X_{i}\in\{0,1\}\quad\text{and} \;\;\;1\leq i\leq 2.N. \tag{5}\]  
We know that when the size of the encrypted image is \(512\times 512\) pixels, processed as \(4\times 4\) pixel blocks, the total blocks accounted for is then 16,384. Hence, the actual amount of data bits that we can hide with the proposed scheme is \(2\times 16\),384 = 32,768 bits. Algorithm 1 processes \(E\) as non-overlapping blocks to embed the secret information. In the current scenario, each \(4\times 4\) block is again divided into independent \(2\times 2\) blocks to hide 2 bits in a \(4\times 4\) block. The pixel values at different positions of a \(2\times 2\) block are swapped in a predefined manner, previously referred to as local pixel swapping, to embed particular 2-bit information. Algorithm 1 gives the details of the information embedding process. ```
Input: 1. Encrypted image \(E\), 2. Secret information stream \(D\) (\(D\) is a stream of bits with a size equal to twice the total encrypted blocks Output: The resultant image \(E^{\prime}\) with hidden secret information /* Consider the image size as \(X\times Y\) pixels */ Let \(r=1;s=1;i=1;j=1;A=1\);  Let \(H\) indicate the block size; while\(((i\leq(X-H-1))\)do while\((j\leq(Y-H-1))\)do \(Z=[E]_{i,j}\); /* \(\mathit{theimagblock}[E]_{i,j}\) will be a \(H\times H\) matrix from \(E\) */ while\(((r\leq(H-1))\)do while\((s\leq(H-1))\)do \(T_{11}=Z_{r,s}\); \(T_{12}=Z_{r,s+1}\); \(T_{21}=Z_{r+1,s}\); \(T_{22}=Z_{r+1,s+1}\); /* Two adjacent data bits of \(D\) ie., \(D(1,A)\) and \(D(1,A+1)\) can be embedded in each block */ if\((D(1,A)==0)\)&&\(D(1,A+1)==1)\)then \(Z_{r,s}=T_{12}\); \(Z_{r,s+1}=T_{11}\); \(Z_{r+1s}=T_{22}\); \(Z_{r+1,s+1}=T_{21}\); elseif\((D(1,A)==1)\)&&\(D(1,A+1)==0)\)then \(Z_{r,s}=T_{21}\); \(Z_{r,s+1}=T_{22}\); \(Z_{r+1,s}=T_{11}\); \(Z_{r+1,s+1}=T_{12}\); elseif\((D(1,A)==1)\)&&\(D(1,A+1)==1)\)then \(Z_{r,s}=T_{22}\); \(Z_{r,s+1}=T_{21}\); \(Z_{r+1,s}=T_{12}\); \(Z_{r+1,s}=T_{12}\); \(Z_{r+1,s+1}=T_{11}\); \(s=s+2\); \(r=r+2\); \([E^{\prime}]_{i,j}=Z\); \(A=A+2\); \(j=j+H\); \(i=i+H\); Return the resultant image \(E^{\prime}\)
```  
**Algorithm 1**Proposed pixel-swapping-based approach for RDH. Let \(d_{j}\) be the two bits that are embedded in the image block \(E^{i}_{H\times H}\). Here,  
\[d_{j}=(X_{2j-1}X_{2j}),\quad\text{where}\quad j=1,2,3,\dots,N. \tag{6}\]  
Thus, the total embeddable secret information  
\[D=d_{1}\|d_{2}\|\dots\|d_{N}. \tag{7}\]  
Furthermore,  
\[d_{j}\in\{00,01,10,11\},\quad\text{where}\quad 1\leq j\leq N. \tag{8}\]  
In the proposed local pixel-swapping process, four different ways are formulated to address the embedding of four different bits such as \(00,01,10,\) and \(11\). Let \(Z_{i}\) be a sub-block of size \(2\times 2\) pixels from a block of \(4\times 4\) pixels. The pixels in \(Z_{i}\) will undergo certain local pixel-swapping operations while embedding a two-bit sequence. The local pixel-swapping operations to embed a piece of 2-bit information in a \(2\times 2\)-pixel block is as follows:  
\[\text{if}\ Z_{i}= \begin{bmatrix}T_{11}&T_{12}\\ T_{21}&T_{22}\end{bmatrix}