## 4 Simulations and Analysis
### Resilience  
Resilience is an important safety performance index in a key management scheme. It indicates the probability of the exposure of the session keys among the remaining uncompromised nodes after some of the nodes are captured. The proposed key management scheme forms a polynomial pool with the key pool. It makes full use of the threshold character in the polynomial key scheme, and it makes the adversary have to crack both the polynomial coefficients and the shared keys simultaneously after a large number of nodes are captured, before it can influence the other uncompromised nodes. This greatly enhances the robustness of the entire network. Normally the MS is safe, but a large number of fixed sensor nodes have the risk of being captured. If there are \(x\) captured nodes, the probability \(p_{k}\) that the key in the key ring could be captured in any pair of uncompromised nodes can be expressed as Equation (9):  
\[p_{k}=1-(1-\frac{n}{S_{k}})^{x} \tag{9}\]  
Suppose that the number of captured nodes: \(x>t\) (where \(t\) denotes the degree of the polynomial). Only if the number of captured nodes is greater than the degree of the polynomial, the adversary could have the possibility of cracking the polynomial coefficients. The probability that any polynomial \(f_{k}(x,y)\) is randomly selected by the sensor nodes is \(n/S_{p}\), and the probability \(p_{j}\) that the polynomial is contained by \(j\) nodes in the \(x\) captured nodes can be expressed as Equation (10):  
\[p_{j}=\left( \begin{array}{c}x\\ j\end{array} \right)\left(\frac{n}{Sp}\right)^{j}\left(1-\frac{n}{Sp}\right)^{x-j} \tag{10}\]  
Therefore, the probability \(p_{p}\) of polynomial exposure in the uncompromised sensor nodes can be expressed as Equation (11):  
\[p_{p}=1-\sum_{j=0}^{t}p(j) \tag{11}\]  
Figure 9: The probability that a MS and sensor nodes establish a communication link within two hops when the number of neighbor nodes \(d=30\). According to Equations (9) and (11), the probability \(p_{link}\) that the safety link is captured can be expressed as Equation (12):  
\[p_{link}=p_{k}\cdot p_{p} \tag{12}\]  
The simulation parameters are set as follows:  
(1) \(P1=0.5055\) (\(N=2\), \(M=4\), \(Sp=14\), \(t=100\)), \(q=0.99\) (\(n=5\), \(S_{k}=1000\), \(m=600\));  
(2) \(P2=0.3335\) (\(N=2\), \(M=4\), \(Sp=22\), \(t=100\)), \(q=0.99\) (\(n=5\), \(S_{k}=1000\), \(m=600\)). From the above simulation results, we can draw the conclusion that the resilience performance of the proposed scheme is better than that of the basic random predistribution scheme (E-G scheme), polynomial predistribution scheme (Liu scheme), and Amar scheme, respectively. When the capture probability of a normal communication link is a certain value, the number of permitted captured nodes is far greater than the number of the other three schemes. For example, when the direct connectivity \(p=0.33\) and the number of captured nodes in the network reaches 650, the probability that a normal communication link is captured is as high as about 0.95 in these three schemes (EG scheme, Liu scheme and Amar scheme), in this case, the network is in dangerous status, but for the proposed scheme, for the capture probability to reach 0.95, the adversary has to capture almost 1300 sensor nodes. It indicates that the resilience ability of the proposed PPBR scheme is better than that of the other three schemes. The reason is that in this scheme if the adversary wants to capture a normal communication link, it must crack the \(t+1\) coefficients of the polynomial and decrypt the shared keys among the sensor nodes simultaneously. Consequently, it is more difficult than the compared schemes above. Comparing Figures 10 and 11 with the decrease in direct connectivity, for example, when \(p\) is reduced from 0.5 to 0.33, the number of permitted captured nodes increases obviously. When the number of captured nodes is greater than a certain threshold, the capture probability of normal nodes will be pretty high in the E-G scheme, Liu scheme and Amar scheme.