\documentclass[12pt,letterpaper,final]{report}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[linewidth=1pt]{mdframed}
\usepackage{fullpage}
\begin{document}
\begin{mdframed}
\center{\Large{\textbf{MATH 314 Fall 2019 - Class Notes}}}
\center{9/11/2019}
\center{Scribe: Christine Adams}
\end{mdframed}
\textbf{\underline{Summary:}} Today's class covered the Hill cipher
\\
\textbf{Hill Cipher}\\
\textbf{m-block size}\\
\textbf{k-$m \times m$} matrix $mod{26}$}\\
\textbf{(k has to have an inverse)}\\
E($\dot{\vec{v}}$)=$\dot{\vec{v}}$k \\
D($\dot{\vec{c}}$)=$\dot{\vec{c}}$k \\
\textbf{Inverse of a $2 \times 2 \matrix} \
(mod{26}) \\
if k=$ \begin{smallmatrix}a&b\\c&d\end{smallmatrix}$ ($mod{26}$)\\
\textbf{Then k^{-1}$=(adbc)^{-1} $\begin{smallmatrix}d&-b\\c&a\end{smallmatrix}$ ($mod{26}$)}\\
\textbf{Determinant has to be a mod 26 value that is odd and not 13}\\
\\
\textbf{Gcd (det(k), 26)=1, 1 being the greatest factor they have in common.}\\
\textbf{This is true for any hill cipher matrix k.}\\
Find the inverse of
$$\[
K=
\left[ {\begin{array}{cc}
4 & 1 \\
3 & 10 \\
\end{array} } \right]
\]$$
\textbf{det(k)=$4\times 10$ -$1\times 3$=37=11 mod {26}}
K^{-1}=(11)^{-1}=$\begin{smallmatrix}10&-1\\-3&4\end{smallmatrix}$\\
$$\[19\times
\left[ {\begin{array}{cc}
10 & 25 \\
23 & 4 \\
\end{array} } \right] mod{26}
\]$$
$$\[\equiv
\left[ {\begin{array}{cc}
19\times 10 & 19 \times 25 \\
19\times 23 & 19\times 4 \\
\end{array} } \right] mod{26}
\]$$
=$$\[\equiv
\left[ {\begin{array}{cc}
8 & 7 \\
21 & 24 \\
\end{array} } \right] \in \textbf{Inverse}
\]$$
\textbf{\underline{Chosen Plaintext attack}}\\
\textbf{Suppose m=2}\\
\textbf{Pick the plaintext} \enquote{"ba"}\textbf{$<$1,0$>$} \\
\textbf{E($<1$,0$>$=$<$1,0$>$}
$\begin{smallmatrix}a&b\\c&d\end{smallmatrix}$ = $<$a,b$>$ or $<$1,0$>$ ( Find the first row of k)}
\\
\\
Encrypt \enquote{"a,b"}- E($<$0,1$>$)=$<$0,1$>$ $\begin{smallmatrix}a&b\\c&d\end{smallmatrix}$
\\Known plaintext attack\\
Find the key using linear algebra\\
Alice sends the ciphertext LIPVPI to Bob \\
11,19,15,21,15,8 \\
Eve learns this corresponds to \enquote{"linear"} \\
11,19,15,21,15,8 \\
Block size m=2\\
$<$11,8$>$ k =$<$11,19$>$\\
$<$13,4$>$k=$<$15,21$>$\\
$<$0,17$>$k=$<$15,8$>$ $mod{26}$ \\
\textbf{Matrix equation}
$$\[ \left[ {\begin{array}{cc}
11 & 8 \\
13 & 4 \\
\end{array} } \right] k=
\left[{\begin{array}{cc}
11 & 19 \\
15 & 21 \\
\end{array} } \right
]$$ \\
Invert the first matrix (find the inverse to get k by itself)
$$\[
\left[ {\begin{array}{cc}
11 & 8 \\
13 & 4 \\
\end{array}} \right]^{-1}
= (44-104)^{-1}
\left[{\begin{array}{cc}
4 & -8 \\
-13 & 11 \\
\end{array} } \right]
\]$$
\textbf{(Even so not invertible)}\\
\textbf{Try again!\\}
\textbf{1st and 3rd equation\\}
$$\[
\left[ {\begin{array}{cc}
11 & 8 \\
0 & 17 \\
\end{array} } \right]
k \equiv \left[ {\begin{array}{cc}
11 & 18\\
15 & 8 \\
\end{array} } \right]
\]$$
\textbf{Invert this}
$$\[
\left[ {\begin{array}{cc}
11 & 8 \\
0 & 17 \\
\end{array} } \right]^{-1}\equiv (11*17-8(0))^{-1}
\left[ {\begin{array}{cc}
17 & -8\\
0 & 11 \\
\end{array} } \right]
\equiv 5^{-1} \left[ {\begin{array}{cc}
17 & -8\\
0 & 11 \\
\end{array} } \right]
\]$$
$$\[
\equiv 21 \times
\left[ {\begin{array}{cc}
17 & 18\\
0 & 11 \\
\end{array} } \right]
\equiv
\left[ {\begin{array}{cc}
19 & 14\\
0 & 23 \\
\end{array} } \right]
\]$$
\textbf{Multiply both sides of equations on left!}
$$\[
\left[ {\begin{array}{cc}
19 & 14\\
0 & 23 \\
\end{array} } \right]
\left[ {\begin{array}{cc}
11 & 8\\
0 & 17 \\
\end{array} } \right] k\equiv
\left[ {\begin{array}{cc}
19 & 14\\
0 & 23 \\
\end{array} } \right]
\left[ {\begin{array}{cc}
11 & 19\\
15 & 8 \\
\end{array} } \right]
\]$$
Identity \\
\\
$$\[K\equiv
\left[ {\begin{array}{cc}
19 & 14\\
0 & 17 \\
\end{array} } \right]
\left[ {\begin{array}{cc}
11 & 19\\
15 & 8 \\
\end{array} } \right]
\]$$
$$\[\equiv
\left[ {\begin{array}{cc}
19(11)+14(15) & 19(19)+14(8)\\
23(15) & 23(8) \\
\end{array} } \right]
\]$$
$$\[
\equiv
\left[ {\begin{array}{cc}
1+2 & 23+8\\
7 & 2 \\
\end{array} } \right]
\]$$
$$\[
\equiv
\left[ {\begin{array}{cc}
3 & 5\\
7 & 2 \\
\end{array} } \right]=k
\]$$
\textbf{Key matrix has to be invertible }
\end{document}\documentclass[12pt,letterpaper,final]{report}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[linewidth=1pt]{mdframed}
\usepackage{fullpage}
\begin{document}
\begin{mdframed}
\center{\Large{\textbf{MATH 314 Spring 2018 - Class Notes}}}
\center{10/14/2015}
\center{Scribe: Name}
\end{mdframed}
\textbf{\underline{Summary:}} Insert a short summary of what today's class covered.
\\
\textbf{\underline{Notes:}} Include detailed notes from the lecture or class activities. Format your notes nicely using latex such as
\begin{itemize}
\item bullets
\item or
\end{itemize}
\begin{enumerate}
\item lists
\item of
\item things
\end{enumerate}
or \textbf{other} \underline{formatting} \textit{commands.} Make sure to write $e^{qu}a+i \circ \mathbb{N} s$ in math mode.
\\
\textbf{\underline{Examples:}} If including plaintext or ciphertext or other data it is often helpful to write them using \texttt{typewriter text}.
\end{document}