# A Secure Protocol against Selfish and Pollution Attacker Misbehavior in Clustered WSNs
## 5 Simulation Setup and Results
### Simulation Results
From the same graph, it is clear that the number of correct messages is higher in \(SSP\) compared to \(SNCR\), as shown by the blue line. From point 0 to point 6 on the x-axis where the number of \(M\)N goes from 0 to 6, the number of correct messages is constant and equal to \(O=85\) (total number of source nodes of original messages to be sent from source nodes), i.e., all the messages sent from source nodes are successfully received at the \(BS\). Then, as more \(M\)N are present, the number of correct messages starts decreasing and reaches a value of 0 only when the number of misbehaving \(CH\) nodes is equal to 10. Figure 7: \(PDR\) and correct messages ratio. This is because for the interval \([0,4]\), where the number of malicious _CH_ nodes is less than the threshold \(K=4(K=p-t-1)\) as assumed previously, the remaining number of honest (_CH_) nodes is at least \(t=5\). This guarantees that the number of correct parts transmitted for each source node is at least \(t+1\) parts, which is a sufficient number to reconstruct the original data parts. Then, for the interval beyond \(4\), where the number of malicious _CH_ nodes is greater than the threshold \(K=4\), the number of collected parts starts going below \(t\) for a member node. The number of correct messages is equal to \(O\) in some cases in this interval, when the number of malicious _CH_s is \(5\) and \(6\). This is explained by the fact that the total number of _CH_ nodes (\(15\) here) in the network is greater than the limit \(p=10\). Therefore, when the network is more scalable, the tolerance for choosing the threshold value \(K\) is enhanced. Figure 9 demonstrates the scalability aspect of the protocol. It depicts the variation in the percentage of correct messages received at the \(BS\) when a _DoS_ attack is executed, related to the size of the network, i.e., the total number of sensor nodes in the network and the number of clusters in it. We chose for this simulation a number of malicious _CH_ nodes that belonged to the interval beyond the threshold \(K=p-t-1\). \(K\) is set here to \(6\). It can be seen that the percentage of correct messages increases as the network size increases. In fact, when the number of sensor nodes increases, the number of clusters increases. Consequently, the number of _CH_ nodes increases, as does the number of possible paths for a source node to route data packets to the \(BS\). In this case, despite \(S\), the number of _MNs_ is greater than the threshold \(K=\), the probability of collecting \(t+1\) parts is, obviously, raised. The reason is that \(S\) is distributed among a higher number of honest _CH_s even with a number of _MNs_\(S\) greater than the threshold \(K\). The protocol enhances tolerance to the existence of _M_Ns in the network while guaranteeing greater prevention against a _DoS_ attack when the network gets larger. By evaluating the scalability factor, we can conclude that the proposed solution is capable of supporting network expansion without degrading the security performance. Figure 8: Number of correct messages for _SSP_.