Wireless sensor nodes are deployed to perform three main tasks: sensing, data processing and communication. Sensor nodes are usually constrained in energy, communication, storage, and computation capability, especially the ones powered by batteries, which cannot be replaced optionally. Due to the main characteristics of resource-constrained and battery-powered sensors in wireless sensor networks, energy consumption is always a major concern. Data aggregation is a method of collecting and aggregating the data to reduce the energy consumption and redundancy. Since data are transmitted through multiple hops security is very much essential. The proposed layered approach provides secure data aggregation by using slicing and mixing method and reduces the number of hopes required to transmit the data