Improved diagonal queue medical image steganography using Chaos theory, LFSR, and Rabin cryptosystem

In this article, we have proposed an improved diagonal queue medical image steganography for patient secret medical data transmission using chaotic standard map, linear feedback shift register, and Rabin cryptosystem, for improvement of previous technique (Jain and Lenka in Springer Brain Inform 3:39–51, 2016). The proposed algorithm comprises four stages, generation of pseudo-random sequences (pseudo-random sequences are generated by linear feedback shift register and standard chaotic map), permutation and XORing using pseudo-random sequences, encryption using Rabin cryptosystem, and steganography using the improved diagonal queues. Security analysis has been carried out. Performance analysis is observed using MSE, PSNR, maximum embedding capacity, as well as by histogram analysis between various Brain disease stego and cover images.


Introduction
In this era, various medical systems are continuously migrating into the cloud and mobile environments. In the version of the telemedicine, the doctor examines medical images along with the patient data, which are transmitted from remote places, which help in receiving medical care by expediting diagnosis and immediate treatment. Security parameters such as authentication, integrity, confidentiality, and availability have to be considered for secure transmission, where Department of Health and Human Services (DHHS), USA imposed regulations for data security and privacy under the health insurance portability and accountability act (HIPAA) of 1996, USA [1][2][3].
Cryptographic techniques encrypt the secret records with a password and assume that only authorized parties have access to the password [4], along with the traditional encryption schemes, chaos-based techniques are used these days, because of properties such as ergodicity, mixing property, sensitivity to initial conditions, and system parameters which can be considered analogous to ideal cryptographic properties such as confusion, diffusion, balance, and avalanche properties. Hence, many chaosbased encryption systems also proposed in last few years [5,6].
In steganography, the very existence of sensitive data by concealing the data in nondescript areas of the carrier image, such that the changes made to the image are imperceptible, and the secret information is retrieved only by authorized person [7][8][9]. Various steganography techniques have used the concept of pixel-value differencing for secret data insertion [10][11][12]. The pixel-value differencing (PVD) scheme uses the difference value between two consecutive pixels in a block to determine how many secret bits should be embedded [13,14]. Steganography methods' performance can be measured by the three valuable specifications: security, capacity, and visual imperceptibility [15,16].
Since the debut of this era, one of the most intelligible terms of information technology and communication is the security of medical records and patient's personal information like unique ID, name of patient, disease information, etc.
Anderson et al. discussed some limitations in steganography methods [17]. They approached an information theoretic method using Shannon's theory for perfect security of data. Therefore, both steganography and cryptography are used together to accomplish the security challenges [15].
Thiyagarajan et al. proposed a new steganography methodology for hiding patient information inside a medical cover image using a dynamic key produced by graph 3 coloring problem [18].
In this paper, we have proposed an improved security system by using the chaotic 2D standard map and linear feedback shift register, as an improvement in our previous report [19]. The proposed algorithm comprises three stages, viz. (i) generation of pseudo-random sequences (pseudorandom sequences are generated by linear feedback shift register and standard chaotic map); (ii) permutation and XORing using pseudo-random sequences; and (iii) steganography using the improved diagonal queues.
This novel approach can be understood by referring the following divisions. In division 2, brief description of chaos, linear feedback shift register, Rabin cryptosystem, queue, and security system of Jain et al. [19] is discussed. In division 3, the proposed method is discussed. In division 4, security analysis is performed. The performance analysis is carried out in division 5. Finally, the work is concluded in division 6.
2 Brief description of Chaos, LFSR, Rabin cryptosystem, queue, and security system of Jain et al. [19] In this section, various techniques have been discussed as follows: 3 Basics of Chaos Theory and LFSR

Chaotic sequence
It has a large circle, susceptible to initial value, and impulsiveness. The encryption with chaos is fast, so it is broadly merged with traditional encryption. The fundamental chaotic system model is given as follows [6]: where the x n ð Þ is a chaotic sequence generated by the nonlinear f : ð Þ, x 0 ð Þ are the initial condition values. The 1D logistic maps whose chaotic intervals both in [0, 1] are as follows: where le½0; 4 and Xe½0; 1: The compound chaotic functions whose chaotic intervals both in [-1, 1] are as follows: . .::; x\0 4x 3 À 3x. . .::. . .::; The chaotic standard map has a large key space compared to other maps.
where X n and Y n are taken modulo 2p and K are constant. Now, generate the pseudo-random sequences using Eq. (4) which in turn used for generating the synthetic images and in counting the number of rounds [6].

Linear feedback shift register
A linear feedback shift register (LFSR) is a method for generating binary sequences [6]. Figure 1 shows a general model of an n-bit LFSR. LFSRs are extremely good pseudo-random binary sequence generators [6]. When this register is full with any given initial value (except 0 which will generate a pseudo-random binary sequence of all 0 s), it generates pseudo-random binary sequence which has very good randomness and statistical properties. The only signal necessary for the generation of the binary sequence is a clock pulse. With each clock pulse, a bit of the binary sequence is generated. An example of 4-bit LFSR is considered to demonstrate the functioning of LFSR with the feedback function f ¼ 1 þ x þ x 4 . Its initial bit values are used (1111). The output sequence Z n : 011111000000001 generated by LFSR in is periodic of period 15.
Period of the sequence generated by LFSR is high if the primitive polynomial is used. To design any stream cipher system, one needs to consider the LFSR with primitive feedback polynomials as the basic building blocks. The pseudo-random sequence depends upon the initial seed value and feedback function [6].

Rabin cryptosystem with security concern
The Rabin cryptosystem is a public key encryption method. It is established on number-theoretic problems allied to the stiffness of integer factoring and computing square roots modulo of composite number, which is straight forward when the factorization is familiar, but very composite when it is concealed. The Rabin cryptosystem requires a receiver's public key to encrypt the text and a private key to decrypt it [4,19].

Queue
The linear data structure or abstractly a sequential collection is called a queue. The principal operations on the collection of data are the addition of them to the rear terminal position, known as enqueuing, and deletion of data from the front terminal position, known as dequeuing [20].

Brief description of security system [19]
Jain et al. [19] proposed a security system which utilizes Rabin cryptosystem, diagonal queue, dynamic keys ,and Brain Disease medical cover image. The dynamic keys were considered as the secret key for the algorithm and public key for Rabin encryption. The algorithm comprises three rounds. The first round encryption using Rabin cryptosystem, the outcome is organized in various blocks and equally distributed sub-blocks (using dynamic keys). The second round, the secret cipher blocks and sub-blocks are assigned dynamically to selected diagonal queues for embedding. In third round, steganography process is performed using LSB (5th-8th bits, dynamic keys are also embedded into the cover image).

Main scope of improvements
• Apart from secret data, metadata are also embedded into cover image, which consume lot of space of the cover image. • Dynamic keys are inserted into the cover image. Hence, these will be easily available to the intruders, which are not desirable. • Creation of diagonal queue is static.

Proposed work
In the proposed security system, it includes the input medical secret data of patient, secret keys, and grey Brain disease cover image. Figures 2 and 3 show the architecture and workflow of this algorithm.

Cover image and secret message
In this system, select a grey Brain disease image as a cover image and a secret message of patient information, which will be embedded in the cover image. Here, generation of pseudo-random sequences is discussed.
• The secret key consists of three floating point numbers and one integer ðx 0; y 0; K; NÞ, where x 0 ,y 0 2 ð0; 2pÞ, K can have any real value greater than 18.0 and N is any integer value, ideally should be greater than 100. • By iterating Eq. (4) 2 times the size of the secret data, the pseudo-random sequence is generated as XKey and YKey End 5.3 Pseudo-random sequence generation using LFSR Here, the various pseudo-random sequences are generated as follows: • Fori ¼ 1toðsecretdatasizeÞ=2.
• Generate the pseudo-random sequences ðL1ðiÞÞ using the primitive root ; f ¼ 1 þ x 4 þ x 5 þ x 6 þ x 8 , and the seed value is X1ðiÞ. • Generate the pseudo-random sequences ðL2ðiÞÞ using the primitive root,f ¼ 1 þ x 4 þ x 5 þ x 6 þ x 8 , and the seed value is Y1ðiÞ.   If the generated random value is 0 for particular pixel, then the 8 bits will be distributed from right to left direction.
If the generated random value is 1 for particular pixel, then the 8 bits will be distributed from left to right direction example as above.
Improved diagonal queue medical image steganography 99 • Generate the pseudo-random sequences ðL3ðiÞÞ using the primitive root,f ¼ 1 þ x þ x 4 , and the seed value is ðXðiÞ À Y1ðiÞÞðmod15Þ.
• Generate the pseudo-random sequences ðL5ðiÞÞ using the primitive root,f ¼ 1 þ x þ x 4 , and the seed value is ðY1ð1Þ Ã X1ð1ÞÞðmod15Þ The above shown bold bits in the example are used to swap with the cipher text bits using FIFO property of queue.
Now, we will select one of these eligible diagonal queues, using chaos theory of random number generation.
We will also select one of the N blocks and sub-blocks using chaos theory of random number generation.
We will then put the selected ciphertext bits, in selected diagonal queue at 5th to 8th bit LSB position.
Example for selection of hiding position in diagonal queues using pseudo-random number is as follows: If L5ð1Þ is having value 1 then 4 þ L5 1 ð Þ is 5, i.e., secret cipher data bit will be hidden at 5th LSB position in selected diagonal.
If L5ð1Þ is having value 2 then 4 þ L5 1 ð Þ is 6, i.e., secret cipher data bit will be hidden at 6th LSB position in selected diagonal.
If L5ð1Þ is having value 3 then 4 þ L5 1 ð Þ is 7, i.e., secret cipher data bit will be hidden at 7 th LSB position in selected diagonal.
If L5ð1Þ is having value 4 then 4 þ L5 1 ð Þ is 8, i.e., secret cipher data bit will be hidden at 8th LSB position in selected diagonal.

XORING and permutation of secret data using pseudo-random sequence
• Let secret data be S • Here, XOR pseudo-random sequence ðX1Þ with secret data is S . • Divide the S 0 into blocks of 256 bytes.
• Permute first block elements using pseudo-random sequence L1ð1Þ, second block with L1ð2Þ; and so on. • Permute first 256 blocks using pseudo-random sequence sL2ð1Þ, next 256 blocks using L2ð2Þ and so on. • Combine the entire blocks as S 00 .

Rabin cryptosystem
• Rabin encryption technique is used to encrypt the permuted secret data S 00 before embedding S 000 ¼ RabinCryotsystemðS 00 ; PublickeyofreceiverÞ: ð7Þ • Now, cipher text will be divided into 16 bits blocks sequentially. • Permute first block elements using pseudo-random sequences L3ð1Þ, second block with L3ð2Þ and so on. • After that, each block is divided into equally distributed 4 bits sub-blocks. • Permute first sub-block elements using pseudo-random sequence sL4ð1Þ, second sub-blocks with L4ð2Þ; and so on.

Diagonal queue
• Now, the cover image will be divided into a number of 8 pixels image blocks. • Now, organize the first image block's 64 bits in diagonal queues using pseudo-random sequence sL5ð1Þ, second blocks using L5ð2Þ; and so on.

Diagonal queue embedding
Now, embedding the secret cipher text in the cover image using diagonal queues is done as follows: • Encrypt seed values along with data size using public key of receiver as F ¼ EððSeed þ SecretDataSizeÞ; PublickeyofReceiverÞ, and embed in cover image.
• Select first 8 pixels of the cover image, and assign them random number XKey 1 ð Þ to XKeyð8Þ, next 8 pixels of the cover image, and assign them random number XKeyð9Þ to XKeyð16Þ and so on.
• One block of the cover image using pseudo-random number as discussed above point is represented by diagonal queues for embedding.
If the generated random value is 0 for particular pixel, then the 8 bits will be distributed from right to left direction. If the generated random value is 1 for particular pixel, then the 8 bits will be distributed from left to right direction example as above.
• Embedding will be done in selected diagonal queues sequentially, using LSB technique from 5th to 8th bits using pseudo-random number ð4 þ L5ðiÞÞ.
Continue this process until all the cipher data blocks are not empty and all secret cipher text is not embedded in diagonal queues sequentially and send resultant stego image to the receiver.
Example of the embedding procedure is shown in Table 1.

Extraction process
Extraction of the secret medical data can be obtained as exact reverse of the encryption and embedding as discussed in above sections.

Security analysis
Security of the proposed system is discussed as follows: • Starting seed values are encrypted using public key of the receiver. • As we know, slight change in seed values will generate the complete different pseudo-random sequences (using chaos). • Seed values, for the LFSR, depend upon the pseudorandom sequence generated by the chaos. • Hence, slight change in the starting seed value will generate different pseudo-random sequences of the LFSR. • Permutation depends on the pseudo-random sequences.
• The complexity of the chaos is very high, and it is next to impossible to break, with existing systems. • Also, encryption using Rabin cryptosystem increases the complexity. • Diagonal queue generation having the complexity 2 8 , and permutation complexity is 15!, Hence, overall diagonal queue complexity will be 2 8 Ã 15!

Performance analysis
The simulation and experimentation have been carried out using MATLAB. Resultant simulated outcome for different Brain disease cover images and their stego images are being displayed in Fig. 4. Histograms also show the negligible amount of difference between histogram of original Brain disease cover image and stego image. Histograms for various Brain disease cover images and their stego images are also shown in Fig. 4. The patient information used in this work is shown in Table 2.
The clause PSNR (Peak Signal-to-Noise Ratio) is a technical terminology that defines the ratio between the maximum power of a signal and the power of damaged noise. An important index to readjust the quality of reformation of steganography images is peak signal-to-noise ratio. The original cover image acts like a signal, and the noise is the defect included by some steganography mechanism. The PSNR, MSE (Mean Square Error), and maximum embedding volume values at divergent payloads for different cover images of various sizes are given in Table 3. PSNR is calculated in decibels (dB). A high-quality stego image should aspire for 40 dB and above [21]. PSNR outcome is defined by the mean square error (MSE) for two P Ã Q monochrome images, where x as well as y are image coordinates, SG xy (stego image) and CV xy (cover image), one of the images is approved a noisy surmise of the other is defined as follows:  Table 3 Observed Capacity, MSE, and PSNR value (different Brain disease cover images of same/different sizes with various secret cipher medical data of same/different sizes) where CV max represents a maximum 255 pixel value, for 8-bit cover images [22] Using Table 3, results are analyzed. If Brain disease cover images such as vascular (multi-infarct) dementia, HIV-associated dementia, Brain Huntington's disease, and corticobasal degeneration of size 262 kilobytes and secret data size is 256 bytes, then PSNR and MSE values will be in the range from 75.02 to 77.16 dB and 0.0052 to 0.0037, respectively, and if data size increases to 1024 bytes then PSNR and MSE values will be in the range from 72.17 to 73.48 dB and 0.0062 to 0.0043, respectively. If cover images size increases to 1048 kilobytes and secret data size is 256 bytes, then PSNR and MSE values will be in the range from 84.28 to 85.26 dB and 0.0005 to 0.0004, respectively, and if secret data size increases to 1024 bytes then PSNR and MSE values will be 79.39-80.39 and 0.0024-0.0025, respectively. So by result analysis, it can be noticed that by increasing the Brain disease cover image size and decreasing the secret data size, PSNR value will be increased up to 85.26 dB and MSE value will be decreased up to 0.0004 as well as maximum embedding capacity is increased up to 39 %. So that performance will be high with respect to PSNR, MSE, and maximum embedding capacity values.
Using Fig. 4, one can observe that there are no visual artifacts with the stego images and histograms, it is looking exactly same as corresponding original cover images. Figure 5 shows the result analysis of proposed algorithm using various performance measure parameters.
Using Table 4, results of the proposed scheme are compared with the results of the Jain et al.'s [19] work, on the basis of minimum calculated PSNR, embedding capacity, and MSE values. By comparing the results of these two articles, this article shows greater PSNR, embedding capacity, and less MSE values when simple plaintext is concealed in Brain disease cover images with same data and cover image size.
Using Table 5, results of the proposed scheme are compared with the results of the other works, on the basis of minimum calculated PSNR, embedding capacity, and MSE values. By comparing the results of these articles, proposed work shows greater PSNR, embedding capacity, and less MSE values when simple plaintext is concealed in cover images with same data and cover image size.

Conclusion and future scope
In this article, an improved secret medical data transmission scheme is proposed using the notion of opacity with respect to an improved diagonal queue least significant bits substitution using pseudo-random sequences. The secret message blocks and sub-blocks are allocated randomly using pseudo-random sequences by the sender to the Brain disease cover image blocks with respect to improved diagonal queues, which increases security levels and gives randomness to proposed algorithm. The proposed algorithm used multilevel encryption at cryptography level to provide encryption of secret patient medical data in remote places communication. At steganography level, least significant bits substitutions using chaos theory and improved diagonal queues are used to protect data. By security analysis, it is found that complexity of the encryption is very high to break, from existing system.
Proposed algorithm hides only secret medical data, embedding of metadata in Brain disease cover image is not required, so that lot of space are available in the cover image. By pseudo-random numbers using chaos theory and LSFR, no clue will be available to the intruders. By using proposed algorithm, creation of diagonal queue is dynamic. As we are hiding less data comparatively to previous technique [19] hence, from result analysis, it is concluded that PSNR, MSE values, and percentage of maximum embedding capacity are better as compared to previous work [19] and others. By histogram analysis, it is concluded that imperceptibility distortion cannot be measured from the corresponding stego images. Here, proposed technique is used for medical application and spatial domain image steganography. In future, this technique can be used for various applications using multimedia secret data, where secrecy of data is a very big challenge. We also would like to use this technique to develop some better steganography algorithms in various image steganography domains.