Public Key Cryptography was measured too expensive for WSN but it all changed due to the developments in software and hardware prototypes. This paper present and analyze the secure hierarchical data aggregation algorithm which uses an effective Public key cryptography to attain end to end security. Many data aggregation systems which are followed before uses either hop by hop decryption or uses symmetric key cryptography for end to end security but it is not energy efficient. This secure hierarchical data aggregation algorithm does not necessitate additional phase for data integrity verification and also it eludes additional transmissions and computational overhead on the sensor nodes to reduce the amount of energy used up by the network. This Paper measures the execution time and energy consumption of various cryptographic functions of the secure data aggregation algorithm on TelosB sensor network platform, programmed in nesC language and also analyses the performance of the algorithm in the Contiki Os simulator Cooja. © 2015 IEEE.