## 5 Performance Analysis and Simulation
### Security Performance Analysis
#### 5.1.2 Security Performance Analysis of our Proposed Schemes  
The safety period is the number of packets the SoN has sent before it is caught by the attacker. In our proposed schemes, the safety period is mainly related to the PN usage time \(\text{T}_{\text{PP}}\), the number of nodes \(M\) in the PNCS, and the number of routing path hops \(\text{Hop}_{\text{sum}}\). (1) Phantom Node Usage Time \(\text{T}_{\text{PP}}\)  
In Reference [19], in order to prevent the attacker from tracing back to the SoN, it is proposed that the lasting time of each routing path should be less than the time used by the attacker to trace back to the SoN. In this paper, in order to ensure the location privacy of the source node and use the routing path efficiently, the PN usage time is determined according to the time required for the attacker to trace to the PN. Suppose that the SoN generates a data packet every time interval \(T\). In the attack model, it is assumed that the attacker quickly moves to the sending node once it overhears a packet, that is, the time that the attacker traces back one hop along the routing path is \(T\). Therefore, **Conclusion 1** can be drawn. **Conclusion 1**. : Suppose that in our proposed NRSPS scheme, the hop count from the source node to the phantom node is \(\text{Hop}_{\text{s,ps}}\), and the hop count from the phantom node to the sink node is \(\text{Hop}_{\text{ps,sink}}\); in the NRDPS scheme, the hop count from the source node to the PN is the same as in the NRSPS scheme, also is \(\text{Hop}_{\text{s,ps}}\), the hop count from the SPN to the RPN is \(\text{Hop}_{\text{ps,pp}}\), the hop count from the RPN to the sink node is \(\text{Hop}_{\text{pr,sink}}\), and the data packet interval is \(T\). The time required for the attacker to trace to the PN in the NRSPS scheme is:  
\[\text{T}_{\text{NRSPSp}}{=}\text{T}*(\text{Hop}_{\text{ps,sink}}). \tag{11}\]  
The time required for the attacker to trace to the SoN in the NRSPS scheme is:  
\[\text{T}_{\text{NRSPSs}}{=}\text{T}*(\text{Hop}_{\text{s,ps}}{+}\text{Hop}_ {\text{ps,sink}}). \tag{12}\]  
The time required for the attacker to trace to the SPN in the NRDPS scheme is:  
\[\text{T}_{\text{NRDPSp}}{=}\text{T}*(\text{Hop}_{\text{ps,pr}}{+}\text{Hop}_ {\text{pr,sink}}). \tag{13}\]  
The time required for the attacker to trace to the SoN in the NRDPS scheme is:  
\[\text{T}_{\text{NRDPSs}}{=}\text{T}*(\text{Hop}_{\text{s,ps}}{+}\text{Hop}_ {\text{ps,pr}}{+}\text{Hop}_{\text{pr,sink}}). \tag{14}\]  
**Conclusion 2. ** Suppose that a phantom node usage time is \(\rm T_{PP}\). \(\rm T_{PP}\) is represented as \(\rm T_{NRSPSpp}\) in the NRSPS scheme and \(\rm T_{NRDPSpp}\) in the NRDPS scheme. The NRSPS scheme and the NRDPS scheme only need to satisfy the Equations (15) and (16) respectively to ensure that the attacker cannot trace back to the phantom node, thus ensuring that the attacker cannot trace back to the source node. In very special cases, even if the attacker traces back to the phantom node, the attacker still needs to backtrack \(\rm Hop_{s,ps}\) to capture the source node. \[\rm T_{NRSPSpp}\leq\rm T_{NRSPSpp}=(\rm Hop_{ps,sink})*T \tag{15}\]  
\[\rm T_{NRDPSpp}\leq\rm T_{NRDPSpp}=(\rm Hop_{ps,pr}+\rm Hop_{pr,sink})*T \tag{16}\]  
(2) The Number of Nodes \(M\) in the Phantom Node Candidate Set  
In the NRDPS scheme, the sink node randomly selects \(M\) grids from near source node side and \(M\) grids from away the source node side, respectively. Then the SN randomly selects one node from each grid to form the sending phantom node candidate set (SPNCS) and the receiving phantom node candidate set (RPNCS). Finally, the SoN randomly selects \(i\) pair node as the SPN and the RPN. **Conclusion 3. ** Suppose that the panda's stay time is \(\rm T_{1}\), and the number of nodes in the phantom node candidate set is M, Equations (17) and (18) can be derived according to Equations (15) and (16).