\documentclass[11pt]{exam}
\newcommand{\myname}{Vecna}
\newcommand{\myemail}{vvecna@uwaterloo.ca}
\newcommand{\myhwtype}{Netsim}
\newcommand{\myhwnum}{Handout}
\newcommand{\myclass}{SPARCS}
\newcommand{\mylecture}{}
\newcommand{\mysection}{2024}

\date{2024 May 13}

% Prefix for numedquestion's
\newcommand{\questiontype}{}

% Use this if your "written" questions are all under one section
% For example, if the homework handout has Section 5: Written Questions
% and all questions are 5.1, 5.2, 5.3, etc. set this to 5
% Use for 0 no prefix. Redefine as needed per-question.
\newcommand{\writtensection}{0}

\usepackage{amsmath, amsfonts, amsthm, amssymb}  % Some math symbols
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[all]{xy}
\usepackage{wrapfig}
\usepackage{fancyvrb}
\usepackage[T1]{fontenc}
\usepackage{listings}

\usepackage{centernot}
\usepackage{mathtools}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\card}{\vert}{\vert}

% Uncomment the following line to get Solarized-themed source listings
% You will have had to already installed the solarized-light package
% https://github.com/jez/latex-solarized
%
%\usepackage{solarized-light}

\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt plus 1pt}
\pagestyle{empty}

\def\indented#1{\list{}{}\item[]}
\let\indented=\endlist

\newcounter{questionCounter}
\newcounter{partCounter}[questionCounter]

\newenvironment{namedquestion}[1][\arabic{questionCounter}]{%
    \addtocounter{questionCounter}{1}%
    \setcounter{partCounter}{0}%
    \vspace{.2in}%
    	\noindent{\bf \questiontype \; \arabic{questionCounter}. #1}%
    \vspace{0.3em} \hrule \vspace{.1in}%
}{}

\newenvironment{numedquestion}[0]{%
	\stepcounter{questionCounter}%
    \vspace{.2in}%
        \ifx\writtensection\undefined
        \noindent{\bf \questiontype \; \arabic{questionCounter}. }%
        \else
          \if\writtensection0
          \noindent{\bf \questiontype \; \arabic{questionCounter}. }%
          \else
          \noindent{\bf \questiontype \; \writtensection.\arabic{questionCounter} }%
        \fi
    \vspace{0.3em} \hrule \vspace{.1in}%
}{}

\newenvironment{alphaparts}[0]{%
  \begin{enumerate}[label=\textbf{(\alph*)}]
}{\end{enumerate}}

\newenvironment{arabicparts}[0]{%
  \begin{enumerate}[label=\textbf{\arabic{questionCounter}.\arabic*})]
}{\end{enumerate}}

\newenvironment{questionpart}[0]{%
  \item
}{}

\newcommand{\answerbox}[1]{
\begin{framed}
\vspace{#1}
\end{framed}}

\pagestyle{head}

\headrule
\header{\textbf{\myclass\ \mylecture\mysection}}%
{\textbf{\myname\ (\myemail)}}%
{\textbf{\myhwtype\ \myhwnum}}

\begin{document}
\thispagestyle{plain}
\begin{center}
  {\Large \myclass{} \myhwtype{} \myhwnum} \\
  \myname{} (\myemail{}) \\
  Cryptography, Security, and Privacy (CrySP) Research Group \\
  University of Waterloo \\
  2024 May 13
\end{center}

\begin{namedquestion}[Links]
	\begin{itemize}
		\item Netsim game: \url{https://vvecna.cs.uwaterloo.ca/netsim/}
		\item Backup link: \url{https://netsim.erinn.io/}
		\item Slides: \url{https://vvecna.cs.uwaterloo.ca/2024-uw-sparcs-netsim.pdf}
	\end{itemize}
\end{namedquestion}

\begin{namedquestion}[Goals]
	\begin{itemize}
		\item \textit{\textbf{Define}} the foundations of computer networks
		\item \textit{\textbf{Define}} security goals
		\item \textit{\textbf{Explore}} whether these security goals are accomplished on the Internet
		\item \textit{\textbf{Execute}} attacks against a (simulated) network
		\item \textit{\textbf{Identify}} real-world implications and defenses
	\end{itemize}
\end{namedquestion}

%\begin{namedquestion}[Outline]
%	\begin{itemize}
%		\item Networking background
%		\begin{itemize}
%			\item Introduction to networking/the Internet: \textbf{2 levels}
%			\item ICMP (ping): \textbf{3 levels}
%		\end{itemize}
%		\item Security goals (and how the Internet fails to accomplish them)
%		\begin{itemize}
%			\item What are our security goals?
%			\item Encryption: \textbf{1 level}
%			\item Attacks: \textbf{6 levels}
%		\end{itemize}
%		\item Real-world implications
%	\end{itemize}
%\end{namedquestion}

\begin{namedquestion}[Takeaways and Advice]
	\begin{itemize}
		\item The Internet was not designed with security in mind.
		\item The Internet's insecurity can be exploited for surveillance, censorship, and other bad things.
		\item Some things you can do:
		\begin{itemize}
			\item Encrypt your web traffic with HTTPS\footnote{\url{https://www.eff.org/deeplinks/2021/09/https-actually-everywhere}}
			\item Encrypt your private messages with Signal\footnote{\url{https://signal.org/}}
			\item Hide which sites you visit with Tor\footnote{\url{https://torproject.org/}}
			\item Help other people access Tor with Snowflake\footnote{\url{https://snowflake.torproject.org/}}
			\item Study cryptography, security, and/or privacy and work on problems that give people more privacy and security
		\end{itemize}
	\end{itemize}
\end{namedquestion}

\end{document}