# A Survey of Secure Time Synchronization
## 3 Current Time Synchronization Methods
### Lightweight Time Synchronization (LTS) Protocol  
The main focus of the lightweight time synchronization (LTS) protocol is to minimize the energy cost by reducing overhead while it remains robust and self-configuring [49]. Lightweight time synchronization (LTS) builds a tree structure within the network to provide network-wide synchronization. The main function of the protocol is that it continues to work effectively even if there is a node failure. It aims to maximize the accuracy while minimizing the complexity of the synchronization and the use of computational resources. It is assumed that the required accuracy in sensor networks is low; therefore, it is appropriate to use a lightweight synchronization scheme [50]. However, in some applications such as measuring the time-of-flight of sound, distributing an acoustic beamforming, landslide detection, natural disaster prevention, and detecting fire in a forest, high precision time synchronization is required. In addition, in a larger network, the accuracy of synchronization decreases linearly, for example, from the root node towards the leaf node, accuracy decreases [34]. Figure 7 explains how LTS synchronization is performed. The LTS pairwise synchronization protocol uses a remote clock reading technique to synchronize two neighbor nodes [49]. For example, node \(i\) wants to synchronize its clock with node \(j\). Node \(i\) sends a synchronization request message and when synchronization is triggered the message is time stamped with \(C_{i}(t_{1})\). After random access medium access delay, node \(i\) sends the packet at time \(t_{2}\) and node \(j\) receives it at time \(t_{3}=t_{2}+\tau+t_{p}\), where \(\tau\) is the propagation delay and \(t_{p}\) is the packet transmission time. At time \(t_{4}\), the packet arrival is signaled by an interruption and timestamped at \(t_{5}\) with \(C_{j}(t_{5})\) which is followed by an answer packet time stamped with \(C_{j}(t_{6})\) at time \(t_{6}\) (also includes previous timestamps \(C_{j}(t_{5})\) and \(C_{i}(t_{1})\)) [51]. Node \(i\) receives the answer packet at \(t_{7}\) and time stamps it with \(C_{i}(t_{8})\) at time \(t_{8}\). Node \(i\) assumes that there is no clock drift between \(t_{1}\) and \(t_{8}\), \(O=\Delta(t^{*})\) for all \(t^{*}\in[t_{1},t_{8}]\) and estimates offset \(O\) by estimating \(\Delta(t_{5})\) in the following way:  
\[O=\Delta(t_{5}):=C_{i}(t_{5})-C_{j}(t_{5}) \tag{10}\]  
However, \(t_{5}\) is unknown between \(t_{1}\) and \(t_{8}\). Uncertainty can be reduced, as we can analyze from the figure given above that there is propagation \(\tau\) and transmission time tp between \(t_{1}\) and \(t_{5}\) and also between \(t_{5}\) and \(t_{8}\). We assume it is the same in both directions. Since we have \(t_{5}\) and \(t_{6}\), we can obtain the difference by \(C_{j}(t_{6})\)-\(C_{j}(t_{5})\). We also assume that the operating system, channel access, interruption, and medium access delay are also the same in both directions as shown in Figure 7. Therefore, \(C_{j}(t_{5})\) is generated at time:  
\[C_{i}(t_{5})=\frac{C_{i}(t_{1})+\tau+t_{p}+C_{i}(t_{8})-\tau-t_{p}-\left(C_{j} (t_{6})-C_{j}(t_{5})\right)}{2} \tag{11}\]  
Therefore, the offset \(O\) is:  
\[ \begin{array}{l}o=\Delta(t_{5})=C_{i}(t_{5})-C_{j}(t_{5})\\ =\frac{C_{i}(t_{8})+C_{i}(t_{1})-C_{i}(t_{6})-C_{j}(t_{5})}{2}\end{array}  \tag{12}\]  
Node \(i\) can adjust its clock by adding offset \(O\), it took only two packets to synchronize node \(i\) and node \(j\). A third packet from node \(i\) to node \(j\) can be used, including \(O\), if the goal is to let node \(j\) know about offset [51]. Figure 7: LTS pairwise synchronization. After providing pairwise synchronization, the LTS protocol solves the synchronization of all the nodes with the reference node. Two different approaches are proposed for this purpose, i.e., a centralized approach and a distributed approach [49]. In the centralized approach, a spanning tree is constructed, and then the nodes are synchronized [44].