# A Novel Adaptive Image Data Hiding and Encryption Scheme Using Constructive Image Abstraction
## 2 Our Proposed Methods
### Image Encryption  
To secure confidential information and prevent unauthorized access to the image, our scheme involves encrypting the abstracted stego image, \(I_{S}\), and producing an encrypted version, \(I_{E}\). The process has four steps, which are detailed below:  
1. Computing the attribute value of the image. We use Equation (4) to obtain the attribute value \(h\) of the abstracted stego image: \[h=10^{a}\times\sum_{i=1}^{W\times H}\frac{\left(P_{i,R^{\prime}}\times 10^{16}+P_{ i,G^{\prime}}\times 10^{8}+P_{i,B^{\prime}}\right)}{10^{24}},\] (4)  
Here, \(W\times H\) denotes image resolution; \(P_{i,R^{\prime}}\), \(P_{i,G^{\prime}}\), and \(P_{i,B^{\prime}}\) are values of the channels in pixel \(i\); the parameter \(a\) is an integer used to adjust the result \(h\) to comply with the restriction, \(0.1<h<1\). After obtaining the result \(h\), we convert it into a double precision floating-point number and incorporate it into the secret key. 2. The two-dimensional logistic tent modular map (2D-LTMM). We produce two pseudo-random sequences, \(R_{1},R_{2}\), using a 2D-LTMM [31], as shown in Equation (5): \[\left\{\begin{array}{ll}x_{i+1}=\left\{ \begin{array}{ll}\left(4 ax_{i}(1-x_{ i})+2 by_{i}\right)\ mod\ 1,&\text{for}\ y_{i}<0.5\\ \left(4 ax_{i}(1-x_{i})+2b(1-y_{i})\right)\ mod\ 1,&\text{for}\ y_{i}\geq 0.5\\ \left(4 ay_{i}(1-y_{i})+2 bx_{i}\right)mod\ 1,&\text{for}\ x_{i}<0.5\\ \left(4 ay_{i}(1-y_{i})+2b(1-x_{i})\right)\ mod\ 1,&\text{for}\ x_{i}\geq 0.5 \end{array} \right.\] (5)  
The constraints of control parameters, \(a\) and \(b\), are \(a>0\) and \(b>0\). In this study, we select \((a,b)=(100,100)\). The trajectory of the 2D-LTMM is shown in Figure 2, which is uniformly distributed over the entire phase plane. In addition, the evaluations of the 2D-LTMM demonstrate a wide and continuous chaotic range, robust chaotic behavior, and hyperchaotic properties [31]. To increase the security of image encryption, the initial values are set as: \((x_{0},y_{0})=(x_{K}\times h,y_{K}\times h)\). The values of \((x_{K},y_{K})\) are a portion of the secret key. It is worth noting that the initial values \((x_{0},y_{0})\) are linked to the image's attribute value obtained in Step 1. Therefore, they dynamically change based on the stego image being processed. We remark that this approach provides the benefit of resisting chosen-plain attacks as attackers, who use more plaintext images for encryption, fail to gain any further information to lessen the security of our scheme. We then apply Equation (5) to generate two pseudo-random sequences: \(\mathbf{X}=\left\{x_{0},x_{1},\ldots,x_{q},x_{q+1},\ldots,x_{q+n_{1}}\right\}\) and \(\mathbf{Y}=\left\{y_{0},y_{1},\ldots,y_{q},y_{q+1},\ldots,y_{q+n_{2}}\right\}\), where the first \(q\) elements in both sequences are discarded to eliminate the initial transient effects. The quantities of \((n_{1},n_{2})\) are \((32 WH,4 WH)\) for HDR images and \((24 WH,3 WH)\) for LDR images. The format of each element is the double precision floating point, as defined by the IEEE 754 standard [33]. The least significant 32 bits of each element in \(\mathbf{X}\) are extracted to form a 32-bit integer sequence, denoted as \(\mathbf{R_{1}}=\left\{R_{1,0},R_{1,1},\ldots,R_{1,n_{1}}\right\}\). We extract the least significant 8 bits of each element in \(\mathbf{Y}\) to construct an 8-bit integer sequence, represented as \(\mathbf{R_{2}}=\left\{R_{2,0},R_{2,1},\ldots,R_{2,n_{2}}\right\}\). The sequence \(\mathbf{R_{1}}\) is used in the next step to randomly permute all \(n_{1}\) bits in the image, and \(\mathbf{R_{2}}\) is employed in the following step to diffuse all \(n_{2}\) bytes of the image. 3. Bit-level permutation for the whole image. This step shuffles the positions of all \(n_{1}\) bits in the abstracted stego image. To achieve the bit-level permutation, we utilize the random permutation scheme [32], also called the Fisher-Yates Shuffling method, in combination with the sequence \(\mathbf{R_{1}}\) generated in Step 2.