Merge branch 'master' of ssh://git.betalupi.com:33/Mark/ormc-handouts

This commit is contained in:
Mark 2023-05-03 22:23:29 -07:00
commit ecb259b229
5 changed files with 362 additions and 382 deletions

View File

@ -8,7 +8,6 @@
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{multicol}
\usepackage{subfiles}
\begin{document}
@ -19,14 +18,10 @@
{Intro to Cryptography}
{Prepared by Mark on \today{}}
\vspace{3ex}
\input{parts/part 1}
\input{parts/part 2}
\input{parts/part 3}
\subfile{parts/part 1}
\subfile{parts/part 2}
\subfile{parts/part 3}
\subfile{parts/challenge}
\input{parts/challenge}
\end{document}

View File

@ -1,7 +1,3 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Challenge Problems}
@ -72,6 +68,7 @@
\end{solution}
\vfill
\pagebreak
\problem{Chinese Remainder Theorem}
There are certain things whose number is unknown. If we count them by threes, we have two left over; by fives, we have three left over; and by sevens, two are left over. How many things are there?
@ -143,4 +140,3 @@
[Note on \ref{eua_runtime}] This proof can be used to show that the Euclidean algorithm finishes in logarithmic time, and it is the first practical application of the Fibonacci numbers. If you have finished all challenge problems, finish the proof: show that the Euclidean runs in $O(\log{n})$
\pagebreak
\end{document}

View File

@ -1,8 +1,3 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{The Euclidean Algorithm}
\definition{}
The \textit{greatest common divisor} of $a$ and $b$ is the greatest integer that divides both $a$ and $b$. \\
We denote this number with $\gcd(a, b)$. For example, $\gcd(45, 60) = 15$.
@ -25,10 +20,9 @@
\vfill
\problem{}<euclid_algorithm>
\problem{The Euclidean Algorithm}<euclid_algorithm>
Using the theorems above, detail an algorithm for finding $\gcd(a, b)$.\\
Then, compute $\gcd(1610, 207)$ by hand. \\
Have an instructor check your work before moving on.
\begin{solution}
Using \ref{gcd_abc} and the division algorthm,
@ -36,20 +30,20 @@
% Minipage prevents column breaks inside body
\begin{multicols}{2}
\begin{minipage}{\columnwidth}
$\gcd(1610, 207)$ \\
$= \gcd(207, 161)$ \\
$= \gcd(161, 46)$ \\
$= \gcd(46, 23)$ \\
$= \gcd(23, 0) = 23$ \\
$\gcd(1610, 207)$ \par
$= \gcd(207, 161)$ \par
$= \gcd(161, 46)$ \par
$= \gcd(46, 23)$ \par
$= \gcd(23, 0) = 23$ \par
\end{minipage}
\columnbreak
\begin{minipage}{\columnwidth}
$1610 = 207 \times 7 + 161$ \\
$207 = 161 \times 1 + 46$ \\
$161 = 46 \times 3 + 23$ \\
$46 = 23 \times 2 + 0$ \\
$1610 = 207 \times 7 + 161$ \par
$207 = 161 \times 1 + 46$ \par
$161 = 46 \times 3 + 23$ \par
$46 = 23 \times 2 + 0$ \par
\end{minipage}
\end{multicols}
\end{solution}
@ -73,8 +67,8 @@
\vfill
\problempart{Conquer}<extend_e_algorithm>
Using the output of your algorithm\footnotemark{} from \ref{euclid_algorithm},
\footnotetext{Your solution to \ref{euclid_algorithm} is called the \textit{Euclidean Algorithm}}
Using the output of the Euclidean algorithm,
\begin{itemize}
\item[-] find a pair $(u, v)$ that satisfies $20u + 14v = \gcd(20, 14)$
\item[-] find a pair $(u, v)$ that satisfies $541u + 34v = \gcd(541, 34)$ \\
@ -90,18 +84,18 @@
\begin{multicols}{2}
\begin{minipage}{\columnwidth}
\textit{Euclidean Algorithm:} \\
$20 = 14 \times 1 + 6$ \\
$14 = 6 \times 2 + 2$ \\
$6 = 2 \times 3 + 0$ \\
\textit{Euclidean Algorithm:} \par
$20 = 14 \times 1 + 6$ \par
$14 = 6 \times 2 + 2$ \par
$6 = 2 \times 3 + 0$ \par
\end{minipage}
\columnbreak
\begin{minipage}{\columnwidth}
\textit{Rearranged:} \\
$6 = 20 - 14 \times 1$ \\
$2 = 14 - 6 \times 2 = \gcd(20, 14)$ \\
\textit{Rearranged:} \par
$6 = 20 - 14 \times 1$ \par
$2 = 14 - 6 \times 2 = \gcd(20, 14)$ \par
\end{minipage}
\end{multicols}
@ -124,6 +118,8 @@
(See Part A)
\end{solution}
\vfill
\pagebreak
\end{document}

View File

@ -1,6 +1,3 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Modular Arithmetic}
\definition{}
@ -65,4 +62,4 @@
\vfill
\pagebreak
\end{document}

View File

@ -1,6 +1,3 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Symmetric Cryptosystems}
\definition{}
@ -30,7 +27,7 @@
\vspace{2ex}
Finally, you will notice that the encryption schemes that follow can only take a limited range of inputs. Indeed, even the cyphers in use today have a limited input size. A simple (though possible insecure) way to overcome this limitation is to split the message into ``blocks'' of a desired size, and encrypt each independently.
Finally, you will notice that the encryption schemes that follow can only take a limited range of inputs. Indeed, even the cyphers in use today have a limited input size. A simple (though possibly insecure) way to overcome this limitation is to split the message into blocks of a desired size, encrypting each independently.
@ -166,4 +163,3 @@
\vfill
\pagebreak
\end{document}