## 5 Evaluation and Discussion
### Security of WSN Data Processing
#### 5.2.1 Privacy Preservation against Eavesdropping
The previous study provides a scalability study of DQ3P, highlighting that the response times is mainly affected by the onion message size. Therefore, we examine delays introduced by DQ3P by metering the Onion message Round-Trip Time (ORTT) of onion messages having the onion body size corresponding to the size of the data mining model described in Section 4.2, and the onion head of the following number of encryption layers \(n=\{5,20,60\}\) shown as appropriate in the previous study. In the following, we refer to \(n\) as the onion message path length, and we define the ORTT as the elapsed time between the issuing of the onion message from the sink node and the return of the issued onion message to the issuer node. Since by DQ3P design, the processing time of onion messages at WSN nodes is affected by randomness, these delays are not included in the ORTT. Moreover, in the implemented simulation, the measured simulation time does not include processing delays at the application layer by the design of the underlying simulation environment. Experimental Setup  
In order to conduct this investigation, we extended the simulator developed in previous work [37] to allow the broader manipulation of the onion message and the properties of the simulated WSN. The developed simulator is based on the simulation environment nsnam ns-3 [74] and is publicly released and described in [75]. Since the detailed simulation description can be found in [75], in the following we will outline simulator parameters selected to obtain the presented results. The simulator is set up to construct an ad hoc wireless network of 200 nodes. Nodes are deployed at random locations on a disc-shaped plane of radius 300 m. We selected the deployment scheme affected by randomness to model the usually non-uniform node density of WSNs. The simulated wireless communication conforms to the IEEE 802.11n standard operating at 2.4 GHz at the data rate of 13 Mbps (Modulation Coding Scheme index 1), with the nodes having a wireless communication range of approximately 30 m. The maximum transmission unit and maximum segment size are set to the ns-3 default value, 2296 bytes and 536 bytes, respectively. Onion messages are transmitted over the TCP protocol, and routing of packets in the multi-hop network is handled using the Optimized Link State Routing Protocol (OLSR) [76]. Encryption layers of the onion head are produced using the _Scaled box_, an ECC-based [77] public-key cipher of 256 b key length implemented in the Libsodium library [78]. As described in [75], the simulator operates in two phases; the first phase is meant to identify nodes in the same network segment as the sink node. Due to the deployment scheme being affected by randomness, some nodes might be located in isolated network segments, unable to communicate with the sink node. In the second phase, the sink node starts issuing onion messages sequentially. After an onion message returns back to the sink node, the following onion message is issued. The sink node is set up to issue 30 onion messages for each value of \(n\). Onion messages are constructed by randomly selecting \(n\) nodes to include in the onion message path. The onion message path is encoded in the onion head and the onion body consisting of padding \(p=\{1\,\mathrm{k},2.5\,\mathrm{k},\,5\,\mathrm{k},\,10\,\mathrm{k},\,25\, \mathrm{k},\,50\,\mathrm{k},\,100\,\mathrm{k}\}\) bytes. Sensor nodes receiving the onion message are deciphering the outer encryption layer of the onion head to reveal the next-hop IP address and the inner encryption layer. The onion head size is maintained uniform by adding padding of the same number of bytes as the removed onion head layer. The onion body is maintained of uniform size, and the onion message is forwarded to the next-hop node. If the onion message does not reach the next-hop node in 30 s, the onion message is deleted, and a new onion message of the same properties as the interrupted one is issued by the sink node. The 30 s timer is set up to speed up simulation completion.