\documentclass[12pt]{amsart}
\pagestyle{plain}

\usepackage{amsthm, setspace, framed, hyperref}
\usepackage{enumerate}
\usepackage{fullpage}

\begin{document}

\noindent \textbf{Math 314 - Spring 2020 \hfill 
Name:} 
\hspace{2in} %Replace this line with your name!

\noindent \textbf{Mission 2} \hfill Due February 12 2020 \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{case} and \texttt{face} using the Hill cipher with $m=2$ and $K = \left(\begin{array}{cc}
6 & 9 \\
3 & 7 \\
\end{array}\right)$. 
		
	\begin{framed} 
	\vspace{2.3in}
	%Type your answer here!
	
	\end{framed}
	
	\pagebreak
	
    
\item Compute the inverse matrix (mod 26), or explain why it doesn't exist for each of the following matrices.
$A = \left(\begin{array}{cc}
2 & 3 \\
3 & 4 \\
\end{array}\right)$,
$B = \left(\begin{array}{cc}
5 & 7 \\
2 & 3 \\
\end{array}\right)$ 
$C = \left(\begin{array}{cc}
2 & 4 \\
1 & 6 \\
\end{array}\right)$
and 
$D = \left(\begin{array}{cc}
2 & 9 \\
3 & 7 \\
\end{array}\right)$
(Remember, you can't have any fractions modulo 26! All of your matrices should only contain numbers between 0 and 25.)
\begin{framed} 
	\vspace{3.8in}
	%Type your answer here!
	
\end{framed}


\item The ciphertext \texttt{WLNI} was encrypted by a Hill cipher with a $2 \times 2$ matrix.  The plaintext is \texttt{turn}.  Find the encryption matrix $M$.
		\begin{framed}
		\vspace{2.8in}
		\end{framed}


\item  \begin{enumerate}[a.]
\item Let $a,b,c,d,e,f$ be integers (mod 26).  Consider the following cipher. Given a block of plaintext $(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{wall}$ using the values:
	$(x,y)\left(\begin{array}{ll}
	 3&4\\
	 3&1\\
	\end{array}\right)+(2,11) \equiv (u,v) \pmod{26}$

	\begin{framed}
	\vspace{3in}
	\end{framed}

    
    \item Give a formula for decryption in terms of $a,b,c,d,e,f$.  
    	\begin{framed}
	\vspace{2.7in}
	\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}