%%% CS 134 Homework
%%% Spring 2019

\documentclass[12pt]{article}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{etoolbox}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{afterpage}
\usepackage[margin = .75in]{geometry}
%%% Import any packages here. %%%



\newcommand{\Name}[1]{\noindent \textbf{Full Name:} #1 \\}
\newcommand{\Sources}[1]{\noindent \textbf{Sources:} #1 \\}
\newcommand{\Problem}[2]{\mbox{} \newline \noindent \textbf{\textbf{Problem #1: #2   \\}}}
\newcommand{\Homework}[1]{\noindent \textbf{Homework #1} \\}
\newcommand{\Due}[1]{\noindent \textbf{Due:} #1 \\}
\newcommand{\Statement}[1]{\noindent  #1  \hrule ~\\~\\}
\newcommand{\Answer}{\noindent \textbf{Solution:} }
\newcommand{\ID}[1]{\noindent \textbf{UCI ID Number:} #1 \\}
\newcommand{\Guidelines}{
~\\
\textbf{Guidelines: }
\begin{itemize}
\item Use any word processor (or handwrite and scan your answers). Upload your solutions \textbf{in PDF} to Gradescope.
\item No collaboration is allowed. The only people you may consult are the TA-s and the instructor.
\item Looking up, paraphrasing or copying answers from the Internet or other sources is not allowed;
doing so is a violation of academic honesty. You must cite any sources you use, e.g., reference books, Wikipedia, etc.
\end{itemize}
\textbf{Warning:} any submissions not following the above guidelines will receive a score of zero.
}
\newcommand{\Points}{
\begin{table}[!ht]
\centering
\begin{tabular}{| l | l | l | l |}
\hline
P1  & P2  & P3  & Total \\
\hline
~~~/40 & ~~~/30 & ~~~/30 & ~~~/100 \\
\hline
\end{tabular}
\end{table}
}

%%% Define any new commands here. %%%%

%%% End commands. %%%%%%%%%%%%%%%

\begin{document}

	\begin{center}
	\bf
	Fall 2019 \\	CS134: Computer and Network Security\\
	\Homework{3}
	\Due{12/04/19: 11:59pm}
	\end{center}


%%% Fill in your name, ID number, and sources here. %%%
\Name{} 
\ID{}
\Sources{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Guidelines
\Points
\pagebreak


\Problem{1}{Certificate Revocation Trees}
\Statement{
Suppose a certificate authority (CA) uses a Certificate Revocation Tree (CRT) to represent revoked certificates. The CA has issued a total of 500,000 certificates. Of those, 127 have been revoked. Assume that the ID of all revoked certificates are not continuous. 

Each time a CRT is issued or updated, the CA hands the CRT to an online server CRT-SRV. CRT-SRV is responsible for storing and answering queries about the most up-to-date CRT. Answer to the following questions.
\begin{enumerate}[label=(\alph*)]
    \item What is the height of the CRT?
    \item If another 128 certificates get revoked, how many hash computations does the CA have to do to update the CRL? Assume that: (1) All 128 revoked certificates' IDs are not continuous; and (2) The additional 128 certificates' IDs are larger than the 127 certificates that are already revoked.
\end{enumerate}
Suppose that Alice wants to check whether Bob's certificate is revoked. She queries CRT-SRV with Bob's certificate ID 43. Assume that Bob's certificate is not being revoked. Answer to the following questions.
\begin{enumerate}[label=(\alph*)]
    \setcounter{enumi}{2}
    \item How many elements are there in the co-path of the answer to the query?
    \item How does Alice determine whether Bob's certificate is revoked? \textbf{Limit your answer to 3 lines.}
\end{enumerate}
	\\
}
\Answer
%%%% Your answer here %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%

\pagebreak % Delete this line.
%%%%%%%%%%%%%%%%%%%%%%

\Problem{2}{Dining Cryptographers}
\Statement{Recall the \emph{Super-posed Sending} protocol described in the lecture slides. Answer the following questions:

\begin{enumerate}[label=(\alph*)]
    \item Given $n$ as the number of users in the network and $m$ as the length of the message being announced, what is the time complexity of the Super-posed sending algorithm for one user in terms of $m$ and $n$? (Assume the cost of communication between users is zero)
    \item Assume Eve and Charlie are Alice's neighbors. Eve and Charlie are able to collude off-line. How could they determine if Alice is the anonymous sender of the message? Assume the message is a one-bit '1' for simplicity. %Assume the network includes a sub-network of multiple malicious users (who are able to collude with each other off-line). What is the (worst-case) minimum number of users in this malicious sub-network required to determine if a user Alice was the anonymous sender? How would this attack work? Assume the message is a one-bit '1' for simplicity.
    \item Consider a user Eve who is participating in the network, and is not the anonymous sender. How could she prevent everyone else from seeing the message, while still being able to see the message herself? Assume everyone else in the network is honest. 
\end{enumerate}

\\
\noindent \textbf{NOTE:} You \textbf{must} justify all of your answers. \textbf{Limit your answers to 6 lines each.}\\
}
\Answer
%%%% Your answer here %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%

\pagebreak % Delete this line.
%%%%%%%%%%%%%%%%%%%%%%
\Problem{3}{Authentication Protocol}
\Statement{
Recall the authentication protocol in the lecture:

\begin{center}
    \includegraphics[width=12cm]{auth_protocol.png}
\end{center}


\begin{enumerate}[label=(\alph*)]
    \item Explain how an adversary (Eve) can perform a reflection attack to bypass this authentication protocol without knowing $K_{AB}$. Note that $K_{AB}$ was securely shared in the first place, and $r_a$ and $r_b$ are randomly generated on each challenge.   
    \item Present \textbf{TWO} ways to modify this authentication protocol in order to avoid the reflection attack. Write down the modified protocols in details and state your assumptions clearly.
\end{enumerate}

}
\Answer
%%%% Your answer here %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%

\pagebreak % Delete this line.
%%%%%%%%%%%%%%%%%%%%%%



\end{document}