## 4 Proposed Scheme
### Trust Model
#### 4.4.2 Indirect Trust  
Indirect trust is also an important metric for evaluating a node, and it is necessary to use indirect trust to evaluate a node when direct trust cannot accurately calculate the reliability of a node. Since there may be MNs in the neighboring nodes to make malicious recommendations to the pre-selected next-hop nodes, it is necessary to evaluate the reliability of the recommendations to exclude malicious recommendations. If the source UW-sensor needs to obtain the indirect trust of the pre-selected UW-sensor, it sends a request to a set of public neighbor nodes and selects a set of indirect trust recommendation groups in the group of public neighbor nodes whose direct trust is greater than 0.5. The nodes in the recommendation trust group are not completely reliable, and it is still necessary to test the reliability of their recommendation of indirect trust to exclude the outliers and calculate the indirect trust. This effectively solves the problem of false positives of malicious nodes. For reliability assessment of indirect trust, the Gaussian distribution anomaly detection algorithm is utilized. For a set of recommended trust values \(R=(R_{1},R_{2},R_{3},\ldots,R_{m})\), the outliers are identified, and the reliability is computed as shown in Equations (12) and (13):  
\[\rho(T)=\frac{1}{\sigma\sqrt{2\pi}}e^{(-\frac{(T-\mu)^{2}}{2\sigma^{2}})} \tag{12}\]  
where \(T_{i}\) is the trust value recommended by UW-sensors in the recommended trust group, and \(\mu\) and \(\sigma\) are the mean and variance of the recommended trust values in this group, respectively. For judging abnormal recommended trust values, the proposed scheme is defined as the value whose value \(T_{i}\) deviates from the mean by more than two times the standard deviation. \(T_{i}\) will be considered as an abnormal value and will not participate in the indirect trust calculation, as follows:  
\[P(|T-\mu|>2\sigma)\leq 0.477 \tag{13}\]  
The reliability of the recommended trust value after excluding outliers is given by:  
\[T_{rec}^{in}=1-2|\int_{\mu}^{R}f(R)\,dR| \tag{14}\]  
where \(f(R)\) is the trust value distribution function of Equation (12). For a set of recommended trust values \(R=(R_{1},R_{2},R_{3},\ldots,R_{C})\) that excludes outliers, the reliability \(T_{rec}^{in}\) is obtained for each of these trust values, and the indirect trust calculation formula is given by:  
\[T_{indirect}=\frac{\sum_{i=1}^{C}T_{rec}^{i}\times R_{i}}{C} \tag{15}\]where \(c\) is the number of recommended UW-sensors participating in the computation, \(R_{i}\) is the recommended trust value of node \(n_{i}\) to the pre-selected nodes, and \(T_{rec}^{i}\) is the assessment of the reliability of the recommended trust value of node \(n_{i}\). Environmental trust: Hydroacoustic communication will be affected by a variety of factors. For example, environmental noise will lead to poor quality of the communication link, resulting in fluctuations in communication, energy, and data, which in turn leads to miscalculation of the trust between the nodes and reduces the accuracy of the detection for MN. Using the underwater acoustic signal path attenuation model [28], the absorption coefficient \(\alpha(f)\) estimated from [PERSON]'s formula is given by:  
\[\alpha(f){=}\frac{0.11f^{2}}{1+f^{2}}+\frac{44f^{2}}{4100+f^{2}}+2.75\times 10^ {-4}f^{2}+0.003 \tag{16}\]  
where \(f\) is the signal frequency. The average signal-to-noise ratio is given by:  
\[SNR(d,f)=\frac{P/\left(d^{k}a(f)^{d}\right)}{N(f)B} \tag{17}\]  
where \(k\) is the spreading factor in the noise simulation, which represents the propagation loss and is set to 1.7 for practical propagation, \(d\) is the distance, \(B\) is the bandwidth, and \(N(f)\) is the PSD of noise in acoustic communication, including four categories: turbulence noise, ship noise, wave noise, and thermal noise [29].