Wireless Sensor Networks is the new concept in the field of networks consists of small, large number of sensing nodes which is having the sensing, computational and transmission power. Due to the lack of tamper-resistant packaging and the insecure nature of wireless communication channels, these networks are vulnerable to internal and external attacks. Moreover, routing protocols are designed, taking the consideration of power consumption not security as a goal. As security plays an important role in the ability to deploy and retrieve trustworthy data from a wireless sensor network. The proper operations of many WSNs rely on the knowledge of routing algorithms. However, most existing routing algorithms developed for WSNs are vulnerable to attacks in hostile environments. Current routing protocols assume the networks to be benevolent and cannot cope with misbehaviour of nodes. The misbehaviour may be due to node being malicious to save the battery power. Whenever any device comes within the frequency range can get the access to the transmitting data and may affect the transmission. Thus, this work has significant importance, to build a highly secure system through frequency hopping.