# A Survey of Secure Time Synchronization
## 1 Introduction  
During industrial development, wireless sensor networks (WSNs) have rapidly replaced wired networks due to their advantages [1]. A WSN is a combination of spatially distributed nodes organized in a cooperative network to monitor and record physical and environmental conditions [2]. Nowadays, sensor networks are used in many different aspects of our life such as proving health care for elderly, surveillance, emergency disaster relief, and intelligence gathering in the battlefield [3]. Switching from wired networks to wireless networks has raised one key issue, i.e., security, since most of the effective security techniques for wired networks are not effective for wireless networks. Providing security in WSNs is challenging due to limited sensor node resources [4]. Current algorithms cannot provide correct results without secure, reliable, and accurate time synchronization [5]. There have been no protocols designed with security in mind, and therefore, it has become easy to execute attacks on time synchronization by following the protocol rules [6]. It is the nature of the corresponding protocols that makes them vulnerable to several types of security threats such as message manipulation attacks in which an attacker can inject corrupted messages into the network [7]. Time synchronization is critical in sensor networks because it provides accurate and secure localization, better duty cycling, beamforming, and other collaborative signal processing tasks [5]. One of the important features of wireless sensor networks is to provide smooth and lossless roaming from one station to another station, which is only possible if precise time information is available [8]. Furthermore, to find the exact geolocation, time synchronization is a key element. Similarly, during network synchronization, different procedures such as data transmission, frame computation, and protocol analysis and encapsulation can result in valuable delays depending on the hardware configuration and software flow, which may lead to confusion in time synchronization [9]. Time synchronization is a key element for data fusion, power management, positioning, future action coordination, event timestamping, and power duty cycling, in wireless sensor networks(WSNs) [9]. Wide use of wireless applications such as target tracking, environment monitoring, and scientific exploration in dangerous environments have attracted the attention of attackers to wireless sensor networks [3]. In addition, authors have indicated that to make these applications work accurately and reliably, the requirement of a common clock time for all sensor nodes is important. The need to limit energy consumption as well as computing and communication resources of nodes in a WSN make it a complex process to build an efficient protocol [10]. Moreover, hardware miniaturization and low-power designs have led to the development of small, battery-operated devices which are capable of detecting conditions such as temperature and sounds; however, miniaturization and low-power designs have limited the data processing and communication capabilities of sensors, making it complex to provide security in the protocol. The complexity in providing security makes a WSN vulnerable to many attacks such as masquerade attacks, replay attacks, message manipulation attacks, and delay attacks, which are the four main types of attacks [6; 10]. However, the attack processes are different on different protocols depending on the structure and design of the protocol [5]. For example, in the timing-sync protocol for secure networks (TPSN), a compromised node can claim to be the root node with the lowest ID 0 and start at the larger sequence number than the actual root node, which causes other nodes to follow the compromised node as the root node and to ignore updates from the actual root node [3]. Hence, the main purpose of all attacks on time synchronization is to somehow convince one or more of its neighbor nodes' clocks to be different from the actual clocks of the system.