\section{Security}

% -----------------------------------------------------------------
\begin{slide}{}

   \begin{sitem}
      \item Cryptography functions
      \begin{sitem}
         \item Secret key (e.g., DES)
         \item Public key (e.g., RSA)
         \item Message digest (e.g., MD5)
      \end{sitem}
      \item Security services
      \begin{sitem}
         \item Privacy: preventing unauthorized release of information
         \item Authentication: verifying identity of the remote participant
         \item Integrity: making sure message has not been altered
      \end{sitem}
   \end{sitem}
   \pichere{sec_tax.eps,height=2.5in}
\end{slide}
% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Encryption Algorithms}

   Private Key (DES)

   \pichere{secret.eps,height=1in}

   \begin{sitem}
      \item 64-bit key (56-bits + 8-bit parity)
      \item 16 rounds
   \end{sitem}
   \pichere{des1.eps,height=4in}
\end{slide}
% -----------------------------------------------------------------
\begin{slide}{}

   \begin{sitem}
      \item Each round
      \pichere{des2.eps,height=2in}
      \item Function F and generation of $K_i$ for each round not shown
      \item Repeat for larger messages
      \pichere{cbc.eps,height=2in}
   \end{sitem}
\end{slide}
% -----------------------------------------------------------------
\begin{slide}{}

   Public Key (RSA)

   \pichere{secret.eps,height=1in}      

   \begin{sitem}
      \item Generate a public and private key
      \begin{sitem}
         \item choose two large prime numbers $p$ and $q$ (each 256 bits)
         \item multiply $p$ and $q$ together to get $n$
         \item chose the encryption key $e$, such that $e$ and $(p-1)
               \times (q-1)$ are relatively prime. 
         \item two numbers are relatively prime if they have no common
               factor greater than one.
         \item compute decryption key $d$ such that 
               $$d = e^{-1} mod\ ((p-1) \times (q-1))$$
         \item construct public key as $\langle e, n \rangle$
         \item construct private key as $\langle d, n \rangle$
         \item discard (do not disclose) original primes $p$ and $q$
      \end{sitem}
      \item Encryption \& Decryption
         $$c = m^e mod\ n$$
         $$m = c^d mod\ n$$
   \end{sitem}
\end{slide}
% -----------------------------------------------------------------
\begin{slide}{}

   Message Digest

   \begin{sitem}
      \item Cryptographic checksum
      \begin{quote}
         just as a regular checksum protects the receiver from accidental 
         changes to the message, a cryptographic checksum protects the 
         receiver from malicious changes to the message.
      \end{quote}

      \item One-way function
      \begin{quote}
         given a cryptographic checksum for a message, it is virtually
         impossible to figure out what message produced that checksum; it is
         not computationally feasible to find two messages that hash to the
         same cryptographic checksum.
      \end{quote}

      \item Relevance
      \begin{quote}
         if you are given a checksum for a message and you
         are able to compute exactly the same checksum for that message,
         then it is highly likely this message produced the checksum 
         you were given.
      \end{quote}
   \end{sitem}
\end{slide}
% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Authentication Protocols}

   \begin{sitem}
      \item Three-way handshake
      \pichere{auth_twh.eps,height=2in}

      \item Trusted third party (Kerberos)
      \pichere{kerberos.eps,height=2in}

      \item Public key authentication
      \pichere{rsa_auth.eps,height=1.5in}

   \end{sitem}
\end{slide}
% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Message Integrity Protocols}

   \begin{sitem}
      \item Digital signature using RSA
      \begin{sitem}
         \item special case of a message integrity where the code can only
               have been generated by one participant
         \item compute signiture with private key and verify with public key
      \end{sitem}
      \item Keyed MD5
      \begin{sitem}
         \item sender
         \begin{quote}
            {\tt $m$ + MD5($m$ + $k$) + E($k$, {\it private})}
         \end{quote}
         \item receiver
         \begin{sitem} 
            \item recovers random key using the sender's public key
            \item applies MD5 to the concatenation of this random key message
            \item compares result with checksum sent with message
         \end{sitem}
      \end{sitem}
      \item MD5 with RSA signature
      \begin{sitem}
         \item sender
         \begin{quote}
            {\tt $m$ + MD5($m$) + E(MD5($m$), {\it private})}
         \end{quote}
         \item receiver
         \begin{sitem} 
            \item decrypts signature with sender's pubic key
            \item compares result with MD5 checksum sent with message
         \end{sitem}
      \end{sitem}
   \end{sitem}
\end{slide}