# An Efficient and Secure Fog Based Routing Mechanism in IoT Network
## 2 Literature Review  
A hybrid offline and online encryption approach to implement digital signature and encryption is demonstrated to speed up packet delivery and decrease communications problems in [29]. The high computing complexity and uncertain forms of defendable assaults are mostly its disadvantages. A novel encryption technique utilizing elliptic curve cryptography (ECC) and homomorphic encryption is used to provide the safe transmission of data in the clustering of WSNs [30]. It is used to outline the kinds of assaults, including hello flood, denial-of-service and compromised cluster heads. Still, this approach results in a high incidence of packet loss and a significant delay. The hello flood and selective forwarding attacks are successfully thwarted by creating unique 176-bit keys for each sensor by using the ECC technique to produce binary strings for each sensor and the rate of packet loss and the latency are both decreased in [31]. However, after 1000 rounds of the method, each node's residual energy fluctuates significantly, which results in uneven energy usage. A better approach is put out to expedite multiuser message broadcasting authentication based on the four components such as system activation, user addition, multiuser broadcast authentication and user revocation to enable safe data transport in RSA [32]. A trust-based drone energy-saving data-collecting strategy to employ the drone path's quadratic optimization algorithm to identify routing paths is presented in [33]. Additionally, trust inference and evolve procedures are also used to determine the sensor node's level of trust. As a result, it can efficiently determine an ideal data-gathering route and balance the network's energy usage. In order to save energy, the Beta Reputation and Direct Trust (BRDT) approach uses the beta and direct trust paradigm for safe and reliable communication in IoT networks [34]. Nevertheless, there are frequently too many cluster heads as a result of the wide communication range overlaps, which a causes lot of energy wastage. Furthermore, BRDT does not specify the defendable assaults. To counter black-hole attacks, Grade Trust, a secured routing system based on the trust levels of nodes, is discussed in [35]. Where only a black-hole attack can be thwarted by Grade Trust, despite an increase in packet delivery ratio. In [36], a secure routing technique based on clustering is implemented an energy-efficient clustering technique to encrypt the data of the network using a trusted hardware module which can successfully fend off several assaults such as data confidence and integrity attacks as well as comparison node attacks. However, the cluster head nodes must have equipment for persistent energy supply which raises the bar for the IoT configuration. A trust-based energy-preserving multi-hop routing system is proposed to combine encryption and a trust management-based protocol [37]. There are some inaccuracies when computing the trust values of neighbor nodes because of indirect trust value calculation. The direct and indirect trust values of nodes as well as the incentive factor, energy trust and quality-of-service (QoS) indicators must be considered to improve the safe routing pathways. Therefore, a lightweight and fast deployable trust-based secure routing protocol (TBSRP) is developed to identify and isolate the misbehaving nodes to minimize the computational complexity of the nodes [38]. Additionally, the TBSRP employs a distributed trust mechanism to dynamically identify malicious nodes and isolate them as soon as feasible. The most trustworthy and quickest routing path is chosen based on the nodes' trust level and hop count. However, it does not account for nodes' energy levels when computing their trust levels, which might lead to choosing the next hop from nodes with high trust but low energy. The energy-efficient clustering approach suggested for an IoT network, is a revolutionary and adaptive energy-efficient fuzzy (AEEF) clustering that boosts efficiency by up to 10% and directly impacts longevity [39].