Cryptography edits

This commit is contained in:
mark 2023-08-30 15:27:07 -07:00
parent bc43a4ecce
commit 366f79f3d4
3 changed files with 22 additions and 7 deletions

View File

@ -2,7 +2,8 @@
% use [solutions] flag to show solutions. % use [solutions] flag to show solutions.
\documentclass[ \documentclass[
solutions, solutions,
singlenumbering singlenumbering,
shortwarning
]{../../resources/ormc_handout} ]{../../resources/ormc_handout}
\usepackage{multicol} \usepackage{multicol}

View File

@ -13,10 +13,20 @@ Find $\gcd(20, 14)$ by hand.
\vfill \vfill
\theorem{The Division Algorithm} \theorem{The Division Algorithm}<divalgo>
Given two integers $a, b$, we can find two integers $q, r$, where $0 \leq r < b$ and $a = qb + r$. \par Given two integers $a, b$, we can find two integers $q, r$, where $0 \leq r < b$ and $a = qb + r$. \par
In other words, we can divide $a$ by $b$ to get $q$ remainder $r$. In other words, we can divide $a$ by $b$ to get $q$ remainder $r$.
\begin{instructornote}
\ref{divalgo} looks scary on paper, but it's quite simple. \par
Doing a small example on the board (like $14 \div 3$) may be a good idea. \par
\vspace{2mm}
For those that are new to modular arithmetic, you may want to explain how remainders,
clock-face counting, division algorithm, and modular arithmetic are all the same.
\end{instructornote}
\theorem{}<gcd_abc> \theorem{}<gcd_abc>
For any integers $a, b, c$, \par For any integers $a, b, c$, \par
$\gcd(ac + b, a) = \gcd(a, b)$ $\gcd(ac + b, a) = \gcd(a, b)$
@ -64,7 +74,12 @@ Using the output of the Euclidean algorithm,
% gcd = 1 % gcd = 1
% u = 11; v = -175 % u = 11; v = -175
\end{itemize} \end{itemize}
This is called the \textit{extended Euclidean algorithm}. This is called the \textit{extended Euclidean algorithm}. \par
\hint{
You don't need to fully solve the last part of this question. \\
Understand how you \textit{would} do it, then move on.
Don't spend too much time on arithmetic.
}
%For which numbers $c$ can we find a $(u, v)$ so that $541u + 34v = c$? \\ %For which numbers $c$ can we find a $(u, v)$ so that $541u + 34v = c$? \\
%For every such $c$, what are $u$ and $v$? %For every such $c$, what are $u$ and $v$?

View File

@ -4,11 +4,11 @@
$\mathbb{Z}_n$ is the set of integers mod $n$. For example, $\mathbb{Z}_5 = \{0, 1, 2, 3, 4\}$. \par $\mathbb{Z}_n$ is the set of integers mod $n$. For example, $\mathbb{Z}_5 = \{0, 1, 2, 3, 4\}$. \par
\problem{} \problem{}
Create a multiplication addition table for $\mathbb{Z}_4$: Create a multiplication table for $\mathbb{Z}_4$:
\begin{center} \begin{center}
\begin{tabular}{c | c c c c} \begin{tabular}{c | c c c c}
+ & 0 & 1 & 2 & 3 \\ \times & 0 & 1 & 2 & 3 \\
\hline \hline
0 & ? & ? & ? & ? \\ 0 & ? & ? & ? & ? \\
1 & ? & ? & ? & ? \\ 1 & ? & ? & ? & ? \\
@ -36,8 +36,7 @@ $a$ has an inverse in $\mathbb{Z}_n$ iff $\gcd(a, n) = 1$ \par
\problem{} \problem{}
Find the inverse of $3$ in $\mathbb{Z}_4$, if one exists. \par Find the inverse of $3$ in $\mathbb{Z}_4$, if one exists. \par
Find the inverse of $20$ in $\mathbb{Z}_{14}$, if one exists. \par Find the inverse of $20$ in $\mathbb{Z}_{14}$, if one exists. \par
Find the inverse of $2$ in $\mathbb{Z}_5$, if one exists. Find the inverse of $4$ in $\mathbb{Z}_7$, if one exists.
%$34^\star \equiv -175 \equiv 366 \pmod{541}$.
\vfill \vfill