# A Novel Fractional Sine Chaotic Map and Its Application to Image Encryption and Watermarking
## 4 Image Encryption and Decryption
### Scheme of Encryption  
The entire process of image encryption is discussed in this section. Our encryption process can be split into three parts  
1. Embedding secret images: Watermarking using discrete wavelet transforms. 2. Partial encryption and diffusion: Generating a chaotic matrix from the discrete fractional sine chaotic map for diffusion of pixels. 3. Encryption: Image is integrated into 256 bits and is bit-XORed with genesis block using SHA-256. A step-by-step procedure of the encryption process is as follows. **Embedding secret images:**  
1. The objective image \((P)\) of size \(K\times L\) is selected and subjected to level 2 or 3 decomposition employing discrete wavelet transformation after converting the image to greyscale [46]. In case of an image of size \(256\times 256\), level 1 contains four sub-bands of size \(128\times 128\) containing approximation (LL), horizontal (HL), vertical (LH) and diagonal (HH) as shown in Figure 7.
2. Consider the LL sub-band for level 2 decomposition and similarly, the procedure can be followed for level 3 decomposition. The size of the sub-bands is halved at each decomposition. 3. In our algorithm, we are interested in embedding watermarked images in different levels. **Case (i):** Level 2 decomposition with secret images embedded in the LH sub-band of  
Figure 6: Image encryption scheme based on the discrete fractional sine chaotic map (DFSCM). Figure 7: Different levels of decomposition by discrete wavelet transforms. level 1 and the HL sub-band in level 2. **Case (ii):** Level 3 decomposition with secret images embedded in the LH sub-band of level 3 and the HL sub-band in level 3. 4. Size of the level in which the secret images to be watermarked are selected and the secret images are processed to this size. Singular vector decomposition (SVD) and inverse discrete wavelet transform are employed to obtain watermarked image. **Partial encryption and diffusion:**  
1. After the watermarked image is obtained, it is subjected to encryption of the selected portion of the image using the sum of the edge intensity values and respective inverse of the value for recovering the image. 2. After partial encryption, we employ Fourier transform for inter-block shifting in the image. Let us denote the shifted image by \(J_{2}\). 3. The discrete fractional chaotic map (8) with parameters \(b=12\), \(c=40\) and fractional order \(\varpi=0.55\) with initial states \((0.01,0.01)\) is considered to obtain the chaotic matrix. Chaotic sequences are generated from the map (8) and the chaotic matrix is obtained by  
for m = 1:K  
for n = 1:L  
\(W(m,n)=floor(mod((x(m)+y(n))\times 2^{30},256))\);  
end  
end  
4. The chaotic matrix \(W(m,n)\) thus obtained from the previous step is employed for the process of diffusion with the shifted image \((J_{2})\) obtained in Step 2. Let the diffused image be denoted by \(J_{3}\). **Encryption:**  
The encryption process is based on the following concept: In a blockchain, the genesis block serves as the initial block upon which subsequent blocks are built. Each block in the blockchain depends on the hash values of the previous block, with the genesis block having a hash value of 0. A notable feature of the blockchain is that every block contains the complete transaction history from the previous block. Therefore, any slight modification in the transactions would lead to corruption of the entire data. Applying this concept, the partially encrypted and block-shuffled image obtained in the previous step is divided into 256 blocks. A unique base block, known as the genesis block, is introduced. This genesis block is XORed with the image disintegrated into bits, resulting in blocks shuffled across different regions of the image. The procedure can be summarized as follows:  
1. The image \(J_{3}\) is divided into 256 small blocks and a genesis block required for construction of blockchain is considered. 2.