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

Data security plays a signiﬁcant 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 suﬀer from diﬀerent kinds of attacks because of their chaotic discontinuous ranges and small key-space. To own the beneﬁts 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 eﬃciency as well as lower encryption time compared with other related algorithms.


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]. e data of citizens include healthcare information, purchase behavior, weather conditions, environmental changes, and transport information.
e 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. e 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. e 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. e 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][11][12][13] with an exclusive application in image encryption. Every work is focusing on how effectively we can improve various measures of security analysis. e 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]. erefore, 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. e 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. e structure of our paper is as follows: the proposed framework for cloud-based smart city is provided in Section 2, while the elementary knowledge of the utilized chaotic integrated maps is delivered in Section 3. e 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.

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. e information and communication technologies are effectively deployed to satisfy the desired level of service delivery. e 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. e 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. Figure 1 shows the proposed framework for secure data transfer in cloud-based smart cities. e image data might represent medical information of patients, live traffic blocks and violation, climatic conditions, suspicious people, etc. e encrypted image data can be transferred and stored in interconnected cloud servers. e 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. e following sections cover the concepts related to the proposed image cryptosystem.

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

Logistic-Chebyshev Map.
Logistic-Chebyshev map is an integration of two common 1D chaotic systems: Logistic and Chebyshev. It can be expressed as [7] where α ∈ (0, 4) is the control parameter, LC 0 ∈ (0, 1) is the primary value of the system, and A ∈ N is the degree of the chaotic map.

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] where β ∈ (0, 4) is the control parameter and LS 0 ∈ (0, 1) is the original value.

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. e architecture of the proposed approach is provided in Figure 2, whereas the encryption processes are provided in Algorithm 1.

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. e key parameters utilized to iterate Logistic-Chebyshev and Logistic-Sine maps are initialized as LC 0 � 0.684, α � 3.356, A � 152, LS 0 � 0.4794, and β � 3.8435.

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. e crucial task of these tests is to measure the randomness property of a sequence and detect any nonrandom characteristics existing in the sequence. e outcome of each test generates a P-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]. e 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.

Time Efficiency.
To verify the time effectiveness for the encryption process of our cryptosystem, Table 2 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]. e encryption time given in Table 2 confirms that our mechanism is superior to other ones in terms of time encryption.

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 10 4 pairs of adjacent pixels in each direction.
where T denotes to the full number of neighboring pixel pairs in every direction, and P x and C x denote the values of neighboring pixels. e 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. e 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.

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). e mathematical representations of NPCR and UACI can be declared as follows: 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. e 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.

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. Figure 8 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] Here, f i denotes the frequency of the pixel value i, and s is the image dimension. By supposing that the significant level is λ = 0.05, then χ 2 λ (255) � 293. 25. For a given image, when the χ 2 value is smaller than χ 2 λ (255), 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 χ 2 λ (255). Consequently, the presented encryption algorithm can resist histogram analysis attacks.

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: Here p(x i ) denotes the probability of x i . e probable values for a gray-scale image are 2 8 , 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.

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] Con � Here, MAX P 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. erefore, a well-designed encryption algorithm should have low PSNR values, which signify that the cipher image is significantly dissimilar from its corresponding plain image. e outcomes of PSNR and MSE values for the investigated dataset are provided in Table 11, in which the PSNR values are very low.

Key-Space and Key Sensitivity Analyses.
e 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 parameters (LS 0 , β.LC 0 , α, and A) 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 10 80 , 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. e outcomes of the key sensitivity for the presented mechanism are provided in Figure 10. 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.   Security and Communication Networks              is highly sensitive to the secret key (LS 0 , β.LC 0 , α, and A). If there is any tiny change in one of the secret keys (LS 0 , β.LC 0 , α, and A), 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. e 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.

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. Figures 12 and 13 show results of occlusion attacks, in which the original image is efficiently obtained after the decryption procedure.

Comparative Analysis.
To confirm the effectiveness of our cryptosystem alongside other related approaches, Tables 14 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]. e outcomes declared in Tables 2,  14, and 15 prove the effectiveness of the presented cryptosystem compared to other related approaches.

Conclusions
is paper has detailed a new cipher image mechanism for secure data transfer in cloud-based smart cities. e proposed encryption system is applicable to both color and greyscale images.
e 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. e 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 ings devices.

Data Availability
e data used in the study can be accessed upon your request to the corresponding author.

Conflicts of Interest
e authors declare that there are no conflicts of interest for this paper and its contents.