Wireless Sensor Network (WSN) is a collection of large number of low cost resource constraint sensor nodes that communicates using wireless medium. Sensor nodes are resource constrained in memory, sensing, communication capability, and battery power. Data communication between nodes consumes a large portion of the total energy consumption of the WSNs. One of the solutions to reduce number of bits transmitted during communication is data aggregation. As wireless sensor networks are usually deployed in remote and hostile environments to transmit sensitive information, sensor nodes are prone to attacks.