CoCalc Shared FilesHandouts / ClassNotes / notes911.tex
Views : 74
Description: Typed up notes from 9/11
1\documentclass[12pt,letterpaper,final]{report}
2\usepackage{amsmath}
3\usepackage{amsfonts}
4\usepackage{amssymb}
5\usepackage{amsthm}
6\usepackage[linewidth=1pt]{mdframed}
7\usepackage{fullpage}
8
9
10\begin{document}
11
12\begin{mdframed}
13
14\center{\Large{\textbf{MATH 314 Fall 2019 - Class Notes}}}
15\center{9/11/2019}  %Put the date of the class here!
17
18\end{mdframed}
19
20\textbf{\underline{Summary:}} Today's class covered the Hill cipher
21\\
22
23\textbf{Hill Cipher}\\
24\textbf{m-block size}\\
25\textbf{k-$m \times m$} matrix $mod{26}$}\\
26\textbf{(k has to have an inverse)}\\
27E($\dot{\vec{v}}$)=$\dot{\vec{v}}$k \\
28D($\dot{\vec{c}}$)=$\dot{\vec{c}}$k \\
29\textbf{Inverse of a $2 \times 2 \matrix} \ 30(mod{26}) \\ 31 32if k=$ \begin{smallmatrix}a&b\\c&d\end{smallmatrix}$($mod{26}$)\\ 33 34 35\textbf{Then k^{-1}$=(adbc)^{-1}  $\begin{smallmatrix}d&-b\\c&a\end{smallmatrix}$ ($mod{26}$)}\\
36
37\textbf{Determinant has to be a mod 26 value that is odd and not 13}\\
38\\
39\textbf{Gcd (det(k), 26)=1, 1 being the greatest factor they have in common.}\\
40\textbf{This is true for any hill cipher matrix k.}\\
41Find the inverse of
42$$$43 K= 44 \left[ {\begin{array}{cc} 45 4 & 1 \\ 46 3 & 10 \\ 47 \end{array} } \right] 48$$$
49\textbf{det(k)=$4\times 10$ -$1\times 3$=37=11 mod {26}}
50
51K^{-1}=(11)^{-1}=$\begin{smallmatrix}10&-1\\-3&4\end{smallmatrix}$\\
52
53$$$19\times 54 \left[ {\begin{array}{cc} 55 10 & 25 \\ 56 23 & 4 \\ 57 \end{array} } \right] mod{26} 58$$$
59$$$\equiv 60 \left[ {\begin{array}{cc} 61 19\times 10 & 19 \times 25 \\ 62 19\times 23 & 19\times 4 \\ 63 \end{array} } \right] mod{26} 64$$$
65 =$$$\equiv 66 \left[ {\begin{array}{cc} 67 8 & 7 \\ 68 21 & 24 \\ 69 \end{array} } \right] \in \textbf{Inverse} 70$$$
71
72
73
74\textbf{\underline{Chosen Plaintext attack}}\\
75\textbf{Suppose m=2}\\
76\textbf{Pick the plaintext} \enquote{"ba"}\textbf{$<$1,0$>$} \\
77\textbf{E($<1$,0$>$=$<$1,0$>$}
78$\begin{smallmatrix}a&b\\c&d\end{smallmatrix}$ = $<$a,b$>$ or $<$1,0$>$ ( Find the first row of k)}
79\\
80\\
81Encrypt \enquote{"a,b"}-  E($<$0,1$>$)=$<$0,1$>$ $\begin{smallmatrix}a&b\\c&d\end{smallmatrix}$
82\\Known plaintext attack\\
83Find the key using linear algebra\\
84Alice sends the ciphertext LIPVPI to Bob \\
8511,19,15,21,15,8 \\
86Eve learns this corresponds to \enquote{"linear"} \\
8711,19,15,21,15,8 \\
88Block size m=2\\
89$<$11,8$>$ k =$<$11,19$>$\\
90$<$13,4$>$k=$<$15,21$>$\\
91$<$0,17$>$k=$<$15,8$>$ $mod{26}$ \\
92\textbf{Matrix equation}
93$$$\left[ {\begin{array}{cc} 94 11 & 8 \\ 95 13 & 4 \\ 96 \end{array} } \right] k= 97 \left[{\begin{array}{cc} 98 11 & 19 \\ 99 15 & 21 \\ 100 \end{array} } \right 101] \\ 102Invert the first matrix (find the inverse to get k by itself) 103 104\[ 105 \left[ {\begin{array}{cc} 106 11 & 8 \\ 107 13 & 4 \\ 108 \end{array}} \right]^{-1} 109 = (44-104)^{-1} 110\left[{\begin{array}{cc} 111 4 & -8 \\ 112 -13 & 11 \\ 113 \end{array} } \right] 114$$$
115\textbf{(Even so not invertible)}\\
116
117\textbf{Try again!\\}
118\textbf{1st and 3rd equation\\}
119$$$120 \left[ {\begin{array}{cc} 121 11 & 8 \\ 122 0 & 17 \\ 123 \end{array} } \right] 124 k \equiv \left[ {\begin{array}{cc} 125 11 & 18\\ 126 15 & 8 \\ 127 \end{array} } \right] 128$$$
129\textbf{Invert this}
130$$$131 \left[ {\begin{array}{cc} 132 11 & 8 \\ 133 0 & 17 \\ 134 \end{array} } \right]^{-1}\equiv (11*17-8(0))^{-1} 135 \left[ {\begin{array}{cc} 136 17 & -8\\ 137 0 & 11 \\ 138 \end{array} } \right] 139 \equiv 5^{-1} \left[ {\begin{array}{cc} 140 17 & -8\\ 141 0 & 11 \\ 142 \end{array} } \right] 143$$$
144$$$145\equiv 21 \times 146 \left[ {\begin{array}{cc} 147 17 & 18\\ 148 0 & 11 \\ 149 \end{array} } \right] 150\equiv 151 \left[ {\begin{array}{cc} 152 19 & 14\\ 153 0 & 23 \\ 154 \end{array} } \right] 155$$$
156\textbf{Multiply both sides of equations on left!}
157$$$158 \left[ {\begin{array}{cc} 159 19 & 14\\ 160 0 & 23 \\ 161 \end{array} } \right] 162 \left[ {\begin{array}{cc} 163 11 & 8\\ 164 0 & 17 \\ 165 \end{array} } \right] k\equiv 166 \left[ {\begin{array}{cc} 167 19 & 14\\ 168 0 & 23 \\ 169 \end{array} } \right] 170 \left[ {\begin{array}{cc} 171 11 & 19\\ 172 15 & 8 \\ 173 \end{array} } \right] 174$$$
175Identity    \\
176\\
177$$$K\equiv 178 \left[ {\begin{array}{cc} 179 19 & 14\\ 180 0 & 17 \\ 181 \end{array} } \right] 182 \left[ {\begin{array}{cc} 183 11 & 19\\ 184 15 & 8 \\ 185 \end{array} } \right] 186$$$
187$$$\equiv 188 \left[ {\begin{array}{cc} 189 19(11)+14(15) & 19(19)+14(8)\\ 190 23(15) & 23(8) \\ 191 \end{array} } \right] 192$$$
193 $$$194 \equiv 195 \left[ {\begin{array}{cc} 196 1+2 & 23+8\\ 197 7 & 2 \\ 198 \end{array} } \right] 199$$$
200
201$$$202 \equiv 203 \left[ {\begin{array}{cc} 204 3 & 5\\ 205 7 & 2 \\ 206 \end{array} } \right]=k 207$$$
208
209\textbf{Key matrix has to be invertible }
210
211
212
213
214
215
216
217
218
219
220
221
222\end{document}\documentclass[12pt,letterpaper,final]{report}
223\usepackage{amsmath}
224\usepackage{amsfonts}
225\usepackage{amssymb}
226\usepackage{amsthm}
227\usepackage[linewidth=1pt]{mdframed}
228\usepackage{fullpage}
229
230
231\begin{document}
232
233\begin{mdframed}
234
235\center{\Large{\textbf{MATH 314 Spring 2018 - Class Notes}}}
236\center{10/14/2015}  %Put the date of the class here!
237\center{Scribe: Name} %Put Your Name Here!
238
239\end{mdframed}
240
241\textbf{\underline{Summary:}} Insert a short summary of what today's class covered.
242\\
243
244\textbf{\underline{Notes:}} Include detailed notes from the lecture or class activities.  Format your notes nicely using latex such as
245
246\begin{itemize}
247\item bullets
248\item or
249\end{itemize}
250
251\begin{enumerate}
252\item lists
253\item of
254\item things
255\end{enumerate}
256
257or \textbf{other} \underline{formatting} \textit{commands.} Make sure to write $e^{qu}a+i \circ \mathbb{N} s$ in math mode.
258\\
259
260\textbf{\underline{Examples:}}  If including plaintext or ciphertext or other data it is often helpful to write them using \texttt{typewriter text}.
261
262\end{document}