## 3 The Proposed Model
### Image Encryption  
In this work, image encryption method takes place to secure medical images. The image encryption procedure mostly comprises key selection, chaotic sequence pre-processing, diffusion, block scrambling, confusion, and expansion [23]. The chaotic sequence pre-processing makes the sequence more arbitrary. Block scrambling has been separated, as intra- and inter-block scrambling decrease the correlation and offer optimum protection against statistical attack. The expansion stage enhances arbitrary numbers to novel images towards all the encryption and thus gains a distinct ciphertext image that is optimally prepared to resist chosen plaintext attack. Diffusion and confusion complicate the connection amongst ciphertext and keys, which make it complex for adversaries to decrypt a ciphertext image and that improves the resistance of such scenarios. **Key Selection**  
Optimizing values \(x_{0}\), \(y_{0}\), \(\mu_{1}\), \(\mu_{2}\), \(\lambda_{1}\), and \(\lambda_{2}\) created by the DOA technique can be utilized as the keys for 2-D logistic maps. For avoiding transient impact, the first 200 points can be discarded and generate 2 chaotic sequences \(\{x_{n}\}\), \(\{y_{n}\}\) that are of length \(MN\). **Chaotic Sequence Preprocessing**  
The 2 chaotic sequences \(\{x_{n}\}\), \(\{y\}\) can be pre-processed based on Equation (1). \[ \begin{array}{l}x_{1}(i)=10^{\sharp}\cdot x_{n}(i)-round(10^{\sharp}\cdot x _{n}(i))+0.5\\ y_{1}(i)=10^{\sharp}\cdot y_{n}(i)-round(10^{\sharp}\cdot y_{n}(i))+0.5\end{array}  \tag{1}\]  
whereas \(x_{1}(i)\) and \(y_{1}(i)\) implies the chaotic sequences \(\{x_{n}\}\), \(\{y\}\) pre-processed sequence, whereas \(q=8\). **Image Scrambling**  
The 16 sub-blocks \(B(i),i=1,2,\ldots,16\) of similar sizes can be separated by the new image \(P_{1}\), and the remaining 16 numbers of sequences \(x(i)\) are acquired for composing a sequences \(D(i)\). The acquired integer sequence \(S(i)\) was sorted, and inter-block scrambling was attained based on Equation (2). \[ \begin{array}{l}S(i)=floor\big{(}mod\big{(}D(i)\times 10^{14},16\big{)} \big{)}+1\\ \hskip 14.226378 pt[s,l]=sort(S)\\ B1=B(l)\end{array}  \tag{2}\]  
Sequences \(t_{1}\) and \(t_{2}\) refer to the collection of 8 sequence values from the mid sequences \(x(i)\) and \((i)\), correspondingly and a novel sequence \(t\) was created based on Equation (3). All the sub-blocks were disordered \(t_{j}\) times by intra-block scrambling established to process the novel disordered sixteen sub-blocks. \[\left\{ \begin{array}{l}t(2(i-1)+1)=floor\big{(}mod\big{(}t1\times 10^{14},3 \big{)}\big{)}+4\\ t(2i)=floor\big{(}mod\big{(}t2\times 10^{14},3\big{)}\big{)}+4\end{array} \right. \tag{3}\]  
Finally, the 16 sub-blocks can be combined with procedure image \(P_{2}\). **Image Expansion**  
The \(R_{0}\) and \(R_{1}\) are 2 random matrices created, whereas the sizes of \(R_{0}\) and \(R_{1}\) are \(4\times(N+4)\) and \(M\times 4\), correspondingly. Develop image \(P_{2}\) based on the system for forming an expanded image \(P_{3}\). **Confusion and Diffusion**  
The chaotic scheme comprises two stages: diffusion and confusion. Confusion seeks to obscure and confound the relationships among key and the cipher images. Diffusion aims to obscure the relationships among the cipher and plain images by making it as convoluted. Principally, the swapping operation on the rows and the columns was performed forthe realization of the confusion effects. Primarily, compute the novel row index \(r(i)=ceil(x_{1}(i)\times(M+4))\) utilizing \(x_{1}(i)\), followed by related row \(i\) with row indexes \(r(i)\). \[ \begin{array}{c}if\ r(i)<i,\ then\\ r(i)=i\end{array}  \tag{4}\]  
Secondly, the parameters \(k_{11}\), \(k_{12}\) are computed utilizing \(x_{1}(i)\). \[ \begin{array}{c}k_{11}(i)=mod\big{(}floor\big{(}x_{1}(i)\times 10^{8}\big{)},256 \big{)}\\ k_{12}(i)=mod\big{(}floor\big{(}x_{1}(i)\times 10^{9}\big{)},256\big{)}\end{array}  \tag{5}\]  
Thirdly, accomplish a bitwise XOR function on the expansion image \(P_{3}\) with parameters \(k_{11}\), \(k_{12}\).