Abstract
In this paper we analyze the reliability of a homogeneous wireless sensor network executing a distributed code attestation protocol with neighbor sensor nodes serving as code verifiers. By considering the tradeoff between energy exhaustion vs. security vulnerability for causing sensor node failures, we identify how often distributed code attestation should be performed as well as how many neighbor sensors should serve as code verifiers per attestation event to maximize the system lifetime without compromising performance. Sensitivity analysis of the results with respect to critical model parameters is presented with physical interpretations given.