The proposed security system for the Wireless Sensor Network (WSN) is based on the WSN security design goal that ‘to design a completely secure WSN, security must be integrated into every node of the system’. This paper discusses on two main components of the security framework viz. the secure key management module and the secure routing scheme. The incorporation of security mechanism during the routing protocol design phase is the main focus of this paper. The proposed security framework viz. ‘Secure and Hierarchical, a Routing Protocol’ (SHARP) is designed for the wireless sensor network applications which is deployed particularly for data collection purpose in a battlefield where the security aspect of the network cannot be compromised at any cost. SHARP consists of three basic integrated modules and each module performs a well defined task to make the whole security framework a complete system on its own.