## 4 Protocol Framework
### Methods
#### 4.4.2 Encountering and Detection  
When one mobile node \(a\) encounters some node \(L\) which belongs to the tracking set of node \(a\) once more, the claim generation and verification procedure are repeated. The mobile node would receive more than one time-location claim which would be denoted by \(C_{L}^{1},C_{L}^{2}\ldots\), and then extract interrelated information such as the time information \(t_{L}^{i}\) and the location information \(l_{L}^{i}\) from claim \(C_{L}^{i}\). On the basis of Euclidean distance, the Euclidean distance between the point \(l_{L}^{i}\) and the point \(l_{L}^{i+1}\) could be computed:  
\[d_{L}^{i}=sqrt(\sum_{j}{(x_{L_{i+1}}^{j}-x_{L_{i}}^{j})}^{\wedge}2) \tag{18}\]  
where \(x_{L_{i+1}}^{j}\) denotes the \(j\)th dimensional coordinate of the point \(l_{L}^{i+1}\), \(x_{L_{i}}^{j}\) denotes the \(j\)th dimensional coordinate of the point \(l_{L}^{i}\). Let the measured speed \(v_{L}^{i}\) at time \(T_{i+1}\) be a trial sample in a Bernoulli trial:  
\[v_{L}^{i}=\frac{d_{L}^{i}}{\left|t_{L}^{i+1}-t_{L}^{i}\right|} \tag{19}\]  
The Bernoulli random variable is denoted by \(S_{L}^{i}\):  
\[S_{L}^{i}=\left\{ \begin{array}{ll}0,&\text{if }v_{L}^{i}\leq v_{\text{max}} \\ 1,&\text{if }v_{L}^{i}>v_{\text{max}}\end{array} \right. \tag{20}\]When the measured speed is over \(v_{\max}\), it indicates the mobile node is a cloned node and \(S_{L}^{i}\) is set to 1. Instead, when the measured speed is not over \(v_{\max}\), it indicates the mobile node is a normal node and \(S_{L}^{i}\) is set to 0. The probability of success is expressed as \(\alpha\):  
\[\alpha=\Pr(S_{L}^{i}=1)=1-\Pr(S_{L}^{i}=0) \tag{21}\]  
There a pre-defined threshold \(\alpha^{\prime}\) is used to judge whether node \(L\) is a replica. If the probability of success \(\alpha\) is more than or equal to the predefined threshold \(\alpha^{\prime}\), then it can be inferred that the mobile node \(L\) is a cloned node. Conversely, when the success rate \(\alpha\) is below the predefined threshold \(\alpha^{\prime}\), the moving node is considered a normal node. The problem of detecting node replication attacks can be reduced to a sequential probability ratio test. In this test, a good sampling strategy is adopted to tolerate the maximum chance errors. To do it, the sequential probability ratio test can be further reduced to a test which contains null hypotheses and alternate hypotheses of \(\alpha\leq\alpha_{0}\) and \(\alpha\geq\alpha_{1}\) respectively, where \(\alpha_{0}\leq\alpha_{1}\). When the null hypotheses is accepted and \(\alpha\geq\alpha_{1}\), this will cause false negative error. On the other hand, When the alternate hypotheses is accepted and \(\alpha\leq\alpha_{0}\), this will result in false positive error. In order to try to void those two error types, the maximum false negative rate \(\gamma\) and the maximum false positive rate \(\eta\) are configured as the threshold to guarantee that the false negative rate is not more than \(\gamma\) and the false positive rate does not exceed \(\eta\). The sequential probability ratio test defines two kinds of hypotheses, one is the null hypothesis \(H_{0}\), another is the alternate hypothesis \(H_{1}\). The null hypothesis means the node is normal. On the contrary, the alternate hypothesis means the node is a clone. In the sampling plan, the measured speed is the sample. It is an important problem that how to judge whether the mobile node has been cloned according to the observed n samples. To comprehend the principle of the sampling scheme, the logarithmic probability ratio on \(n\) sample is defined as \(L_{n}\):  
\[L_{n}=\ln\frac{\Pr(S_{L}^{i},\cdots,S_{L}^{n}\big{|}H_{1})}{\Pr(S_{L}^{i}, \cdots,S_{L}^{n}\big{|}H_{0})} \tag{22}\]  
In the Bernoulli experiment, each sample is measured independently, so \(S_{L}^{i}\) is i.i.d. random variable sequences. Therefore Equation (22) can be reformulated to obtain:  
\[