Medical image steganographic algorithm via modiﬁed LSB method and chaotic map

Many methods of hiding information in an image are existing now. The least signiﬁcant bit is the famous method used in steganographic algorithms. Medical image steganography is a technique used to make the transmission of these images secure so that the decision of the Specialist physician based on these images is not affected. In this paper, medical image steganographic algorithm using modiﬁed least signiﬁcant bit and chaotic map is proposed. The main problem is that the selection of embedding pixels within the host image is not protected enough in most existing methods. So, the author used two-dimensional piecewise smooth chaotic map to select the positions of these pixels randomly. On the other hand, all bits in the secret medical image are transmitted without losing any bit. To do that, the secret medical image is encrypted using one-dimensional piecewise chaotic map (Tent map). Then, the steganographic algorithm is used to hide the bits of the encrypted secret medical image. The bits of each embedded pixel are shufﬂed before the embedding pro-cess randomly. After that, the stego image is created. The host image and stego image are analysed with the peak signal-to-noise ratio, the mean square error, histogram test, image quality measure and relative entropy test. The stego image displays acceptable result when comparing with the host image. Also, the chi-square attack test is performed and the stego image can resist it. The proposed algorithm can assist the sending of medical images via communication media.


INTRODUCTION
Digital image transmission via open networks is one of the important research problems. Medical image is one of the famous digital images. Due to their sensitivity, the medical images must be transmitted by networks securely. Any change in the medical image during the transmission will affect the accuracy of the doctor's diagnosis. So the problem here is how to send the image safely and without change. Steganography algorithms are used to hide the secret information within the host image. Then the host image is sent to the receiver. Finally, the secret information can be retrieved from the host image. The hiding data using watermarking is the traditional method where the secret information is embedded into host image [1]. In this case, the host image is called stego image. The host image used two styles for hiding the secret information, frequency domain and spatial domain [2]. In the first one,  [3,4]. In the second one, the secret information is hidden in intensity values of host image [5,6]. Many algorithms of spatial domain steganography have been presented based on watermarking [7], LSB substitution [8], LSB matching [9], chaos theory and random distortion [10], chaos [11]. In LSB, the LSB set of pixels in the host image are replaced by the secret image's bits in random or in sequential method. In terms of security, the random method is better than the sequential method [12]. In the current proposed algorithm, the pixels of the host image are chosen randomly via the sequence created by the chaotic map. Chaos implies a condition of turmoil. A dynamical system of discrete type is called map. The main essential features of the chaotic map are sensitive to the initial conditions, ergodicity, and structure complexity. Much information hiding algorithms has been proposed using a chaotic sequence [13]. Medical image steganography has been FIGURE 1 Bifurcation diagram of Tent map with respect to the parameter receiving considerable attention [14,15]. The proposed algorithm is developed based on three main steps. The first step is encrypting the secret image via one dimensional-piecewise chaotic map (Tent map). The second is determining the pixel positions of the host image randomly, by the two-dimensional piecewise smooth chaotic map. The third step is embedding the bits of the encrypted medical secret image in the colour channel of the selected pixels of the host image randomly.
The remaining sections of the current paper are organised as follows: the piecewise chaotic maps and their features are given in Section 2. In Section 3, the proposed algorithm is described. The experimental results are presented in Section 4. Finally, the conclusion is presented in Section 5.

THE PIECEWISE CHAOTIC MAPS
In this section, two piecewise chaotic maps are given to encrypt the secret medical image and to select the pixels of the host image randomly.

One dimensional-piecewise chaotic map (Tent map)
The Tent map can be described piecewise by where n ≥ 0 and the control parameter ∈ [0, 2]. Depending on , the dynamical system behaviours of system (1) going from predictable to chaotic. Figure 1 displays the bifurcation diagram of the Tent chaotic map with respect to the parameter. Lyapunov exponent of the Tent chaotic map with respect to the parameter shows in Figure 2. For more details, see for example [16].

Two-dimensional piecewise smooth chaotic map (2DPSCM)
Recently, the authors in [17] described the problem of remanufacturing duopoly game using 2DPSCM. It takes the following form: x i and y i reflect the amount of production received in the market by Company 1 and Company 2. Equation (1) displays 2DPSCM's chaotic behaviour with seven separate parameters. In the economy, these parameters are significant. The shift cost parameters are c 1 and c 2 such that c 1 > c 2 . The parameter denotes to a fraction where customers will pay for the purchase of new remanufactured goods such that c 2 < and 0 < < 1. The functions k 1 x and k 2 y are used to capture the speed of a company's quantity adjustment with the change that can occur in the marginal profit of a company. The chaotic behaviour of 2DPSCM is observed by the values of the parameters: x(0) = 0.19, y(0) = 0.15, c 1 = 0.55, c 2 = 0.3, = 0.73, k 1 = 2.1 and k 2 = 8.4. Figure 3 displays the bifurcation diagram of 2DPSCM with respect to the k 1 parameter. Lyapunov exponent of a 2DPSCM with respect to the k 1 parameter shows in Figure 4.

PROPOSED WORK
The digital image is represented by RGB model which can use triplets in a 24-bit digital image corresponding to red, green, and blue intensities. A triple of values associated with each colour can be represented for each pixel of the image. All these triplets consist of an array corresponding to the digital image. The image is represented by an array of gray-scale values in the case of 8-bit images. The most noticeable and also the most wellknown technique for hiding information in images is the LSB insertion process. Changing the least significant bit is expected to cause a hardly noticeable image alteration.

Cryptography
Cryptography [18] is maybe the first and greatest common technique to protect the secret images. This technique modifies the secret image from original to cipher image which it is shuffled and hard to read. So, the encryption stage should save secrecy and avoid to drive any information of the secret image from the cipher image.

3.1.1
The secret key of the cryptography stage Assume the secret medical image is denoted by S = (s i j ), i = 1, 2, … , m, j = 1, 2, … , n. The key mixing proportion factor can be used to compute K 1 as follows [19]:

Input:
Secret medical image S with size m × n, and initial value x 0 of the Tent map.

Output:
Cipher image C with size m × n.
Step 9: Converte from binary to decimal, E.
Step 10: Reshape E to two-dimensional array of size m × n, say C.
Step 11: C is the cipher image Then the initial condition x 0 and the parameter of the Tent map are modified via the following formulas:

The encryption algorithm
Now, the encryption algorithm via the Tent chaotic map is given in Algorithm 1.
For the decryption algorithm, use the inverse steps of Algorithm 1 to restore the secret medical mage.

Steganography
In most methods used in steganogarphy, we lost some low significant bits but in medical image it is not acceptable. In the current proposed algorithm, two pixels from the host image are needed to hide one pixel from the cipher image (encrypted secret medical image). Those pixels are selected randomly using 2DPSCM. LSB embedding is modified by shuffling the 8-bits of each pixel in the cipher image randomly. This modification is shown in Figure 5. Suppose X and Y are two random pixels from the host image and the arrows indicate the new positions of the random bits of the cipher image's pixel. In [20], the authors decided that the R and G channels are more sensitive to embedding bits and make more distortion in stego image than the B channel. So, two bits are embedded in each B channel of X and Y.

3.2.1
The secret key of the steganography stage The key mixing proportion factor can be used to compute K 2 and K 3 as follows: Then the initial condition x(0) and y(0) of 2DPSCM are modified according to the following formulas: Also, the parameters of 2DPSCM can be calculated by the following formulas:

Modified LSB embedding algorithm
In the current proposed algorithm, two pixels from the host image are needed to hide one pixel from the cipher image (encrypted secret medical image). Those pixels are selected randomly using 2DPSCM. LSB embedding is modified by shuffling the 8-bits of each pixel in the cipher image randomly. This modification is shown in Figure 5. Suppose X and Y are two random pixels from the host image and the arrows indicate the new positions of the random bits of the cipher image's pixel. In [20], the authors decided that the R and G channels are more sensitive to embedding bits and make more distortion in stego image than the B channel. So, two bits are embedded in each B channel of X and Y. The proposed embedding algorithm based on modified LSB and 2DPSCM may be given as: where the Matlab function bitset(A,bit,V ) returns A with position bit set to the value of V .

Modified LSB extracting algorithm
In this stage, the embedded secret medical image S can be extracted from the given stego image O without referring to the original host image H. The set of pixels that store the cipher image bits in the stego image is chosen using the same sequence as in the modified embedding algorithm. Extract and unshuffle the LSBs of the chosen pixels to reconstruct the cipher image. Then, the cipher image is decrypted using the inverse of Algorithm 1 to get the secret medical image S. The proposed modified extracting algorithm based on modified LSB and 2DPSCM may be given as: where the Matlab function bitand(A, B) returns the bit-wise AND of A and B.
The proposed steganographic algorithm embeds the bits of the secret medical image according to the modified least significant bit technique as shown in Figure 6.

EXPERIMENTAL RESULTS
In the current section, the result of our proposed algorithm will be investigated.
Step 1: Reshape H to two-dimensional array, say h with size 4mn × 3.
Step 2: Encrypt the secret medical image S using Algorithm 1 to get the cipher image C.
Step 4: Reshape C to two-dimensional array, say msg with size mn × 1.
Step 5: Generate two different random vectors of size mn × 1 using 2DPSCM, say X and Y such that for all i ∈ X , Y then i ∈ 1, 2, 3, … , 4mn.
Step 6: Convertmsg from decimal to binary, say out.
Step 10: O is the stego image.  Figure 7 shows four images which are used as host images. Figure 8 shows the host image (baboon), the secret medical image, the stego-image and the retrieved secret medical image.

Output:
Secret medical image S with size m × n.
Step 2: Declare an one-dimensional array of size 8, say W, to store the extracting LSBs for each pixel.
Step 3: Generate two random vectors of size mn × 1 using 2D-PSCM, say X and Y such that for all i ∈ X , Y then i ∈ 1, 2, 3, … , 4mn.

End
Step 6: Reshape msg to two-dimensional array, say C with size m × n.
Step 7: C is the cipher image.
Step 8: Decrypt C using the inverse of Algorithm 1.
Step 9: The result of Step 8 is the secret medical image, S.

Statistical analysis
The efficiency of the proposed algorithm was investigated using various types of statistical tests.

PSNR test
The distortion degree of a stego image regarding the host image plays an essential role. It is usually evaluated by the peak signalto-noise ratio (PSNR) that is given by PSNR = 10 log 10 where H and O are the host and stego images, respectively. Table 1 shows MSE and PSNR of different host images with the same secret medical image. Furthermore, Table 2 presents a comparison result between the proposed algorithm, algorithm [21] and algorithm [22]. In this comparison, lena (512 × 512) is   The percentage of the embedded hidden bits in the entire pixels of the cover image is represented by ER, which stands for embedding rate. It is given by the following formula: where the total number of embedded secret bits is T , and M × N is the size of the host image. A large value of ER, according to the embedding payload evaluation, indicates that   the steganographic algorithm performs better in terms of the embedding payload, i.e. a host pixel in the host image will hold more hidden bits. Table 3 presents the embedding rate of host images and secret images.

Image quality measures (IQMs)
The human visual system and the display have a relationship can be measured by mathematical equations of IQMs. Eventually, steganographic algorithms leave statistical indicators which can be used to quantify the stego image's hidden content relative to the host image [24]. After inserting the secret image, the measurements calculate the similarity between the host image and the stego image, summing up all bytes and computed by [25]: where CQ, SC, IF, and AD denote the correlation quality, the structure content, the image fidelity and the average absolute difference respectively. If these measurements are close to one then the high level of similarity is obtained. Moreover, if AD is close to zero then the global distortion of the stego image related to the host image is very low. Table 4 shows that CQ, SC, and IF are close to 1 and AD are close to zero. So, we can conclude that no significant differences between the host image and the stego image are detected. Moreover, the comparison between the proposed algorithm and algorithm [25] is given in Table 5. It shows that the proposed algorithm gives result better than algorithm [25].  One of the important measurements is relative entropy which is defined by [26]: where P H and P O denote the distribution of host and stego image, respectively. If the relative entropy between host image and stego image is close to zero then the stego image is similar to the host image [26]. Table 6 shows the relative entropy between different host images and stego images with different secret medical images. Based on the result of Table 6, the relative entropies are close to zero approximately. The comparison between the proposed algorithm and the algorithm in [25] is given in Table 7. The proposed algorithm gives results better than algorithm in [25]. From Tables 6 and 7, we can conclude that the host image and the stego image are similar approximately. It is one of the basic tests which aim to detect whether the sent image transmits (or not) any unseen image(secret image) [27]. In this test, we calculate the probability of embedding information as the following: is the 2 static with k − 1 degrees of freedom, x i , i = 0, 1, … , k − 1 is the total pixels in the sample image of the gray-scale value 2i, y i = (total pixels with gray value2i )+(total pixels with gray value2i+1) 2 , i = 0, 1, … , k − 1 is the expected value of the total pixels in the sample image, k is the category which has the values 1, 2, … , 128.
The probability of embedding is the probability of 2 k−1 under the condition that x i = y i , i = 0, 1, … , k − 1. The density function, 1 − p, tends to 1 as 2 k−1 approaches ∞, so p approaches 0 as 2 k−1 approaches ∞. So, the probability of embedding is close to 0 for large 2 k−1 . The Matlab code in [28] is used to calculating the probability of embedding information. Figure 13 shows that the probability of embedding information is nearly equal to zero. So the proposed algorithm can resist the chi-square attacks.  The proposed algorithm has been tested against noise attack in this section. Salt & pepper noise has corrupted the stego image with densities 0.01, 0.05 and 0.1. The effect of noise attack on the proposed algorithm is measured using root mean squared error (RMSE) and peak signal-to-noise ratio (PSNR). Figure 14 displays the extracted secret medical image after adding the salt & pepper noise to the stego image with densities 0.01, 0.05 and 0.1. The RMSE and PSNR are evaluated between the secret medical image and the extracted images in Table 8. Based on Table 8, extracting images after adding salt & pepper noise with small density produces better results than extracting images after adding salt & pepper noise with large density.

CONCLUSION
In this paper, a new image steganographic algorithm using modified LSB and chaotic map is proposed. The author used two piecewise chaotic maps. The first is Tent chaotic map which is used to encrypting the secret medical image. The second is two-dimensional piecewise smooth chaotic map, which is used to selecting the positions of the host pixels randomly. Those pixels are used to embed the bits of the cipher images. In this algorithm, no bits of the secret medical image are lost. The experimental results show that the histogram of the stego image is almost identical to that of the host image. The comparison result, based on PSNR and MSE between the proposed algorithm and other algorithms in literature, shows that the proposed algorithm has the best result. The image quality measures display acceptable results based on the proposed algorithm. The relative entropies between different host images and stego images with different secret medical images are close to zero approximately. Also, the probability of embedding information is nearly equal to zero. So, the new steganographic algorithm can resist chi-square attacks. Therefore, the proposed algorithm can assist with the transmission of secret medical images via the communication media.

ACKNOWLEDGMENTS
The author deeply thank Dr. Abdel-Mohsen Elsherif for his proof reading of the paper.