# A Medical Image Encryption Scheme for Secure Fingerprint-Based Authenticated Transmission
## 3 Materials and Methods
### Visually Secure Image Encryption Scheme  
In this section, the proposed secure visual encryption scheme for medical image transmission with the inclusion of the physician's fingerprint to authenticate the image and the EHR to provide medical information has been described. In the proposed encryption scheme, a medical image is first decomposed, encrypted, and then embedded into a non-significant reference image along with the fingerprint feature vector and the EHR. The SVD is used to decompose a medical image into two orthogonal matrixes \(U\) and \(V^{H}\), and in a singular value vector s. SVD enables a robust watermarking incorporation process, as small variations in singular values do not affect the visual quality of the reconstructed medical image [38]. The SVD of the gray-scale medical image with \(N\times N\) size is stated in Equation (1). \[X=U\ s\ V^{H} \tag{1}\]  
where \(U\) and \(V^{H}\) have size \(N\times N\) and \(s\) has size \(N\). In the next stage \(U\), \(V^{H}\) and s are embedded into the reference image through a watermarking process. The reference image is a gray-scale image with \(2N\times 2N\) size, and it is divided into four non-overlapping sub-bands through 2D-DWT, namely approximation (\(LL\)), horizontal detail (\(LH\)), vertical detail (\(HL\)) and diagonal detail (\(HH\)) according to Equation (2). \[LL,\ LH,\ HL,\ HH=DWT2(I,\ w) \tag{2}\]  
where \(DWT2\) is 2D-DWT function, \(I\) is the reference image, and \(w\) is the wavelet used for the transformation. \(LL\) represents low-frequency components, and the remaining \(LH,\ HL,\ HH\) represent high-frequency components [39]. The \(LL\) sub-band contains the main information of the image, and any operation or replacement of this sub-band is easily noticeable by the human eye. Therefore, \(LL\) ensures the robustness of the watermarking process and should not be altered. To obtain a good imperceptibility of the watermarking process \(HH\) is the best sub-band to embed the information to be hidden [25]. Figure 3 shows the 2D-DWT applied to the reference image, where each sub-band have \(N\times N\) size. Figure 2: Visually secure image decryption scheme. The \(U\) and \(V^{H}\) values are embedded into the sub-bands \(LH\) and \(HL\), respectively, and \(s\) is embedded into \(HH\) after the encryption process. In this way \(LL\) remains unaltered, and the reference image remains visually meaningful despite the watermarking process. On the other hand, \(LL\) is used to generate the random matrixes for the encryption process. A QR decomposition is applied on \(LL\) to obtain an orthonormal matrix \(Q\) and upper-triangular matrix \(R\) following Equation (3). \[LL=Q\ R \tag{3}\]  
\(Q\) and \(R\) are used as random matrixes to map the vector s and the fingerprint feature vector, respectively. By mapping the values of \(s\) into \(Q\) according to Equation (4), the obtained vector \(s_{m}\) is a transformed vector, and the original vector \(s\) not be retrieved from \(s_{m}\). \[Q\ s=s_{m} \tag{4}\]  
In the same way, the physician's fingerprint feature vector \(f\) is mapped into \(R\) to obtain the mapped vector \(f_{m}\) according to Equation (5). \[R\ f=f_{m} \tag{5}\]  
The two mapped vectors \(s_{m}\) and \(f_{m}\) are concatenated to obtain a concatenated mapped vector \(c_{m}\) of size \(L\) and then \(c_{m}\) is permuted and embedded into \(HH\) following a random permutation key \(k\). The key \(k\) is a matrix of integer numbers randomly generated in the range \([0,\ N]\) of size \(L\times 3\). The first column of \(k\) defines the index of the values of \(c_{m}\) to be embedded in the position of \(HH\) determined by the values in the remaining two columns of \(k\). Consequently, the first column of \(k\) has unique values in the range \([0,\ N]\) and the second and third columns have unique pairs of values same in the range \([0,\ N]\). The embedding process for each value of \(c_{m}\) into \(HH\) is detailed in Equation (6).