# FarpScun: Fully Anonymous Routing Protocol with Self-Healing Capability in Unstable Sensor Networks
## 3 Fully Anonymous Routing Protocol with Self-Healing Capability
### Fully Anonymous Routing Protocol with Self-Hailing Capability
#### Anonymous Route Self-Healing Process  
Here, we consider one of the most common topology modifications: in \(A-B-C\) route, nodes \(A\) and \(B\) are visible to each other, and nodes \(B\) and \(C\) are visible to each other. Suppose that we replace the existing route with a new shorter \(A-C\) route. However, nodes \(A\) and \(C\) know nothing about each other. When nodes \(A\) and \(C\) can interact directly, we call this self-healing process [21].  
The proposed demand route discovery scheme can find an accessible route when it is needed. Honestly, the self-healing is optimization in the normal environment. While, in the circumstance where some nodes are unreachable, the optimization becomes a self-healing process. The destination node gets the shortcut information through RREQ messages derived from other nodes. If the destination node gets the shortcut before the anonymous route is built, it will certainly construct and send the refreshed RREP message back through the shorter route.  
The route self-healing process is implemented in the route reply process, where a special routing packet \(Pkt\) is added. This routing package contains some route optimization information shared by the destination node. Initially, a specific packet \(Pkt\) is encrypted into \(E_{K_{N_{i}}}(Pkt)\), and the key (the element of \(K_{N_{i}}\)) used in order to decrypt the special routing packet is distributed by the destination node.  
In addition, each \(E_{K_{N_{i}}}(Pkt)\) is encrypted by a corresponding symmetric key on the destination node. For example, if the packet is to be used at the node \(C\), then the reply message will contain the \(E_{fast}\left(E_{K_{N_{i}}}\left(Pkt\right),z_{C}\right)\) data block. Therefore, only the node \(C\) will be able to decrypt it and get \(E_{K_{N_{i}}}(Pkt)\). The packet structure of encryption route information is shown in Figure 3.  
If there is a self-healing route, the information in RREP message will include a special routing packet, which includes the encrypted node IP addresses in the shortcut. That is, when the network topology changes, if there is a shortcut route \(A-C\) between node \(A\) and node \(C\), the IP address of the node \(A\) will be put in the special packet, so that the node \(C\) can decrypt the IP address of the node \(A\).  
Specifically, when the destination node finds the shortcut of the route \(A-C\), the destination node puts the information of node \(A\) (the IP address of the node \(A\)) in an additional special routing package \(Pkt\), encrypts the routing package into \(E_{K_{A}}(Pkt)\), and only the corresponding \(K_{A}\) can decrypt it. The \(E_{K_{A}}(Pkt)\) is encrypted by the symmetric key \(z_{C}\) of the corresponding node \(C\) at the destination node.  
When the \(E_{fast}\left(E_{K_{A}}\left(Pkt\right),z_{C}\right)\) data block arrives at the node \(C\) along the route, \(z_{C}\) decrypts \(E_{K_{A}}(Pkt)\). When the network topology changes, (1) node \(A\) enters the wireless detection area of node \(C\), (2) node \(A\) is connected with node \(C\), (3) \(K_{A}\) can decrypt \(Pkt\), (4) use optimization information in \(Pkt\) (the IP address of the node \(A\)) to optimize, and (5) node \(C\) can skip \(B\) to send frame directly to \(A\). This completes a route self-healing process.  
Now, some intermediate relay nodes have some routing packets with the hidden routing information. Each routing packet is encrypted with \(K_{N_{i}}\). To open it, the node must collect the required key. This can only be achieved through direct communication between the nodes.