## 3 Related Work on Protection against Sybil Attacks
### B&SEBP&F Algorithm--Solution against Sybil Attack--Footprint  
The solution proposed in [6] is based on the timestamp and nodes credentials. A node (vehicle) drives through a crossroads every time with a given timestamp consisting of a current day and hour. As the node reaches another crossroads, its timestamp is renewed after verifying if it was feasible for the car to travel the given path at the specified speed.  
Each roadside unit (RSU) is responsible for sending vehicles within the range of the so-called tag link that contains information about RSU, vehicle position, and timestamp. It should be mentioned that the new timestamp must represent a certain period of time, selected taking into account the location of the RSU (e.g., 500 ms). To protect the network against the possibility of counterfeiting tags, it should be possible to verify its authenticity, e.g., by attaching a digital signature. In this way, the vehicle has a tag link string that describes the history of its movements.  
Thanks to the use of a link tag system, the network can easily detect the vehicles whose presence is fake. Since this attack is carried out by a physical device (vehicle) transmitting signals on behalf of other nonexistent vehicles, each fake device will also have a tag link chain to be able to confirm its identity for network communication purposes. Since having identical chains describing the vehicle's trajectory by two real vehicles is relatively small, it can be assumed that having chains with identical tags means that they are bogus vehicles, even if each device reveals its presence with a random delay. The course of communication between the vehicle and the RSU in order to certify its authenticity and receive the next tag could be seen as in the diagrams in Algorithm 5 and in Figures 6 and 7.  
```
Input: Vehicle, RSU Output: information update Data: Testing set vehicles
1 FunctionfootprintSybilAttack(vehicle_i_):
2 vehicle.sendLinkTagChain(\(RSU_{i}\));
3 rsu.checkTagAuthenticity(\(RSU_{i}\));
4 rsu.checkDbForidenticalChain(\(RSU_{i}\));
5 if attacker foundthen
6 rsu.informAboutAttacer(\(StationaryNetworkPoint_{k}\));
7 returnNewTag();
```  
**Algorithm 5**Communication between the vehicle and the RSU in order to certify its authenticity and receive the next tag--footprint during Sybil attack.  
The _StationaryNetworkPoint_ class (Figure 8) is responsible for generating tags for checking in passing vehicles. It also verifies whether the vehicles within the range have different chains. If they are identical, it marks all these vehicles as attackers--it is done by setting a flag on the program's vehicle object. In fact, such information should be propagated through the entire network. Events reported by vehicles marked as attackers are ignored.  
Figure 6: Footprint sequence diagram.  
Figure 7: Footprint activity diagram.  
The _Vehicle_ class has been equipped with methods allowing for interaction with the implemented tag system. The _SybilVehicle_ class, extending it, allows user to simulate an attacker pretending to be any number of vehicles. Internally, such an object has a list of vehicles that it pretends to register their presence in the system, thanks to which they can communicate with the environment (Figure 8).