Providing End-to-End Security Using Quantum Walks in IoT Networks

Internet of Things acts an essential role in our everyday lives and it deﬁnitely has the potential to grow on the importance and revolutionize our future. However, the present communication technologies have several security related issues which is required to provide secure end to end connectivity among services. Moreover, due to recent, rapid growth of quantum technologies, most common security mechanisms considered secure today may be soon imperilled. Thus, the modern security mechanisms during their construction also require the power of quantum technologies to resist various potential attacks from quantum computers. Because of its characteristics, quantum walks (QW) is considered as a universal quantum computation paradigm that can be accepted as an excellent key generator. In this regard, in this paper a new lightweight image encryption scheme based on QW for secure data transfer in the internet of things platforms and wireless networking with edge computing is proposed. The introduced approach utilises the power of nonlinear dynamic behaviour of QW to construct permutation boxes and generates pseudo-random numbers for encrypting the plain image after dividing it into blocks. The results of the conducted simulation and numerical analyses conﬁrm that the presented encryption algorithm is effective. The encrypted images have randomness properties, no useful data about the ciphered image can be obtained via analysing the correlation of adjacent pixels. Moreover, the entropy value is close to 8, the number of the pixel change rate is greater than 99.61%, and there is high sensitivity of the key parameters with large key space to resist various attacks.


I. INTRODUCTION
The Internet of Things (IoT) has heightened an integral part of the future of communication systems [1], [2]. It promises vast interconnections of ''things'' including everything, everyone, everywhere, every time and every network. Within this concept, smart nodes comprising devices, sensors, The associate editor coordinating the review of this manuscript and approving it for publication was Jun Wu . services, applications, etc. will be able to seamlessly interact and communicate in real time. In addition, to interconnecting devices, IoT will usher in web-enabled exchange of data which will enhance service delivery. Moreover, IoT will also provide a platform to integrate the physical world with the virtual one. From this perspective, considering the envisioned importance of IoT, data security should be treated as the backbone of data transfer in IoT environments. VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ The protection of data transfer from unauthorized access in IoT systems becomes a pressing issue and is increasingly investigated by experts and researchers [3]- [8]. Techniques for protecting digital information can be roughly classified into two groups. The first type is data encryption and the other is data hiding [9]- [14]. In this context, data encryption refers to transformations of the original data from an intelligible form into an unidentifiable one [15]. Digital images are one of the common data representation patterns which are extensively used in numerous applications.
Recently, various image encryption mechanisms have been proposed [16]- [22] and most of them are based on mathematical models such as chaotic systems. Nevertheless, because of the periodicity chaos property, most chaotic models are unstable [23]. Consequently, most chaos-based image encryption mechanisms are susceptible to attacks [24].
Quantum computers have shown promise for operations unrivalled by the best-known digital resources due to quantum phenomena like quantum superposition and quantum entanglement [25], [26]. Considering its roots in quantum mechanics, which relies on the linear algebraic formulations as well as applications in computing, device fabrication, etc., quantum computing is a promising concept for a wide range of disciplines including physics, mathematics, computer science, and engineering. This multidisciplinary undertaking is already shaping innovations and technologies in information theory, communication, cryptography, image processing and electronics, among many other fields. In all these areas, quantum computation has been deployed to improve the existing non-quantum algorithms and technologies. Moreover, the reinvigorated efforts to realize physically scalable quantum hardware have reinforced the belief that when (not if) quantum computers are fully completed they will be capable of solving many computing issues considered intractable via available (digital) resources.
However, in the wrong hands, the immense capabilities of quantum computing can be misused. In this manner, they pose unprecedented threat to today's information security mechanisms. These threats range from exploiting the vulnerabilities inherent to cybersecurity frameworks to issues or gaps arising from the transition or widespread prevalence of quantum computing hardware. Therefore, modern cryptographic mechanisms require incorporating quantum technology to withstand possible attacks from quantum devices in the near future [27]. In this regard, risks related to data transfer in IoT platforms would be greatly mitigated or eliminated via advanced cryptographic mechanisms based on quantum technologies.
Quantum walks (QW) is considered as a universal quantum computational model [28]- [30], that can be accepted as a good key generator because of its inherent nonlinear chaotic dynamical behaviour [31]- [40]. QW similarly to chaos has chaotic behaviour and high sensitivity to initial conditions. Moreover, QW possesses advantages like nonperiodicity, stability and theoretically infinite keyspace to withstand various attacks. In this manner, El-Latif et al [32] presented a novel idea for cascading quantum inspired QWs with chaotic systems and present its cryptographic application. Also, Yang et al [33] designed an image encryption mechanism using two-walker QW. Then, Yang et al [34] presented a new scheme for constructing hash function using controlled two-walker QW and introduced its application to image encryption, Next, El-Latif et al [35] constructed a substitution-box mechanism based on two-walker QW and presented its application in image steganography. However, the implementation of two-walker QW requires more physical resources than the realization of one-walker QW [41], that is why consequently Abd-El-Atty et al [36] designed a quantum encryption approach based on controlled one-walker QW. Finally, El-Latif et al [37] presented an image encryption approach using controlled alternate QW for privacy preserving medical images in IoT systems.
The key contribution of this paper is a proposal of a new lightweight image cipher scheme using one-walker QWs on a circle for secure data transfers in IoT platforms. The aspects of the new scheme is based on lightweight structure in confusion and diffusion processes. It utilises the power of nonlinear dynamics of QW to construct P-boxes for confusion and to generate PRNGs in diffusion. At first, the original object is divided into blocks, and then each block is divided into two subblocks: right subblock and left subblock. Each subblock before recombination with each other is permutated and substituted with its own P-box and PRNG sequence that originates from the probability distribution of running QW. The ciphered blocks are combined together and then XORed with another PRNG sequence to construct the ciphered image. Several enclosed simulation and numerical analyses are conducted based on differential and statistical analyses, which affirm the effectiveness of the proposed cipher. The resulted cipherimages have randomness properties, no useful data about the ciphered image can be obtained via analysing the correlation of adjacent pixels. Moreover, the entropy value is close to the optimal value, NPCR test rate is greater than 99.61%, and there is high key sensitivity in the parameters of the keys with large key space to resist various cyberanalysis.
The key contributions of our paper can be summarized as: • Propose a new lightweight cipher scheme using QWs.
• The presented mechanism is utilised for securing data transfers in IoT platforms.
• The aspects of the presented cryptosystem are based on a lightweight structure in confusion and diffusion processes.
• The presented mechanism utilises the power of nonlinear dynamics of QW to construct P-boxes for confusion and to generate PRNGs for diffusion stage. The outline of this work is as follows: the preliminary knowledge for QW is presented in Section II, while the proposed framework for secure data transfers in IoT environments is presented in Section III. Next, Section IV presents our lightweight image encryption approach, while the numerical analyses and simulation outcomes are given in Section V. Finally, Section VI concludes our work.

II. PRELIMINARY KNOWLEDGE
There are two models of quantum walks: continuous-time quantum walk and discrete-time quantum walk (QW) [28]. In this paper, we focus only on QW, which is widely used in designing modern cryptographic applications [31]- [40]. The elementary components of running one-walker QW acting on a circle have two quantum systems: a particle |ψ p known as a walker living in a p-dimensional Hilbert space H p and a 2-dimensional quantum system |ψ c = cos α|0 +sin α|1 known as a coin living in Hilbert space H c . The total Hilbert space of the QW is H = H p ⊗ H c . In every step r of running QW on a circle, the unitary transformationR is executed on the whole quantum system |Q . The unitary transformationR can be expressed as in Eq. (1).
hereF points to the shift operator and can be stated for running QW on a circle with T vertices as in (2).
Also, operatorÛ points to a coin operator 2×2 and in general case can be stated as in (3) After r steps, the final state |Q r can be stated as in (4) |Q r = R r |Q 0 (4) and after r steps, the probability of locating the particle at location i can be expressed as in (5)

III. PROPOSED FRAMEWORK FOR SECURE DATA TRANSFERS IN IoT PLATFORMS
IoT covers a huge amount of information, which refers to a rapidly growing network of objects or connected devices that are able to collect data using sensors and share this data via networks, e.g. Internet [42]. The immense potential of IoT has seen its use in many areas, including smart cities, smart homes, smart cars, telemedicine, etc. [2], [43]. These vastly interconnected devices need to gather real-time information and connect them to other cloud resources to collect, store, and analyse different data streams [44]. All these processes have an impact on privacy and security of sensitive information. For example, the confidential health records of patients, geotagging people's location using wearable devices [45], [46] need to be safely guarded against the everincreasing sophistication of criminals. In smart cities, IoT can include important data to control and monitor installations as well as private information of inhabitants of the city [43], [47]. Securing such sensitive information from malicious attacks becomes currently the most pressing aspect of IoT [48]. Currently, the security fabric of the Internet is not sufficient due to the lack of appropriate security and integrity, susceptibility to systems and physical access, etc. Apart from these issues, since most devices communicate in a wireless manner thus IoT applications should work perfectly in the presence of security challenges. To deal with these security risks a system that is capable to identify and diagnose attacks in necessary. Due to the low-capacity of IoT devices, operations need to be performed using lightweight security mechanisms that can deal with various attacks [49].
With subsisting centralized security solutions which require heavyweight computing and large memory, finding solutions for lightweight security for IoT scenarios is a challenge with many open research areas. That is why, in this paper we provide a new lightweight cipher using one-walker QW for secure data transfers in IoT systems. The presented framework is based on QW to deal with various attacks and resist the feasible threats from quantum computers in the coming future. The outline of the presented framework is provided in Fig. 1.

IV. PROPOSED LIGHTWEIGHT IMAGE ENCRYPTION MECHANISM
In this section, we introduce a new lightweight image encryption mechanism using one-walker QW. The presented solution utilises the capabilities of nonlinear dynamics of QWs to generate PRNG sequences and construct P-boxes. At first, the original image is divided into blocks each of size 16 × 16, and then each block is divided into two subblocks: right subblock (RB) and left subblock (LB). Each subblock before recombination is permutated and substituted with its own P-box and PRNG that originates from the probability distribution of acting one-walker QW on a circle. The ciphered blocks are combined together and then XORed with another PRNG sequence to construct the cipher image. The suggested lightweight image encryption algorithm is outlined in Fig. 2 and the encryption and decryption procedures are presented in Algorithms 1 and 2, respectively.

V. SIMULATION RESULTS
To validate the presented image encryption mechanism, we utilised a laptop with 6-GB RAM and Intel Core TM VOLUME 8, 2020

FIGURE 2.
The encryption procedure where the permutation and substitution procedures are based only on QWs and the procedure of constructing permutation boxes is provided in Fig. 3. i5 CPU 2.50-GHz with preinstalled MATLAB R2016b. The used dataset of images (Sailboat, Baboon, Houses, and Aerial) consists of greyscale images each of size 512 × 512 (see Fig. 4), while the initial values utilized for operating one-walker QW on a circle are (T = 241, r = 265, α = 0, β = π/3).

A. RANDOMNESS ANALYSIS
NIST SP 800-22 tests are applied to investigate the randomness behavior of the produced key (key sequence) and the constructed cipher image (CIm) and they consist of 15 tests that are applied on a 10 6 bit sequence. The NIST results of key sequence (Key) and the cipher Sailboat image (Enc-Sailboat) are stated in Table 1, which passed all randomness tests. Therefore, the proposed encryption mechanism can be reliably used on modern cryptographic mechanisms.

B. CORRELATION ANALYSIS
One of the most important tools to evaluate an ciphered image is its correlation coefficient of adjacent pixels Cor pc . The typical images have Cor pc close to 1 in each direction while in ciphered images with a well-designed encryption mechanism it should be near 0. To measure Cor pc of the plain and ciphered images, we picked at random 10 4 pairs Algorithm 1 Encryption Procedure Input: Plain image (PIm) and key parameters for running one-walker QW(T , r, α, β) Output: Cipher-image (CIm) 1 P ← QW (T , r, α, β) // Run quantum walks on a circle of odd T vertices for r steps, where the initial walker is H c = cos α|0 + sin α|1 , and β is used to construct the operatorÛ where α, β ∈ [0, π/2] 2 [h w] ← size(PIm)// Gets the size of the plain image // Construct two permutation boxes each of length 128 (see Fig.3 here N indicates the entire number of adjacent pixel pairs in each direction and c i , p i are pointing to the values of adjacent pixels. Table 2 displays the outcomes of Cor pc for ciphered images and as it can be seen they are very close to 0 as well as the original ones. Also, Fig. 5 displays the correlation distribution in each direction for Sailboat image as well as for its ciphered version. From the outcomes stated in Table 2 and the acquaintance displayed in Fig. 5, no useful data can be inferred about the ciphered image by analysing Cor pc values.

C. NPCR
NPCR (''Number of pixel change rate'') is a tool utilized to calculate the influence of varying pixel values in the plain image on the identical ciphered ones, which can be expressed as in (7).
VOLUME 8, 2020 Algorithm 2 Decryption Procedure Input: Cipher-image (CIm) and key parameters for running one-walker QW(T , r, α, β) Output: Decrypted-image (DIm) 1 P ← QW (T , r, α, β) // Run quantum walks on a circle of odd T vertices for r steps 2 [h w] ← size(CIm) // Gets the size of the ciphered image // Construct two permutation boxes each of length 128 (see Fig. 3  DIm ← combineDecblockintoDImimage here A indicates the whole number of pixels in the image, C and P point to the ciphered and plain images, respectively. The NPCR outcomes for the examined dataset are provided in Table 3, in which we can see that NPCR values are greater than 99.612%. As a result, it can be concluded that the suggested approach is highly sensitive to tiny pixel mutations in the original image.

D. HISTOGRAM ANALYSIS
Histogram analysis represents the frequency of pixel distribution in an image. A robust encryption approach ought to guarantee the uniform distribution for distinct ciphered images to stand toward statistical attacks. The histograms of the images from the utilized dataset are illustrated in Fig. 6. Note that they are dissimilar from each other. At the same time, the histograms of their corresponding encrypted versions are practically identical. This means that the presented algorithm could resist histogram analyses attack.

E. GLOBAL ENTROPY ANALYSIS
One of the most important statistical tests to indicate the pixel values distribution for each level in the image is global entropy which can be expressed as follows: here p(x i ) refers to the probability of x i . There are 2 8 possible values for a greyscale image, therefore, in an ideal case entropy should be equal to 8 bits. Hence, to assert the   effectiveness of the designed mechanism, the value of entropy for the ciphered image must be as near to 8 as possible. Table 4 shows the outcomes of information entropy for the   original images and the corresponding ciphered ones. Note that, all outcomes of information entropy for the ciphered images are extremely close to 8 bits. Thus, the suggested approach is secure under entropy attacks.

F. KEY SPACE AND KEY SENSITIVITY ANALYSES
A robust encryption approach should have a sufficient keyspace to withstand brute-force attacks. Our encryption mechanism is based on running one-walker QW on a cycle where the initial values (T , r, α, β) are required for operating QW. By considering the calculation precision for digital computers as 10 −16 , the total keyspace of the encryption algorithm is 2 212 , which is sufficient for any encryption mechanism. Moreover, the key space can be enriched by running controlled one-walker QW on a circle [36]. Key sensitivity is an essential test to ensure the security of any encryption mechanism, which is known as the sensitivity of the initial key parameters to the deciphered effect. To assess the key sensitivity of the presented mechanism, the ciphered Sailboat image is deciphered with tiny changes of initial values as shown in Fig. 7.

G. DISCUSSION
We have designed a new lightweight image encryption mechanism based on QWs for securing data transfers in IoT platforms. The presented solution utilises the capabilities of nonlinear dynamics of QWs to generate PRNG sequences and construct P-boxes. At first, the plain image is divided into blocks, and then each block is divided into two subblocks. Each subblock before recombination with each other is permutated and substituted with its own P-box and PRNG sequence that originates from the probability distribution of running QW. The ciphered blocks are combined together and then XORed with another PRNG sequence to construct the ciphered image. Several enclosed simulation and numerical analyses are conducted based on differential and statistical analyses, which affirm the effectiveness of the proposed cipher. The resulted cipher images have randomness properties, no useful data about the ciphered image can be obtained via analyzing the correlation of adjacent pixels. Moreover, the entropy value is close to the optimal value, NPCR test rate is greater than 99.61%, and there is high key sensitivity in the parameters of the keys with large keyspace to resist various cyberanalysis. In addition, to ensure the effectiveness of the presented mechanism, Table 5 provides a comparison with other related schemes which its construction is based on QWs.

VI. CONCLUSIONS
This work has introduced a new lightweight image encryption mechanism which is based on QW and which is destined for secure data transfers in IoT environments. The proposed solution utilises the probability distribution of running one-walker QW to construct P-boxes and to generate PRNG sequences for encrypting a plain image after dividing it into blocks. Perfomed simulations and statistical analysis confirmed that the suggested encryption scheme has high efficiency in terms of randomness tests,correlation coefficients, NPCR, information entropy, and histogram analysis. In addition to the formulation and application presented here, our proposal can be applied in digital computers as quantum-inspired quantumwalk protocols. Along the same lines, our approach can be utilized as quantum-inspired quantum-walk procedures for designing various encryption applications such as video, file, audio, etc.