## 4 Simulations and Analysis  
### Storage Effectiveness Analysis  
The proposed scheme assigns different number of polynomials and keys in the MS node and sensor nodes, and this reflects the heterogeneity property between the two kinds of nodes. Compared to homogeneous network, for example, Amar scheme assigns the same number of polynomials and keys to MS and sensor nodes. In the case of achieving the same connectivity, the proposed scheme can significantly reduce the storage overhead. The probability \(P1\) of sharing at least one polynomial between MS and sensor node \(S_{i}\) can be expressed as Equation (3):  
\[ \begin{split} P1&=1-P(\textit{do not share any polynomial between MS and $S_{i}$})\\ &=1-\frac{\left(\begin{array}{c}Sp\\ M\end{array}\right)\left(\begin{array}{c}Sp-M\\ N\end{array}\right)}{\left(\begin{array}{c}Sp\\ M\end{array}\right)\left(\begin{array}{c}Sp\\ N\end{array}\right)}\end{split}  \tag{3}\]  
where \(S_{p}\) is the size of polynomial pool, \(M\) is the size of polynomial ring in MS, and \(N\) is size of the polynomial ring in \(S_{i}\). The probability \(P2\) of sharing at least one polynomial between MS and sensor node \(S_{i}\) in homogeneous network can be expressed as Equation (4):  
\[ \begin{split} P2&=1-P(\textit{do not share any polynomial between MS and $S_{i}$})\\ &=1-\frac{\left(\begin{array}{c}Sp\\ S\end{array}\right)\left(\begin{array}{c}Sp-S\\ S\end{array}\right)}{\left(\begin{array}{c}Sp\\ S\end{array}\right)\left(\begin{array}{c}Sp\\ S\end{array}\right)}\end{split}  \tag{4}\]where \(S_{p}\) is the size of polynomial pool, and \(S\) is the size of polynomial ring in the nodes (including MS and \(S_{i}\)). In this case, MS and sensor nodes store the same size of polynomial ring. For the two different structures of the network, the different values of \(M\), \(N\), \(S\) will have different influences on storage overhead, because the more polynomials are stored in a node, the larger the storage space cost will be. We can get the simulation results as shown in Figure 5.  
This article takes an example of polynomial distribution, and the key distribution method follows the same way. In Figure 5, the parameters set \([M,N,S]\) in four curves from bottom to up are taken the values as: [4, 1, 2], [8, 2, 4], [12, 3, 6] and [16, 4, 8] respectively, where \(M\), \(N\) and \(S\) satisfy the equation: \(M\times N=S^{2}\). According to Figure 5, on the premise of ensuring the same sharing probability, we can adjust the values of \(M\) and \(N\) properly to minimize the number of polynomials which are stored in the sensor nodes, and let the MS with more resources store more polynomials. For example, when \([M,N,S]=[16, 4, 8]\) and the size of polynomial pool \(S_{p}=60\), the probabilities to share at least one polynomial for homogeneous and heterogeneous networks are: \(P1=0.71\) and \(P2=0.7\), respectively. At this time, although the two probabilities are nearly similar, the number of polynomials stored by sensor nodes in a homogeneous network is: \(S=8\), and the number for a heterogeneous network is: \(N=4\). It indicates that the proposed scheme can save sensor node storage space, and it improves the storage efficiency by using different disposal schemes for the storage between MS nodes and fixed sensor nodes. The existence of MS nodes makes the fixed sensor nodes' communication no longer rely too much on cluster heads. When MS nodes do not communicate with the sensor nodes, the sensor nodes will not communicate with each other, and they will remain in sleeping mode, thus reducing the communication overhead among the sensor nodes. However, due to the adoption of the polynomial method, the protocol will increase the computation overhead relatively in the process of key establishment for sensor nodes. In order to improve the robustness of the whole network, it is worthy contributing some computation overhead. Figure 5: The probability of sharing polynomial with different \(S_{p}\).