## 3 Sensor Data Security Estimator
### Proposed Security Metrics
#### 3.2.2 Resilience Probability of the Key Management Scheme  
**Metric Definition**. The metric \(P_{R}(x)\), the resilience probability, represents the probability that a secure communication link between any two nodes, A and B, remains secure, even if \(x\) nodes (not including A and B) have been physically captured by attackers. **Features and Vulnerabilities of Key Management Schemes**. Key management is a mechanism responsible for the maintenance and distribution of cryptographic keys among nodes in a sensor network. Nodes that share common keys are able to communicate through a secure connection. As sensor nodes can be deployed in hostile environments, it is possible that an adversary physically captures one or more nodes and gains access to their cryptographic keys. Thus, nodes that share keys with captured nodes may also have their secure connections compromised. The security provided by key management schemes can be measured on the basis of their resilience toward node capture. The resilience of a key management scheme represents the probability that a secure connection between any two nodes, A and B, is not compromised when x nodes (different from A and B) are captured. The higher the resilience of a key management scheme, the more secure the network. **Metric Computation**. SDSE computes \(P_{R}(x)\), the resilience probability of a communication link between two nodes when \(x\) other nodes are captured, by the following equation:  
\[P_{R}(x)=1-P_{C}(x) \tag{7}\]  
where \(P_{C}(x)\) represents the probability that a link is compromised when \(x\) nodes are captured. \(P_{C}(x)\) is defined by the following conditional probability:  
\[P_{C}(x)=P\{L_{c}|C_{x}\} \tag{8}\]  
where \(L_{c}\) is the event in which a link is compromised and \(C_{x}\) is the event in which \(x\) nodes are captured. For each key management scheme, a specific equation to calculate \(P_{C}(x)\) exists, since each scheme operates differently from the others and is based on different configuration parameters. These equations are usually defined and published by the authors of each management scheme, since they are usually quite complex. In [21], [PERSON]. _et al._ present various key management schemes and their respective equations to calculate \(P_{C}(x)\) when a single node is captured (_i.e._, \(x=1\)). In the following subsection, we give an example of a key management scheme and show how to calculate its respective probability \(P_{C}(x)\), which can then be used by SDSE to compute the resilience probability \(P_{R}(x)\) for that scheme, via Equation (7). **Example of \(P_{C}(x)\) Computation. ** In the q-composite random key pre-distribution scheme (proposed by [PERSON] _et al._[22]), a scheme on which several other schemes are based, initially, a set \(K\) of keys is randomly chosen from the total possible key space. This key pool is generated offline and has size of \(|K|\). For each node in the sensor network, \(k\) keys are randomly picked from the key pool \(K\) and stored in the node's memory. This subset of \(k\) keys is called the node's key ring. The size of the key pool, \(|K|\), is chosen, such that there is a probability \(p\) that two random subsets of size \(k\) in \(K\) share at least one key. After network deployment, every node shares information with its neighbors in order to find out which keys they have in common. If a node has at least \(q\) keys in common with a neighbor, it is saidthat they share a secure communication link, _i.e._, two nodes have a secure communication link between them when they share \(i\) keys, where \(q\leq i\leq k\). In this case, the secure communication key \(c\) (the key that is also vulnerable to brute force attacks, defined in Section 3.2.1) is generated by the hash of all keys in common, that is, \(c=hash(k_{1}||k_{2}||...||k_{i})\). Neighboring nodes that share less than \(q\) keys cannot establish a secure communication link.