## 2 Security Issues in WSN
### Defense Mechanisms  
Security threats in wireless sensor networks push us to incorporate some defense mechanisms. Different approaches may be employed to try to preserve security requirements of sensing applications, but the adopted mechanisms should comply with the particularities and limitations of the employed sensor networks. The basic defense mechanism in wireless sensor networks is cryptography. In short, cryptography is the set of techniques for transforming information into a set of unreadable data. Then, it can only be read by the recipient, which has the corresponding secret key. In this context, the original message is called plain text and the encrypted message is called cipher text [20]. Encryption methods, when applied in a WSN context, should be aware of the resource constraints of sensor nodes, such as limited processing power, low storage capacity, limited memory and finite power supply. Therefore, traditional security mechanisms and encryption with large computing and communication overhead are not feasible for WSN [6]. Thus, providing security for WSN is a rather difficult task. Furthermore, in WSN, data transmission demands more resources than processing functions [21], potentially guiding the adoption of particular security mechanisms. Thus, encryption mechanisms should be evaluated by code size, data size after encryption, processing time and power consumption [6]. Cryptography may be employed to provide authenticity, confidentiality and integrity. The use of cryptography keys allows the authentication of source nodes, since they must have the proper keys. Additionally, as such keys would be required to recover the original data, confidentiality is also provided. At last, if the original information cannot be accessed, it can not be adulterated, assuring integrity. Although it is not a defense for attacks against availability, cryptography has become the core of defense mechanisms in different types of networks. Another defense mechanism that can be adopted in wireless sensor networks is watermarking. This technique embeds secrecy information into transmitted data, which can be used to authenticate source nodes. As malicious nodes may be introduced into the network, such authentication mechanism may be highly beneficial to WSN, especially because the (low) additional processing may be tolerated by typical sensor nodes. Wireless sensor networks are composed of distributed sensors, which are cooperative and trustworthy in essence. However, this may not be true in many scenarios, especially when new nodes may be dynamically inserted into the network. A sensor trust model is then necessary for many applications [22, 23], which can complement general authentication mechanisms. DoS attacks are prejudicial to wireless sensor networks, but cryptography is not a defense measure for this kind of attack. Actually, it is primarily designed to compromise availability, which in wireless sensor networks is performed by draining resources of sensor nodes and prejudicing sensing and transmission of valid gathered information. In fact, as DoS attacks may be performed in different ways, specialized counter-measures should be adopted. For jamming attacks, frequency hopping can be used [12]. Admission control mechanisms can also be adopted, avoiding energy depletion due to artificially-produced collisions. Additionally, watermarks may be used to support such mechanisms. Time division medium access can also be used to avoid DoS, although network performance may be prejudiced. In general, DoS is hard to predict, and sometimes, it may be hard to be countered. An infected node may suddenly start a DoS attack, even if it was acting properly for a long period of time. For wireless multimedia sensor networks, which can be retrieving large amounts of information from a monitored field, DoS attacks may be camouflaged as the valid operation of the network, making their detection harder. Efficient mechanisms against DoS attacks in WSN should be adopted. In this context, an intrusion detection mechanism could be employed [24].