Improving Wireless Sensor Network Security Using Quantum Key Distribution

: Wireless Sensor Networks (WSNs) are promoting the spread of the Internet for devices in all areas of life, which makes it is a promising technology in the future. In the coming days, as attack technologies become more improved, security will have an important role in WSN. Currently, quantum computers pose a significant risk to current encryption technologies that work in tandem with intrusion detection systems because it is difficult to implement quantum properties on sensors due to the resource limitations. In this paper, quantum computing is used to develop a future-proof, robust, lightweight and resource-conscious approach to sensor networks. Great emphasis is placed on the concepts of using the BB84 protocol with the AES algorithm in WSN security. The results of analysis indicated a high level of security between the data by depending on the generation of secure keys, and reached an accuracy rate of about (80-95) % based on using NIST statistical. The efficiency of the work increased to 0.704 after using the Quantum Bit Error Rate equation, eventually increasing the network performance. This results in the reduction of the overall amount of energy, and the time required for performing the key exchange in the encryption and decryption processes decreased.


Introduction:
A Wireless Sensor Network consists of a large number of sensor nodes that communicate wirelessly.Healthcare, sports training, workplace safety, consumer electronics, secure authentication, and protection of uniformed personnel are just a few of the applications of WSN, meaning it is ubiquitous and has broad market potential 1 .In a wireless sensor network, data aggregation reduces packet transmissions and enhances network duration, as sensor data is collected and delivered to the base station by aggregation nodes.A WSN is typically used to monitor inaccessible or hard-to-reach websites.There are security issues in the communication between sensor nodes 2 .
In WSN, message security and sensor node authentication have become major concerns while data collection, security is the most important in the matter of the paper 3 .
Network security is a concept of securing data in a designed manner that requires few resources and provides high throughput while consuming little power.Two types of light weight algorithms are symmetric and asymmetric, stream ciphers and block are both symmetric ciphers 3,4 .
The WSN environment has many security issues being unable to secure the privacy of user data.One of the most serious security issues with WSN, which is vulnerable to a variety of privacy threatening attacks, one of which is a quantum computer attack that has occurred as a result of rapid advances in the use of quantum physics to break many than traditional algorithms 5 .
Quantum computing is based on quantum physics and allows secure communication based on quantum properties, such as quantum no-colning theorem.Because quantum computing properties can solve problems of security and privacy that are unsolvable with classical approaches 6 , quantum computing (quantum key distribution QKD) becomes more likely for security in WSN.
In a wireless sensor network, quantum computation is utilized to ensure that data transmission is secure.Quantum key distribution (QKD) is a quantum-based communication system.Using the BB84 protocol, it will generate a shared secret key that is only known by communicating parties 7,8 .Two basis sequences are employed in the BB84 protocol: rectilinear (+) and diagonal (x).The horizontal polarization (0°) and vertical polarization (90°) of the rectilinear basis are separated.Two polarization states, (45°) and (135°), are found in the diagonal basis 9,10 .This purpose of this paper is to provide lightweight encryption algorithm for low-resource devices in WSNs.By combining quantum computing and the lightweight algorithm (AES) in WSN, encryption procedures in lightweight cryptographic algorithms are created, implemented, and assessed to improve the security of communication and data transmission in this environment.

Related Work
Heig et al. 2 proposed a future proof lightweight security concept for wireless sensor networks with a permeate filtering mechanism through a multi-stage filtration system that includes encryption and error detection mechanisms in the processing stage.Focuses on conceptual evaluation on the new magic number filter to reduce the special type of denial of service attack that has been worked on the CC1350 Launch-Pad ARM Cortex M3 microcontroller boards.
JV Anand 3 proposes an approach that deals with a routing algorithm that relies on compression sensing data and trust-awareness, to handle routing in a clustered WSN.In this approach five optimization methods were used based on a developed methodology that focuses on maximizing trust in the route, minimizing message overhead, number of hops and maximum distance.
Bhatia and Sumbaly 4 presented a methodology for incorporating quantum encryption and IEEE 802.11 wireless network security into cryptographic key distribution.A new protocol was developed to distribute the secret key needed to encrypt data, as this key provides strong security during the communication session.
Miralem Mohic et al. 5 described a simulated environment of a quantum key distribution network with several nodes and links.In this approach several routing protocols, packet delivery ratio and routing packets are analyzed to find a best solution to the large amount of routing data flowing through the WSN through the QKD network.Doha AL-Mubayedh et al. 6 used the quantum key distribution protocol BB84 to provide a practical application to IBM QX software.In this approach a statistical analysis of third-party eavesdropping detection in WSN is proposed.Through this proposal, the quantum key distribution protocol BB84 is practically implemented in addition to the possibility of protection against eavesdropping attacks.
Journal, D. In, and P. K. Kishore 7 reviewed how we can use symmetric polynomials and the quantum cryptography method based on key management in key distribution to enhance and analyze the authentication mechanism between wireless sensor network access points.
The above related works did not introduced the computing between QKD and AES algorithm to enhance the security of WSN which will be introduced in our paper.

Security Requirements in WSN
The below are the security requirements for wireless sensor networks: 1-Confidentiality: The encryption method is employed to keep data confidential 11 , because the radio spectrum used in the sensor network is an open resource that may be accessed by anybody with a suitable radio transceiver.2-Authentication: The receiving node of transmitted data should verify that the data came from a trustworthy source 12 .Authentication ensures that the identities of those involved in the communication are verified.3-Data Integrity: Is a term that refers to the quality of data assurance that the sent data is not tampered with, either intentionally or unintentionally.The usage of message integrity code is the conventional method for assuring data integrity 13 .4-Self-Organization and Self-Healing: WSN sensor nodes can self-organize and self-heal.
There is no fixed infrastructure available for WSN network management due to the capability of sensor nodes to organize 14 .5-Data Freshness: The attack may attempt a replay by substituting an old key for a new key; in such instances, data freshness assures that the data is current and that no old data keys are used 15 .

Quantum Key Distribution
Quantum physics advancements have prompted new ideas for ensuring communication security.In symmetric encryption systems, designers of encryption systems had to come up with a new encryption scheme and distribute the key safely 7,15 .A single or entangled quantum is passed between two parties in the quantum key distribution.
A quantum channel is utilized for photon exchange, and a conventional channel is used for basic agreement to find the opponent in this protocol 16 .Both parties will notice an eavesdropper presence on the public media if a third party measures the conveyed quantity.The eavesdropper's measurement will 2079 modify the quantum state according to the rules of quantum mechanics 17,18 , and it will not be able to clone an arbitrary quantum state.

1-BB84 Protocol
Bennett and Brassard introduced the first quantum key distribution protocol in 1984, which has since been documented in a number of publications, as well as proof that it is unconditional.Quantum and classical channels are used in the BB84 protocol 19 for sending polarized light pulses via a quantum channel, such as an optical fiber, with each pulse containing one photon.It allows two parties, Alice as the sender and Bob as the receiver, to create a secret shared key using polarized photons qubits 20,21  WSN nodes often face resource constraints, such as computing capacity, memory space, and power management.Additional constraints imposed by network communication, especially WSN communications, include low information rates, constant delays, and higher data drops.
Different methods are used to verify the information key exchanged between WSN nodes.The existing method makes use of WSN node classical memories via key information stored in the node that recalls the key that is kept in a secure location.The suggested approach is based on the QKD principle to produce safe keys using the QKD link's local key, which is stored by the node on both ends of the connection, while the secret key is generated on the QKD path link's paths.

1-Proposed Network in WSN
The topology of the WSN consists of some sensors sending data to a sink, which processes the data and encrypts it using the AES algorithm and BB84 to exchange keys before sending it to the Internet.The suggested WSN topology is shown in Fig. 1.

Figure 1: WSN Topology
The QKD principle is used in conjunction with the WSN environment in this system.It is dependent on switching from the classical algorithms used to generate the key in the AES algorithm to another algorithm or protocol based on quantum features, such as the BB84 protocol, which is used to generate secure keys to encrypt data in the WSN.To prevent security threats in WSN, the QKD employs the features of the Transport Layer Security (TLS) protocol to offer safe data by requiring trustworthy parties to interact.
The QKD method in AES is used to authenticate and encrypt data using a key generated by the BB84 protocol, which is utilized to generate key material in AES' data encryption process.

2-Proposed Algorithm for Network
Each work algorithm in the WSN establishes communication between the sensor and the sink, as well as adding security via the AES architecture.
The following technique depicts the major steps for generating keys for WSN security from the sender side using the quantum key Distribution (BB84) protocol, the points below explain to execute steps of algorithm 1. 1-The sender may select a value (N) that used a random function to generate fragments (0 or 1) and equalize them with the input value and then generate another function to pass N numbers to random bases (+ or ?) to create polarization by using these generated bases.Then send these  if bit value =0, polarize state will be → (H)  if bit value =1, polarize state will be (V) If the bases are x, that state based on the random bit values as follow:  if bit value =0, polarize state will be (R)  if bit value =1, polarize state will be (L) After these steps, the polarization is sent to the receiver.The major processes for returning the generated bits based on the polarization received are shown in the second algorithm.The server starts by creating a random number and calculating the key to extract the error bit after receiving the polarization and measurement operation by using the steps of algorithm 2.
This algorithms, rather than Deffie Hellman, is used in the AES algorithm to exchange keys based on the features of the BB84 protocol.To set up this network, the Contiki operating system and the Cooja simulator is used to construct a WSN made up of sensors and sinks (WisMote) In the cooja simulation, the WSN is shown in Fig. 2. The mechanism of QKD within AES is used to authenticate and encrypt data based on the key generated by BB84.The BB84 protocol key is used to generate key material within the data encryption process in AES algorithm protocol for the WSN environment.Fig. 3 represents the diagram of the properties used for BB84 in QKD with the AES algorithm instead Deffie Hullman, such as a case study to exchange the key for encryption and decryption the data and to enhance the security in WSN.

Figure 3 . AES with BB84 Protocol
After designing the WSN, the network was run through simulation, observing the connections between clients and servers, as well as the network's output, which is displayed in Fig. 4 as a Bit Array, packet data, and power trace.

Results and Discussion:
The current study aims towards the identification of the features with the highest significance and which have established and analyzed integrating the WSN in the cooja simulator, which aims to strengthen the environment's security, to prove the enhancement protocol's algorithm.
The network's output shows that data authentication in these nodes takes a bit longer than the conventional protocol, about one second, but is more secure and saves energy for each WSN node.
The result of the work analysis using the Wireshark, Fig. 5 represents the captured packet using in the proposed protocol in WSN, IPV4 address of the source and destination, clarification the throughput, and packet loss of WSN.
Where the percentage of transmission, communication delay and the amount of sent and received packets between each nodes in WSN are displayed.The key for encryption is an important parameter in the security process; according to NIST statistics with the different percentage of analysis and statistical that make this protocol safer.
The important parameter in security process is the key for encryption, the percentage of generated bits key around 80%-95% based on NIST statistical (Using Random Test) that makes protocol stronger for security as shown in Fig. 6.

Figure 6 . Wireshark Statistical
Also, there is a table for QBER for BB84 protocols that show the result of QBER depending on the following equation: Table 1 shows the result of equation to calculate the QBER with BB84 protocol in WSN environment which appears the low values of errors and high values of efficiency.

Nerror : 38
Ncorrect + Nerror is :128 bit QBER : 0.296 0.704 Fig. 7 shows the mechanism for analyzing the network protocol and network data when the packet is sent through Mote nodes at intervals time using the UDP protocol as a filter.In Wireshark analysis, the conversation using in the all of the interfaces for (Ethernet, IPv4, IPv6, TCP, UDP), In Ethernet analysis calculates the (time, bytes array, packets, rel start (relative time), duration) that Show the relationship between the byte arrays and time while commencing the operation in Fig. 8, which signifies higher data security based on all result of Wireshark Statistical.
. Conjugate bases are used to polarize photons.The Standard Basis is the vertical and horizontal polarization) such as: The rectilinear bases + • Horizontally(0 )polarized represent as H • Vertically (90 ) polarized represent as V And the horizontal bases ? • Right (45 ) polarized represent as R • Left (135 ) polarized represent as L Proposed System in WSN

2 -
If the bases is +, that state based on the random bit values as follows: