\documentclass[12pt]{amsart}
\pagestyle{plain}
\usepackage{amsthm, setspace, framed, hyperref}
\usepackage{enumerate}
\usepackage{fullpage}
\begin{document}
\noindent \textbf{Math 314 - Spring 2019 \hfill
Name:}
\hspace{2in} %Replace this line with your name!
\noindent \textbf{Mission 2} \hfill Due February 14 2019 \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} using the Vigenere cipher and key \texttt{PAPER}.
\begin{framed}
\vspace{2in}
%Type your answer here!
\end{framed}
\item Encrypt the messages \texttt{food} and \texttt{wood} 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 whether
$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. (All of your matrices should only contain numbers between 0 and 25.)
\begin{framed}
\vspace{3.65in}
%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{3.2in}
\end{framed}
\item Let $a,b,c,d,e,f$ be integers (mod 26). Consider this combination of the Hill and affine ciphers: write a block of plaintext as a pair $(x,y) \pmod{26}$. The ciphertext $(u,v)$ is
$$(x,y)\left(\begin{array}{ll}
a&b\\
c&d\\
\end{array}\right)+(e,f) \equiv (u,v) \pmod{26}.$$ \begin{enumerate}[a.]
\item Encrypt the plaintext $\texttt{here}$ using the key $(a,b,c,d,e,f)=(7,4,3,1,2,17)$:
\begin{framed}
\vspace{2.8in}
\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.0in}
\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, 24
\end{itemize}
\end{enumerate}
\end{document}