\section[clocksync applications]{applications}

\begin{frame}\frametitle{Timing Consistency}
  \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 in our infrastructure.
  % For eg., In the finance industry, synchronization is also required to maintain consistency between databases distributed throughout the network.
  For eg. in transactions, buyers and sellers should agree on the same price at any time.
  For eg., in the case of global positioning, a few ns accuracy is required for spatial accuracies of a few meters. 
  And since even atomic clocks typically drift a few ns per day, they have to be synchronized with the clocks on other satellites and with the receiver on the ground. 

  Ideally, we want to do it securely, otherwise, the timing signal can be spoofed, or delayed, allowing an advesary to misdirect ships and aircraft.
  % such as the capture and control of unmanned aircraft.
  }
\end{frame}

% \begin{frame}\frametitle{Clock Synchronisation 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}{Synchronisation 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 Synchronisation}}
  \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]{ \tiny Narula, L. and Humphreys, T., arXiv:1710.05798 (2017)}
  \footnotetext[2]{ \tiny Used in 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, the remaining time difference must be the clock error delta.
  }
\end{frame}

\begin{frame}{One-way Synchronisation\\\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 an independent distance measurement
  \end{itemize}
\end{center}
\note{
  However, this simple scheme is vulnerable to delay attacks - an unknown error tD can be imposed on the measured offset by introducing a signal delay. 
  Obviously, this attack cannot be prevented by authentication or encryption.
  % 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}

