# Securing Digital Images through Simple Permutation-Substitution Mechanism in Cloud-Based Smart City Environment

Authors: Ahmad Alanezi; Bassem Abd-El-Atty; Hoshang Kolivand; Ahmed A. Abd El-Latif; Basma Abd El-Rahiem; Syam Sankar; Hany S. Khalifa
Journal: Security and Communication Networks
 (2021)

---

## Abstract

Data security plays a significant role in data transfer in cloud-based smart cities. Chaotic maps are commonly used in designing modern cryptographic applications, in which one-dimensional (1D) chaotic systems are widely used due to their simple design and low computational complexity. However, 1D chaotic maps suffer from different kinds of attacks because of their chaotic discontinuous ranges and small key-space. To own the benefits of 1D chaotic maps and avoid their drawbacks, the cascading of two integrated 1D chaotic systems has been utilized. In this paper, we report an image cryptosystem for data transfer in cloud-based smart cities using the cascading of Logistic-Chebyshev and Logistic-Sine maps. Logistic-Sine map has been utilized to permute the plain image, and Logistic-Chebyshev map has been used to substitute the permuted image, while the cascading of both integrated maps has been utilized in performing XOR procedure on the substituted image. The security analyses of the suggested approach prove that the encryption mechanism has good efficiency as well as lower encryption time compared with other related algorithms.


---

## Body

## 1. Introduction

In smart cities environment, the data generated from various sources (smart city applications) are usually kept inside a cloud server and are manipulated by the concerned government officials and citizens of the city [1, 2]. The data of citizens include healthcare information, purchase behavior, weather conditions, environmental changes, and transport information. The majority of the data take the form of images. Image data concerning the day to day activities of people are extremely sensitive and critical. In order to save the data from exploitation by third parties, we need to build efficient encryption mechanisms so that they can be integrated with the cloud system for secure storage.In the digital era of processing multimedia data by almost all of the electronic devices, technologists, researchers, and scientists are actively involved in the design and development of powerful cryptosystems. Since the images are the inevitable source of digital data in today’s world, cryptosystem builders are focusing more on devising techniques that encipher the actual image information and in no way that the opponents must be able to disclose it. In their concrete terminology, images are nothing but a matrix of numbers. An encryption algorithm, through its reversible set of operations, conceals the actual pixel values. To achieve better security, we should mainly focus on four parameters: design of efficient confusion and diffusion strategy, reducing the correlation of neighboring pixels, enhancing the entropy value of the encrypted image, and huge key-space.It is observed that, due to the high correlation amongst pixels of the image, popular enciphering mechanisms like Data Encryption Standard (DES) and Advanced Encryption Standard (AES) are not effectively suitable for enciphering images. The active area of research in designing encryption algorithms for images is chaos-based cryptography [3, 4]. It basically involves the processing of images with a sequence of random numbers produced by a chaotic system. Chaotic systems are mathematical functions with the property of being sensitive to primary values of parameters. The values of parameters or constants of the chaotic maps act as keys to the cryptosystem. Various researchers use maps like Lorentz map, Arnold-Tent map, Cat map, etc., to generate random numbers so that they can be applied on the image to change the original pixel values (substitution or diffusion) and to shift the position of actual pixel values (permutation or confusion). To enhance the security in all levels, the researchers use the concepts of DNA sequence operation [5], Cellular Automata [6], substitution-box [7, 8], finite-state machine [9], fractal sorting matrix [10], bit-level permutation [11], compressive sensing [12, 13], etc., along with chaos-based cryptography.As we explained earlier, the permutation-substitution process decides the level of security attained by the final cipher image. It is considered as the two basic steps in encryption. Most of the researchers primarily focus on developing an efficient permutation strategy by devising a separate shifting algorithm that can effectively conceal the original image information. Traditional image permutation mechanisms like sort-based, Arnold-based, Baker-based, cyclic shift-based permutation mechanisms, etc., have disadvantages like weak permutation and high time complexity [14]. Based on these limitations, Wang et al. [14] presented a new permutation method to achieve low time complexity based on the combination of cyclic shift with sorting, and Hao et al. [15] presented a new permutation mechanism called “chaotic magic transform” using a two-dimensional chaotic system to achieve low time complexity and efficient permutation of image pixels. In substitution, the pixel value is getting changed, mostly because of the XOR operation between the set of random sequences produced by the chaotic map and the image matrix. Researchers have the maximum flexibility in deciding steps in the encryption algorithm. The selection of a particular step (permutation or substitution) in the algorithm is decided by three factors: the step must be reversible, yield an enhanced value of evaluation parameters, and have fast running speed.Researchers in their new works clearly show the design of one-dimensional (1D) chaotic systems [14, 16, 17] and multidimensional chaotic maps [10–13] with an exclusive application in image encryption. Every work is focusing on how effectively we can improve various measures of security analysis. The 1D chaotic systems enjoy powerful benefits like being easy to design, having low computational complexity, having high-speed processing, and having simple structure. However, 1D maps have a weakness to several attacks because their initial values have a small key-space and chaotic discontinuous ranges [16].Therefore, cascading systems are the solution to possess the benefits of iterating 1D chaotic maps and avoiding their drawbacks. Recently, Zhou et al. [18] proposed a new cascading system of two 1D systems (Tent, Sine, and Logistic) and presented its application in image encryption. In this work, we report a new image cryptosystem using the cascading of two integrated 1D chaotic systems (Logistic-Chebyshev and Logistic-Sine). In the suggested cipher approach, Logistic-Sine map is utilized to permute the plain image, and Logistic-Chebyshev map is used to substitute the permuted image. Cascading of both maps is used in performing XOR procedure on the substituted image. The experimental outcomes of the suggested approach prove that the encryption system has good efficiency and low running time for encryption compared to other related mechanisms.The structure of our paper is as follows: the proposed framework for cloud-based smart city is provided in Section2, while the elementary knowledge of the utilized chaotic integrated maps is delivered in Section 3. The presented image cryptosystem is given in Section 4, while the security analyses of the presented encryption mechanism are given in Section 5. As a final point, the conclusions are provided in Section 6.


## 2. Proposed Framework for Cloud-Based Smart City

Smart cities are an enhanced urban infrastructure in which citizens are offered high-quality life in a way of efficient delivery of various services such as transportation, e-governance, waste management, healthcare, education, and water supply. The information and communication technologies are effectively deployed to satisfy the desired level of service delivery. The smart city environment involves data reception from various sensors, devices, and people and is processed further to make final decisions. Large amounts of data are generated every day through various smart city applications. For the efficient storage and management of such data, cloud servers are deployed. Cloud computing allows us to access various services hosted remotely. Smart city applications make use of services cloud environment. Data security, authenticity, and integrity policies are also integrated along with the cloud platform for smooth data transmission and storage. The privacy of digital contents is of utmost importance [19, 20].We intend to propose a cryptosystem that enciphers the digital image data captured from the smart city environment. Figure1 shows the proposed framework for secure data transfer in cloud-based smart cities. The image data might represent medical information of patients, live traffic blocks and violation, climatic conditions, suspicious people, etc. The encrypted image data can be transferred and stored in interconnected cloud servers. The users at the other end can make use of the image data after applying the deciphering mechanism. Since the data are stored in an encrypted form at cloud servers, opponents must not be able to view and interpret the same. The following sections cover the concepts related to the proposed image cryptosystem.Figure 1
Framework outline of secure data transmission in cloud-based smart city.


## 3. Preliminary Knowledge

The proposed image cipher approach is based on cascading two integrated 1D chaotic systems: Logistic-Chebyshev and Logistic-Sine. The following subsections detail the two chaotic systems.


### 3.1. Logistic-Chebyshev Map

Logistic-Chebyshev map is an integration of two common 1D chaotic systems: Logistic and Chebyshev. It can be expressed as[7](1)LCi+1=α×LCi1−LCi+4−αcosA×arccosLCi4mod1,where α∈0,4 is the control parameter, LC0∈0,1 is the primary value of the system, and A∈N is the degree of the chaotic map.


### 3.2. Logistic-Sine Map

Logistic-Sine map is an integration of two 1D chaotic maps: Logistic map and Sine map, which can be expressed as [16](2)LSi+1=βLSi−LSi2+4−βsinπ×LSi4mod1,where β∈0,4 is the control parameter and LS0∈0,1 is the original value.


## 3.1. Logistic-Chebyshev Map

Logistic-Chebyshev map is an integration of two common 1D chaotic systems: Logistic and Chebyshev. It can be expressed as[7](1)LCi+1=α×LCi1−LCi+4−αcosA×arccosLCi4mod1,where α∈0,4 is the control parameter, LC0∈0,1 is the primary value of the system, and A∈N is the degree of the chaotic map.


## 3.2. Logistic-Sine Map

Logistic-Sine map is an integration of two 1D chaotic maps: Logistic map and Sine map, which can be expressed as [16](2)LSi+1=βLSi−LSi2+4−βsinπ×LSi4mod1,where β∈0,4 is the control parameter and LS0∈0,1 is the original value.


## 4. Proposed Image Cipher Approach

In this part, we explain a new image cryptosystem using cascading Logistic-Chebyshev and Logistic-Sine maps. Logistic-Sine system is utilized to permute the plain image, and Logistic-Chebyshev map is used for substituting the permuted image, while the cascading of both integrated maps is utilized in performing XOR process on the substituted image. The architecture of the proposed approach is provided in Figure2, whereas the encryption processes are provided in Algorithm 1.Figure 2
The architecture of the proposed image cryptosystem.Algorithm 1: Encryption algorithm.
Input: Plain image PParameters:LS0, β, LC0, α, A//Used for iterating chaotic maps.Output: Cipher image C and decimal values H1,H2,H3andH4mnc = size p//Get image dimension.Hb=hashP//Compute the hash value Hb for image P using SHA-256 algorithm.H=uint8Hb//Convert the 256 bit hash value to 32 integer values h1,h2,…,h32, where each integer composed of 8 bit.H1 = h1⊕h2⊕⋯⊕h8/256;H2 = h9⊕h10⊕⋯⊕h16/128;H3 = h17⊕h18⊕⋯⊕h24/256;H4 = h25⊕h26⊕⋯⊕h32/128;//Update initial key parameters (LS0, β, LC0, α) using H1, H2, H3, and H4LC0=LC0+H1/2;α=α/2+H2;LS0=LS0+H3/2;β=β/2+H4;LC = Logistic-Chebyshev LC0,α,A,m×n×c//Using the updated key parameters LC0,α,A, operate Logistic-Chebyshev map for m×n×c times to generate sequence LC, wherever the size of P is m×n and c denotes the number of color channels.LS = Logistic-Sine LS0,β,m×n×c//Using the updated key parameters LS0,β, operate Logistic-Sine system for m×n×c times to create sequence LS.KC=fixLCi×1012mod256//Convert sequence LC into integer values.KS=fixLSi×1012mod256;PerIm=permutationP,KS//Permute the input image P using the sequence KS and chaotic magic transform method presented in [15].Sbox=uniqueKC//Collect the first 256 unequal elements in the sequence KC to construct the substitution-box (S-box).//Substitution process.forI=1:mforj=1:nfork=1:cSimi,j,k=SboxPerImi,j,k+1;endendendKey=KS⊕KC//Cascade both sequences (KC and KS) to generate the key sequence Key.C=Sim⊕key//Cipher image


## 5. Experimental Results

To estimate the performance of the presented encryption system, we used a laptop with Intel Core™ i5-2450M CPU 2.50 GHz and 6 GB RAM with preinstalled MATLAB software R2016b. We used standard test images from SIPI database [21] of dimension 512 × 512 as shown in Figure 3, which labeled as Boats, Bridge, Baboon, Sailboat, Airplane, and Peppers. The key parameters utilized to iterate Logistic-Chebyshev and Logistic-Sine maps are initialized as LC0 = 0.684, α = 3.356, A = 152, LS0 = 0.4794, and β = 3.8435.Figure 3
The first two rows display the used investigation images, whereas the last two rows display their ciphered images using our presented cryptosystem. (a) Boats. (b) Bridge. (c) Baboon. (d) Sailboat. (e) Airplane. (f) Peppers. (g) Enc-Boats. (h) Enc-Bridge. (i) Enc-Baboon. (j) Enc-Sailboat. (k) Enc-Airplane. (l) Enc- Peppers.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)


### 5.1. NIST SP 800-22 Test

To check the random characteristics of the generated sequence from cascading chaotic maps and the constructed encrypted images, we used NIST SP 800-22 tests. The crucial task of these tests is to measure the randomness property of a sequence and detect any nonrandom characteristics existing in the sequence. The outcome of each test generates aP-value in range [0, 1]. When the P-value is greater than the threshold value µ = 0.01, this indicates that the sequence passes this test [22]. The outcomes of NIST SP 800-22 tests are stated in Table 1, where the two sequences of the cipher image Enc-Sailboat and its used key stream that was generated from chaotic maps passed all NIST SP 800-22 tests.Table 1
Outcomes of NIST SP 800-22 tests for the cipher image Enc-Sailboat and its used key stream that was generated from chaotic maps.
Test nameP-valuePassedEnc-sailboatKey streamRandom excursions variant (x = 1)0.7582880.911716√Rank0.2774270.023295√Random excursions (x = 1)0.7594210.324551√Long runs of ones0.5382390.047194√Overlapping templates0.3096690.864874√Frequency0.2757130.305835√Linear complexity0.2998820.348444√Block-frequency0.4697850.646149√Runs0.4230220.456241√No overlapping templates0.6869460.311721√Universal statistical0.9430580.638841√Spectral DFT0.9123140.890517√Approximate entropy0.3580940.373851√SerialTest 10.7529910.278112√Test 20.5511330.465868√Cumulative sumsReverse0.3883770.348202√Forward0.4831050.282021√


### 5.2. Time Efficiency

To verify the time effectiveness for the encryption process of our cryptosystem, Table2 shows a simple comparison for encryption time for the proposed image cryptosystem with related cryptosystems for different sizes of images. Outcomes of encryption time for related works are given as reported in [10, 15, 16, 23]. The encryption time given in Table 2 confirms that our mechanism is superior to other ones in terms of time encryption.Table 2
Comparisons of encryption time (in seconds) for the proposed image cryptosystem with related cryptosystems for different sizes of images.
Encryption schemeImage size256 × 256512 × 5121024 × 1024Our proposed method0.04940.30331.0453Ref. [10]0.07790.32611.3146Ref. [15]0.05380.23381.1494Ref. [16]0.17890.66393.1426Ref. [23]0.09490.40101.9857


### 5.3. Correlation Analysis

In plain images, per pixel is profoundly correlated with its neighboring pixels, and the value of correlation is imminent to 1 in all directions (horizontal, vertical, and diagonal). On the other hand, for the generated ciphered images using a well-designed image cryptosystem, the correlation values should be imminent to 0 [24]. For calculating correlation values of cipher images and their corresponding plain ones, we picked randomly 104 pairs of adjacent pixels in each direction.(3)V=∑x=1TPx−P¯Cx−C¯∑x=1TPx−P¯2∑x=1TCx−C¯2,​​​where T denotes to the full number of neighboring pixel pairs in every direction, and Px and Cx denote the values of neighboring pixels. The correlation values of the experimented datasets are provided in Tables 3 and 4, in which the correlation values of cipher images are very near to 0. The correlation distribution of neighboring pixels for greyscale Boats image before and after encryption is plotted in Figure 4, and the correlation distribution of color Sailboat image before and after encryption is plotted in Figures 5–7 . From the stated results in Tables 3 and 4, and the stated correlation distributions in Figures 4–7, we can conclude that our image cryptosystem is secure against correlation analysis.Table 3
Correlation coefficients of the experimented greyscale dataset.
ImageDirectionHor.Ver.Dia.Boats0.97130.93670.9212Enc-boats−0.00110.0004−0.0005Bridge0.92700.93970.8937Enc-bridge0.00150.00040.0011Baboon0.76230.86410.7274Enc-baboon−0.0002−0.00010.0011Table 4
Correlation coefficients of the tested color dataset.
ImageDirectionHor.Ver.Dia.RedGreenBlueRedGreenBlueRedGreenBlueSailboat0.95620.97010.97080.95650.97360.97350.94640.95840.9558Enc-sailboat−0.0002−0.0003−0.00020.00070.0002−0.0012−0.0006−0.00140.0007Airplane0.96250.97100.94550.97210.96230.96390.93910.94060.9263Enc-airplane−0.0003−0.0011−0.00010.0002−0.0001−0.00010.0002−0.00050.0005Peppers0.96820.98460.96890.96700.98320.96710.96190.97220.9518Enc-peppers−0.0012−0.00090.00090.0003−0.0008−0.00090.00030.0003−0.0004Figure 4
Correlation distribution of Boats image, where the correlation distribution of the plain image is stated in the first row, and the correlation distribution of the cipher image is stated in the last row.
(a)(b)(c)(d)(e)(f)Figure 5
Red channel of Sailboat-Correlation distribution.
(a)(b)(c)(d)(e)(f)Figure 6
Green channel of Sailboat-Correlation distribution.
(a)(b)(c)(d)(e)(f)Figure 7
Blue channel of Sailboat-Correlation distribution.
(a)(b)(c)(d)(e)(f)


### 5.4. Pixels Change Rate

To assess the plain image sensitivity to tiny bit changes, two measures are applied: Unified Average Changing Intensity (UACI) and Number of Pixels Change Rate (NPCR). The mathematical representations of NPCR and UACI can be declared as follows:(4)NPCR=∑x,yDiffx,yT×100%,Diffx,y=0,ifC1x,y=C2x,y,1,ifC1x,y≠C2x,y,(5)UACI=1T∑x,yC1x,y−C2x,y2b−1×100%.Here, C1, C2 are two encrypted images for one plain image with changes in one bit, T points to the full number of pixels used in the image, and b expresses the number of bits used to describe the pixel value. The NPCR and UACI outcomes of plain and cipher images are given in Table 5, which demonstrated that our image cryptosystem is highly sensitive to tiny pixel variations in the plain image.Table 5
NPCR and UACI values of the experimented datasets.
ImageNPCR (%)UACI (%)Boats99.6177633.44965Bridge99.6253933.46607Baboon99.6238733.56153Sailboat99.6204333.44339Airplane99.6223433.45237Peppers99.6220933.45786


### 5.5. Histogram Analysis

Histogram points to the frequency distribution of pixel values in the image. A well-designed cryptosystem should guarantee the uniformity of the histograms for different encrypted images. Figure8 displays the histograms of greyscale images before and after the encryption process, and also Figure 9 displays the histograms of the plain and cipher Sailboat image, in which the histograms of plain images differ from each other and the histograms of the corresponding cipher images are uniform. However, we need a mathematical quantity analysis to check the histogram test; therefore, we perform Chi-square test χ2, which can be expressed as[25](6)χ2=∑i=0255fi−s2s,Here, fi denotes the frequency of the pixel value i, and s is the image dimension. By supposing that the significant level is λ = 0.05, then χλ2255=293.25. For a given image, when the χ2 value is smaller than χλ2255, this confirms the uniformity of the histogram for this image; otherwise, the image has nonuniform distribution. Tables 6 and 7 provide the results of χ2 for the investigated dataset, in which the χ2 values for all cipher images are smaller than χλ2255. Consequently, the presented encryption algorithm can resist histogram analysis attacks.Figure 8
The histogram of the tested greyscale images, in which the encrypted images are totally having a uniform distribution. (a) Boats. (b) Bridge. (c) Baboon. (d) Enc-Boats. (e) Enc-Bridge. (f) Enc-Baboon.
(a)(b)(c)(d)(e)(f)Figure 9
The histogram of Sailboat color image, in which the three channels of the cipher image are totally having a uniform distribution.
(a)(b)(c)(d)(e)(f)Table 6
χ2 values of the experimented greyscale images.
ImageChi-square valueResultBoats383969.687NonuniformBridge1185618.347NonuniformBaboon187692.171NonuniformEnc-boats277.561UniformEnc-bridge263.324UniformEnc-baboon286.876UniformTable 7
χ2 values of the experimented color images.
ImageChi-square valueResultRGBSailboat196697.306130154.716344571.537NonuniformAirplane678424.492682495.3821107858.005NonuniformPeppers213187.216318382.929491428.177NonuniformEnc-sailboat215.636243.337232.412UniformEnc-airplane204.193269.281287.061UniformEnc-peppers235.867251.417239.181Uniform


### 5.6. Information Entropy Analysis

To compute the distribution of pixel values per level in the image, we employed the global entropy test, which can be stated as follows:(7)EX=∑i=0255pxilog21pxi,Here pxi denotes the probability of xi. The probable values for a gray-scale image are 28, and then the ideal entropy value is equal to 8 bits. To assess the efficiency of the suggested image cryptosystem, the entropy values for the cipher image must be extremely nearby 8. Notwithstanding, the global entropy is ignoring to assess the true randomness for encrypted images. Consequently, local entropy can be estimated by the mean of global entropies for nonoverlapping blocks (1936-pixel per block). Table 8 displayed the values of global and local entropies for the plain images and their corresponding ciphered ones, in which all values of information entropy for encrypted images are really near 8 bits. Consequently, the suggested cryptosystem is protected against entropy attacks.Table 8
Global and local information entropies for the investigated dataset.
ImageGlobal entropyLocal entropyPlainCipherPlainCipherBoats7.191377.999236.102637.90249Bridge5.705567.999274.815257.90286Baboon7.357877.999186.660197.90322Sailboat7.762167.999766.077417.90136Airplane6.663917.999745.528647.90223Peppers7.669827.999766.049647.90145


### 5.7. Contrast Analysis

To estimate the variation of local intensity that existed in an image, we employed the contrast test, which is a statistical measure and defined as given in [26](8)Con=∑x,yx−y2px,y,Here, px,y denotes the number of gray-level cooccurrence matrices. For a given image, high contrast values denote that the image has significantly various gray levels, whereas lower values indicate constant gray levels. Contrast values of plain and cipher images are provided in Tables 9 and 10, in which all cipher images possess high contrast values.Table 9
Contrast values of the experimented greyscale images.
ImageOriginalEncryptedBoats0.3799410.51092Bridge0.4789510.49715Baboon0.6184210.51323Table 10
Contrast values of the experimented color images.
ImageOriginalEncryptedRGBRGBSailboat0.294320.486110.4615810.4887210.4802410.50732Airplane0.184730.285020.1333510.4893510.5221610.50711Peppers0.275140.302990.2213710.5013110.4742910.53328


### 5.8. Peak Signal-to-Noise Ratio Analysis

To measure the noise ratio between the plain and cipher images, we employed peak signal-to-noise ratio (PSNR) tool, which can be defined as[27](9)PSNRP,C=20log10MAXPMSE,MSE=1MN∑x=0M−1∑y=0N−1Px,y−Cx,y2,Here, MAXP is the maximum pixel value of the plain image P, while C indicates its corresponding cipher image, and the dimensions of P and C are M×N. Higher PSNR values denote that the cipher image is near to the plain image. Therefore, a well-designed encryption algorithm should have low PSNR values, which signify that the cipher image is significantly dissimilar from its corresponding plain image. The outcomes of PSNR and MSE values for the investigated dataset are provided in Table 11, in which the PSNR values are very low.Table 11
PSNR and MSE values of experimented datasets.
ImagePSNRMSEBoats9.295257.64812Bridge8.777618.61627Baboon8.644967.28999Sailboat7.873251.01174Airplane7.235951.03475Peppers7.447291.01103


### 5.9. Key-Space and Key Sensitivity Analyses

The key-space referred to the various keys that can be applied in brute force attacks and must be large enough to resist those attacks. Our image cryptosystem uses key parametersLS0,β.LC0,α,andA to operate chaotic maps during the encryption and decryption processes. By supposing that the computation precision of digital computers is 10−16, the key-space for our cryptosystem is 1080, which is large enough for any modern cryptographic mechanism.Key sensitivity indicates that any slight modifications in the initial keys lead to significant variations in the outcome. To evaluate the key sensitivity of the presented cryptosystem, the encrypted Sailboat image is deciphered amidst tiny modifications in the primary keys. The outcomes of the key sensitivity for the presented mechanism are provided in Figure10. Also, to evaluate the key sensitivity of our cryptosystem in quantity terms, we perform NPCR and UACI on decrypted Sailboat image with the correct key and other decrypted Sailboat images with tiny modifications in the initial keys in which the outcomes are stated in Table 12. From the results stated in Table 12 and Figure 10, our cryptosystem has high key sensitivity, in which any slight modifications in the initial keys lead to significant variations in the outcome.Figure 10
Key sensitivity of the presented encryption approach. (a) Correct key. (b) Correct key butLC0 = 0.684000000000001. (c) Correct key but α = 3.356000000000001. (d) Correct key but A = 153. (e) Correct key but LS0 = 0.479400000000001. (f) Correct key but β = 3.84350000000001.
(a)(b)(c)(d)(e)(f)Table 12
NPCR and UACI of decrypted Sailboat image with the correct key and other decrypted Sailboat images with tiny modifications in the initial keys, as stated in Figure10.
ImageNPCR (%)UACI (%)Figures10(a) and 10(b)99.60441532.209367Figures10(a) and 10(c)99.61891232.198207Figures10(a) and 10(d)99.61306332.211601Figures10(a) and 10(e)99.60505232.217681Figures10(a) and 10(f)99.60085632.191464


### 5.10. Classical Types of Attack

During the cryptanalyses of a cryptosystem, it is generally assumed that cryptanalysts have a complete understanding of the design of the cryptosystem and know everything regarding the cryptosystem except the values of initial key parameters. This is an obvious requirement in today’s cryptosystems. There are four kinds of classic attacks: ciphertext only, known-plaintext, chosen-plaintext, and chosen-ciphertext. The chosen-plaintext attack is known to be the most powerful attack, in which the hacker has temporary access to the cryptosystem and can construct the ciphertext corresponding to a chosen-plaintext. If a cryptosystem has the capability to withstand the chosen-plaintext attack, it possesses the ability to withstand other types of attacks. The presented cryptosystem is highly sensitive to the secret keyLS0,β.LC0,α,andA. If there is any tiny change in one of the secret keys LS0,β.LC0,α,andA, then a significant variation is generated in the outcome. In addition, our cryptosystem employs the hash value of the plain image to update the initial key parameters; therefore, our cryptosystem depends not only on key parameters but also on the plain image. Cryptanalyst tries to obtain some valuable information regarding the secret key using full black and white images, due to their capability of disabling the role of permutation/substitution processes. The corresponding cipher images for black and white plain images and their corresponding histograms are given in Figure 11, in which no visual information can be obtained from these cipher images, and Table 13 provides some statistical analyses for these images. Consequently, our encryption approach has the ability to withstand the chosen-ciphertext and chosen-plaintext attacks.Figure 11
Cipher images of full white and black images, and their corresponding histograms. (a) Enc-white. (b) Histogram of Enc-white. (c) Enc-black. (d) Histogram of Enc-black.
(a)(b)(c)(d)Table 13
Statistical examinations of the cipher full-white and full-black images.
ImageChi valueCorrelationEntropyContrastHor.Ver.Dia.GlobalLocalEnc-white279.8320−0.00150.00040.00077.999237.902310.50954Enc-black280.1445−0.00020.00010.00117.999227.902610.46016


### 5.11. Noise and Data Loss Attacks

When data is transmitted over a communication channel, noise affects the information transmitted, and data may lose some of its parts. Subsequently, a well-designed encryption approach should have the capability of withstanding data loss and noise attacks. To assess the suggested cryptosystem against these attacks, we execute occlusion attacks by cutting out some parts of the cipher image or joining Salt & Pepper noise to it and then attempting to recover the secret image from the defective cipher image via the decryption procedure. Figures12 and 13 show results of occlusion attacks, in which the original image is efficiently obtained after the decryption procedure.Figure 12
Data loss attack, with the first row denoting the defective cipher images by cutting out some parts and the last row signifying the corresponding deciphered ones. (a) Cutting out 10%. (b) Cutting out 15%. (c) Cutting out 25%.
(a)(b)(c)Figure 13
Noise attack, with the first row denoting the defective cipher images by varying Salt & Pepper noise density and the last row signifying the corresponding deciphered ones. (a) Density = 0.01. (b) Density = 0.15. (c) Density = 0.25.
(a)(b)(c)


### 5.12. Comparative Analysis

To confirm the effectiveness of our cryptosystem alongside other related approaches, Tables14 and 15 present average values of correlation, NPCR, UACI, local information entropy, global information entropy, Chi-square, contrast, and PSNR of our cryptosystem with their average values reported in [5, 10–12, 14, 25, 26, 28]. The outcomes declared in Tables 2, 14, and 15 prove the effectiveness of the presented cryptosystem compared to other related approaches.Table 14
Comparison of our algorithm with other related cryptosystems in terms of average values of correlation, NPCR, UACI, local entropy, and global entropy.
CryptosystemCorrelationNPCR (%)UACI (%)Information entropyHor.Ver.Dia.GlobalLocalOur cryptosystem−0.000160.000020.0002399.6219833.471817.999497.90227Ref. [5]0.00200−0.00070−0.0014099.6500033.480007.99700—Ref. [10]0.000520.000330.0008799.6096033.459607.999307.90237Ref. [11]−0.00970−0.008700.0065099.6000033.440007.997007.90217Ref. [12]−0.000740.00120−0.00320——7.99830—Ref. [14]0.002190.001690.0018699.6110033.475677.999297.90238Ref. [25]−0.00420−0.00490−0.0045099.610133.525207.99957.90300Ref. [26]0.00180−0.001610.0046399.622533.595007.99301—Ref. [28]0.000500.00170−0.0025099.6066733.426677.99866—Table 15
Comparison of our cryptosystem with other related cryptosystems in terms of average values of Chi-square, contrast, and PSNR.
CryptosystemChi-squareContrastPSNROur approach250.5121710.502098.21239Ref. [11]257.33667——Ref. [14]249.42857——Ref. [25]249.84440——Ref. [26]—10.435258.53790Ref. [28]256.7514610.620608.41076


## 5.1. NIST SP 800-22 Test

To check the random characteristics of the generated sequence from cascading chaotic maps and the constructed encrypted images, we used NIST SP 800-22 tests. The crucial task of these tests is to measure the randomness property of a sequence and detect any nonrandom characteristics existing in the sequence. The outcome of each test generates aP-value in range [0, 1]. When the P-value is greater than the threshold value µ = 0.01, this indicates that the sequence passes this test [22]. The outcomes of NIST SP 800-22 tests are stated in Table 1, where the two sequences of the cipher image Enc-Sailboat and its used key stream that was generated from chaotic maps passed all NIST SP 800-22 tests.Table 1
Outcomes of NIST SP 800-22 tests for the cipher image Enc-Sailboat and its used key stream that was generated from chaotic maps.
Test nameP-valuePassedEnc-sailboatKey streamRandom excursions variant (x = 1)0.7582880.911716√Rank0.2774270.023295√Random excursions (x = 1)0.7594210.324551√Long runs of ones0.5382390.047194√Overlapping templates0.3096690.864874√Frequency0.2757130.305835√Linear complexity0.2998820.348444√Block-frequency0.4697850.646149√Runs0.4230220.456241√No overlapping templates0.6869460.311721√Universal statistical0.9430580.638841√Spectral DFT0.9123140.890517√Approximate entropy0.3580940.373851√SerialTest 10.7529910.278112√Test 20.5511330.465868√Cumulative sumsReverse0.3883770.348202√Forward0.4831050.282021√


## 5.2. Time Efficiency

To verify the time effectiveness for the encryption process of our cryptosystem, Table2 shows a simple comparison for encryption time for the proposed image cryptosystem with related cryptosystems for different sizes of images. Outcomes of encryption time for related works are given as reported in [10, 15, 16, 23]. The encryption time given in Table 2 confirms that our mechanism is superior to other ones in terms of time encryption.Table 2
Comparisons of encryption time (in seconds) for the proposed image cryptosystem with related cryptosystems for different sizes of images.
Encryption schemeImage size256 × 256512 × 5121024 × 1024Our proposed method0.04940.30331.0453Ref. [10]0.07790.32611.3146Ref. [15]0.05380.23381.1494Ref. [16]0.17890.66393.1426Ref. [23]0.09490.40101.9857


## 5.3. Correlation Analysis

In plain images, per pixel is profoundly correlated with its neighboring pixels, and the value of correlation is imminent to 1 in all directions (horizontal, vertical, and diagonal). On the other hand, for the generated ciphered images using a well-designed image cryptosystem, the correlation values should be imminent to 0 [24]. For calculating correlation values of cipher images and their corresponding plain ones, we picked randomly 104 pairs of adjacent pixels in each direction.(3)V=∑x=1TPx−P¯Cx−C¯∑x=1TPx−P¯2∑x=1TCx−C¯2,​​​where T denotes to the full number of neighboring pixel pairs in every direction, and Px and Cx denote the values of neighboring pixels. The correlation values of the experimented datasets are provided in Tables 3 and 4, in which the correlation values of cipher images are very near to 0. The correlation distribution of neighboring pixels for greyscale Boats image before and after encryption is plotted in Figure 4, and the correlation distribution of color Sailboat image before and after encryption is plotted in Figures 5–7 . From the stated results in Tables 3 and 4, and the stated correlation distributions in Figures 4–7, we can conclude that our image cryptosystem is secure against correlation analysis.Table 3
Correlation coefficients of the experimented greyscale dataset.
ImageDirectionHor.Ver.Dia.Boats0.97130.93670.9212Enc-boats−0.00110.0004−0.0005Bridge0.92700.93970.8937Enc-bridge0.00150.00040.0011Baboon0.76230.86410.7274Enc-baboon−0.0002−0.00010.0011Table 4
Correlation coefficients of the tested color dataset.
ImageDirectionHor.Ver.Dia.RedGreenBlueRedGreenBlueRedGreenBlueSailboat0.95620.97010.97080.95650.97360.97350.94640.95840.9558Enc-sailboat−0.0002−0.0003−0.00020.00070.0002−0.0012−0.0006−0.00140.0007Airplane0.96250.97100.94550.97210.96230.96390.93910.94060.9263Enc-airplane−0.0003−0.0011−0.00010.0002−0.0001−0.00010.0002−0.00050.0005Peppers0.96820.98460.96890.96700.98320.96710.96190.97220.9518Enc-peppers−0.0012−0.00090.00090.0003−0.0008−0.00090.00030.0003−0.0004Figure 4
Correlation distribution of Boats image, where the correlation distribution of the plain image is stated in the first row, and the correlation distribution of the cipher image is stated in the last row.
(a)(b)(c)(d)(e)(f)Figure 5
Red channel of Sailboat-Correlation distribution.
(a)(b)(c)(d)(e)(f)Figure 6
Green channel of Sailboat-Correlation distribution.
(a)(b)(c)(d)(e)(f)Figure 7
Blue channel of Sailboat-Correlation distribution.
(a)(b)(c)(d)(e)(f)


## 5.4. Pixels Change Rate

To assess the plain image sensitivity to tiny bit changes, two measures are applied: Unified Average Changing Intensity (UACI) and Number of Pixels Change Rate (NPCR). The mathematical representations of NPCR and UACI can be declared as follows:(4)NPCR=∑x,yDiffx,yT×100%,Diffx,y=0,ifC1x,y=C2x,y,1,ifC1x,y≠C2x,y,(5)UACI=1T∑x,yC1x,y−C2x,y2b−1×100%.Here, C1, C2 are two encrypted images for one plain image with changes in one bit, T points to the full number of pixels used in the image, and b expresses the number of bits used to describe the pixel value. The NPCR and UACI outcomes of plain and cipher images are given in Table 5, which demonstrated that our image cryptosystem is highly sensitive to tiny pixel variations in the plain image.Table 5
NPCR and UACI values of the experimented datasets.
ImageNPCR (%)UACI (%)Boats99.6177633.44965Bridge99.6253933.46607Baboon99.6238733.56153Sailboat99.6204333.44339Airplane99.6223433.45237Peppers99.6220933.45786


## 5.5. Histogram Analysis

Histogram points to the frequency distribution of pixel values in the image. A well-designed cryptosystem should guarantee the uniformity of the histograms for different encrypted images. Figure8 displays the histograms of greyscale images before and after the encryption process, and also Figure 9 displays the histograms of the plain and cipher Sailboat image, in which the histograms of plain images differ from each other and the histograms of the corresponding cipher images are uniform. However, we need a mathematical quantity analysis to check the histogram test; therefore, we perform Chi-square test χ2, which can be expressed as[25](6)χ2=∑i=0255fi−s2s,Here, fi denotes the frequency of the pixel value i, and s is the image dimension. By supposing that the significant level is λ = 0.05, then χλ2255=293.25. For a given image, when the χ2 value is smaller than χλ2255, this confirms the uniformity of the histogram for this image; otherwise, the image has nonuniform distribution. Tables 6 and 7 provide the results of χ2 for the investigated dataset, in which the χ2 values for all cipher images are smaller than χλ2255. Consequently, the presented encryption algorithm can resist histogram analysis attacks.Figure 8
The histogram of the tested greyscale images, in which the encrypted images are totally having a uniform distribution. (a) Boats. (b) Bridge. (c) Baboon. (d) Enc-Boats. (e) Enc-Bridge. (f) Enc-Baboon.
(a)(b)(c)(d)(e)(f)Figure 9
The histogram of Sailboat color image, in which the three channels of the cipher image are totally having a uniform distribution.
(a)(b)(c)(d)(e)(f)Table 6
χ2 values of the experimented greyscale images.
ImageChi-square valueResultBoats383969.687NonuniformBridge1185618.347NonuniformBaboon187692.171NonuniformEnc-boats277.561UniformEnc-bridge263.324UniformEnc-baboon286.876UniformTable 7
χ2 values of the experimented color images.
ImageChi-square valueResultRGBSailboat196697.306130154.716344571.537NonuniformAirplane678424.492682495.3821107858.005NonuniformPeppers213187.216318382.929491428.177NonuniformEnc-sailboat215.636243.337232.412UniformEnc-airplane204.193269.281287.061UniformEnc-peppers235.867251.417239.181Uniform


## 5.6. Information Entropy Analysis

To compute the distribution of pixel values per level in the image, we employed the global entropy test, which can be stated as follows:(7)EX=∑i=0255pxilog21pxi,Here pxi denotes the probability of xi. The probable values for a gray-scale image are 28, and then the ideal entropy value is equal to 8 bits. To assess the efficiency of the suggested image cryptosystem, the entropy values for the cipher image must be extremely nearby 8. Notwithstanding, the global entropy is ignoring to assess the true randomness for encrypted images. Consequently, local entropy can be estimated by the mean of global entropies for nonoverlapping blocks (1936-pixel per block). Table 8 displayed the values of global and local entropies for the plain images and their corresponding ciphered ones, in which all values of information entropy for encrypted images are really near 8 bits. Consequently, the suggested cryptosystem is protected against entropy attacks.Table 8
Global and local information entropies for the investigated dataset.
ImageGlobal entropyLocal entropyPlainCipherPlainCipherBoats7.191377.999236.102637.90249Bridge5.705567.999274.815257.90286Baboon7.357877.999186.660197.90322Sailboat7.762167.999766.077417.90136Airplane6.663917.999745.528647.90223Peppers7.669827.999766.049647.90145


## 5.7. Contrast Analysis

To estimate the variation of local intensity that existed in an image, we employed the contrast test, which is a statistical measure and defined as given in [26](8)Con=∑x,yx−y2px,y,Here, px,y denotes the number of gray-level cooccurrence matrices. For a given image, high contrast values denote that the image has significantly various gray levels, whereas lower values indicate constant gray levels. Contrast values of plain and cipher images are provided in Tables 9 and 10, in which all cipher images possess high contrast values.Table 9
Contrast values of the experimented greyscale images.
ImageOriginalEncryptedBoats0.3799410.51092Bridge0.4789510.49715Baboon0.6184210.51323Table 10
Contrast values of the experimented color images.
ImageOriginalEncryptedRGBRGBSailboat0.294320.486110.4615810.4887210.4802410.50732Airplane0.184730.285020.1333510.4893510.5221610.50711Peppers0.275140.302990.2213710.5013110.4742910.53328


## 5.8. Peak Signal-to-Noise Ratio Analysis

To measure the noise ratio between the plain and cipher images, we employed peak signal-to-noise ratio (PSNR) tool, which can be defined as[27](9)PSNRP,C=20log10MAXPMSE,MSE=1MN∑x=0M−1∑y=0N−1Px,y−Cx,y2,Here, MAXP is the maximum pixel value of the plain image P, while C indicates its corresponding cipher image, and the dimensions of P and C are M×N. Higher PSNR values denote that the cipher image is near to the plain image. Therefore, a well-designed encryption algorithm should have low PSNR values, which signify that the cipher image is significantly dissimilar from its corresponding plain image. The outcomes of PSNR and MSE values for the investigated dataset are provided in Table 11, in which the PSNR values are very low.Table 11
PSNR and MSE values of experimented datasets.
ImagePSNRMSEBoats9.295257.64812Bridge8.777618.61627Baboon8.644967.28999Sailboat7.873251.01174Airplane7.235951.03475Peppers7.447291.01103


## 5.9. Key-Space and Key Sensitivity Analyses

The key-space referred to the various keys that can be applied in brute force attacks and must be large enough to resist those attacks. Our image cryptosystem uses key parametersLS0,β.LC0,α,andA to operate chaotic maps during the encryption and decryption processes. By supposing that the computation precision of digital computers is 10−16, the key-space for our cryptosystem is 1080, which is large enough for any modern cryptographic mechanism.Key sensitivity indicates that any slight modifications in the initial keys lead to significant variations in the outcome. To evaluate the key sensitivity of the presented cryptosystem, the encrypted Sailboat image is deciphered amidst tiny modifications in the primary keys. The outcomes of the key sensitivity for the presented mechanism are provided in Figure10. Also, to evaluate the key sensitivity of our cryptosystem in quantity terms, we perform NPCR and UACI on decrypted Sailboat image with the correct key and other decrypted Sailboat images with tiny modifications in the initial keys in which the outcomes are stated in Table 12. From the results stated in Table 12 and Figure 10, our cryptosystem has high key sensitivity, in which any slight modifications in the initial keys lead to significant variations in the outcome.Figure 10
Key sensitivity of the presented encryption approach. (a) Correct key. (b) Correct key butLC0 = 0.684000000000001. (c) Correct key but α = 3.356000000000001. (d) Correct key but A = 153. (e) Correct key but LS0 = 0.479400000000001. (f) Correct key but β = 3.84350000000001.
(a)(b)(c)(d)(e)(f)Table 12
NPCR and UACI of decrypted Sailboat image with the correct key and other decrypted Sailboat images with tiny modifications in the initial keys, as stated in Figure10.
ImageNPCR (%)UACI (%)Figures10(a) and 10(b)99.60441532.209367Figures10(a) and 10(c)99.61891232.198207Figures10(a) and 10(d)99.61306332.211601Figures10(a) and 10(e)99.60505232.217681Figures10(a) and 10(f)99.60085632.191464


## 5.10. Classical Types of Attack

During the cryptanalyses of a cryptosystem, it is generally assumed that cryptanalysts have a complete understanding of the design of the cryptosystem and know everything regarding the cryptosystem except the values of initial key parameters. This is an obvious requirement in today’s cryptosystems. There are four kinds of classic attacks: ciphertext only, known-plaintext, chosen-plaintext, and chosen-ciphertext. The chosen-plaintext attack is known to be the most powerful attack, in which the hacker has temporary access to the cryptosystem and can construct the ciphertext corresponding to a chosen-plaintext. If a cryptosystem has the capability to withstand the chosen-plaintext attack, it possesses the ability to withstand other types of attacks. The presented cryptosystem is highly sensitive to the secret keyLS0,β.LC0,α,andA. If there is any tiny change in one of the secret keys LS0,β.LC0,α,andA, then a significant variation is generated in the outcome. In addition, our cryptosystem employs the hash value of the plain image to update the initial key parameters; therefore, our cryptosystem depends not only on key parameters but also on the plain image. Cryptanalyst tries to obtain some valuable information regarding the secret key using full black and white images, due to their capability of disabling the role of permutation/substitution processes. The corresponding cipher images for black and white plain images and their corresponding histograms are given in Figure 11, in which no visual information can be obtained from these cipher images, and Table 13 provides some statistical analyses for these images. Consequently, our encryption approach has the ability to withstand the chosen-ciphertext and chosen-plaintext attacks.Figure 11
Cipher images of full white and black images, and their corresponding histograms. (a) Enc-white. (b) Histogram of Enc-white. (c) Enc-black. (d) Histogram of Enc-black.
(a)(b)(c)(d)Table 13
Statistical examinations of the cipher full-white and full-black images.
ImageChi valueCorrelationEntropyContrastHor.Ver.Dia.GlobalLocalEnc-white279.8320−0.00150.00040.00077.999237.902310.50954Enc-black280.1445−0.00020.00010.00117.999227.902610.46016


## 5.11. Noise and Data Loss Attacks

When data is transmitted over a communication channel, noise affects the information transmitted, and data may lose some of its parts. Subsequently, a well-designed encryption approach should have the capability of withstanding data loss and noise attacks. To assess the suggested cryptosystem against these attacks, we execute occlusion attacks by cutting out some parts of the cipher image or joining Salt & Pepper noise to it and then attempting to recover the secret image from the defective cipher image via the decryption procedure. Figures12 and 13 show results of occlusion attacks, in which the original image is efficiently obtained after the decryption procedure.Figure 12
Data loss attack, with the first row denoting the defective cipher images by cutting out some parts and the last row signifying the corresponding deciphered ones. (a) Cutting out 10%. (b) Cutting out 15%. (c) Cutting out 25%.
(a)(b)(c)Figure 13
Noise attack, with the first row denoting the defective cipher images by varying Salt & Pepper noise density and the last row signifying the corresponding deciphered ones. (a) Density = 0.01. (b) Density = 0.15. (c) Density = 0.25.
(a)(b)(c)


## 5.12. Comparative Analysis

To confirm the effectiveness of our cryptosystem alongside other related approaches, Tables14 and 15 present average values of correlation, NPCR, UACI, local information entropy, global information entropy, Chi-square, contrast, and PSNR of our cryptosystem with their average values reported in [5, 10–12, 14, 25, 26, 28]. The outcomes declared in Tables 2, 14, and 15 prove the effectiveness of the presented cryptosystem compared to other related approaches.Table 14
Comparison of our algorithm with other related cryptosystems in terms of average values of correlation, NPCR, UACI, local entropy, and global entropy.
CryptosystemCorrelationNPCR (%)UACI (%)Information entropyHor.Ver.Dia.GlobalLocalOur cryptosystem−0.000160.000020.0002399.6219833.471817.999497.90227Ref. [5]0.00200−0.00070−0.0014099.6500033.480007.99700—Ref. [10]0.000520.000330.0008799.6096033.459607.999307.90237Ref. [11]−0.00970−0.008700.0065099.6000033.440007.997007.90217Ref. [12]−0.000740.00120−0.00320——7.99830—Ref. [14]0.002190.001690.0018699.6110033.475677.999297.90238Ref. [25]−0.00420−0.00490−0.0045099.610133.525207.99957.90300Ref. [26]0.00180−0.001610.0046399.622533.595007.99301—Ref. [28]0.000500.00170−0.0025099.6066733.426677.99866—Table 15
Comparison of our cryptosystem with other related cryptosystems in terms of average values of Chi-square, contrast, and PSNR.
CryptosystemChi-squareContrastPSNROur approach250.5121710.502098.21239Ref. [11]257.33667——Ref. [14]249.42857——Ref. [25]249.84440——Ref. [26]—10.435258.53790Ref. [28]256.7514610.620608.41076


## 6. Conclusions

This paper has detailed a new cipher image mechanism for secure data transfer in cloud-based smart cities. The proposed encryption system is applicable to both color and greyscale images. The system is based on cascading two integrated 1D chaotic maps: Logistic-Chebyshev and Logistic-Sine. Logistic-Sine map is used to permute the plain image, and Logistic-Chebyshev map is used to substitute the permuted image, while the cascading of both integrated maps is used in performing XOR procedure on the substituted image. The experimental results of the suggested approach demonstrated the effectiveness of the presented cryptosystem. In the future, we aim to extend this work into designing a new visual cryptography mechanism for secure data transfer among Internet of Things devices.



---

*Source: 6615512-2021-02-26.xml*