## 4 The Proposed Method: SLP-E
### Protocol Execution Phase
#### 4.2.2 Scenario-2
of hops to travel \(h_{2}\gets selectHops(45,180,PresentNode)\);
20 for\(i=1\):\(h_{2}\)do
21\(/\)Select the node to relay \(NodeRelay\gets getClockwiseListNode(walkDirection)\);
22\(TransferPacket(NodeToRelay)\);
23\(/\)Shortest Path Walk //Determine the hop count necessary based on the group if\(group\)\(<\)\(G==1\)then
24\(h_{3}\gets random(2,radius/4)\);
25 else
26\(h_{3}\gets random(4,(2\times radius)/3)\);
27 for\(i=1\):\(h_{3}\)do
28//Select a neighbor node with the least distance to Base Station \(NodeToRelay\gets getShortestListNode()\);
29\(TransferPacket(NodeToRelay)\);
30\(PresentNode\gets NodeToRelay\);
31\(/\)Get the ring number of the present node \(r\leftarrow nodeRingNum(PresentNode)\);
32//Clockwise Walk and Anti-Clockwise Walk //Select the no. of hops to travel \(h_{4}\gets selectHops(45,90,PresentNode)\);
33 for\(i=1\):\(h_{4}\)do
34\(/\)Select the node to relay \(NodeToRelay\gets getClockwiseListNode(walkDirection)\);
35\(TransferPacket(NodeToRelay)\);
36\(TransferPacket(NodeToRelay)\);
37\(PresentNode\gets NodeToRelay\);
38//Shortest Path Walk
```  
**Algorithm 1**SLP-E  
```
1 if(DetectedAsset)then
2\(/\)Obtain Network's radius in hop count terms \(radius\gets NetworkRadius()\);
3\(/\)Define Hop Threshold \(h_{t}\gets int(round(radius/4,0))\);
4\(/\)Get Hop Count of the Source Node \(sn\_{hc}\gets HopCountSN()\);
5//Choose the group of Source Node if\(sn\_{hc}\)\(<=\)\(h\_{t}\)then
6\(group=1\);
7 else
8\(group=2\);
9\(/\)Backward Random Walk (BRW) //Select only the Far-away Neighbor Set \(onlyFurtherSet\gets True\);
10\(/\)Based on the selected group, decide the no. of hops if\(group_{c}==1\)then
11\(h_{1}\gets random(radius/3,(2\times radius)/3)\);
12 else
13\(h_{1}\gets random(radius/2,radius)\);
14 for\(i=1\):\(h_{1}\)do
15\(/\)Select the neighbor for relaying \(NodeRelay\gets GetBackwardListNode(onlyFurtherSet)\);
16\(TransferPacket(NodeToRelay)\);
17\(/\)Clockwise Walk and Anti-Clockwise Walk \(h_{1}\gets random(radius/3,(2\times radius)/3)\);
18\(/\)Select the no. of hops to travel \(h_{2}\gets selectHops(45,180,PresentNode)\);
19 for\(i=1\):\(h_{3}\)do
20\(/\)Select the node to relay \(node\gets getBackwardListNode(onlyFurtherSet)\);
21\(TransferPacket(NodeToRelay)\);
22\(/\)Select the no. of hops to travel \(h_{2}\gets selectHops(45,180,PresentNode)\);
23 for\(i=1\):\(h_{3}\)do
24\(h_{3}\gets random(4,(2\times radius)/3)\);



## 5 Privacy Analysis

_Privacy analyses_ in our work indicate the packet escape probability \(p_{esc}\) from the attacker's sight. Figure 3 shows this effect. Let us investigate a source that does not use SLP and sends a lot of packets via shortest path routing. In that scenario, every packet will arrive at the base station (BS) within the inference space that is determined by the angle \(2\beta\). The reason is that the SN packets travel a single path to reach the BS. This helps the attacker to reach the SN within \(d_{SN}/r_{s}\) hops, where \(d_{SN}\) is the distance between the BS and the SN. The two red-colored arrows drawn tangent to the SN indicate the total angular space (\(2\beta\)) occupied by the SN compared to the entire network angle \(2\pi\). Any path trajectory of the packets that escape this region is never intercepted by this region (\(2\beta\)). To mitigate the issue of this direction-based inference attack by the attacker, it is suggested that the packets escape this visibility space. The space within the angle (\(2\beta\)) made by the SN is termed as the _visibility space_. In order to accomplish this, as illustrated in Figure 3, the random walk-based SLP-E protocol seeks to transmit the packets far from the source node to a distant node known as the _phantom node_ (PN). From here, the packets are sent to the BS using annular walks. That means if the packets have to escape the SN's vicinity, then they have to travel for a distance of \(\alpha\gamma\) (measured in hops) from the SN point.