Robust Chaos-Based Medical Image Cryptosystem
Robust Chaos-Based Medical Image Cryptosystem
net/publication/361715692
CITATIONS READS
0 73
3 authors, including:
All content following this page was uploaded by Samira Dib on 10 January 2023.
Abstract: - In In this paper, we propose an efficient cryptosystem for medical images. While the confusion
stage is ensured by an Arnold's cat map allowing the permutation of pixels; the diffusion stage is alleviated by
an improved logistic map used by the chaotic key-based algorithm (CKBA).
The simulation results attest that the proposed algorithm has superior security and enables efficient
encryption/decryption of medical images. Performances were evaluated by several security analyses: the NPCR
and UACI are improved over 99.60% and 33.46% respectively, and entropy is reported close to 7.8. What
makes this new cipher much stronger security.
needed. Further, many efforts have been focused on Where n is a time index, x0 is the initial value,
the use of the chaotic cryptography for medical data s−α s+α
xn ∈ [ 2s , 2s ] and the control parameters are α
encryption [19–27].
In this paper, a medical image encryption scheme and s used as key parameters for the proposed
using a modified logistic (ML) map is presented. cryptosystem. They are related by the following
The initial condition x0 of the chaotic ML system is equation:
considered as the secret key of our proposed
α = s − x0 (3)
encryption algorithm. Furthermore, the parameters
of cat map, p and q, are used as confusion key
Here, the parameter s must always be greater than α,
parameters.
for the xn values to appear inside the interval (0,1).
To test the feasibility of the proposed algorithm,
Moreover, the closer the value α is to s, the wider
a variety of standard reference images were used
the interval of xn .
including X-ray, ultrasound, MRI and CT scanner
images. Additionally, to accurately verify the
In order to explain the performance of Equations
performance of this method, several parameters
(1) and (2), Bifurcation diagram and Lyapunov
were calculated, including histogram analysis,
exponents are calculated and plotted with respect to
correlation, differential attack, PSNR, SSIM and
respective control parameters ‘r’ and ‘s’ in Figure
information entropy. The results reveal that the
1, for the Logistic map and the Modified Logistic
proposed technique offers good results and can
Map (ML).
therefore be adopted in a telemedicine system.
The organization of the paper is as follows: Regarding Fig.1, Logistic map is chaotic when
Section 2 is devoted to the definitions of the logistic parameter “r” lies in interval [3.6, 4] and ML map is
map and the modified map of the chaotic system. chaotic when parameter ‘s’ lies in interval [0.1, 20].
The proposed encryption method is presented in Therefore, the chaotic range of ML is more than the
Section 3. Section 4 is devoted to the discussion of others. As shown in the figure, there are no free
the obtained results. Finally, conclusions are white spaces and the entire area is almost covered.
presented in section 5. More importantly, all values of s can be used to
build the key space. This property extends the key
space of the proposed cryptosystem.
2 Logistic Map and Modified Map
The logistic map is typically used in most chaos-
based cryptosystems, especially in secure
communication systems.
x pq + 1 −p x′
[y] = [ ] [ ] mod N (5)
−q 1 y′
where (x,y) are the pixel position of the plain image Step 4 : Generate a pseudo-random binary sequence
with a size of N×N and (x’, y’) is the corresponding (PRBS) {b(i)}2MN−1
i=0 from the 16-bit binary
pixel position. Control parameters of the ACM are p representation of x(i) = 0. b(16i + 0)b(16i +
and q, which are positive integers and will be used 1) … b(16i + 15). Once {b(i)} is generated, the
as confusion key parameters: encryption can start.
- For the plain-pixel f(x,y) (0 ≤ x ≤ M – 1 , 0 In this section, the correlations of the adjacent
≤ y ≤ N−1), the corresponding cipher-pixel f′(x,y) pixels in the original image and encrypted image are
is determined by the following rule : analysed and compared by choosing 20 000 pairs of
adjacent pixels in horizontal, vertical, and diagonal
directions from the original image and its encrypted
f(x, y)XOR key1, b′ (x, y) = 3 image.To calculate the correlation coefficient of
f(x, y)XNOR key1, b′ (x, y) = 2 adjacent pixels, Eq. 7 can be adopted [28]:
f ′ (x, y) = (6)
f(x, y)XOR key2, b′ (x, y) = 1
cov(a.b)
{f(x, y)XNOR key2, b′ (x, y) = 0 rab =
√D(a)√D(b)
Where b′ (x, y) = 2. b(l) + b(l + 1) and l = x. N + y. 1
D(a)=M ∑M M
i=1 ∑i=1(a−E(ai ))
2 (7)
1
Step 5 : The decryption procedure is just like the E(a)=M ∑Mi=1 ai
encryption since XOR and XNOR are both 1
involutive operations. cov(a.b)=M ∑M i=1(ai −E(a))(bi −E(b))
In order to evaluate the proposed cryptographic If the correlation coefficient is 1, it means that
method, multiple medical images have been the original image and its encrypted image are
adopted, including X-Ray, ultrasound, MRI and CT highly dependent. However, if this coefficient is 0,
scanner images which are retrieved from open then the encrypted image and the original image are
databases [29, 30]. not correlated. Table 1 demonstrates the results
obtained. Indeed, it is clear that two adjacent pixels
of the original image, in the three directions, are
strongly correlated. However, for adjacent pixels of
4.1. Histogram Analysis
the encrypted image, the correlation is is very small
In image processing, histogram is the graphical or negligible. Therefore, the proposed algorithm has
representation of the pixel values’ distribution in an good permutation and substitution properties.
image by plotting the number of pixels at each gray
On the other hand, the graphical representation
level. The randomness of the proposed algorithm
of the correlation is a visual inspection of the pixel
can be validated by a flat and uniformly distributed
dependence of the image, where the horizontal axis
histogram of the encrypted images.
represents the intensity value of the pixel and the
A good cipher image has a uniform frequency vertical axis represents the value of the
distribution of the pixel values. Fig. 2 shows neighbouring pixel, horizontal, vertical or diagonal.
histograms of the plain and cipher images with the For an informative image, the graph is expected to
studied algorithm. As can be seen, the cipher images show a strong pattern on a 45 degree line; the denser
are so boisterous in a way that any data from them this line, the more the tested image is correlated. In
cannot be obtained, so the proposed scheme is the encrypted image, the expected graph should
powerful against histogram attacks. have points in the whole plane since most
neighbours of any pixel have different intensity
values with respect to that pixel.
4.2. Correlation Analysis
The graphical representation of the correlation
analysis is performed by plotting the pixel gray
Correlation distributions and correlation coefficients
values between adjacent pixels in the different
play a crucial role in the analysis of encrypted
directions for 1024 randomly selected adjacent
images. It is well known that the correlation
pixels pairs for both the original and the encrypted
between adjacent pixels of an informative image is
image. It is clearly shown from Fig. 3 (a)–(d) that
high in any direction. Whereas for the encrypted
the strong correlation between adjacent pixels is
image, the correlation must be very weak in order to
completely broken in all directions after applying
be able to withstand the various statistical attacks.
the proposed encryption process.
Fig. 2. Simulation results: (a) Original images. (b) Histograms of the original images. (c) Encrypted images.
(d) Histograms of the encrypted images.
Fig. 3. Correlation distribution of adjacent pixels in different directions: (a) Original and encrypted images.
(b) Diagonal direction. (c) Vertical direction. (b) Horizontal direction.
4.3. Information Entropy analysis given in the form of a byte, the maximum entropy
value is 8. Thus, the entropy value close to 8
The pixel values of a cipher image should be denotes higher randomness; else if this entropy
randomly distributed that they do not hold any value is lesser then there is a possibility of attack
relation with the plain image. Entropy denotes the which can reduce the security of image
degree of randomness and it is calculated using transmission. In Table 2, the entropy after
logarithm over a probability distribution. encryption is compared to that before encryption for
various images. According to the obtained values,
H(x) = − ∑N
i−1 P(xi )log 2 P(xi ) (8) the average entropy of all encrypted images is very
close to the theoretical value (≈ 7.7). This means
where, P(xi ) is the probability mass function. that the proposed algorithm is much efficient and is
highly secure. So we can conclude that the main
Generally, we expect from a good image objectives of image encryption are ensured, namely,
encryption scheme that the entropy of the encrypted illegibility and indeterminacy.
image is close to the ideal case. For an image data
Images
Plain images 7.516 7.574 6.097 0.642 6.701 6.017 6.361 7.530
4.4. Differential Attack Analysis where E1 and E2 are the encrypted images.
4.4.1. NPCR and UACI tests
Evaluation of encrypted images by NPCR and
Number of Pixel Change Rate (NPCR) and Unified UACI parameters is depicted in Table 3. The results
Average Change in Intensity (UACI) are the two reveal that a swift change in the original images
most important parameters to measure the resistance leads to a change in the cipher ones. This signifies
of developed algorithm against differential attacks. that the proposed scheme has a high ability to resist
This analysis can be made by observing the differential attack and the image encryption schema
relationship between two cipher images, one has a high sensitivity to a minor change in the
obtained from the normal image and another from original images.
single pixel changed plain image. NPCR measures The average values of NPCR and UACI for
the minimum number of pixels altered and UACI images are estimated as 99.60 % and 33.47%
measures the average difference between the two respectively.
cipher images. The NPCR and UACI are evaluated
by Eqs. (9) and (10) [28] :
4.4.2. SSIM and PSNR
∑𝑁 𝑀
𝑖=1 ∑𝑗=1 𝐷(𝑖,𝑗)
𝑁𝑃𝐶𝑅 = × 100 (9)
𝑁×𝑀 An encryption method achieves successful
performance when the encrypted image has a low
∑𝑁 𝑀
𝑖=1 ∑𝑗=1|𝐸2 (𝑖,𝑗)−𝐸2 (𝑖,𝑗)|
𝑈𝐴𝐶𝐼 = × 100 (10) PSNR and SSIM values. Indeed, two same images
255×𝑁×𝑀 have PSNR value as 1 and perfectly similar images
have SSIM value as 1(one).
Subject to :
0 𝑖𝑓 𝐸2 (𝑖, 𝑗) = 𝐸2 = (𝑖, 𝑗)
𝐷(𝑖, 𝑗) = {
1 𝑖𝑓 𝐸2 (𝑖, 𝑗) ≠ 𝐸2 = (𝑖, 𝑗)
To determinate the change in the pixel values of MAX: Maximum supported pixel value, MSE:
encrypted image from original image and accuracy Mean squared error, 𝑀 × 𝑁: Size of the image,
of decrypted image from original image, peak 𝐼(𝑖, 𝑗): Original image pixel value at location (i, j),
signal-to-noise ratio (PSNR) and structural and 𝐾(𝑖, 𝑗): Received image pixel value at location
similarity (SSIM) value are calculated using the (i, j).
following equations [28]:
In medical image, it is important that the
MAX decrypted image is exactly the same as the original
PSNR = 20 × log 10 (11)
√MSE
one. Table 4 shows the PSNR and SSIM values for
1 both crypted and decrypted image with respect to
MSE = M×N ∑m−1 n−1
i=0 ∑i=0 [I(i, j) − K(i, j)]
2
(12) the original image. These results indicate that the
PSNR is less than 10 dB and the SSIM is close to 0
SSIM(x, y) =
(2μx μy +c1 )(2σxy +c2 )
(13) for all encrypted images. In addition, all the images
(μ2x +μ2y +c1 )(σ2x +σ2y +c2 ) have been well reconstructed. Indeed, the SSIM is
close to 1 and the PSNR is very high and tends to ∞.
Where :
NPCR (%) 99.55 99.61 99.61 99.57 99.61 99.56 99.61 99.61
UACI (%) 33.48 33.46 33.46 33.48 33.46 33.48 33.46 33.46
PSNR (dB) Encrypted 8.77 7.86 6.81 8.14 6.91 6.81 8.46 6.58
SSIM Encrypted 0.02 0.04 0.03 0.00 0.04 0.02 0.02 0.06
4.5. Key Sensitivity Analysis image may still be partially decrypted, indicating
that the encryption performance of the encryption
For the encryption of medical images, the sensitivity method is poor.
of the keys is a very important index for building
any cryptosystem and evaluating the quality of an Key sensitivity analysis can be observed in two
encryption algorithm. An image cannot be properly aspects: (i) if slightly different keys are applied to
decrypted if the key is changed slightly, indicating encrypt the same images, then completely different
that the encryption method has high performance. cipher images should be produced; (ii) if a small
On the contrary, if the key changes significantly, the
difference exists in decryption key, then the cipher The proposed cryptosystem should also be
image could not be decrypted correctly. sensitive to Cat map stage p, q and n parameters.
Cipher images produced by slightly different keys
For the first key sensitivity analysis, a test plain are shown in Fig. 5 and the correlation coefficients
of X-Ray image is encrypted with a randomly for the corresponding cipher images are given in
chosen key of s=97.5678910, x0 =0.1234567. Then Table 6. It is clear from these results that a very
a slight change 10−7 is applied to the one of the small difference for all encryption keys results in
parameters with the other remains same, and repeats completely different encryption images.
the encryption. The corresponding cipher images
and the differential images are shown in Fig. 4. The In the second case, the encrypted image could
correlation coefficients between the cipher images not be properly decrypted, using a slightly different
are calculated and given in Table 5. Small key key than the one used in the decryption. As an
changes will lead to incorrect decryption results. example, the scanner CT image of Fig. 2(c) was
This also shows that the security performance of this used and the result is shown in Fig. 6.
method is very high. Fig .4 illustrates that the
decrypted images with incorrect secret key are quite We conclude that the proposed cryptosystem is
different from the original image, which quite sensitive to all keys and can resist differential
demonstrates that the proposed scheme is highly attacks effectively.
sensitive to the slightest changes in secret keys.
Fig. 4. Key sensitivity in the first case: (a) Plain image; (a’) Cipher image with s=97.5678910, x0 = 0.1234567;
(b) Cipher image with s=97.5678911, x0 = 0.1234567 ; (c) Cipher image with s = 97.5678910 ; x0 = 0.1234568;
(d) Differential image between (a’) and (b); (c’) Differential image between (a’) and (c).
Table 5. Correlation coefficients between cipher images produced by slightly different keys.
s x0
Fig. 5. Key sensitivity in the first case: (a’) Cipher image with p = 7 , q = 5 , n = 10 ; (b) Cipher image with
p=6, q = 3 , n = 10 ; (c) Cipher image with p = 5 , q = 3 , n = 7.
Table 6. Correlation coefficients between cipher X-Ray images produced by slightly different keys.
3(b) 6 4 10
Fig. 6. Key sensitivity in the second case: (a) Wrong decrypted image with s = 97.5678911, x0= 0.1234567 ;
(b) Wrong decrypted image with s = 97.5678910, x0 =0.1234568 ; (c) Correct decrypted image with
s=97.5678910, x0 = 0.1234567
4.6. Data Loss and Noise Attack Analysis Moreover, the ability of defending the noise
attacks is measured by adding different types of
During transmission, the image is subject to data noise. In this test, the salt and pepper noise are
loss. A powerful image cryptosystem must added in cipher image of ultrasound and MRI with
withstand this loss. Cropping attack and noise attack the density of 1% and 2%, which are given in Fig. 8.
analysis is performed to find how the algorithm is The Gaussian noise influences the cipher image
stronger against a loss of data when an image is sent with the intensity of 0.0001 and 0.0002 are shown in
over the public channel. Fig.9.
Fig. 7 shows examples simulation of the data From these Figures, it is concluded that the
loss attack. A CT scan and ultrasound test images proposed method has good robustness to defend the
are first encrypted using the proposed algorithm. noise attacks. It is demonstrates that the proposed
Next, a 60x60 data slice of the encrypted images is method can still succeeds in recovering the image
performed. According to the obtained result, the when the cipher image subjects to different noise
decrypted images contain most of the original attacks.
information. Even after cropping, the intended
receiver will be able to retrieve the plain images to
some extent, hence against this cropping its
robustness is been proved.
Fig. 7. Data loss analysis: (a) Original Ultrasound and CT scanner images;
(b) Cipher image with 60×60 data cut; (c) Decrypted image of (b).
Fig. 8. Noise attack analysis: (a) Original Ultrasound and MRI images; (b)-(c) Cipher images added with
1% “salt & pepper” and 2% “salt & pepper” noise ; (d)-(e) Decrypted images.
Fig.9. Noise attack analysis: (a) Original CT and Ultrasound images; (b)-(d) Cipher images under Gaussian
noise with the degree of Mean=0, Variance=0.0001, 0.0002 and 0.0003; (e)-(g) Decrypted images.
diffusion, Signal Processing, Vol. 167, 2020, [24] E. A. Adedokun, J. B. Akan, H. Bello-Salau, I.
107286. J. Umoh, Nwosu R. I, and Y. Ibrahim, A Secure
[18] SM. Ismail, LA. Said, AG. Radwan, Chaotic Framework for Medical Image
Generalized double-humped logistic map-based Encryption using a 3D Logistic Map,
medical image encryption, Journal of Advanced Applications of Modelling and Simulation, Vol.
Research, Vol. 29(5), 2018, pp. 232-239. 4, 2020, pp. 141-148.
[19] C. Fu, G.-y. Zhang, O. Bian, W.-m. Lei, and [25] BS. Aashiq, R. Amirtharajan, A robust medical
H.-f. Ma, A novel medical image protection image encryption in dual domain: chaos-DNA-
scheme using a 3-dimensional chaotic system, IWT combined approach, Medical & Biological
PloS One, Vol. 9, 2014, pp. 1–25. Engineering & Computing, Vol. 22(3), 2020,
[20] K. A. Kumari, B. Akshaya, B.Umamaheswari, pp.102-110.
K.Thenmozhi, R. Amirtharajan and [26] G. Mathur, A Survey on Medical Image
P.Praveenkumar, 3D Lorenz Map Governs Encryption, Intern. J. of Comp. Sci & Eng.,
DNA Rule in Encrypting DICOM Images, 2019.
Biomedical & Pharmacology Journal, Vol. [27] R. Dib, Active Contours with Term of
11(2), 2018, pp. 897-906. Smouthing: Application in Medical Imaging,
[21] U. Verma and N. Sharma, Security Analysis of WSEAS Transactions on Signal Processing,
Medical Images using ECC over RSA, Journal Vol.16, 2020, pp. 108–117.
of University of Shanghai for Science and [28] W. Zhou, C.B. Alan, R.S.Hamid and P.S. Eero,
Technology, Vol. 23(5), 2021, pp. 356-367. Image Quality Assessment: From Error
[22] L. D. Singh, K. M. Singh, Medical image Visibility to Structural Similarity, IEEE Trans.
encryption based on improved ElGamal on Image Proc., Vol. 13, 2004, pp. 600-612.
encryption technique, Optik, Vol. 147, 2017. [29] W. Al-Dhabyani, M. Gomaa, H. Khaled, A.
[23] Q.A. Kesr, L. Nana, A. C. Pascu, S. Gire, J. M. Fahmy, Dataset of breast ultrasound images,
Eghan, N. N. Quaynor, A cryptographic Data in Brief, 2020, Feb;28:104863.
technique for security of medical images in [30] T. Preston-Werner and C. Wanstrath, Github,
health information systems, Procedia Computer https://github.com/ieee8023/covid-chestxray-
Sciences, Vol. 58, 2015, pp. 538 – 543. dataset/tree/master/images.com,
accessed September 2020.