Crypto edits

This commit is contained in:
2024-10-17 21:09:13 -07:00
parent 386b83c83f
commit 8b10780fbe
7 changed files with 45 additions and 20 deletions

View File

@ -17,20 +17,19 @@ Find $\gcd(20, 14)$ by hand.
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$.
\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>
For any integers $a, b, c$, \par
$\gcd(ac + b, a) = \gcd(a, b)$
\problem{}
Compute the gcd of 12 and 976.
\begin{solution}
$976 = 3 \times 324 + 4 = 3 \times 4 \times 81 + 4$
So, $\gcd(a, b) = 4$
\end{solution}
\vfill
\problem{The Euclidean Algorithm}<euclid>
Using the two theorems above, detail an algorithm for finding $\gcd(a, b)$. \par
Then, compute $\gcd(1610, 207)$ by hand. \par