# An On-Demand Fault-Tolerant Routing Strategy for Secure Key Distribution Network
## 4 Proposed Solution
### Evidence Collection  
In addition to malicious causes, benign factors such as poor local key status can also cause detection triggers. Simply isolating the faulty link will reduce system availability. Therefore, we use the Dempster-Shafer evidence theory to provide theoretical tools for multi-information aggregation and subsequent decision making to make a reasonable link status assessment. The Dempster-Shafer evidence theory provides a mathematical model for the uncertainty and imprecision in events associated with certain evidence, and also shows how to combine different evidence to make reasonable deductions about associated events [34]. We define a frame of discernment \(\Omega\) as the possible causes that trigger detection, and the corresponding mass functions are assigned to both subjective and objective knowledge, also known as evidence, generated during the detection process, representing their respective estimations of potential causes:  
\[\Omega=\{Benign,Malicious\} \tag{4}\]  
Mass function \(m\) is the mapping of power sets \(2^{\Omega}\) to positive real numbers, satisfying:  
\[\sum_{A\subseteq\Omega}m(A)=1\;,\;m(\varnothing)=0 \tag{5}\]  
where \(m\) is defined as the following piecewise linear function:  
\[m(Malicious)=\begin{cases} \begin{array}{c}d,\;0\leq x\leq a,\\ \left(\frac{1-2d}{c-a}\right)(x-a)+d,\;a<x\leq c,\\ 1-d,c<x\leq 1.\end{array} \\ m(Benign)= \begin{cases}\begin{array}{c}1-d,\;0\leq x\leq a,\\ \left(\frac{2d-1}{b-a}\right)(x-a)+1-d,\;a<x\leq b,\\ d,b<x\leq 1.\end{array}\\ \end{array}\end{cases}  \tag{6}\]\[m(Benign,Malicious)=\left\{ \begin{array}{c}0,\ 0\leq x\leq a,\\ \left(\frac{2d-1}{b-a}+\frac{1-2d}{c-a}\right)(a-x),a<x\leq b,\\ \left(\frac{2d-1}{c-a}\right)(x-a)-2d+1,\ b<x\leq c,\\ 0,c<x\leq 1.\end{array} \right. \tag{8}\]  
\[for\ 0<a<b<c<1,\ 0<d<0.5.\]  
where \(x\) is derived from each evidence and \(b\) represents the current value of the input evidence \(x\) when the uncertainty of the associated event is highest. The evidence is collected from the communication key acknowledgment rate, current path status, and autocorrelation coefficient of acknowledgment bitmap, as shown below. **Evidence** 1: communication key acknowledgment rate \(e_{1}\). As shown in the following formula, \(N_{K}\) is the number of communication key packets sent in a sliding window, and \(N_{A}\) is the number of acknowledgments; this evidence is collected from the acknowledgment rate of the communication key that triggers the current detection process. Since the false positive rate is a common problem of intrusion detection systems [35], further analysis is required. It needs to be evaluated based on further evidence to improve the accuracy of inference of the cause of the fault:  
\[e_{1}=\frac{N_{A}}{N_{K}} \tag{9}\]  
**Evidence** 2: autocorrelation coefficient of acknowledgment bitmap \(e_{2}\). This evidence is collected from the autocorrelation coefficient of acknowledgment bitmap that triggers the current detection process. A bitmap is represented by a one-dimensional sequence:  
\[\overset{\rightarrow}{b}=\left(b_{1},b_{2},\ldots,b_{N_{K}}\right) \tag{10}\]  
where \(b_{j}\) indicates whether the \(j\)th acknowledgment that triggers the current detection process is lost or not. Malicious faults usually result in irregular response packet loss, so we use the autocorrelation function [36] as shown below to evaluate the repeating pattern in the time series represented by the bitmap and further deduce the nature of the anomaly:  
\[e_{2}=1-\frac{1}{N_{K}}\sum_{j=0}^{N_{K}-1}\sum_{k=1}^{N_{K}-j}\frac{b_{k}b_{k +j}}{N_{K}-j} \tag{11}\]  
**Evidence** 3: current path status \(e_{3}\). This evidence is collected from the current path status \(S_{cur}\) in the routing table. \(K_{cmax}\) represents the maximum key generation rate of all logical links. A path with a poor current path status can easily cause detection triggers. If not, the belief that indicates a malicious fault in the path is stronger.