# A Trust-Based Model for Secure Routing against RPL Attacks in Internet of Things
## 3 Proposed SMTrust Model
### System Model
#### 3.1.2 Trust Metrics Identification and Trust Index Calculation  
The choice of suitable trust parameters is fundamental to the development of a trust-based security mechanism. The trust metrics employed by SMTrust, to provide IoT networks and routing security are scrutinized in detail [20]. For SMTrust, the most relevant trust metrics are considered, including historical observations, energy level, direct trust, \begin{table}
\begin{tabular}{l l l} \hline \hline
**Ref** & **Domain** & **Trust Evaluation/Calculation/Metrics** \\ \hline
[14] & Routing attacks; RPL & Historical observation; Feedback; Successful and unsuccessful transaction \\
[16] & Routing attacks; RPL & Contextual information; QoS; QPC \\
[44] & Routing Attacks; Wireless Networks & Historical Observations; Indirect trust; Route trust; Contextual factors \\
[12] & WSNs/LEACH; Attacks; Healthcare & Data packets received, dropped, and forwarded \\
[45] & RPL; Routing Attacks & Direct and Indirect trust \\
[46] & RPL; LLNs; WSNs & Node behavior \\
[47] & AODV; Routing Security & Direct trust; Historical observation; Uncertainty; \\
[42] & Medical IoT; Routing & Bayesian probability \\
[15] & IDS-based; RPL Attacks & Energy consumption; Node capacity \\  & & Recommended trust; Energy; Honesty; \\
[48] & RPL Security & Selfishness; ETX \\  & & Event-based trust; Weighted trust; Nonce ID; \\  & & Timestamp \\
[49] & RPL Security & Routing behavior; Contextual factors; \\  & & non-cooperative game models and DST \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Trust Metrics in State-of-the-Art IoT Routing and Networks. and recommended trust. SMTrust incorporates mobility of nodes by considering mobility-based metrics in trust computation. Table 3 shows the description of applied trust metrics in SMTrust. Using the calculations of trust metrics, the trust index is computed. The trust value computed is kept dynamic by assigning the appropriate weights (\(w\)) to the calculation of each trust metric. Hence, the trust index is the weighted aggregation of the trust metrics. The aggregated trust values are ranging from 0 to 1. The concept of a fuzzy threshold-based mechanism is used by SMTrust for the evaluation of trust rating [50]. The final trust index value is calculated using Equation (1). \[ \begin{split}\textit{TrustIndex}=w_{1}(\textit{TM}_{SR})+w_{2}( \textit{TM}(H_{0}))+w_{3}(\textit{TM}_{EL})+w_{4}(\textit{TM}_{LLS})+w_{5}( \textit{TM}_{\textit{Mobility}})+w_{6}(\textit{TM}_{\textit{RT}})\\ \end{split}  \tag{1}\]  
where \((w_{1}+w_{2}+w_{3}+w_{4}+w_{5}+w_{6})=1\). Current or direct trust values are given more weightage than the historical observations. The degree of trust index, as evaluated by fuzzy judgement, is five-tuple, defined as, \(T=\)[11; 12; 13; 14; 15], with the following trust levels, respectively, [\"No Trust\", \"Poor Trust\", \"Fair Trust\", \"Good Trust\", \"Full Trust\"]. The defined trust levels are according to the given ranges of trust values as [0.0-0.20, 0.21-0.45, 0.46-0.70, 0.71-0.90, 0.91-1.00]. SMTrust does not consider the nodes that lie in \(t1\) and \(t2\) tuple for routing decisions and secure communication. The nodes in tuple \(t4\) and \(t5\) are considered as reliable and trustworthy to \begin{table}
\begin{tabular}{c c} \hline \hline
**Trust Metrics** & **Description** \\ \hline Success rate (\(\textit{TM}_{SR}\)) & The ratio of number of packets forwarded by the number of packets received. \\ Energy Level (\(\textit{TM}_{EL}\)) & Amount of remaining energy level of the node. \\ Historical Observations (\(\textit{TM}(H_{0})\)) & Recent trust value calculated for the node. \\ Location and Link Stability (\(\textit{TM}_{LLS}\)) & Node’s location based on Received Signal Strength \\  & Indicator (RSSI) value. \\ Mobility (\(\textit{TM}_{\textit{Mobility}}\)) & Distance moved from the previously noted position. \\ Recommended Trust (\(\textit{TM}_{\textit{RT}}\)) & Trust recommendation by 1-hop neighbors. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Trust Metrics Applied for SMTrust.