\documentclass[12pt]{amsart}
\pagestyle{plain}
\usepackage{amsthm, setspace, framed, hyperref}
\usepackage{enumerate}
\usepackage{fullpage}
\begin{document}
\noindent \textbf{Math 314 - Fall 2018 \hfill
Name:}
\hspace{2in} %Replace this line with your name!
\noindent \textbf{Mission 2} \hfill Due September 17 2018 \vspace{-4mm}\\
\small \textit{There are two kinds of cryptography in this world: cryptography that will stop your kid sister from reading your files, and cryptography that will stop major governments from reading your files.}\\\vspace{1mm} \hfill--- Bruce Schneier
\vspace{-5mm}
\normalsize
\noindent \hrulefill
\begin{itemize}
\item All work must be shown for full credit.
\item You may use Sage to help you solve the problems. If you do, print out your code.
\item Either print out this assignment and write your answers on it, or edit the latex source and type your answers in the document. You must still show your work!
\item You may work with classmates, but be sure to turn in your own written solutions. Write down the name(s) of anyone who helps you.
\item Check one:\\
%You can put an x inside the framebox to "check" the box in latex for example: \framebox(12,12){x}
\framebox(12,12){} I worked with the following classmate(s):
\rule{7cm}{0.5pt}\\ %Replace this line with names of students.
\noindent\framebox(12,12){} I did not receive any help on this assignment.
\end{itemize}
\section{Graded Problems}
\begin{enumerate}[1.]
\item Decrypt the ciphertext \texttt{ERTWZSECXNPSWMEVTDR}, which was encrypted using the key \texttt{PAPER}.
\begin{framed}
\vspace{2in}
%Type your answer here!
\end{framed}
\item Encrypt the messages \texttt{cook} and \texttt{book} using the Hill cipher with $m=2$ and $K = \left(\begin{array}{cc}
2 & 5 \\
3 & 7 \\
\end{array}\right)$.
\begin{framed}
\vspace{2.3in}
%Type your answer here!
\end{framed}
\pagebreak
\item Determine which of the matrices
$A = \left(\begin{array}{cc}
2 & 9 \\
3 & 7 \\
\end{array}\right)$,
$B = \left(\begin{array}{cc}
5 & 7 \\
2 & 3 \\
\end{array}\right)$
$C = \left(\begin{array}{cc}
2 & 4 \\
3 & 6 \\
\end{array}\right)$
and
$D = \left(\begin{array}{cc}
5 & 11 \\
1 & 4 \\
\end{array}\right)$
are valid matrices for the Hill Cipher and find the decryption matrices for those that are. (Remember, you can't have any fractions modulo 26! All of your matrices should only contain numbers between 0 and 25.)
\begin{framed}
\vspace{7in}
%Type your answer here!
\end{framed}
\item The ciphertext \texttt{ELNI} was encrypted by a Hill cipher with a $2 \times 2$ matrix. The plaintext is \texttt{dont}. Find the encryption matrix $M$.
\begin{framed}
\vspace{4.8in}
\end{framed}
\item \begin{enumerate}[a.]
\item Let $a,b,c,d,e,f$ be integers $\pmod{26}$. Consider the following combination of the Hill and affine ciphers: represent a block of plaintext as a pair $(x,y) \pmod{26}$. The corresponding ciphertext $(u,v)$ is
$$(x,y)\left(\begin{array}{ll}
a&b\\
c&d\\
\end{array}\right)+(e,f) \equiv (u,v) \pmod{26}.$$
Encrypt the plaintext $\texttt{here}$ using the values below:
$$(x,y)\left(\begin{array}{ll}
3&4\\
3&1\\
\end{array}\right)+(8,11) \equiv (u,v) \pmod{26}$$
\pagebreak
\begin{framed}
\vspace{3.5in}
\end{framed}
\item Describe how to perform a chosen plaintext attack on this system (with the goal of finding the key $a,b,c,d,e,f$) State the plaintexts you chose and how to recover the key.
\begin{framed}
\vspace{3.4in}
\end{framed}
\end{enumerate}
\section{Recommended Exercises}
\noindent These will not be graded but are recommended if you need more practice.
\begin{itemize}
\item Section 2.13: \# 10, 13
\end{itemize}
\end{enumerate}
\end{document}