%!TEX root = clock_main.tex
\section[clocksync applications]{applications}

\begin{frame}\frametitle{Timing Consistency}
  \begin{block}{Cloud computing}
    \begin{itemize}
      \item Between globally distributed, multi-versioned databases
      \item Sub-millisecond accuracy
    \end{itemize}
  \end{block}
  \begin{block}{Financial Markets}
    \begin{itemize}
      \item Between buyers and sellers
      \item Sub-millisecond accuracy
    \end{itemize}
  \end{block}
  \begin{block}{Global Positioning}
  % Time and Navigation: The Untold Story of Getting from Here to There
  % Accuracy: 3 ns (1 m), 
  % https://www.gps.gov/systems/gps/control/
  % Onboard Ce Beam clocks: ~8 ns / day drift
  % http://www.best-microcontroller-projects.com/ppm.html
  \begin{itemize}
    \item Between satellites and receivers 
    \item Few nanosecond accuracy
  \end{itemize}
  \end{block}
  \note{
  So first of all, why do we care about clock synchronization?

  Maintaining timing consistency between geographically separated clocks is important for various infrastructure.
  % For eg., In the finance industry, synchronization is also required to maintain consistency between databases distributed throughout the network.

  For eg. in cloud computing, 
  it is required for synchronizing the versioning history of distributed servers 
  
  in finance, 
  it is required for buyers and sellers to agree on the same time-sensitive price,

  and in global positioning, 
  for sats and ground receivers to calculate transit times of GPS signals.

  % used for geolocation.
  For each application, 
  we want to achieve a certain synchronization accuracy:

  For GPS, order of a few ns accuracy is required for spatial accuracies of a meter. 
  % And since even atomic clocks typically drift 
  % a few ns per day, they have to be periodically synchronized as well. 
  % they have to be synchronized with the clocks on other satellites and with the receiver on the ground. 
  
  Ideally, we also want to synchronize securely, otherwise, 
  for e.g. in the case of GPS, 
  % timing signals are counterfeited and delayed, 
  counterfeited or delayed signals may result in misdirecting of ships and aircraft.
  % such as the capture and control of unmanned aircraft.
  }
\end{frame}

% \begin{frame}\frametitle{Clock Synchronization Tasks}
%   \begin{block}{\textcolor{gray}{Frequency Distribution}}
%     \begin{itemize}
%       \item\textcolor{gray}{Difference in ticking rates}
%     \end{itemize}
%   \end{block}
%   \begin{block}{Time Distribution}
%     \begin{itemize}
%       \item Offset at in instant in time
%     \end{itemize}
%   \end{block}
% \end{frame}
\begin{frame}{Synchronization of Remote Clocks\\\small{Distribution of Time and Frequency}}
\vspace*{-35pt}
  \begin{center}    
    \includegraphics[width=0.8 \textwidth]{images/classical_schematic/colocated_offset.eps}
    % http://www.best-microcontroller-projects.com/ppm.html
  \end{center} 
  % \includegraphics[width=\textwidth]{images/classical_schematic/many_clocks.jpeg}
  \note{
  A clock synchornization task requires two separated parties, 
  Alice and Bob to communicate and discover their clock error, delta, 
  which generally changes with time. 
  % when their clocks have different ticking rates.
  }
\end{frame}

\begin{frame}\frametitle{Time Distribution\\\small{One-Way Synchronization}}
  \begin{center}    
    \hspace*{35pt}\includegraphics[width=0.9 \textwidth]{images/classical_schematic/classical_concept.eps}
    \begin{align*}
    \Delta t_{AB} &= \frac{\text{Distance}}{c_n}\\[15pt]
    \delta &= t' - t - \Delta t_{AB}
    \end{align*}
  \end{center} 
\vfill
  \footnotetext[1]{arXiv:1710.05798 (2017)}
  \footnotetext[2]{e.g. Global Navigation Satelite Systems}
  \note{
  A simple one-way synchronization protocol consists of measuring the departure time t of a signal at Alice, and the arrival time t' at Bob.

  By removing the contribution of the propagation delay, tAB, the remaining time difference must be the clock error delta.
  }
\end{frame}

\begin{frame}{One-way Synchronization\\\small{Cannot Detect Delays}}
\begin{center}
\includegraphics[width=\textwidth]{images/classical_schematic/MITM.eps}
\vfill
  \begin{itemize}
    \item Bob unaware of additional delay $\rightarrow$ wrong $\delta$
    \vfill
    \item Cannot be prevented by Authentication or Cryptography!
    \vfill
    \item Security requires trusted value of $t_{AB}$
  \end{itemize}
\end{center}
\note{
  However, this simple scheme is vulnerable to a delay attack, where the propagation delay is unknowingly changed. 

  This causes Bob to account for the propagation time incorrectly and result in a sync error.
  % However, this simple scheme is vulnerable to a delay attack, where an unknown error tD is imposed on the offset by introducing a signal delay. 

  Obviously, this attack cannot be prevented by better authentication or encryption.

  Security then relies on having a previously measured, trusted value of the propagation delay,
  which is challenging for mobile parties.
  % While Alice can encrypt the information of t to prevent an adversary from modifying it,
  % there is an attack she cannot prevent.
  % If Eve creates a delay tD which Bob is unaware of, he will subtract the wrong delay and end up predicting the wrong offset.
  % Authenticated and encrypted signals pass through the delay unaffected and are not suitable countermeasures.
}
\end{frame}

% \begin{frame}{Detecting Delay Attacks\\\small{Monitoring Round-Trip Time}}
% \begin{center}
%   \includegraphics[width=0.9 \textwidth]{images/classical_schematic/RTT.eps}\\
%   \vfill
% Round-Trip Time $\sim 2 \times \frac{\text{Distance}}{c_n}$
% \vfill
% % \fbox{Requires Trustworthy Estimate of Distance}
% \fbox{Requires an Independent Measurement of Distance}
%   \footnotetext[1]{ \tiny Narula, L. and Humphreys, T., arXiv:1710.05798 (2017)}
%   \end{center}
% \note{
% A direct way of detecting a delay attack is to compare the RTT of the signal with an independent measurement of the physical separation.
% However, this is not always practical, as in the case of mobile parties.
% }
% \end{frame}

