A WSN typically has no infrastructure. It is composed of number of sensor nodes works together to monitor an environment to obtain data about it. Structured and unstructured are the two types of WSNs. An unstructured WSN contains a dense collection of sensor nodes. These sensors are small, computing resources, with limited processing and they are inexpensive. It can sense, measure, and gather information from the environment based on some local decision process; they can transmit the sensed data to the user. Security and lifetime of a sensor node in a network plays an important role.