Sensor networks are expected to play an essential role in the upcoming age of pervasive computing. Due to their constraints in computation, memory, and power resources, their susceptibility to physical capture, and use of wireless communications, security is a challenge in these networks. The scale of deployment of wireless sensor networks requires careful decisions and trade-offs among various security measures. In this paper we present a key management scheme based on the basic random key predistribution scheme. Our analysis of this scheme shows that it is resilient to node capture and provide features such as dynamic security, low-complexity, node to node authentication, global and continuous authentication of every node in thee network and multiple level of encryption.