– In this paper, we present a comprehensive study on the design of secure and survivable wireless sensor networks (WSNs). Our goal is to develop a framework that provides both security and survivability features that are crucial to applications in WSNs, which are vulnerable to physical and network based security attacks, accidents, and failures. To achieve such a goal, we first examine the security requirements and survivability requirements. We then propose an architecture for security and survivability in WSNs with heterogeneous sensor nodes. To understand the interactions between survivability and security, we also design and analyze a key management scheme. The experiment results show that 1) a good design can improve both security and survivability of WSNs; and 2) in some situation, there is a trade-off between security and survivability.