# A Lightweight Secure and Energy-Efficient Fog-Based Routing Protocol for Constraint Sensors Network
## 4 Results
It not only minimizes the transmission distance towards cloud servers but also balances the energy consumption to control the delivery time. The routing nodes are delay tolerant and more robust in terms of network conditions including packet queuing factor. Unlike  
Figure 3: Packet drop ratio with varying number of nodes. Figure 2: Energy consumption with a varying number of nodes. SMSN and TASA solutions that increase the data reception time when the network size increases, the SEFR protocol efficiently collaborates the communication from the sensor field to fog nodes and from fog nodes to cloud servers, and such a paradigm minimizes the transmission distance and time intervals for data delivery. Also, the proposed SEFR protocol gives equal significance to routing factors, which results in balancing the load on the nodes, and ultimately it also strengthens the network performance in terms of end-to-end delay. Figure 5 demonstrates the performance of the SEFR protocol for network throughput in the comparison of existing work. The results showed that the SEFR protocol increases the ratio of network throughput under a varying number of nodes by 10 and 20%. The improvement is due to the fact that it utilizes multi-facet-based QoS attributes to determine the energy-efficiency and reliable data forwarders. Also, the cluster heads and fog nodes that are more powerful in terms of resources are selected for data routing towards the cloud server. Moreover, compared existing solutions that overlooked the data privacy and authentication during the routing phase, and lead to compromised network performance in terms of security, the SEFR protocol makes use of the Blum Blum Shub algorithm to ensure data confidentiality and avoid malicious nodes being part of the routing process. The basic purpose of using such an algorithm is to impose lower processing and memory overheads on smart sensors. The SEFR protocol efficiently detects the malicious nodes and avoiding network congestion by utilizing the packet queuing factor, which results in maintaining high throughput. Also, the proposed security scheme randomizes the secrets and increases the level of data encryption and decryption. Such secure methods make the data routing more consistent for network throughput and neglect the probabilities of security threats to affect the reception of sensor data. Figure 6 illustrates the performance of the SEFR protocol against existing work in terms of communication overhead. It is seen from the analysis of the simulation-based results that the SEFR protocol improves the communication overhead by 23%, and 32.5%. This is due to it generating steady clusters based on dynamic distance threshold and only allowing appropriate nodes to participate in the selection process of cluster heads. Also, the transmission load is reduced among sensors due to multi-hop communication instead of a direct link. Unlike SMSN and TASA, which increase the call of route maintenance and data re-routing, the SEFR protocol uses the various QoS-aware factors to choose the long run and more stable routing path that decreases the communication cost in terms of route re-discoveries. Along with other parameters, the SEFR protocol also computes the end-to-end distance while selecting the routing path and decreases the network congestion of the transmission links. Furthermore, it increases the performance of network security  
Figure 4: End-to-end delay with varying number of nodes. based on lightweight exclusive OR operation. The security keys are generated using the Blum Blum Shum algorithm and securely interchange between the sensor nodes. The proposed security algorithm protects the sensors' data from malicious threats with lower link intrusion and contributes to route maintenance. Figure 7 depicts the measurement of the SEFR protocol compared to other solutions in terms of link load. It is noticed that the experimental results improve the load on wireless links by 20% and 27% as compared to SMSN and TASA.