18.16: Cryptography
- Page ID
- 41810
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)1. \(\mathrm{ZLU ~ KZB ~ WWS ~ PLZ}\) 3. \(\mathrm{SHRED ~ EVIDENCE}\)
5. \(\mathrm{O2H ~ DO5 ~ HDV}\) 7. \(\mathrm{MERGER ~ ON}\)
9. \(\mathrm{MNI ~ YNE ~ TBA ~ AEH ~ RTA ~ TEA ~ TAI ~ LRE ~ A}\)
11. \(\mathrm{THE ~ STASH ~ IS ~ HIDDEN ~ AT ~ MARVINS ~ QNS}\)
13. \(\mathrm{UEM ~ IYN ~ IOB ~ WYL ~ TTL ~ N}\)
15. \(\mathrm{HIRE ~ THIRTY ~ NEW ~ EMPLOYEES ~ MONDAY}\)
17. \(\mathrm{ZMW ~ NDG ~ CDA ~ YVK}\)
19. a) \(3\) b) \(0\) c) \(4\)
21. We test out all \(n\) from 1 to 10
\(\begin{array}{|r|r|r|}
\hline \mathrm{n} & 4^{\mathrm{n}} & 4^{\mathrm{n}} \bmod 11 \\
\hline 1 & 4 & 4 \\
\hline 2 & 16 & 5 \\
\hline 3 & 64 & 9 \\
\hline 4 & 256 & 3 \\
\hline 5 & 1024 & 1 \\
\hline 6 & 4096 & 4 \\
\hline 7 & 16384 & 5 \\
\hline 8 & 65536 & 9 \\
\hline 9 & 262144 & 3 \\
\hline 10 & 1048576 & 1 \\
\hline
\end{array}\)
Since we have repeats, and not all values from 1 to 10 are produced (for example, there is no \(\left.n \text { is } 4^{n} \bmod 11=7\right)\), 4 is not a generator \(\bmod 11\).
23. \(157^{10} \bmod 5=(157 \bmod 5)^{10} \bmod 5=2^{10} \bmod 5=1024 \bmod 5=4\)
25. \(3^{7} \bmod 23=2\)
27. Bob would send \(5^{7}\) mod \(33=14\). Alice would decrypt it as \(14^{3} \bmod 33=5\)
31.
a. \(67^{8} \bmod 83=\left(67^{4} \bmod 83\right)^{2} \bmod 83=49^{2} \bmod 83=2401 \bmod 83=77\)
\(67^{16} \bmod 83=\left(67^{8} \bmod 83\right)^{2} \bmod 83=77^{2} \bmod 83=5929 \bmod 83=36\)
b. \(17000 \bmod 83=(100 \bmod 83)^{*}(170 \bmod 83) \bmod 83=(17)(4) \bmod 83=68\)
c. \(67^{5} \bmod 83=\left(67^{4} \bmod 83\right)(67 \bmod 83) \bmod 83=(49)(67) \bmod 83=3283 \bmod 83=46\)
d. \(67^{7} \bmod 83=\left(67^{4} \bmod 83\right)\left(67^{2} \bmod 83\right)(67 \bmod 83) \bmod 83=(49)(7)(67) \bmod 83=22981 \bmod 83=73\)
e. \(67^{24}=67^{16} 67^{8}\) so \(67^{24} \bmod 83=\left(67^{16} \bmod 83\right)\left(67^{8} \bmod 83\right) \bmod 83=(77)(36) \bmod 83=2272 \bmod 83 = 33\)