# Trust-Aware Fog-Based IoT Environments: Artificial Reasoning Approach
## 3 Trust Model Architecture Components
### Trust Model Mapping  
Since IoT systems can have a large number of nodes, it is not desirable to consider each IoT node as an entity since this will impact the proposed trust scalability. As such and as shown in Figure 1, the IoT system is aggregated into Fog Computing Domains (FCDs).  
\begin{table}
\begin{tabular}{l c c c c c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Hosting Environment**} & \multicolumn{6}{c}{**Trust Characteristics**} \\ \cline{2-13}
**Ref.** & **Year** & \multicolumn{2}{c}{**IoT Layer**} & \multicolumn{2}{c}{**Architecture**} & \multicolumn{2}{c}{**Trust Update**} & \multicolumn{2}{c}{**Trust Components**} & \multicolumn{2}{c}{**Trust Filtering Mechanisms**} \\ \cline{2-13}  & **Things** & **Fog** & **Cloud** & **Cen.** & **Dis.** & **Time** & **Event** & **Direct** & **Reputation** & **Recommenders** & **Recommendations** \\ \hline
[31], 2018 & ✓ & ✓ & - & ✓ & ✓ & ✓ & - & ✓ & ✓ & ✓ & ✓ & ✓ \\
[37], 2019 & - & ✓ & - & - & ✓ & - & ✓ & ✓ & ✓ & ✓ & - \\
[28], 2019 & ✓ & ✓ & - & ✓ & - & - & ✓ & ✓ & - & - & - \\
[30], 20  
During this aggregation process, each FCD elects one coordinator. The coordinator represents the entire FCD in the trust modeling process, and it is held responsible for managing its FCD members to maintain a high reputation for its FCD within the IoT environment.  
For example, assume that an FCD with six member nodes and one of the members is the coordinator. We will refer to the Fog coordinator as FC. The FC has the complete trust levels of the members within its FCD. Suppose a new node needs to join the FCD. The FC will request it to provide references from prior associations with other FCDs. The objective of the FC is to show its resources as highly trustworthy to other FCs because the value of highly trustworthy resources is higher than the less trustworthy resources. Therefore, the FC does not want to overestimate or underestimate the trust level of a member node because the FC and hence its FCD's reputation will suffer.  
Figure 1 shows that each FCD is a collection of member nodes (IoT things) which are a mixture of clients and resources. These members collectively contribute to the overall trustworthiness of their FCD. In contrast to the reputation of other FCDs, which is maintained in \(RTT_{FCD}\), the trust records that an FCD believes in other FCDs with whom it has had direct interactions are maintained in \(DTT_{FCD}\). These two data structures, associated with each FCD, are maintained by the FC. The member nodes are where the real interaction between two FCDs takes place. The FC also maintains _internal trust table_\(ITT_{FCD}\) that contains the trust levels for the members of FCD. By obtaining feedback from FCDs that utilized the service provided by its member node, the FC modifies the member node's trust level in the \(ITT_{FCD}\) each time it takes part in a transaction.  
Figure 2 illustrates the operations of the trust model. Assume a source (i.e., FC) wants to determine the trust level of a target (i.e., FC). The source determines the target's trust level by combining its direct trust (i.e., its own experience) with the target as well as the target's reputation. From its DTT, the source obtains its direct trust in the target. The target reputation is obtained by the source contacting its recommenders in RTT. After the recommendations are received, the source can compute the target reputation.  
After that, and as shown in Figure 2, the source computes the target trust level by combining its direct trust level in the target and the target reputation. Based on the computed target's trust level, the source can decide to go ahead or reject the transaction with the target. After the transaction is finished, the followings are performed: (a) the source can update its RTT by evaluating its recommenders; (b) the source can update its DTT; and (c) the target can update its ITT to reflect the trustworthiness of its member node.  
Figure 1: Trust model architecture components.