---
# System prepended metadata

title: Time Synchronization
tags: [time, synchronization, materials]

---

# [Time synchronization for the safety of computer networks](https://www.hindawi.com/journals/jece/2016/6297476/)

 [TOC]
 
#  Материалы и статьи

## Cтатьи
- [ ] 1. [Protecting Clock Synchronization: Adversary Detection through Network Monitoring](https://www.hindawi.com/journals/jece/2016/6297476/)
- [Personal article](https://hackmd.io/WM3EPzP8S5mocbT--i2IYA)

- [ ] 2. [Clockwork UniChron API (beta)](https://www.clockwork.io/unichron/)
![](https://hackmd.io/_uploads/H1RC7LFfp.png)
- [ ] 3. [Intermittent Control for Synchronization of Discrete-Delayed Complex Cyber-Physical Networks under Mixed Attacks](
https://www.hindawi.com/journals/jcse/2022/9799958/#references)

![](https://hackmd.io/_uploads/BJg6O8YMp.png)

- [ ] 4. [The importance of network time synchronization in CMMC](
https://www.totem.tech/network-time-synchronization-cmmc/)
![](https://hackmd.io/_uploads/S1IL5LFf6.png)

- [ ] 5. [Узгодження стану розподіленої системи](https://hackmd.io/@ArthMax/КСМ3)
![](https://hackmd.io/_uploads/HkMG7PYzT.png)

## Видео
- [ ] 1.  [Beyond NTP: High-accuracy clocks for distributed observabality](https://youtu.be/WBgGFqozRlQ?si=XvYr0dHjlwKuem3M)
    {%youtube WBgGFqozRlQ%}
    
# Простые тестовые приложения
- [ ] 1. [Приклад використання tymesync](
 https://replit.com/join/wevfzaxnbz-arthmax)
![](https://hackmd.io/_uploads/ryqoGDtf6.png)
- [ ] 2. [Performance.now()](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now)
```javascript=1  
const t0 = performance.now();
 doSomething();
  const t1 = performance.now();
   console.log(`Call to doSomething took ${t1 - t0} milliseconds.`);
```

# Сервисы

 [ngrok](https://ngrok.com/)
 ![](https://hackmd.io/_uploads/rJMrfvKza.png)
 
 [zrok](https://zrok.io/)
 ![image](https://hackmd.io/_uploads/rktUaYwH6.png)



# Стандарты
[High Resolution Time](https://w3c.github.io/hr-time/#clock-resolution)
# Атаки с использованием высокоточного времени
[The Spy in the Sandbox – Practical Cache Attacks in Javascript](https://arxiv.org/pdf/1502.07373.pdf)

# Советы бота

To identify the precise left edge of a statistical distribution with a strict but unknown left edge of delays in a network channel using a sequence of current online minimums, you can employ the following online methods:

:::info
Recursive Minimum Tracking: Maintain a running record of the minimum delay encountered so far in the network channel. Continuously update this minimum value as new delays are observed. The point at which the minimum value stabilizes or stops decreasing significantly can indicate the left edge of the distribution.

Change Detection Algorithms: Utilize change detection algorithms, such as the CUSUM (cumulative sum) or Exponentially Weighted Moving Average (EWMA), to detect significant changes in the sequence of online minimum delays. Sudden shifts or persistent changes in the minimum values can suggest the presence of the left edge of the distribution.

Statistical Thresholding: Define a threshold based on a predefined statistical criterion, such as a certain number of standard deviations from the mean or a percentile value. Continuously compare the online minimum delays to this threshold. The point at which the minimum values consistently fall below the threshold can indicate the left edge of the distribution.

Bayesian Inference: Apply Bayesian methods to update the posterior distribution of the left edge as new minimum delay values are observed. Use prior knowledge or assumptions about the distribution, along with the likelihood of the observed minimums, to iteratively refine the estimation of the left edge.

Sequential Analysis: Utilize sequential analysis techniques, such as Sequential Probability Ratio Test (SPRT) or Sequential Change Point Detection, to analyze the sequence of online minimum delays. These methods allow for sequential decision-making, updating the estimation of the left edge as new data becomes available.
:::

# Стек протоколов

## Два  подхода к описанию стека сетевых протоколов 
![image](https://hackmd.io/_uploads/SJfXSxMRp.png)

## Протоколы сетевого взаимодействия (точка-точка)

![image](https://hackmd.io/_uploads/By9-IxfC6.png)










