To test a devise secure energy efficient routing algorithm is needed about hours. Sensor Protocol for Information via Negotiation (SPIN), is one of the widely used energy efficient routing protocol in WSNs that completely ignores the security aspect. The alternate routing protocol, MS-SPIN, which incorporates the best features of SPIN it includes the security issue. The implementation of MS-SPIN in NS2 has shown that, for a larger number of nodes. Its energy performance characteristics are comparable to those of SPIN while providing security features.
I would also recommend NetSim. It is the easiest to use and comes with excellent support. If you use NS-3 you will spend ages trying to figure out things. Secure AODV code for NetSim is available in http://tetcos.com/File_Exchange/Secure_AODV_9.1.zip
Thank you for all your suggestions. NetSim is a licensed product. I would like to know which open source simulator would be easy to learn and implement a secure routing protocol in WSN
I would suggest OmNet++. It has two models that support WSN: Castalia and MiXiM as well as a security module. A secure routing protocol called PASER was developed based on OmNet/Inetmanet and the security module.
You can use NS-3 but if you want to do more advanced things like connecting to WSN hardware, or linking to MATLAB, etc then you would need to go with a licensed simulator like OPNET or NetSim