## 2 Background
### Case Study: Intelligent Transportation Systems  
One of the most relevant applications today, where the security issues in WSNs play a very important role, are the intelligent transportation systems (ITS) [16]. These systems have the potential to improve mobility, safety and security, while ensuring energy efficiency and reducing the environmental impact of transportation systems. These systems are composed of different kinds of devices installed at several locations, such as inside the vehicles, on the road or in the traffic signals. For instance, the vehicles can be equipped with several sensors with different sensor units, such as acoustic, accelerometers, temperature, the vehicles' on-board unit (OBU) computers and GPS devices. These sensors are used to ensure safe driving, being responsible, for instance, for measuring the distance to obstacles around them. The vehicles also use information received from surrounding vehicles, such as their speed or distance, and are able to communicate with each other in order to cooperate for safety and other reasons. Furthermore, the traffic signals send information to the vehicles informing them of speed limits and general traffic regulations. ITSs have a wide variety of interesting applications, such as road safety applications (accident warnings, red-light warnings, road congestion, contextual speed advisory, _etc._), information dissemination applications (parking spots, traffic warnings/conditions, fuel prices, landmarks, _etc._), entertainment applications (file sharing, advertisements, voice communication with vehicles nearby, _etc._) or assisted driving. Additionally, vehicles can be considered as distributed sensors that can collect environmental data (such as average speed, potholes, temperature, pollution, _etc._) and send a report to base stations. This infrastructure composed of the vehicles' sensors, GPS and OBUs, road sensor units (RSUs) and other sensors or actuators installed in traffic signals, is common to all of these applications. Similarly, some of the requirements, such as coordination, monitoring or security, are also common to all of the applications. In particular, the security needs of all of these applications are quite important, especially when dealing with safety-related services. In these cases, to know whether a node in the network is being uncooperative or malicious is really crucial to prevent intentionally wrong instructions being sent to a vehicle. Furthermore, these systems are very dynamic, and their contextual environment changes very frequently, so they need different security policies adapted to the changing situations. Additionally, the ITS infrastructure is composed of extremely heterogeneous devices where both the monitoring and the deployment and management of the security policies must be performed in different ways. In this paper, we illustrate these needs with a specific ITS application, a contextual speed advisor (CSA) application [16], where vehicles are informed about the speed they have to follow, taking into account the contextual environment. As shown in the scenario in Figure 3, this kind of application has the same common infrastructure as previously described, with sensors, OBUs, base stations, and so on. In this application, basically the base stations periodically receive the information from the sensors and other devices (e.g., the location of cars, information about crashes, traffic congestion or weather conditions). With this information, the base stations calculate the recommended speed for each vehicle on a certain stretch of road and send it to the vehicles (through the RSUs to the vehicle OBUs or to other user devices, such as smartphones). In the CSA scenario, avoiding malicious attacks is extremely important. For example, to indicate that the recommended speed is 100 kph when you have traffic congestion in the vicinity could causean accident. Therefore, the messages sent between the nodes and the base station must be properly encrypted, and all of the nodes must be trustworthy.