Secure Medical Image Communication Using Fragile Data Hiding Based on Discrete Wavelet Transform and A₅ Lattice Vector Quantization

Secure communication of medical images is essential to telemedicine. Message Authentication Codes (MAC) can be embedded inside medical images to protect their integrity. Fragile watermarking algorithms are suitable options since they can be used to detect any tampering attempt. In this paper, a novel fragile data-hiding algorithm based on Integer-to-Integer Discrete Wavelet Transforms (IIDWT) and $A_{5}$ Lattice Vector Quantization (LVQ) is proposed. In the proposed data-hiding algorithm, a combination of the medical image Metadata and a MAC is embedded into the medical image. The Metadata includes information about the patient such as name, family, birthday, the place where it is created such as the name of the hospital, and the physician’s name. To preserve the privacy of the patients and the physician/hospital, the Metadata is then replaced with fake information. The receiver can extract the Metadata and the MAC. If the extracted MAC is the same as the expected MAC, the integrity of the medical image is guaranteed. Otherwise, a tampering attempt is detected. The proposed algorithm can embed 50% more data than similar algorithms in medical images while keeping the Peak Signal to Noise Ratio (PSNR) in acceptable ranges. Furthermore, the proposed algorithm is applied to a dataset of medical images and high PSNR values above 53.88 dB are experienced.


I. INTRODUCTION
The developments in multimedia and communication technologies have provided more and more services such as telemedicine, but on the other hand, digital content is prone to manipulation. Thus, the integrity and authenticity of data and software often need to be protected. Over the past decades, medical image privacy protection based on data hiding or watermarking has been a common method [1], [2]. Specifically, authentication information can be hidden in the marked images and retrieved when needed. In addition to authentication, the data hidden in medical images may include Electronic Patient Records (EPR) [3].
The associate editor coordinating the review of this manuscript and approving it for publication was Giovanni Dimauro .
To employ watermarking schemes as an efficient way of protecting medical images, the embedded data must not cause significant distortion to the medical image. In addition, the watermarking must be invisible. A detailed description of watermarking schemes used for medical data authentication is presented in [4].
Although many watermarking algorithms have been proposed in the literature, the embedding capacity and imperceptibility of the embedding algorithms need to be improved. Lattice Vector Quantization (LVQ) [5] has been used for multiple descriptions image coding [6], [7] and multiple descriptions video coding [8]. However, LVQ is also used for data hiding [9], [10].
In this paper, a new fragile high-capacity data-hiding algorithm based on similar sub-lattices of A 5 LVQ is proposed to protect the integrity and privacy of digital medical images. VOLUME 11, 2023 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ The new proposed algorithm is an improved version of the watermarking algorithm proposed by the authors [11] based on similar sub-lattices of A 4 LVQ, with higher capacity as well as higher imperceptibility. The proposed algorithm can embed more than 20 KB of data in a 512 × 512 grayscale image, which is more than other watermarking algorithms while keeping the quality of the cover image at an acceptable level of Peak Signal to Noise Ratio (PSNR). The proposed algorithm is applied to medical images and the results show that even after embedding the payload which is composed of the medical image Metadata, the patient's photo, and the watermark image, the quality of the marked cover image in terms of PSNR does not fall below 53 dB, which is completely acceptable for a semi-reversible datahiding algorithm. The contributions of the proposed algorithm are as follows: 1) A systematic procedure for finding the similar sublattices of A 5 with arbitrary index, N is presented in this manuscript.
2) The proposed data-hiding algorithm is based on A 5 −LVQ can embed a high amount of data. 3) For the same embedding capacity, the proposed algorithm demonstrates higher perceptual quality in terms of PSNR compared to similar algorithms. This high capacity of embedding is consistent among different medical images. 4) The proposed data-hiding algorithm can hide the data inside the entire cover image and it is capable of extracting the embedded data without requiring the original image.
The rest of this paper is organized as follows. A review of the related works is provided in Section II. The proposed lattice vector quantization algorithm as well as the proposed data-hiding algorithm is introduced in Section III. The simulation study and the experimental results are presented in Section IV. Finally, Section V concludes the paper.

II. RELATED WORKS
Data-hiding algorithms are categorized based on their application as well as the employed embedding technique. If the main objective of the data-hiding algorithm is to preserve the confidentiality of the embedded data, it is usually called steganography. But, if the security of the cover media is the main goal, it can be called watermarking. Steganography algorithms are usually designed for grayscale images, and in the case of color images, the algorithms are applied to the 3 color channels equally. However, the relationship between color planes should be incorporated into steganography. In [12], a method, of amplifying channel modification probabilities (ACMP) is proposed, that can be used to generalize any grayscale steganography algorithm to a color steganography algorithm. Steganography algorithms are also divided into single-image and multiple-image methods. Dividing the payload into multiple images increases the security of the algorithm. The payload distribution can be based on the texture of the image and distortion distribution [13].
Watermarking techniques are also divided into fragile watermarking methods and robust watermarking methods. Robust watermarking is suitable for ownership protection, since the algorithm is robust against possible attacks, and the embedded data is recovered. Fragile watermarking is suitable for the detection of tampering attempts [14].
In telemedicine secure communication of medical images is necessary. Digital medical images are prone to different attacks. One attacker may try to identify the patient or the physician, to compromise their privacy. On the other hand, one may try to tamper with the content of the image to cause misdiagnosis or to do fake insurance claims.
Zarrabi et al. present a blind diagnostically-lossless watermarking (BlessMark) [2]. In this research the region of interest (ROI) map is generated by a deep network and the watermark is only embedded in the region of non-interest (RONI) and the ROI is kept intact. The authors claim that BlessMark is a blind watermarking scheme since neither the ROI map nor the original cover image is required on the receiver side to extract the watermark. The proprietary deep network weights, which are used to find the ROI map are not publicly known, like a secret key. Therefore, the confidentiality of the embedded information is preserved. Fares et al. [15] proposed a blind and robust watermarking algorithm based on discrete cosine transform (DCT) and Schur decomposition with the results of 47-49 dB PSNR values.
The presented algorithm by Gao et al. in [16], separates an original medical image into ROI and RONI then it estimates the pixels concentration rate (PCR) of the ROI part. If the PCR is above a threshold, the ROI histogram is stretched, but if the PCR is less than the threshold, the ROI histogram is stretched without shifting. Finally, it embeds the secret data in the ROI. In addition, the RONI is pre-processed to embed secret data into it. YANG et al. presented a framework for secure medical image communication based on Contrast-Enhancement Reversible Data Hiding (RDH) and Homomorphic Encryption [17]. The presented algorithm first embeds the payload in the medical image using a lesion-extraction-based RDH, then encrypts the marked medical image by a symmetric key Homomorphic cipher.
Kahlessenane et al. [18] presented a medical image watermarking method in the frequency domain which uses discrete wavelet transform (DWT), non-subsampled contourlet transforms, non-subsampled Shearlet transforms, and DCT. Robustness against various attacks is tested in this research. Alshanbari [19] used LZW (Lempel-Ziv-Welch) based fragile medical image watermarking. The results are proven to be robust against various attacks.
Hemdan [20] proposed a combination of Wavelet Fusion (WF), Singular Value Decomposition (SVD), and Multi-Level Discrete Wavelet Transform (MDWT) for medical image watermarking. The algorithm is proven to be able to resist severe attacks [20]. Zermi et al. [21] presented an algorithm that uses DWT decomposition and SVD for medical image watermarking. The PSNR values in the range of 44 are reported as the results.
Thanki and Kothari [22] used ridgelet transform and SVD and the Arnold scrambling-based encryption for medical image watermarking.
An enhanced RDH scheme is presented in [23]. In this work, a fragile watermark as well as the EPR is embedded in the medical image. Any kind of tampering attack would be detected since it will destroy the fragile watermark. During the embedding process underflow (intensity values <0) and overflow (intensity values >255) may occur. The authors have used Paillier cryptosystem to avoid this problem [23].
Sanivarapu [24] proposed a watermarking algorithm for medical images based on a 2-level DWT for the creation of sub-bands which are then partitioned into blocks. Furthermore, Schur decomposition is used for the creation of Authenticated Block Bits (ABB). The results show PSNR values larger than 30 dB.
Vaidya [25] presented a hybrid transform-based medical image watermarking which embeds the patient's fingerprint in the medical images using lifting wavelet transform (LWT) and DWT. The experimental results show the PSNR values in the range of 36 dB for watermarked medical images.
Singh et al. [26] used Least Significant Bit (LSB) substitution and pseudo-random key encryption and Discrete Wavelet Transform-Singular Value Decomposition (DWT-SVD) for watermarking. The experimental results show PSNR values in the range of 43 dB. Agarwal and Singh [27] used discrete cosine transform (DCT) and the genetic algorithm for RGB, YCbCr, and YIQ image watermarking. An increase in PSNR value led to 52-53 dB reported. Anand and Singh [4] surveyed various watermarking techniques in the medical domain.

III. MATHEMATICS OF A 5 LATTICES
An n-dimensional lattice in R n is denoted by a set of basis vectors, = ⟨b 1 , b 2 , . . . ,b n ⟩. The lattice points are generated using a generator matrix. The generator matrix is composed of the basis vectors of the lattice. The generator matrix of the lattice with the basis vectors b 1 = (b 11 , b 12 , . . . ,b 1m ) , . . . ,b n = (b n1 , b n2 , . . . ,b nm ) is given as [28]: The Gramm matrix, A, of a lattice is defined as A =GG t , where G t is the transposed matrix of G. The Gramm matrix A determines the linear independence of the basis vectors, that is, they are linearly independent if and only if the determinant of A is non-zero. Two lattices are called equivalent if they are with proportionate Gramm matrices. The determinant of a lattice is also equal to the determinant of the A [28]: If the generator matrix is square then (2) is written as [28] det = (det(G)) 2 Thus, the volume of the fundamental parallelotope of a lattice is also calculated as [28]: Assume that is an L-dimensional lattice with the generator matrix G. A sub-lattice ′ ⊂ with generator matrix G ′ is said to be geometrically similar to if and only if G ′ = cUGB, for nonzero scalar c, an integer matrix U with detU= ±1, and a real orthogonal matrix B (with BB t = I) [28]. The index N is defined as the ratio of the fundamental volume of the sub-lattice ′ to the fundamental volume of VOLUME 11, 2023 the lattice . The fundamental volume of the lattice (vol) is equal to the determinant of the generator. Thus, N is calculated by The root lattice A n is a subset of points with n+1 coordinates, such that the sum of their coordinates is zero. Therefore, the lattice A n can be defined as: A sub-lattice ′ ⊂ with generator matrix G ′ is said to be geometrically similar to if and only if G ′ = cUGB, for nonzero scalar c, an integer matrix U with detU= ±1, and a real orthogonal matrix B (with BB t = I) [28]. In other words, the existence of ′ can be determined (in principle) by searching through to see if it contains a set of vectors with Gram matrix cA. For small k and c, this is quite feasible [29]. In lattice vector quantization (LVQ), the lattice points are used as the quantization bins. During the LVQ process, every point p ∈ R 5 is mapped to a certain lattice point λ, that is closer to p than any other lattice point. The region around every λ, which includes all the points that are mapped onto λ by LVQ is called its Voronoi region, Voro λ .
Sub-lattice ′ ⊂ is considered a clean sub-lattice if all the points of the reside only inside the Voronoi region of the sub-lattice points rather than on the boundary of the Voronoi region [29]. It means that the lattice points are not shared between the Voronoi regions of adjacent sub-lattice points.

A. FINDING SIMILAR SUB-LATTICES OF A 5
According to (6), the A 5 root lattice is defined as: The A 5 root lattice space is spanned by the multiplication of Z 5 points and (8) Every A n lattice has a n × n square generator in addition to the rectangular n × (n + 1) the generator is usually called a triangular generator. It is difficult to find the similar sub-lattices of A 5 using the rectangular description A5_5×6. Therefore, the square description of A 5 in R 5 space is usually used instead. The square generator of the A 5 is given as: In general, it is not possible to find clean any sub-lattice of A n with any arbitrary N . In other words, for every A n lattice, only certain values of N are possible. In the case of root A 5 lattice, similar sub-lattice generators can only be found for: This sequence of integer numbers is named A000302 in [30]. The Gramm matrices of the generators of the similar sub-lattices, A ′ A5_5×5 and the Gramm matrix of the lattice, A A5_5×5 are proportional. The Gramm matrix of G A5_5×5 is: Suppose the generator of a clean sub-lattice is Then, the Gramm matrix of the generator of the clean sublattice A ′ A5_5×5 would be: According to (12), the basis vectors of the generator of the sub-lattice must have the following properties: where d can be 1, 4, 16, 64, 256, 1024, 4096, . . . . In other words, to find a clean sub-lattice generator with an arbitrary index N, first A 5 lattice is generated by the multiplication of Z 5 by (8). Any set of 5 points in A 5 lattice can be used as the basis vectors of a potential generator of the sub-lattice. But only those potential generators with a Gramm matrix A ′ that fulfills the requirements of (14) can generate a clean sublattice of A 5 . Therefore, the A 5 lattice must be searched to find sets of 5 lattice points such that, if used as the basis vectors of the generator of the sub-lattice, they satisfy the properties of (13).
Although the A 5 lattice includes an infinite number of points, it is not required to search all the R 5 space because the lattice points that are possible basis vectors reside in the proximity of the origin, for example with Euclidean distance less than 10 it is possible to find sub-lattice generators with N < 1048690.
In this way, a portion of A 5 lattice was generated by the multiplication of a portion of the Z 5 points and (8). The selected portion of Z 5 includes all 5-dimensional integer vectors that range from [−5 − 5 − 5 − 5 − 5] to [5 5 5 5 5], therefore it includes 11 5 elements and consequently the corresponding A 5 lattice will have the same number of elements.
However, searching among all the 5-combinations of a set with 11 5 elements, (161051!) (5! × 161046!) will be infeasible. To minimize the searching time, a progressive procedure is defined. Assume that we are going to find sub-lattice generators with N = 1ord = 1. According to our experiments, there are 30 lattice points λ i in the selected portion of A 5 that hold the following property: λ i .λ i = 2d = 2. Therefore, these lattice points are potential basis vectors of the sub-lattice generators with index N = 1, presented in Table 2. This matrix is called A 5_N 1 . Although, searching among all the 5-combinations of a set with 30 elements (30!) (5! × 25!)) is very faster than the previous set with 161051 members, but it is still impossible. Each row of Table 2 can be used as the first basis vector of the sub-lattice generator. Next, to find the second basis vector of the sublattice generator, the mutual dot product between the 30 rows of A 5_N 1 are computed. Among 30 × 30 couples, there are 120 couples λ i , λ j such that λ i .λ j = −1. This matrix is called A 5_N 1_ij . Several example couples of A 5_N 1_ij are presented in Table 3. In the third step, for every couple of A 5_N 1_ij , a suitable lattice point λ k from A 5_N 1 must be selected. Among these 120 × 30 possible tuples, there are only 600 triple like λ i , λ j , λ k such that λ i .λ k = 0,λ j .λ k = −1. These 600 triples form a matrix called A 5_N 1_ijk . Two examples are triples of A 5_N 1_ijk are presented in Table 4. These triples all satisfy the requirements of (15). For each row of A 5_N 1_ijk such as λ i , λ j , λ k , the following dot multiplications hold: In the fourth step, for every triple of A 5_N 1_ijk , suitable lattice points λ l from A 5_N 1 are selected. Among these 600 × 30 possible quadruples, there are only 3960 quadruples λ i , λ j , λ k , λ l such that λ i .λ l = 0,λ j .λ l = 0, and λ k .λ l = −1. These 3960 quadruples form a matrix called A 5_N 1_ijkl . Two examples of quadruples of A 5_N 1_ijkl are presented in Table 5.
For each quadruple of A 5_N 1_ijkl such as λ i , λ j , λ k , λ l , the following dot multiplications hold: Finally, for every quadruple point in A 5_N 1_ijkl , possible lattice points are found such as λ i , λ j , λ k , λ l , λ m , that satisfy the requirements of (14) and therefore they form a sub-lattice VOLUME 11, 2023  generator of index N = 1. According to our experiments, 720 distinct sub-lattice generators with index N = 1 were found.
This means that each row of A 5_N 1_ijklm form a new generator of the A 5 sub-lattice with index N = 1. For example, the 3 rd quintuple gives the following generator, (18), as shown at the bottom of the page.
Since G ′ A5_N1_3 and G A5_5×5 have the same Gramm matrices, their relative index is N = 1. The same procedure is repeated for other values of d= 4, 16, 64,and256, and generators with indexes of N = 32, 1024, 32768,and1048576 were calculated. Example generators are reported in (19) to (22), as shown at the bottom of the page.
Fast quantizing algorithms are a family of lattice vector quantization algorithms presented in [28] for different root lattices. The fast quantizing algorithm first projects the n-dimensional input vector onto n +1 dimensional vectors on n+1 i=1 x i = 0, x i ∈ R hyper-plane using a matrixmultiplication [28]. Then, using a manipulation the projected point is mapped onto a lattice point. The transformation matrix determines on which lattice the input points must be mapped. For example, if the points are going to be quantized on G A5_5×5 then T A5_5×5 must be used. The transformation matrix T A5_5×5 is calculated using the relation between the triangular generators G A5_5×5 and the (n+1)dimensional definition G A5_5×6 [31]:

IV. PROPOSED MEDICAL IMAGE DATA HIDING BASED ON DWT AND A 5 LVQ ALGORITHM
In this part of the paper, the proposed data-hiding algorithm is presented. For every data-hiding algorithm whether it is fragile or not, two different functions must be implemented,  that is embedding function and extracting function. These functions are described in the following subsections.

A. EMBEDDING FUNCTION
Digital medical image files usually have a DICOM (Digital Imaging and Communication in Medicine) format. DICOM makes medical images exchange easier and more independent of the imaging equipment manufacturer. The image data type is usually uint16 which means every pixel has a positive number between 0 and 65536. Besides the image data, the DICOM file format includes other information useful to describe the images such as the type of patient diagnostic image (MRI/CT), the patient's demographic data, the place where it is created such as the name of the hospital, and the physician's name, called Metadata [32]. The medical images that are used in our experiments include 95 fields, which include 2 KB of Metadata. The details of the selected Metadata are provided in Table 6. In the proposed data-hiding algorithm, the patient's photo and the watermark logo are also embedded in the cover image. The image inside the DICOM file is used as the cover image, in which the sensitive data are embedded.
To describe the proposed embedding algorithm, assume the cover image has a common size of 512 × 512. It is important to minimize the distortion due to the embedding process, therefore the embedding process does not affect all pixels of the image, but it only selects several blocks of the image and embeds the data in those blocks. The number of required blocks depends on the amount of the payload. Since the algorithm is going to embed the payload using the DWT coefficients and A 5 LVQ, the blocks must be 10 × 10 pixels so that DWT coefficients become 5 × 5 blocks. Thus, to create 10 × 10 pixels blocks, the 512 × 512 cover image is cropped and one 510 × 510 image is formed and then it is reshaped to 2601 blocks.
Assume a given 10 × 10 block of the image is selected for embedding. In the second step of the embedding process, this block is transformed by an IIDWT. This is important to mention that the DWT must be Integer-to-Integer. If a noninteger DWT is used instead, then the cover image would have fractions after the embedding. Since the data type of the cover image is an unsigned integer then any floatingpoint value is rounded and consequently, the embedded data is lost. The IIDWT transforms the input 10 × 10 block into four 5 × 5 sub-bands, namely approximation coefficients or LL, horizontal sub-band (HL), vertical sub-band (LH), and diagonal sub-band (HH). Embedding inside the approximation coefficients injects a considerable amount of distortion therefore it is usually kept intact. The coefficients of the HL, LH, and HH sub-bands are only used for embedding.
Suppose a vector of the HL is selected for the embedding V . The main idea of the embedding process is to replace V with V ′ according to a mapping table and recover the embedded data by having V ′ a nd the mapping table. The set of Z 5 points in the vicinity of V are suitable candidates. However, the mapping table must not be sent along V ′ , thus in the receiver, it will not be possible to recover the data using V ′ without the mapping table. The mapping table can be reconstructed in the receiver if the same set of Z 5 points can be formed, which requires to have a consistent relation between VOLUME 11, 2023 the Z 5 points in the set and V The lattice vector quantization can be used to form the required relation.
The set of Z 5 points found within the Voronoi region of any given A 5 sub-lattice point λ ′ , includes Z 5 points that are quantized λ ′ by A 5 -LVQ. If the set of the Z 5 points that are quantized to a fixed point such as λ ′ = LVQ_A5 (V , N ) is formed, then it is possible to reconstruct the same set Z 5 points in the receiver. This set, Z voro , is defined as: The process of finding the Z 5 points that reside within the Voronoi region of a given sub-lattice point are as follows. First, the DWT coefficient vector V is quantized onto λ ′ , a sub-lattice of A 5 with a given index N . Then, λ ′ is rounded to the nearest Z 5 and added to each row of a combination matrix [−e, −e, −e, −e, −e] to [+e, +e, +e, +e, +e], where e is determined by N . The result is the set of all Z 5 points around λ ′ . Finally, among these points, only those that are lattice vector quantized on λ ′ are selected and then Z voro (V , N ) is formed.
For N = 1 the value of e can be as small as 1 and for N = 1048576 the value of e must be as high as 4. When e = 2, there are 5 5 rows in the combination matrix. The embedding capacity depends on the number of Z 5 points found inside Z voro (V , N ), which is controlled by N . The most important property of Z voro (V HL , N) is that: In other words, if any member of Z voro (V , N ) is sent instead of V , such as V ′ , the receiver repeats the process and finds Z voro (V ′ , N ) that is the same as Z voro (V , N ). Thus, it is no longer required to send the mapping table with V ′ HL . It is impossible to depict the embedding process in 5 dimensions. However, to visualize the process, it is possible to simulate the process in 2 dimensions, that is, A 2 is used instead of A 5 and Z 2 is used instead of Z 5 .  Table 7.
The mapping table can be as simple as possible. For example, if Z voro in Table 7 is considered, according to Table 7   The embedding phase continues by repeating the same procedure for every row in HL, LH, and HH sub-bands. For a given 510 × 510 image there are 2601 blocks of the size 10 × 10 and as a consequence, there are 2601 × 3 sub-bands of the size 5 × 5. The next step of the embedding phase is to do the inverse IIDWT transform and prepare 10 × 10 blocks of the embedded cover image. Finally, the embedded image and anonymized Metadata are used to generate a DICOM image to send to the destination. The embedding procedure is depicted in FIGURE 3.

B. EXTRACTING FUNCTION
On the receiver side, the extracting process is applied to the received DICOM file. The data extraction process is very similar to the embedding process. First, the cover image is read from the DICOM file. Next, the cover image is reshaped to the form of 2601 blocks of 10 × 10 d imensions. Every 10 × 10 block is transformed to the wavelet domain using the same IIDWT. The result for every block would be four 5 × 5 sub-bands, LL, HL, LH, and HH. As mentioned in IV-A there is no data embedded in the approximation sub-band, LL. Thus, HL, LH, and HH sub-bands are used to extract data. Every 5 × 5 sub-band includes 5 rows and consequently 5 embedded data.
Assume that a row V ′ is received. To extract the data embedded in V ′ , it is required to find its corresponding Z voro (V ′ , N ), the set of all Z 5 points that are in the Voronoi of the same sub-lattice point λ ′ . As mentioned in IV-A, members of the Z voro (V ′ , N ), set have two properties, they are all close to the input vector and they are all quantized to the same sublattice point, and consequently, they are all within the Voronoi of the same sub-lattice point. Thus, the following relation can be used instead of (24).
In other words, it doesn't matter which member of Z voro (V ′ , N ) has been sent and received, since Z voro V ′ is the same as Z voro (V ′ , N ) for every one of the rows. Now the input V ′ is searched in the Z voro V ′ , N and its index in Z voro (V ′ , N ) is found. The embedded data is decoded by subtracting 1 from the index of V ′ in Z voro V ′ , N . The extraction procedure is depicted in   repeating the same procedure for every row in HL, LH, and HH sub-bands. For a given 510 × 510 image there are 2601 blocks of size 10 × 10 and as a consequence, there are 2601 × 3 sub-bands of the size 5 × 5. By repeating the algorithm for the rest of the blocks, the embedded payload, including the Metadata, the patient's photo, and the watermark image is extracted. The final step of the extracting phase is to replace the fake Metadata with the extracted original Metadata and generate a reconstructed DICOM image.

V. EXPERIMENTAL RESULTS
In this section, the performance of the proposed datahiding algorithm is evaluated and compared against several recent algorithms proposed in the literature. The experimental results are divided into four parts. In section V-A the impact of changing the index N on the embedding capacity for random vectors is provided. In section V-B, the impact of changing the index N on the total amount of embedding capacity on medical images is provided. In sections V-C the Metadata of the patient, the patient's photo, and the watermark image are embedded in selected medical images with DICOM format. In these three experiments, a database of 20 medical DICOM files has been used. Finally, the proposed data-hiding algorithm is compared with similar medical image watermarking algorithms in sections V-D. In this experiment, 14 images from [33], 12 images from [34], and 24 images from [35] were used. The most common measure for imperceptibility analysis in the literature is the PSNR. PSNR measures the amount of distortion between two images. The value of PSNR can be calculated as: where I 1 is the first image, I 2 is the second image, N rows is number rows, N cols number of columns, max (I 1), is the maximum level of intensity, and MSE is the Mean Squared Error defined as follows: The second imperceptibility measure that we use is the number of pixels changed ratio (NPCR). To calculate NPCR the number of pixels that are changed after embedding is divided by the number of all pixels. The structural similarity index measurement (SSIM) is another common measure of distortions between an image and its altered version.
SSIM (x, y) = 2µ x µ y + C 1 2δ xy + C 2 where µ x is the average of x, µ y is the average of y, δ 2 x is the variance of x, δ 2 y is the variance of y, δ xy is the covariance of x and y, C 1 = (k1L) 2 -Constant to avoid instability when µ 2 x + µ 2 y is close to zero, k1 = 0.01, L = 255, C2 = (k2L) 2 -Constant to avoid instability when δ 2 x + δ 2 y is close to zero, k2 = 0.03. The PSNR is not an objective measure of perceptual quality whereas SSIM is a common measure of perceptual quality. The embedding capacity of data-hiding algorithms are usually measured by the value of BPP. To calculate BPP, the number of embedded bits is divided by the number of pixels used.

A. THE IMPACT OF INDEX N ON THE EMBEDDING CAPACITY
The lattice vector quantization onto the points of a sub-lattice depends on the index of the generator which has generated the sub-lattice. The number of lattice points and Z 5 points within the Voronoi of any sub-lattice point are increased when the index N increases. In this part of the experiment, we are going to check the impact of the index N on the performance of the data-hiding algorithm in terms of the embedding capacity and the perceptual quality of the cover image.
In section IV-A, V = [63, 82, −75, 83, 27] as a random vector was used to generate a sample Z voro (V , N ) for index N = 1. However, if the same V is quantized onto a sublattice of A 5 lattice with a given index N = 32, a different Z voro (V , N ) with a larger number of points will be found. If the index of the sub-lattice is N = 32 then the result of the quantization of V will be λ ′ = [62.932, 82.874, −75.632, 82.734, 27.386] and there are eighty Z 5 points inside the Voronoi of λ ′ . The embedding capacity for a given vector depends on the coarse degree of quantization. The embedding capacity for a given vector V is calculated as The number of points in Z voro is also dependent on the input vector. In other words, the embedding capacity per vector is not the same for different vectors. For example, if Z voro in Table 7 is considered, the capacity is 1 bit per 5 pixels or 0.2 BPP. To show the relation between the input vector and the number of points in Z voro (V , N ), 1000 sample random vectors are generated and the corresponding embedding capacity is depicted in Table 9. According to Table 9, the embedding capacity for the same random vector increases when the index is increased and it remains almost constant for the same index across different vectors, especially for N >32. The total embedding capacity for a given 512 × 512 image is calculated as follows. There are 2601 blocks of the size 10 × 10 in a cropped image of the size 510 × 510 and as a consequence, there are 2601 × 3 sub-bands of the size 5 × 5. The total capacity of the proposed embedding algorithm in a 512 × 512 image will be determined by: It is also possible to trade the quality for a higher capacity. In other words, if the approximation coefficients are also used for the embedding, then the capacity will increase but the quality will decrease. Therefore, the total capacity of the proposed embedding algorithm in a 512 × 512 image will be determined by:

B. THE IMPACT OF N ON THE TOTAL EMBEDDING CAPACITY OF MEDICAL IMAGES
In this section the impact of the selected index for the A 5 sublattice vector quantization on the total embedding capacity of the proposed algorithm is studied. According to the embedding algorithm described in section V-A, the cover image is first divided into 10 × 10 blocks and then these blocks are transformed into wavelet domains. The embedding process is done on 3 sub-bands out of 4 available sub-bands and the approximation coefficients are  left intact. Therefore, for every block, there are 3 sub-bands each one having 5 rows, a total of 15 rows per block. The number of bits per block is dependent on the value of the row vector and is not consistent for all vectors. In this experiment, 20 medical images have been selected for embedding random numbers. Selected medical images are illustrated in FIGURE 5.
For every row vector V Z the set of Z voro is calculated and a random number in the range of [1,Capacity (V Z , N ) − 1] is embedded. According to our experimental results, presented in Table 10, the embedding capacity is directly related to the value of the index N as well as the number of embedded blocks. In other words, increasing the index or the number of embedded blocks improves the embedding capacity. However, increasing the embedding capacity imposes higher distortions and lower PSNR values.
According to Table 10, the distortion between the embedded image and the original image increases as the value of index N is increased and consequently, the PSNR value decreases. On the other hand, the embedding capacity is increased as the value of index N is increased. Increasing the number of embedded blocks can impact both the distortion and the embedding capacity.
Embedding in the first 128 blocks decreases the PSNR values and increases the average embedding capacity for the same index N. Details of the average PSNR values and the average embedding capacities for embedding in the first 128 blocks of the 20 images are shown in Table 6.
To demonstrate the impact of the index N and the number of embedded blocks on the perceptual quality of the cover images, the original images and the cover images with 128 embedded blocks are provided in FIGURE 6 with corresponding PSNR values and SSIM values.
The maximum embedding capacity of the proposed embedding algorithm based on the similar sub-lattices of A 5 is achieved for the index N = 1048576 and the number of embedded blocks = 2601. The average PSNR values of the 20 embedded medical images as well as the corresponding average embedding capacities are plotted as a function of   to FIGURE 7, it is obvious that the distortion between the embedded image and the original image and the average or embedding capacity increases as the number of embedded blocks is increased, despite the value of index N . Besides, according to FIGURE 7 for the same number of embedded blocks, the distortion between the embedded image and the original image increases as index N is increased.

C. EMBEDDING THE METADATA IN THE SELECTED MEDICAL IMAGES
As stated in section IV-A, the entire Metadata of the selected medical images includes less than 2 KB of data. The watermark image, which is shown in FIGURE 8, is a binary image with dimensions of 180 × 50. Thus, 180 × 50 ÷ 4 = 2250 bytes in the payload data are reserved for the watermark. The patient photo is a gray-scale image with 50 × 50 pixels, and 5000 bytes of payload data must be reserved for it. Less than 6 KB will be embedded in a typical medical image. The experimental results of embedding the patient Metadata, his/her photo, and the watermark image in the 20 selected medical images are provided in TABLE 12. According to TABLE 12 the number of required blocks to be used in the embedding process of the Metadata, patients' photo, and the watermark image, is constant for each index N for different image, and PSNR values range from 93.573 dB to 101.076 dB. As demonstrated in Section IV, the proposed data-hiding algorithm based on A 5 lattice vector quantization is capable of embedding a high amount of data. Furthermore, for the same embedding capacity, the proposed algorithm demonstrates higher perceptual quality in terms of PSNR compared to similar algorithms. Also, this high capacity of embedding is consistent among different medical images. Finally, the proposed data-hiding algorithm can hide the data inside the entire cover image and it is capable of extracting the embedded data without requiring the original image.

D. COMPARISON WITH RELATED WORKS
The results of the proposed algorithm are compared with the related works on three medical image datasets. The medical image datasets comprise an MRI image dataset [33], a radiographic image dataset [34], and an ultrasound image dataset [35]. The datasets are in BMP format. The comparison of the PSNR, SSIM, NPCR, and BPP values between the proposed algorithm index N = 1024, with similar methods proposed from 2017 to 2021 is presented in TABLE 13. According to our experiments, as the embedded payload is increased, that is higher BPP, the PSNR values decrease.  This is logical because to increase the payload we have to embed data in more blocks or use a larger index N and consequently impose more distortion.

E. COMPUTATIONAL COMPLEXITY AND SPEED OF THE PROPOSED ALGORITHM
To calculate the speed and computational complexity of the proposed algorithm the simulations are performed on the same computer system with a processor Intel(R) Core (TM) i9-10850K CPU @ 3.60GHz 3.60 GHz, with 64 GB of RAM, Windows 10, and Matlab R2019b for the same three datasets and the results are reported in TABLE 14.

VI. CONCLUSION
In this paper, a novel data-hiding algorithm based on IIDWT and the A 5 lattice vector quantization is proposed that can embed the payload data inside the entire image. The proposed data-hiding algorithm is a fragile data-hiding algorithm that enables us to detect any tampering efforts. The proposed data-hiding algorithm embeds the data by finding the Z voro , the set of Z 5 points that coexist in the same Voronoi as the current vector of the DWT coefficients. Then the vector is substituted by a proper member of the Z voro . The embedded data is recovered in the receiver by doing the same procedure and finding the index of the received vector in the same Z voro .
The simulation results show that the proposed algorithm outperforms similar proposed algorithms. The proposed datahiding algorithm is applied to 62 BMP medical images from an MRI image dataset [33], a radiographic image dataset [34], and an ultrasound image dataset [35]. The experimental results show that the proposed algorithm can embed more data than similar algorithms in the standard test images while keeping the PSNR above 53 dB. In addition, the proposed algorithm is applied to 20 DICOM medical images to embed the Metadata of the file together with the patient's photo and a watermark as MAC. The fragility of the algorithm enables us to detect any tampering efforts and keep the integrity of the system. In addition, the PSNR value which are above 53 dB guaranties no adverse effect in the process of diagnosis. For the future works of the proposed algorithm the A 6 , A 7 , and A 8 similar sub-lattice are considered for increasing the capacity of the data hiding in various multimedia applications. Furthermore, other applications of the proposed algorithms for the Internet of Things and smart cities are under investigation.