## 4 Proposed Routing Protocols
### Proposed Two-Level Phantom with a Backbone Route Protocol (PhaT)
#### 4.2.1 Phase 0: Network Configuration  
In the PhaT protocol, it is assumed that the near network border region is defined during the network configuration phase. Distance between any two points in the network is computed using the Euclidian distance equation. As an example, the distance between point \(J\) at \((x_{J},y_{J})\) and point \(B\) which is located on the network border at \((x_{B},y_{B})\) is calculated as: \(d_{JB}=\sqrt{\left(x_{J}-x_{B}\right)^{2}+\left(y_{J}-y_{B}\right)^{2}}\). The outer boundary of the near network border region is the network border. The inner boundary of the near network border region is defined at distance \(d_{NB}\) from the network border. Therefore, the near network border region is the region within distance \(d_{NB}\) from the network border. All sensor nodes which are located within distance \(d_{NB}\) from the network border are identified as nodes in the near network border regions (\(N_{NB}\)). To compute a distance from location of a sensor node to the network border (\(d_{SB}\)), the location coordinates of the sensor node (\(x_{S},y_{S}\)) are used. For any sensor node, if \(d_{SB}\leq d_{NB}\), the sensor node is added in the list of \(N_{NB}\). All \(N_{NB}\) may be selected as a first level phantom node (\(epN\)) during packet routing. The algorithm for PhaT protocol is summarized in Algorithm 2. The last task in the network configuration phase is the process where each \(N_{NB}\) computes a list of candidate second level phantom nodes (\(npN\)). For each \(N_{NB}\), an \(npN\) is a sensor node which is located at hop distance, \(d_{p}\), away. For example, if node \(N_{20}\) is in the list of \(N_{NB}\), and \(d_{p}\) is specified as 4 hops, then \(N_{20}\) will compute a list of all sensor nodes which are located 4 hops away. As an example, \(N_{20}\) may compute a list containing nodes \(N_{8}\), \(N_{30}\), \(N_{14}\), and \(N_{57}\). During packet routing, if \(N_{20}\) is selected as \(epN\), then it may select \(N_{8}\), \(N_{30}\), \(N_{14}\), or \(N_{57}\) as the second level phantom node (\(npN\)). Figure 4 shows the configuration of sensor nodes in the proposed PhaT protocol. The location configuration of the candidate \(npN\)s is guarded by a restricted region, \(RR\), around the \(epN\). \(RR\) is defined by radius of hop distance \(d_{H}\) from \(epN\). \(d_{H}\) is used to ensure a safe distance between \(epN\) and \(npN\). All the neighboring nodes of \(epN\) are located inside the \(RR\). The distances \(d_{H}\) and \(d_{p}\) have a relationship which satisfy the equation \(d_{H}=~{}d_{p}-1\). While \(d_{H}\) specifies the sensor nodes which are restricted from becoming \(npN\), \(d_{p}\) is used to specify the sensor nodes which are good candidate for \(npN\)s. The \(npN\) are located outside the \(RR\) to ensure the \(epN\) and \(npN\) are not neighboring nodes. Longer \(d_{P}\) increases the distance between the \(epN\) and \(npN\), increases the complexity for the adversary back tracing attack, and improves the SLP protection. To guarantee routing paths with high path diversity, two unique regions of \(npN\)s are defined. The regions are north of \(epN\) (_northR_) and south of \(epN\) (_southR_). If a node is a candidate \(npN\) with \(Y\)-coordinate greater than the \(Y\)-coordinate of the \(epN\), it is identified as a candidate \(npN\) in _northR_. Otherwise, if a node is a candidate \(npN\) with \(Y\)-coordinate less than or equal to the \(Y\)-coordinate of the \(epN\), it is identified as a candidate \(npN\) in _southR_.