You are on page 1of 22

Multimedia Tools and Applications (2022) 81:14001–14022

https://doi.org/10.1007/s11042-022-12480-4

A dual layer security scheme for medical images using


Hessenberg and singular value decompositions

Ahmed Elmoasry 1 & Lal Said Khan 2 & Majid Khan 3 & Iqtadar Hussain
4,5

Received: 14 April 2021 / Revised: 2 June 2021 / Accepted: 25 January 2022 /


Published online: 25 February 2022
# The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature 2022,
corrected publication 2022

Abstract
Due to the recent advancement in the field of the Internet of Medical things (IoMT). To
facilitate doctors and patients, in the process of diagnosis and treatment, the medical
imaging equipment is connected to the IoMT. During communication over the network,
these medical images are subjected to various threads. In this work, we have proposed a
dual-layer data confidentiality scheme, firstly it encrypts the secret medical images
followed by a data hiding scheme. The encryption scheme possesses diffusion and
confusion, for confusion the encryption scheme utilizes logistic and tent maps for the
generation of S-boxes. For data hiding, it utilizes Hessenberg and singular value decom-
position (SVD). The proposed scheme is applied to highly correlated medical images.
The proposed technique provides dual security to the confidential information and makes
it difficult for the intruder to extract the confidential information. The encryption scheme
is evaluated by using the standard performance indicators including statistical analysis,
differential analysis, and NIST analysis, etc. The encrypted images have the highest
practically achievable entropy of 7.999 which is closest to the ideal value of 8. The data
hiding scheme is evaluated by using statistical analysis, Distance-based analysis, analysis
based on pixel difference, and information theory. Both the analysis of encryption and
data hiding are satisfactory and the results show the strength of the dual-layer security
scheme.

* Majid Khan
mk.cfd1@gmail.com

1
Department of Mathematics, College of Science Al-Zulfi, Majmaah University, Al-Zulfi, Saudi
Arabia
2
Department of Avionics Engineering, Institute of Space Technology, Islamabad, Pakistan
3
Department of Applied Mathematics and Statistics, Institute of Space Technology, Islamabad,
Pakistan
4
Mathematics Program, Department of Mathematics, Statistics and Physics, College of Arts and
Sciences, Qatar University, 2713 Doha, Qatar
5
Statistical Consulting Unit, College of Arts and Science, Qatar University, Doha, Qatar
14002 Multimedia Tools and Applications (2022) 81:14001–14022

Keywords Information confidentiality . Confusion and diffusion . Hessenberg decomposition .


Singular value decomposition

1 Introduction

With the development of the Internet of Medical things (IoMT), a large quantity of medical
equipment are connected and are facilitating the process of diagnosis and treatment for the
doctors and patients. Picture archiving and communication systems (PACS) are usually utilized
in the management of medical images [9]. The generated medical image by scanning the patient
through medical imaging equipment is firstly stored in the PACS. The image will be transferred
into the doctor’s workstation when the patient begins to examine by the doctor. The doctor
workstation is connected through the internet with the hospital information system. During this
transfer and storage of the patient information which is mostly medical images. These images
carry sensitive and private information regarding patients’ health, are subject to various threads.
So this data needs security. In this age of fifth-generation communication, the security of data
during transmission and storage is one of the unavoidable issues. The data may be in the form of
audio, video, text, or images [8]. Information security is the field, to deliver security to the data
during transmission and storage, during transmission and storage over insecure databases the
data is vulnerable to security threats. Information security is further classified as cryptography
and data hiding. Cryptography is the science of obfuscating the content of data, while in data
hiding the secret data is embedded in the cover data and the secret data is invisible to an
observer [14, 15, 39]. Encryption schemes can be classified based on keys, namely public key
and private key cryptography [19]. In public-key cryptography, one key is used for encryption
and that key is available for the public, a second key named, the private key is used for
decryption and is only known to the intended receiver, while in private key cryptography same
key is utilized for encryption and decryption. Private key cryptography may be classical or
modern encryption systems. In classical encryption systems, either confusion or diffusion is
done at a time [11, 20, 25, 26, 28]. While in modern encryption schemes both confusion and
diffusion are added [8, 17, 27, 38]. By encrypting the data, the intruder once sees the encrypted
data will try her best to decrypt the data, as she will know that the encrypted data contain secret
information, to provide dual-layer security the data, nowadays the trend is to encrypt the secret
data and then hide the encrypted data in cover data [22, 42].

2 Related work

To provide dual security to the secret health information of the patient, In this work, we are
firstly encrypting the medical images and then hiding them in the cover image. so first we give
a review on the related encryption technique and then the recently proposed data hiding
techniques. A review of the encryption scheme is presented in [19]. Due to the sensitivity to
initial condition chaos theory has been widely used in cryptography [8, 26, 29, 30, 37, 38], In
chaos-based cryptography, the initial conditions to the chaotic map are utilized as the key for
the symmetric cryptosystem and the encryption is very sensitive to a slight change in key. To
obscure the relation among the key and ciphertext confusion is performed by utilizing highly
nonlinear S-boxes, which can be generated using multiple techniques [5, 11, 13, 25, 28, 33].
Most of the researchers utilize chaos base generated sequences for the diffusion process, due to
Multimedia Tools and Applications (2022) 81:14001–14022 14003

extraordinary sensitivity to initial conditions the use of chaos is widespread in cryptography [7,
10, 23, 31, 41]. Fractals accompanied with chaotic maps have been also widely used in
cryptography [16]. A review of the work that has been done in the field of cryptography is
presented in [40] discrete and continuous chaotic maps are utilized by the work presented in
[24]. To add more diffusion in the cryptosystem fractals and multiple chaotic maps are utilized
in [36]. For the deployment of the encryption scheme in different environments, several
alterations have been done in the design of cryptosystems [38]. Rossler map and PSO-based
S-boxes are presented in [18]. Elliptic curve isomorphism is also been used for data encryption
[6]. During designing a cryptosystem, the basic requirements that need to be fulfilled are
presented [1]. Once the secret data is encrypted, to provide a dual layer of security the
data is hiding in the cover image, this is known as steganography. A lot of work has been
done in the field of steganography. To enhance the quality of stego image, the secret
image size is reduced using a novel image size reduction technique and then the
processed image is hidden in the cover image [3]. A novel approach for hiding the
secret bits within Arabic text by engaging Unicode standards is presented in [32] The
rapid expansion of connectivity has resulted in major advances in digital content trans-
mission. Medical contents are very important for assisting medical personnel in the
diagnosis process. Magnetic resonance imaging (MRI), ultrasound, computed tomogra-
phy (CT) scans and X-rays are used to detect illness and provide visual information
about the organs of the body to assist in recovery. These medical photos contain
sensitive details about the patient’s medical history, and many healthcare organizations
must share this information across traditional public media. The patient’s sensitive data is
vulnerable to security threats. Therefore before sharing and storing patient information, it
needs security. In this work we propose a novel dual layer security mechanism for highly
spatially correlated medical images, where the secret data will be firstly encrypted and
then hidden in the cover data, the encryption is done using permutation of pixels and for
confusion, S-boxes are dynamically generated using logistic and asymmetric tent map,
after encryption the encrypted data is hidden in the cover image using Hessenberg
decomposition (HD), singular value decomposition (SVD) in the transform domain. In
a nutshell, the main contribution of this research is as follows:
For the encryption of medical images, dynamically S-boxes are generated using logistic and
asymmetric tent maps. These dynamically generated S-boxes induce confusion in the
encryption process. The security analysis of the encryption scheme shows the applica-
bility and strength of the dynamically generated S-boxes. The encrypted image is then
hidden in the cover image using SVD and Hessenberg decomposition. The security
analysis of the stego and cover image shows the strength of the proposed scheme. In
previous studies as discussed above the schemes either provides encryption or data
hiding for medical images, but not both at a time. The remaining of the paper is
structured as follows: Section 3 designates the basics of the terminologies utilized in
this work, Section 4 contains the details and flow diagram of the proposed dual-layer
security mechanism, to plaid the immunity of the suggested scheme against various
threats, Section 5, listed and tabulated the security analysis of the proposed mechanism
while the conclusion is drawn in section 6 of this article.
14004 Multimedia Tools and Applications (2022) 81:14001–14022

3 Preliminaries

In this part of the article, we will define the terminologies utilizes in the suggested dual-layer
security structure.

3.1 Logistic map

Due to the sensitivity to initial conditions, chaotic maps have been suitable for image
encryption. The logistic chaotic map is a polynomial mapping of degree two. The logistic
chaotic map can be defined as in Eq. (1)
znþ1 ¼ rzn ð1−zn Þ; ð1Þ
where zn ϵ (0, 1) , r ϵ (0, 4]). When r = 4.0, the range of zn in Eq. (1) is [0,1]. For utilizing
logistic map in confusion of our proposed encryption algorthim we use r = 4, and zn is
computed from the key Q, having length 32 decimal numbers, of encryption scheme as in
Algorithm one displayed in Table 1. For the first iteration the value of the zn = z3 is initiated
and r = 4 is kept constant. For the asymmetric tent map the value zn + 1 is used as the initial
condition. And similarly, the output of the asymmetric tent map updates the logistic map as
feedback.

3.2 Asymmetric tent map

Due to the sensitivity to initial conditions, chaotic maps are widely utilized in cryptography.
Asymmetric tent map is a chaotic map and is defined in Eq. (2):
8w 9
< n; 0≤w ≤ b =
wnþ1 ¼ b ð2Þ
: 1− wn ; b < w≤1 ;
1−b
The value of wn is initialized by Eq. (2), where wnϵ (0,1) and b is a real positive constant and
can be computed from the 32 length decimal key Q as follows in Eq. (3):
 
Q32 þ Q1 þ sum
b¼ þ :01 ð3Þ
28

3.3 Discrete wavelet transform (DWT)

One of the utmost importance and widely utilized mathematical transforms is DWT,
possessing numerous applications in the field of science and engineering. When DWT is

Table 1 Algorithm for generating Zn for logistic chaotic map

h 1 +Q2……………..+Q
sum=(Q i 32 +last pixel of plain image)
Q12 þQ21 þsum
Z1 ¼ 28 þ :01
Z3 =Z1 −floor(Z1 +.01) +.01
Z4 =Z2 −floor(Z2 +.01) +.01
Zn =[Z3, Z4]
Zn =Z3 in one round and Zn =Z4 in second round
Multimedia Tools and Applications (2022) 81:14001–14022 14005

applied to images it delivers an energy squeezed illustration of that image. DWT can be
applied to various levels on an image depending upon the application, four sub-bands, which
include low-high (LH), high-high (HH), low-low (LL), high-low (HL) can be obtained as a
result of one level DWT. After getting the four sub-bands the most of the information of the
processed image lies in the LL band of the DWT resultant image. Therefore the LL band is
suitable for applications like data hiding and watermarking [32]. Further decomposition of the
sub-bands is also possible until the dimensions of the sub-bands fulfill the requirements of data
hiding.

3.4 Singular value decomposition (SVD)

Any symmetric matrix can be decomposed into three sub-matrices by the singular value
decomposition (SVD), the resultant matrices obtained after applying SVD are separated in
the form of a diagonal matrix [35]. The computation of SVD of any symmetric matrix involves
the relation in Eq. (4):

USV T ¼ SVDðX Þ; ð4Þ


where U, S, and V are three resultant singular matrices. Also, UUT = I and VVT = VTV = I, the
columns of U and V are orthonormal eigenvectors of XXT and XTX respectively. The square
root from the eigenvalues is contained by the matrix S in descending order. In this research, the
singular value of the secret image is embedded in the singular value of the cover image by
utilizing the singular matrix S of the SVD. The geometric information that is a requirement for
the extraction process is provided by the other parts of the SVD that are U and V.

3.5 Hessenberg decomposition (HD)

HD is another widely utilized tool in science and engineering applications, and any matrix Y
having dimensions M × M can be decomposed, by using Eq. (5):

XYX T ¼ HDðY Þ; ð5Þ

where Y is an orthogonal matrix and X is an upper Hessenberg matrix and yi,j = 0, for i > j + 1.

3.6 Dynamically S-boxes generation

By utilizing logistic and asymmetric tent maps, s-boxes are generated dynamically. The
generation of S-boxes involves the following steps. The procedure for the generation of S-
boxes are shown in Fig. 1.

Step 1: An initial empty S-box of size 1 × 256 is created.


Step 2: First of all the initial condition for the logistic chaotic map is generated using
algorithm 1 in Table 1.
Step 3: Logistic map is iterated and the output of logistic map is utilized as the initial
condition for asymmetric tent map.
Step 4: The output of the asymmetric tent map is used for two purposes, firstly it is fed back
as the initial condition for the logistic chaotic map and secondly this output is
14006 Multimedia Tools and Applications (2022) 81:14001–14022

Fig. 1 Dynamically S-box generation from Logistic and asymmetric tent map

multiplied with a large number, and mod 256 operations are performed. The mode
256 operation makes sure that all the entries of the S-box are in the range 0 to 255.
Step 5: the output of step 4 is compared with all entries of the S-box, if this belongs to the S-
box then it is discarded otherwise it becomes part of the S-box.

4 Proposed dual-layer security scheme

The dual layer security scheme comprises encryption and data hiding, for encryption dynam-
ically S-boxes are created, and for data hiding SVD and HD are used in the DWT domain. The
dual-layer security scheme is presented in Fig. 2, the encryption comprises the subsequent
steps.

Step 1: the RGB image is split into respective channels and pixels are shuffled of each
channel.
Step 2: The dynamically generated S-boxes are utilized for confusion in the encryption
process. Red channel substitution is done with S-box 1, and the outcome of this is
passed through another substitution process using S-box 2, and the outcome of this
is passed through another substitution process using S-box 3. The same process is
done with the other layers.
Step 3: The encrypted channels are concatenated to obtain the final RGB encrypted image.
Multimedia Tools and Applications (2022) 81:14001–14022 14007

Fig. 2 Dual layer security scheme


14008 Multimedia Tools and Applications (2022) 81:14001–14022

Step 4: The data hiding process utilizes DWT, HD, and SVD. the process of data hiding is
shown in Fig. 2. First of all, N-level DWT is computed of the cover image, then HD
and SVD is computed, similarly, the SVD of the Secret encrypted image is also
computed, and at this level, the data embedding process is performed, after the
embedding, the inverse SVD, inverse HD, and inverse DWT are performed and the
resultant image is the stego image.

The secret image and the corresponding encrypted image, also the stego and cover images
are shown in Fig. 3.

5 Security analysis

To check the resistance against cryptographic attacks and the effectiveness of the proposed
system, security analysis is mandatory before implementing the system in real-time. We have
performed both the analysis of encryption and data hiding and are presented in the preceding
section of the article.

Fig. 3 (a-b)Secret image and its corresponding encrypted image (c-d) Cover image and stego image. (a) Secret
Image (MRI Lumbar Spine). (b)Secret Encrypted Image. (d) Cover Image (CT scan carina). (e) Stego Image
Multimedia Tools and Applications (2022) 81:14001–14022 14009

5.1 Statistical analysis

To evaluate the immunity of encryption schemes against statistical-based attacks, statistical


analyses are utilized. Histogram analysis, correlation coefficient, and entropy analysis are
utilized to find immunity against statistical attacks.

5.1.1 Histogram analysis

The histogram signifies the frequency of distribution of pixels in an image. Pixels of digital
images are highly correlated. In Fig. 4 the original image of CT scan carina having most of the
color of the pixel is black, this is also reflecting in the corresponding histogram, as in the
histogram black pixels or pixels close to black have a high frequency. So the original image
pixels are highly correlated and follow the non-uniform distribution. The encryption scheme
must smash this correlation and make the histogram uniform to withstand statistical attacks.
Figure 4 depicting the histograms, it can be noted that the histogram of each channel of the
enciphered image is flat and uniform, this uniformity in histogram after encryption makes it
difficult for the attacker to utilize histogram in any attack because flat histogram does not
convey any significant information regarding the content of the image, that can be utilized in
cryptanalysis. In the case of the data hiding scheme, to withstand statistical attacks the
histograms of the cover image and stego image need to be similar, from Fig. 4, which depicts
the histograms of each channel of stego and cover image respectively, it can be observed that
the corresponding histogram of each channel is approximately similar. From all the above
discussion it is clear that the encryption scheme and the data hiding scheme possess high
immunity against any attack that utilizes histogram and the dual-layer security to the secret
data cannot be broken any statistical attack.

5.1.2 Correlation based analysis

To check the similarity between stego and cover image and the dissimilarity amongst the
original and enciphered image correlation-based analysis are performed, these analysis in-
cludes correlation coefficient, the difference in variance, entropy difference, Bias, local image
quality index, relative average spectral error, structural similarity index and structural index,
the detail of these analysis are described in the following section of the paper and the results
are displayed in Table 2.

Correlation coefficient The correlation coefficient (CC) is a measure of the similarity index
between to symbols. The range of CC lies from −1 to 1 where 1 reflects a strong correlation i-e
higher similarity, 0 represents no similarity and − 1 symbolizes the perfect complement of the
symbol. The pixels of an image are highly correlated in three spatial directions i-e vertical,
diagonal, and horizontal. The encryption has to smash this correlation and there needs no
correlation in the three directions, in the encrypted image. The CC can be calculated utilizing
Eqs. (6–9):
Aði; jÞ
ri; j ¼ pffiffiffiffiffiffiffiffipffiffiffiffiffiffiffiffiffi ; ð6Þ
BðiÞ Bð jÞ

where
14010 Multimedia Tools and Applications (2022) 81:14001–14022

Fig. 4 Histogram analysis of original; image, encrypted, cover, and stego image. (a) CT Scan Carina. (b)Plain
image histogram. (c)Red layer histogram of the original image. (d) Green layer histogram of the original image.
(e) Blue layer histogram of the original image. (f) Red layer histogram of the encrypted image. (g) green layer
histogram of the encrypted image. (h) Blue layer histogram of the encrypted image. (i) Red layer histogram of the
cover image. (j) green layer histogram of the cover image. (k)blue layer histogram of the cover image. (l) Red
layer histogram of the stego image. (m) green layer histogram of the stego image. (n) blue layer histogram of the
stego image
Multimedia Tools and Applications (2022) 81:14001–14022 14011

Table 2 Measurements of similarity and dissimilarity of the original image MRI Lumbar Spine, enciphered MRI
Lumbar Spine, stego CT scan carina, and cover image CT scan carina

Measurement Cover and Stego Image Original and enciphered Image

R G B R G B

Bias 0.302928 0.299190 0.30068 1.54980 1.537384 1.532146


DIV 2425.763 2433.196 2433.90 444.940 446.0506 427.3597
CC 0.904413 0.905445 0.90491 0.00422 0.002769 0.001736
Entropy Diff 0.364812 0.361445 0.36287 1.09264 1.091403 1.090714
Local Quality Index Q 0.82414 0.825493 0.82495 0.00018 −0.00010 −0.00155
RASE 47.20256 46.81811 46.9290 219.166 217.8386 217.8725
RMSE 6.101185 6.078277 6.08227 103.482 103.0745 103.0825
SSIM 0.97519 0.949263 0.9726 0.0031 0.00308 0.00484
SC 0.9987 0.9979 0.9977 0.4930 0.2890 0.29100

C 
∑ ðia −E ðiÞð ja −E ð jÞÞÞ
a¼1
Aði; jÞ ¼ ; ð7Þ
S

1 S
BðiÞ ¼ ∑ ðia −EðiÞÞ2 ; ð8Þ
C a¼1

1 S
Bð jÞ ¼ ∑ ð j −E ð jÞÞ2 ; ð9Þ
C a¼1 a
The covariance between the pixel a and b is symbolized by A(i,j), C signifies the number of
pairs, the standard deviation of i and j is represented by B(i), and B(j). The CC of original
and enciphered images are computed and tabulated in Table 2 for visualizing the CC,
graphical representation of the CC in the plain and encrypted image, as well as stego and
cover image, are shown in Fig. 5, in case of stego and cover images correlation among
pixels are similar, which is required in case of data hiding. And it can be seen in the case of
original and encrypted images, that the pixels are linearly correlated in all three directions
as shown in Fig. 5a-e-i, which represents the distribution of pixels in verticle, horizon-
tally, and diagonally of the original image. Figure 5b-f-j shows that the pixels are spread
and the correlation is smashed, similarly, Fig. 5c-g-k, d-h-i) shows the distribution of
pixels in verticle, horizontally, and diagonally of the cover and stego images respectively
and it can be observed that the distribution of pixels is same in case of cover and stego
images.

Difference in variance The difference in variance (DIV) is another measurement of similarity


and can be calculated utilizing the relation in Eq. (10):

σ2P
DIV ¼ 1− ; ð10Þ
σ2O
14012 Multimedia Tools and Applications (2022) 81:14001–14022

Fig. 5 Correlation of adjacent pixels in three spatial directions i-e vertical, horizontal, and diagonal, of the
original image, enciphered image, host, and stego image

The lower value of DIV conveys strong similarity between the original and processed image
and vice versa. In the case of encryption, there must be a high DIV value due to the reason they
possess strong dissimilarity and DIV between stego and cover image the DIV outcome must
be less because they have high similarity. The value of DIV is computed and displayed in
Table 2.

Entropy difference The difference in entropy is high in case of strong dissimilarity


while it is low in case of strong similarity. The difference in entropy is computed
among the secret image and encrypted image as well as the difference in entropy can
be calculated between stego and cover image. The results are satisfactory and tabu-
lated in Table 2.

Bias Bais is computed by using the mean value of the original and processed image and can be
calculated as in Eq. (11):
P
Bias ¼ 1− ð11Þ
O
Multimedia Tools and Applications (2022) 81:14001–14022 14013

where P denotes the mean of the processed and O represents the mean of the original image.
The Bias will have a high outcome in case of strong dissimilarity while it will have a low
outcome in case of strong similarity. The bais is computed for each channel of the original and
encrypted also it can be calculated between stego and cover and the results are displayed in
Table 2.

Local image quality index (Q) Local image quality image index (Q) can be calculated by
utilizing Eq. (12). It tells regarding the quality of the processed image. The mathematical
expression for local image quality image index is given below:
4σOP O P
Q¼  ð12Þ
  2 2
σ2O þ σ2P O þ P
The outcome of Q can be understood the equivalent as in the example of Bias. Q is calculated
for both encryption and data hiding schemes and tabulated in Table 2.

Relative average spectral error (RASE) To see the effect of processing in the frequency
domain RASE is utilized. It provides evidence concerning the average spectral error. Less
spectral distortion is signified by low RASE values. The RASE for encryption and data hiding
scheme is calculated and displayed in Table 2 in the case of data hiding less spectral distortion
is observed while in the case of encryption huge spectral distortion is observed.

Structural similarity index (SSI) To investigate the similarity in structures of the original and
processed image SSIM is utilized. It can be calculated using relation in Eq. (13):
ð2μo þ μP Þð2σOP Þ
SSIM ¼   ; ð13Þ
μ2o þ μ2P σ2o þ σ2P

where μ represents mean and σ represents the variance of the images. SSIM is computed for
both encryption and data hiding schemes. In the case of data hiding high SSIM is noted and
tabulated while in the case of encryption scheme less SSIM is observed. The measurements of
the SSIM are computed and tabulated in Table 2.

Structural content (SC) To measure the similarity in the structures of the cover and steg
image SC is utilized. SC conveys about the changes in structural content after embedding
information in the cover image and SC is calculated using the relation in Eq. (14):
M N
∑ ∑ ðProcessed imageði; jÞÞ2
i¼1 j¼1
SC ¼ W H
ð14Þ
∑ ∑ ðOriginal imageði; jÞÞ2
i¼1 j¼1

SC is computed for encryption and data hiding schemes and tabulated in Table 2. It can be
seen that the SC among the stego and cover image is high and is equal to unity while the SC of
the original and encrypted image is very less and is near to zero.
14014 Multimedia Tools and Applications (2022) 81:14001–14022

5.2 Analysis based on pixel difference

In pixel difference-based analysis, the dissimilarity amongst the pixels of the original and
processed image is computed and their cumulative effect is studied. This type of measurements
includes the Root Mean Squared Error (RMS), Average Difference (AD), Normalized Abso-
lute Error (NAE), Peak Signal to Noise Ratio (PSNR), Mean Squared Error (MSE), Maximum
Difference (MD), and Mean Absolute Error (MAE), all the analysis are done for data hiding
scheme except NPCR and UACI which the analysis for encryption scheme, and displayed in
Table 5 for an efficient data hiding scheme, all these distances need to be minimum, minimum
distances convey strong similarity among the original and processed image. Table 6 displays
the comparison of the proposed scheme with the recently proposed system, it can be seen from
Table 6 that the MSE, AD, and MD of our proposed system is very less as compared to the
system presented in [2].

5.3 Differential analysis

To evaluate the immunity of the projected cryptosystem to resist differential attacks, differen-
tial analysis is carried out. The number of Pixels Change Rate (NPCR) and unified Average
Changing Intensity (UACI) are employed in the examination against differential attacks(DA).
In DA, the intruder faintly changes the original image and encrypt that image then compares
the originally encrypted and the modified encrypted images and tries to find information
regarding the cryptosystem. The NPCR and UACI analysis are as described.

5.3.1 NPCR

In NPCR analysis the effect of change of one pixel in the original image on the corresponding
cipher image is investigated. The modification in the original image must outcome in a huge
alteration in the cipher image, this is an important characteristic of the encryption scheme and
necessary to withstand differential attacks. NPCR is computed for the encryption scheme using
the relation in Eq. (15)
1 M N 3
NPCR ¼ ∑ ∑ ∑ zðk; l; mÞ  100; ð15Þ
M  N  3 k¼1 l¼1 m¼1

where

1 im1 ðk; l; mÞ ¼ im2 ðk; l; mÞ
zðk; l; mÞ ¼
0 elsewhere;

Table 3 NPCR and UACI for (256 × 256 × 3) images, having a first-alteration

Image NPCR UACI

CT Scan Carina 99.64 33.52


MRI Lumbar Spine 99.6 33.46
Airplane 99.57 33.56
Baboon 99.49 33.47
Lena 99.65 33.6
Multimedia Tools and Applications (2022) 81:14001–14022 14015

NPCR is computed for encryption scheme and tabulated in Table 3. The ideal value of NPCR
is 100%. For better visualization, the computed results are shown in Fig. 6.

5.3.2 Unified average change intensity (UACI)

The effect on the average change in intensity in cipher image, by changing one pixel in the
plain image is investigated. as the result outcomes approach 33%, it shows the strength of the
encryption scheme against differential attacks.UACI can be computed using the relation
in Eq. (16):

1 M N 3 image1 ðk:l:mÞ−image2 k; l; m
UACI ¼ ∑ ∑ ∑  100; ð16Þ
M  N  3 k¼1 l¼1 m¼1 255

UACI is computed for the encryption scheme and is displayed in Table 3 the outcome of
NPCR and UACI is satisfactory. For better visualization, the computed results are shown in
Fig. 6. Table 4 displays the comparison of the NPCR and UACI with the recently proposed
systems as in the recently proposed systems Plain image Lena of dimensions 256 × 256 × 3 is
encrypted (Tables 5 and 6).

5.4 Analysis based on information theory

Information entropy-based Analysis is supplemented by, joint entropy (JE), condition-


al, mutual, relative, and information entropy. All these entropies are computed and
tabulated in Tables 7 and 8. For better visualization, the computed outcomes are shown
in Figs. 7 and 8.

Fig. 6 NPCR and UACI for (256 × 256 × 3) images


14016 Multimedia Tools and Applications (2022) 81:14001–14022

Table 4 Comparison of NPCR & UACI for Cipher 256 × 256 × 3, and plain Lena with the recently proposed
algorithm

Algorithm NPCR UACI

Reference [12] 99.62 33.44


Reference [4] 99.57 33.45
Reference [21] 99.63 33.46
Refrence [36] 99.64 33.52
Proposed 99.65 33.6

Table 5 Pixel difference between stego and cover image

Measurements The layer of Stego and cover image

R G B RGB

MSE 23.23000 20.21000 20.89000 7.721000


AD −0.07324 0.347120 0.258921 0.075309
MD 32.00000 37.00000 38.00000 37.00000
NAE 0.026834 0.029683 0.090100 0.083200

Table 6 Comparison of pixel difference based analysis for secret image pepper and cover image Lena of 256 ×
256 × 3 dimensions, with the recently proposed algorithm

Method MSE AD MD NAE

Refrence [2] 7.711 0.060378 39 –


Proposed 6.321 0.030443 26 0.05308

Table 7 Information theory analysis of cover and stego image

Information Entropy Relative Entropy Mutual information Conditional Entropy Joint Entropy

Cover Stego

6.5222331 6.785844 0.47258623 3.6658648 2.8563682 9.642212

Table 8 Information theory analysis of original and enciphered Image

Information Entropy Relative Mutual Conditional Joint


Entropy information Entropy Entropy
Original Enciphered Secret
Image Image

7.0133700592 7.99909 0.3222684 0.21620 6.7971661 14.7962


Multimedia Tools and Applications (2022) 81:14001–14022 14017

Fig. 7 Information theory analysis of cover and stego image

Fig. 8 Information theory analysis of original and enciphered images


14018 Multimedia Tools and Applications (2022) 81:14001–14022

Table 9 Analysis based on the distance between stego and cover images

Analysis Distance

Mean Euclidean Distance 0.0000319044


Difference Normalized Entropy 0.517773
Mean Pattern Intensity 0.0603867
Correlation Distance 0.0007821
Cosine Distance 0.000427304
Euclidean Distance (Squared) 629.452
Mutual Information Variation 0.745967
Normalized Squared Euclidean Distance 0.000427304
Manhattan Distance 16,477.4
Mean Reciprocal Squared Euclidean Distance 0.000798465
Earth Mover Distance 0.00687758
Mean Squared Euclidean Distance 0.000800504
Gradient Correlation 0.00285914
Mean Reciprocal Gradient Distance 0.0104207
Euclidean Distance 25.0907

5.5 Distance-based analysis

Various distance-based analyses are computed and displayed in Table 9. The distance between
stego and cover image needs to be less and the distance between plain image and cipher image
needs to be more. Table 10 gives a Comparison of Distance-based analysis for secret image
pepper and cover image Lena of 256 × 256 × 3 dimensions, with the recently proposed
algorithm [2]. It can be seen from Table 7 that most of the distance of the proposed scemes
comes out to be less than the distances in [2].

Table 10 Comparison of distance-based analysis for secret image pepper and cover image Lena of 256 × 256 ×
3 dimensions, with the recently proposed algorithm

Proposed Refrence [2]

Analysis Distance Distance


Mean Euclidean Distance 0.0000000761 0.000000873878
Difference Normalized Entropy 0.517773 0.182706
Mean Pattern Intensity 0.0603867 0.00955684
Correlation Distance 0.0000821 0.000143103
Cosine Distance 0.0000040304 0.000024751
Euclidean Distance (Squared) 2.145 3.01918
Mutual Information Variation 0.745967 0.361946
Normalized Squared Euclidean Distance 0.000427304 0.0000715547
Manhattan Distance 316.459 432.714
Mean Reciprocal Squared Euclidean Distance 0.000798465 0.00103253
Earth Mover Distance 0.000075804 0.000557582
Mean Squared Euclidean Distance 0.00000584 0.0000153563
Gradient Correlation 0.00285914 0.000518462
Mean Reciprocal Gradient Distance 0.0104207 0.00103570
Euclidean Distance 1.0086 1.73758
Multimedia Tools and Applications (2022) 81:14001–14022 14019

Table 11 Test findings for the proposed cryptosystem from NIST SP 800–22 experiments

Test p Value for every Layer of enciphering image

R G B Qualified

Frequency 0.75183 0.77595 0.26838 √


Block Frequency 0.93178 0.92498 0.50042 √
Commulative Sums Forward 0.24227 0.26611 0.27054 √
Overlapping test 0.85988 0.81567 0.81567 √
Long Runs of Ones 0.7127 0.7127 0.7127 √
Approximate Entropy 0.55386 0.39227 0.49067 √
Spectral DFT 0.081659 0.14679 0.46816 √
Non-overlapping 0.99981 0.98974 0.99891 √
Rank 0.29119 0.29119 0.29191 √
Universal 0.98858 0.99276 0.98681 √
Serial 1 0.838808 0.00033237 0.21416 √
Serial 2 0.64076 0.057581 0.20265 √
Runs (M =10,000) 0.7127 0.019343 0.81523 √
Commulative Sums Reverse 0.0672 0.98587 0.37502 √
Random Excursions X =-4 0.71093 0.22071 0.61377 √
X =-3 0.593606 0.67393 0.51708 √
X =-2 0.73232 0.25919 0.24633 √
X =-1 0.93249 0.92636 0.51928 √
X =1 0.61856 0.74158 0.44254 √
X =2 0.71111 0.2922 0.002812 √
X =3 0.31011 0.86221 0.4313 √
X =4 0.28736 0.001948 0.2367 √
Random Excursions Variant X =-9 0.8876 0.31731 0.24109 √
X =-8 0.86065 0.47143 0.34378 √
X =-7 0.99901 0.63773 0.502609 √
X =-6 0.97664 0.63455 0.42138 √
X =-5 0.79563 0.59924 0.34278 √
X =-4 0.27075 0.55127 0.50269 √
X =-3 0.098817 0.66431 0.42138 √
X =-2 0.13 0.94418 0.15658 √
X =-1 0.14514 0.90438 0.83214 √
X =1 0.69764 0.90348 0.12654 √
X =2 0.99764 0.83363 0.33592 √
X =3 0.93077 0.91363 0.55098 √
X =4 0.9123 0.81873 0.80106 √
X =5 0.94837 0.77721 0.67692 √
X =6 0.68181 0.25702 0.33969 √
X =7 0.4190 0.18962 0.33169 √
X =8 0.38008 0.12497 0.50476 √
X =9 0.43693 0.08803 0.64203 √

Table 12 Time Analysis of the proposed dual-layer security scheme

Secret Image Cover image Time for Encryption Time for Data Hiding

MRI Lumbar Spine CT scan carina 2.10 1.5


Lena Pepper 2.090 1.6
14020 Multimedia Tools and Applications (2022) 81:14001–14022

5.6 NIST analysis

A non-regulatory and physical science laboratory National of Standard and Technology


(NIST), issued a special edition of the randomness test named NIST randomness analysis
[34], which utilizes for the randomness in data. The detail of the tests is presented in [34], the
test is said to be certified if the value of the outcomes is less than unity. The subject test is
accomplished and the outcomes are displayed in Table 8. All the random tests are certified by
the encryption scheme, it can be perceived from the results that the ciphered image achieves
high randomness, which is the desired characteristic of a good encryption system (Table 11).

5.7 Time analysis

Time analysis of the proposed encryption scheme is carried out using MATLAB 2018 b on a
PC Intel(R), Core(TM) i3–7700 CPU @ 3.60 GHz, 8GB RAM with Windows 8. The
computed time is tabulated in Table 12.

6 Conclusion

To provide security to the medical imaging generated by the imaging equipment, connected to
the IoMT, a dual layer security system is proposed. In which firstly the medical image is
encrypted by utilizing the dynamically generated S-boxes, and then is hided in the cover
image, using SVD and Hessenberg decompositipon. The dual layer security ensure to make
safe the medicl images of the patient during communication and storage. The proposed
encryption scheme is tested against various cryptographic attacks and the results are tabulated
which shows the strength of encryption scheme. The stego image and cover image similarity
was checked using various indicators including correlation based analysis, analysis based on
pixel difference, analysis based on information theory and distance based analysis. All these
analysis shows that the stego image possess higher similarity with the cover image.

Acknowledgements The first author (Dr. Ahmed Elmorsy) would like to thank Deanship of Scientific Research
at Majmaah University for supporting this work under Project Number R-2021-107.

Declarations

Ethical approval This article does not contain any studies with human participants or animals performed by
any of the authors.

Conflict of interest The authors declare that they have no conflict of interest.

References

1. Abdulla AA, Sellahewa H, Jassim SA (2014) Stego quality enhancement by message size reduction and
fibonacci bit-plane mapping. In international conference on research in security standardisation
2. Alanazi AS (2021) A dual layer secure data encryption and hiding scheme for color images using the three-
dimensional chaotic map and Lah transformation. IEEE Access 9:26583–26592
Multimedia Tools and Applications (2022) 81:14001–14022 14021

3. Alanazi N, Khan E, Gutub A (2020) Efficient security and capacity techniques for Arabic text steganog-
raphy via engaging Unicode standard encoding. Multimed Tools Appl 80:1403–1431
4. Alghafis A, Firdousi F, Khan M, Batool SI, Amin M (2020) An efficient image encryption scheme based on
chaotic and deoxyribonucleic acid sequencing. Math Comput Simul 177:441–466
5. Ali KM, Khan M (2019) A new construction of confusion component of block ciphers. Multimed Tools
Appl 78:32585–32604
6. Alvarez G, Li S (2006) Some basic cryptographic requirements for Chaos-based cryptosystems. Int J
Bifurcation Chaos 16(8):2129–2151
7. Arshad U, Khan M, Shaukat S, Amin M, Shah T (2020) An efficient image privacy scheme based on
nonlinear chaotic system and linear canonical transformation. Phys A Stat Mech Appl 546
8. Batool SI, Shah T, Khan M (2014) A color image watermarking scheme based on affine transformation and
S4 permutation. Neural Comput Appl 25(7):2037–2045
9. Chen J-J, Zou H, Meng W-H, Zhan Y-F, Yu Y-W, Fu C (2012) A chaos-based digital image encryption
scheme with an improved diffusion strategy. Opt Express 20(3):2363–2378
10. Farah MAB, Farah A, Farah T (2020) An image encryption scheme based on a new hybrid chaotic map and
optimized substitution box. Nonlinear Dyn 99:3041–3064
11. Gan Z, Chai X, Zhang M, Lu Y (2018) A double color image encryption scheme based on three
dimensional brownian motion. Multimed Tools Appl 77:27919–27953
12. He YI, Zhang YQ, Wang XY (2020) A new image encryption algorithm based on two-dimensional
spatiotemporal chaotic system. Neural Comput Applic 32:247–260
13. Jamal SS, Shah T, Attaullah A (2017) A group action method for construction of strong substitution box.
3D research
14. Jamal SS, Shah T, Farwa S, Khan MU (2019) A new technique of frequency domain watermarking based
on a local ring. Wirel Netw 25(4):1491–1503
15. Kaur M, Kumar V (2020) A comprehensive review on image encryption techniques. Arch Comput Methods
Eng 43:15–27
16. Kaur M, Kumar V (2020) A comprehensive review on image encryption techniques. Arch Comput Methods
Eng 15-43:27
17. Khade PN, Narnaware M (2012) 3D chaotic functions for image encryption. IJCSI Int J Comput Sci 9(3):
323–328
18. Khalid I, Jamal SS, Shah T, Shah D, Hazzazi MM (2021) A novel scheme of image encryption based on
elliptic curves isomorphism and substitution boxes. IEEE Access 9:77798–77810
19. Khan M (2015) A novel image encryption scheme based on multiple chaotic S-boxes. Nonlinear Dyn 82:
527–533
20. Khan M, Asghar Z (2018) A novel construction of substitution box for image encryption applications with
Gingerbreadman chaotic map and S8 permutation. Neural Comput & Applic 29:993–999
21. Khan S, Han L, Lu HI, Butt KK, Bachira G, Khan NU (2019) A new hybrid image encryption algorithm
based on 2D-CA, FSM-DNA rule generator, and FSBI. IEEE Access 7:81333–81350
22. Khan M, Jamal SS, Waqas UA (2020) A novel combination of information hiding and confidentiality
scheme. Multimed Tools Appl 79:30983–31005
23. Khan M, Masood F (2019) A novel chaotic image encryption technique based on multiple discrete
dynamical maps. Multimed Tools Appl 358:26203–26222
24. Khan M, Masood F, Alghafis A (2020) Secure image encryption scheme based on fractals key with
Fibonacci series and discrete dynamical system. Neural Comput & Applic 32:11837–11857
25. Khan M, Shah T (2014) A construction of novel chaos base nonlinear component of block cipher. Nonlinear
Dyn 76:377–382
26. Khan M, Shah T, Batool SI (2016) Construction of S-box based on chaotic Boolean functions and its
application in image encryption. Neural Comput Appl 27:677–685
27. Khan M, Shah T, Batool SI (2017) A new approach for image encryption and watermarking based on
substitution box over the classes of chain rings. Multimedia Tools Appl 76:24027–24062
28. Khan M, Shah T, Gondal MA (2013) An efficient technique for the construction of substitution box with
chaotic partial differential equation. Nonlinear Dyn 73:1795–1801
29. Liu Z, Wu C, Wang J, Hu Y (2019) A color image encryption using dynamic DNA and 4-D memristive
hyper-chaos. IEEE Access 7:7836778378
30. Ma S, Zhang Y, Yang Z, Hu J (2019) A new pliantext-related image encryption scheme based on chaotic
sequence. IEEE Access 7:30344–30360
31. Masood F, Ahmad J, Shah SA, Jamal SS, Hussain I (2020) A novel hybrid secure image encryption based
on Julia set of fractals and 3D Lorenz chaotic map. Entropy 22:274
32. Mishra A, Agarwal C, Sharma A, Bedi P (2014) Optimized gray-scale image watermarking using DWT-
SVD and firefly algorithm. Exp Syst Appl Int J 41:7858–7867
14022 Multimedia Tools and Applications (2022) 81:14001–14022

33. Özkaynak F (2020) On the effect of chaotic system in performance characteristics of chaos based s-box
designs. Phys A Stat Mech Appl 550:124072
34. Rukhin A, JuanSoto J, Nechvata J A statistical test suite for random and pseudorandom number generators
for cryptographic applications
35. Run RS, Horng SJ, Lai J-L, Kao TW (2012) An improved SVD-based watermarking technique for
copyright protection. Expert Syst Appl 39(1):673–689
36. Said L, Hazzazi MM, Khan M, Jamal SS (2021) A novel image encryption based on rossler map diffusion
and particle swarm optimization generated highly non-linear substitution boxes. Chin J Phys 72:558–574
37. Tanyildizi E, Özkaynak F (2019) A New Chaotic S-Box Generation Method Using Parameter Optimization
of One Dimensional Chaotic Maps. IEEE Access 7:117829–117838
38. Unkaševi’c T, Banjac Z, Milosavljevi’c M (2019) A Generic Model of the Pseudo-Random Generator
Based on Permutations Suitable for Security Solutions in Computationally-Constrained Environments.
Sensors 19:5322
39. Waqas UA, Khan M, Batool SI (2020) A new watermarking scheme based on Daubechies wavelet and
chaotic map for quick response code images. Multimedia Tools Appl 79:6891–6914
40. Younas I, Khan M (2018) A new efficient digital image encryption based on inverse left almost semi group
and Lorenz chaotic system. Entropy 20(12):913
41. Zhang Q, Guo L, Wei X (2013) A novel image fusion encryption algorithm based on DNA sequence
operation and hyper-chaotic system. Opt Int J Light Electron Opt 124(18):3596–3600
42. Zhang LY, Hu X, Liu Y, Wong K-W A chaotic image encryption scheme owning temp-value feedback.
Cornell Univ J

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps
and institutional affiliations.

You might also like